Quick Search:

View

Revision:

Diff

Diff from 1850 to:

Annotations

Annotate by Age | Author | Mixed | None
/fisheye/browse/osCommerce/branches/hpdl/oscommerce/admin/includes/applications/administrators/classes/rpc.php

Annotated File View

hpdl
1850
1 <?php
2 /*
3   $Id: rpc.php 1850 2009-02-28 03:07:56Z hpdl $
4
5   osCommerce, Open Source E-Commerce Solutions
6   http://www.oscommerce.com
7
8   Copyright (c) 2009 osCommerce
9
10   This program is free software; you can redistribute it and/or modify
11   it under the terms of the GNU General Public License v2 (1991)
12   as published by the Free Software Foundation.
13 */
14
15   require('includes/classes/administrators.php');
16
17   class osC_Administrators_Admin_rpc {
18     public static function getAll() {
19       if ( !isset($_GET['search']) ) {
20         $_GET['search'] = '';
21       }
22
23       if ( !isset($_GET['page']) || !is_numeric($_GET['page']) ) {
24         $_GET['page'] = 1;
25       }
26
27       if ( !empty($_GET['search']) ) {
28         $result = osC_Administrators_Admin::find($_GET['search'], $_GET['page']);
29       } else {
30         $result = osC_Administrators_Admin::getAll($_GET['page']);
31       }
32
33       $result['rpcStatus'] = RPC_STATUS_SUCCESS;
34
35       echo json_encode($result);
36     }
37   }
38 ?>