case "copy_process": copyDocumentProcess($cid); break; case "remove": removeDocument($cid); break; case "apply": case "save": saveDocument(); break; case "cancel": cancelDocument(); break; case "download": $bid = JRequest::getInt('bid', 0); downloadDocument($bid); break; case "show": default: showDocuments($pend, $sort, 0); } function showDocuments($pend, $sort, $view_type) { global $_DOCMAN; require_once $_DOCMAN->getPath('classes', 'utils'); global $option, $section; global $section, $menutype; $database = JFactory::getDBO(); $mainframe = JFactory::getApplication(); $limit = $mainframe->getCfg('list_limit'); $catid = $mainframe->getUserStateFromRequest("catidarc{option}{$section}", 'catid', 0);
function request() { global $app; $httprequest = new Phalcon\Http\Request(); $datain = $httprequest->get(); $data = array(); foreach ($datain as $key => $value) { $data[strtolower($key)] = $value; } $filter = new \Phalcon\Filter(); $request = $filter->sanitize($data["request"], array("string", "lower")); $response = null; switch ($request) { case "getcapabilities": $response = getCapabilities(); break; case "describefeaturetype": $response = describeFeatureType($data); break; case "getfeatures": $response = getFeatures($data); break; case "delete": $response = delete($data); break; case "create": $response = create($data); break; case "update": $response = update($data); break; case "transaction": $response = transaction($data); break; /* For grouping*/ /* For grouping*/ case "getassoclayers": $response = getAssocLayers($data); break; case "getgrouping": $response = getGrouping($data); break; case "describegrouping": $response = describeGrouping($data); break; case "creategrouping": $response = createGrouping($data); break; case "updategrouping": $response = updateGrouping($data); break; case "deletegrouping": $response = deleteGrouping($data); break; case "getFeaturesFk": $response = getFeaturesFk($data); break; case "duplicategrouping": $response = duplicateGrouping($data); break; case "associatedocument": $response = associateDocument($data); break; case "deletedocument": $response = deleteDocument($data); break; case "downloaddocument": $response = downloadDocument($data); echo $response; break; case "getdocumentlist": $response = getDocumentList($data); break; case "getdocumentdescription": $response = getDocumentDescription($data); break; default: $response = false; break; } $app->response->setContentType('application/json; charset=UTF-8')->sendHeaders(); echo json_encode($response); }