getAppGridData( $userUid, $start, $limit, $action, $filter, $search, $process, $user, //delete $status, $type, $dateFrom, $dateTo, $callback, $dir, $sort ); $result = G::json_encode($data); } else { G::LoadClass("applications"); switch ($action) { case "search": case "to_reassign": $user = ($user == "CURRENT_USER")? $userUid : $user; $userUid = $user; break; default: break; } $apps = new Applications(); $data = $apps->getAll( $userUid, $start, $limit, $action, $filter, $search, $process, $status, $type, $dateFrom, $dateTo, $callback, $dir, $sort, $category ); $result = G::json_encode($data); } echo $result; } catch (Exception $e) { $msg = array("error" => $e->getMessage()); echo G::json_encode($msg); }