Пример #1
0
         $mode = OUTPUT_XML_MODE;
 }
 if ($mode != OUTPUT_LIST_MODE) {
     if (!isset($req->props[$argument])) {
         throw new ADEIException(translate("The view should be specified"));
     }
     $view_name = $req->props[$argument];
     if (!isset($modules[$view_name])) {
         throw new ADEIException(translate("Invalid view (%s) is specified", $view_name));
     }
 }
 switch ($req->props['target']) {
     case 'list':
         $list = array();
         foreach ($modules as $v => $info) {
             $view = $req->CreateView($info['handler'], $info['opts']);
             if ($view->IsApplicable()) {
                 array_push($list, array("value" => $v, "name" => isset($info['title']) ? $info['title'] : $view->title));
             }
         }
         break;
         /*	case 'update_options':
         	    $xslt = strtolower($view_name) . "_form";
                     $xslt_file = $ADEI->GetXSLTFile($xslt);
                     if (!file_exists($xslt_file)) $xslt = "forms";
             
                     $query = $req->GetQueryString(array("target"=>"get_options"));
                     $json = array(
         	        "xml" => "services/view.php?$query",
         	        "xslt" => $xslt
                     );