Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Request URL:http://localhost/service/destroy/news.php?_dc=1357565811429
- Request Method:POST
- Status Code:200 OK
- Query String Parameters:
- _dc:1357565811429
- Request Payload:
- {"items":{"id":5}}
- Request URL:http://localhost/service/update/news.php?_dc=1357566047052
- Request Method:POST
- Status Code:200 OK
- Query String Parameters:
- _dc:1357566047052
- Request Payload:
- {"items":{"datepubl":"2012-12-01T00:00:00","title":"the Update Plan","alias":"the-update-plan","new":"<p>small text new</p>","newfull":"<p>full text new</p>","id":4}}
- Request URL:http://localhost/service/create/news.php?_dc=1357566179903
- Request Method:POST
- Status Code:200 OK
- Query String Parameters:
- _dc:1357566179903
- Request Payload:
- {"items":{"id":0,"datepubl":null,"dateclose":null,"title":"the NEW new","alias":"the-new-new","new":"text the NEW new","newfull":""}}
- var storeNews = Ext.create('Ext.data.Store', {
- autoLoad: true,
- autoSync: true,
- idProperty: 'id',
- remoteFilter: true,
- fields: [
- { name: 'id', type: 'int' },
- { name: 'datepubl', type: 'date' },
- { name: 'dateclose', type: 'date' },
- { name: 'title', type: 'string' },
- { name: 'alias', type: 'string' },
- { name: 'new', type: 'string' },
- { name: 'newtext', type: 'string' }
- ],
- proxy: {
- type: 'ajax',
- api: {
- read: 'service/view/news.php',
- create: 'service/create/news.php',
- update: 'service/update/news.php',
- destroy: 'service/destroy/news.php'
- },
- reader: {
- type: 'json',
- successProperty: 'success',
- root: 'data',
- messageProperty: 'message'
- },
- writer: {
- type: 'json',
- writeAllFields: false,
- root: 'data'
- },
- listeners: {
- exception: function(proxy, response, operation){
- Ext.MessageBox.show({
- title: 'REMOTE EXCEPTION',
- msg: operation.getError(),
- icon: Ext.MessageBox.ERROR,
- buttons: Ext.Msg.OK
- });
- }
- }
- }
- });
- $data = json_decode(file_get_contents('php://input'));
- print( json_encode( $data ) );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement