Beispiel #1
0
 /**
  * @param string $action
  * @return string
  */
 public static function get_data_browser_link_html_and_button_handler($action)
 {
     global $regional;
     $html;
     $html_caption;
     $button_handler;
     $button_handler_caption;
     $template;
     $paramquery = $_GET;
     unset($paramquery['run']);
     switch ($action) {
         case "parameter_delete":
             if (isset($_POST['sure'])) {
                 self::delete($_POST['parameter_id']);
             } else {
                 $template = new HTMLTemplate("data/parameter_delete_window.html");
                 $button_handler_template = new JSTemplate("data/js/parameter_delete_window.js");
                 $button_handler_template->set_var("session_id", $_GET['session_id']);
                 $button_handler_template->set_var("parameter_id", $_POST['parameter_id']);
                 $button_handler = $button_handler_template->get_string();
                 $button_handler_caption = "Delete";
                 $html_caption = "Delete Parameter";
                 $html = $template->get_string();
             }
             break;
         case "permission":
             require_once "data.ajax.php";
             if (isset($_POST['permissions'])) {
                 $success = DataAjax::change_permission(json_decode($_POST['permissions']), "Parameter");
                 return $success;
             } else {
                 $permission = DataAjax::permission_window();
                 $button_handler_template = new JSTemplate("data/js/parameter_permission_window.js");
                 $button_handler_template->set_var("session_id", $_GET['session_id']);
                 $button_handler_template->set_var("parameter_id", $_POST['parameter_id']);
                 $button_handler = $button_handler_template->get_string();
                 $button_handler_caption = "Change";
                 $html_caption = "Change permission";
                 $html = $permission;
             }
             break;
     }
     $array = array("content" => $html, "content_caption" => $html_caption, "handler" => $button_handler, "handler_caption" => $button_handler_caption);
     return json_encode($array);
 }
Beispiel #2
0
 /**
  * @param string $action
  * @return string
  */
 public static function get_data_browser_link_html_and_button_handler($action)
 {
     $html;
     $html_caption;
     $button_handler;
     $button_handler_caption;
     $template;
     $paramquery = $_GET;
     unset($paramquery['run']);
     switch ($action) {
         case "file_update":
             $unique_id = uniqid();
             $paramquery['unique_id'] = $unique_id;
             $paramquery['file_id'] = $_POST['file_id'];
             $params = http_build_query($paramquery, '', '&');
             $template = new HTMLTemplate("data/file_update_window.html");
             $template->set_var("params", $params);
             $template->set_var("unique_id", $unique_id);
             $template->set_var("session_id", $_GET['session_id']);
             $button_handler_template = new JSTemplate("data/js/file_update_window.js");
             $button_handler = $button_handler_template->get_string();
             $button_handler_caption = "Upload";
             $html_caption = "Upload newer version";
             $html = $template->get_string();
             break;
         case "file_update_minor":
             $unique_id = uniqid();
             $paramquery['unique_id'] = $unique_id;
             $paramquery['file_id'] = $_POST['file_id'];
             $params = http_build_query($paramquery, '', '&');
             $template = new HTMLTemplate("data/file_update_window.html");
             $template->set_var("params", $params);
             $template->set_var("unique_id", $unique_id);
             $template->set_var("session_id", $_GET['session_id']);
             $button_handler_template = new JSTemplate("data/js/file_update_window.js");
             $button_handler = $button_handler_template->get_string();
             $button_handler_caption = "Upload";
             $html_caption = "Upload minor version";
             $html = $template->get_string();
             break;
         case "permission":
             require_once "data.ajax.php";
             if (isset($_POST['permissions'])) {
                 return DataAjax::change_permission(json_decode($_POST['permissions']), "File");
             } else {
                 $permission = DataAjax::permission_window();
                 $button_handler_template = new JSTemplate("data/js/file_permission_window.js");
                 $button_handler_template->set_var("session_id", $_GET['session_id']);
                 $button_handler_template->set_var("file_id", $_POST['file_id']);
                 $button_handler = $button_handler_template->get_string();
                 $button_handler_caption = "Change";
                 $html_caption = "Change permission";
                 $html = $permission;
             }
             break;
         case "file_delete":
             if (isset($_POST['sure'])) {
                 return self::delete_file($_POST['file_id']);
             } else {
                 $template = new HTMLTemplate("data/file_delete_window.html");
                 $button_handler_template = new JSTemplate("data/js/file_delete_window.js");
                 $button_handler_template->set_var("session_id", $_GET['session_id']);
                 $button_handler_template->set_var("file_id", $_POST['file_id']);
                 $button_handler = $button_handler_template->get_string();
                 $button_handler_caption = "Delete";
                 $html_caption = "Delete File";
                 $html = $template->get_string();
             }
             break;
     }
     $array = array("content" => $html, "content_caption" => $html_caption, "handler" => $button_handler, "handler_caption" => $button_handler_caption);
     return json_encode($array);
 }
Beispiel #3
0
 /**
  * @param string $action
  * @return string
  */
 public static function get_data_browser_link_html_and_button_handler($action)
 {
     $html;
     $html_caption;
     $button_handler;
     $button_handler_caption;
     $template;
     $paramquery = $_GET;
     unset($paramquery['run']);
     switch ($action) {
         case "folder_add":
             if (isset($_POST['folder_name'])) {
                 return self::add_folder($_POST['folder_id'], $_POST['folder_name']);
             } else {
                 $button_handler_template = new JSTemplate("data/js/folder_add_window.js");
                 $button_handler_template->set_var("session_id", $_GET['session_id']);
                 $button_handler_template->set_var("folder_id", $_POST['folder_id']);
                 $button_handler = $button_handler_template->get_string();
                 $button_handler_caption = "Add";
                 $html_caption = "Add Folder";
                 $template = new HTMLTemplate("data/folder_add_window.html");
                 $html = $template->get_string();
             }
             break;
         case "folder_delete":
             if (isset($_POST['sure'])) {
                 return self::delete_folder($_POST['folder_id']);
             } else {
                 $paramquery['sure'] = "true";
                 $paramquery['nextpage'] = "1";
                 $params = http_build_query($paramquery);
                 $template = new HTMLTemplate("data/folder_delete_window.html");
                 $template->set_var("params", $params);
                 $button_handler_template = new JSTemplate("data/js/folder_delete_window.js");
                 $button_handler_template->set_var("session_id", $_GET['session_id']);
                 $button_handler_template->set_var("folder_id", $_POST['folder_id']);
                 $button_handler = $button_handler_template->get_string();
                 $button_handler_caption = "Delete";
                 $html_caption = "Delete Folder";
                 $html = $template->get_string();
             }
             break;
         case "folder_rename":
             if (isset($_POST['folder_name'])) {
                 return self::rename_folder($_POST['folder_id'], $_POST['folder_name']);
             } else {
                 $template = new HTMLTemplate("data/folder_rename_window.html");
                 $button_handler_template = new JSTemplate("data/js/folder_rename_window.js");
                 $button_handler_template->set_var("session_id", $_GET['session_id']);
                 $button_handler_template->set_var("folder_id", $_POST['folder_id']);
                 $button_handler = $button_handler_template->get_string();
                 $button_handler_caption = "Rename";
                 $html_caption = "Rename Folder";
                 $html = $template->get_string();
             }
             break;
         case "permission":
             require_once "data.ajax.php";
             if (isset($_POST['permissions'])) {
                 $success = DataAjax::change_permission(json_decode($_POST['permissions']), "Folder");
                 return $success;
             } else {
                 $permission = DataAjax::permission_window();
                 $button_handler_template = new JSTemplate("data/js/folder_permission_window.js");
                 $button_handler_template->set_var("session_id", $_GET['session_id']);
                 $button_handler_template->set_var("folder_id", $_POST['folder_id']);
                 $button_handler = $button_handler_template->get_string();
                 $button_handler_caption = "Change";
                 $html_caption = "Change permission";
                 $html = $permission;
             }
             break;
     }
     $array = array("content" => $html, "content_caption" => $html_caption, "handler" => $button_handler, "handler_caption" => $button_handler_caption);
     return json_encode($array);
 }
Beispiel #4
0
 /**
  * @param string $action
  * @return string
  */
 public static function get_data_browser_link_html_and_button_handler($action)
 {
     global $regional;
     $html;
     $html_caption;
     $button_handler;
     $button_handler_caption;
     $template;
     $paramquery = $_GET;
     unset($paramquery['run']);
     switch ($action) {
         case "value_add":
             if (!isset($_POST['folder_id']) && !isset($_POST['value_array'])) {
                 //second call (from additional script; loads template)
                 require_once "core/modules/data/io/value_form.io.php";
                 $value_form_io = new ValueFormIO(null, $_POST['type_id'], $_POST['folder_id']);
                 $value_form_io->set_field_class("DataValueAddValues");
                 return $value_form_io->get_content();
             }
             if (isset($_POST['value_array'])) {
                 //third call (from add button; creates value)
                 return self::add_value($_POST['folder_id'], $_POST['type_id'], $_POST['value_array']);
             }
             require_once "core/include/data/value/access/value_type.access.php";
             $types = ValueType_Access::list_entries();
             $options = array();
             $counter = 0;
             foreach ($types as $key => $value) {
                 if ($value == 2) {
                     continue;
                 }
                 $value_type = new ValueType($value);
                 $options[$counter]['value'] = $value;
                 $options[$counter]['content'] = $value_type->get_name();
                 $options[$counter]['selected'] = "";
                 $options[$counter]['disabled'] = "";
                 $counter++;
             }
             $template = new HTMLTemplate("data/value_add_window.html");
             $template->set_var("option", $options);
             $html = $template->get_string();
             $html_caption = "Add Value";
             $button_handler_template = new JSTemplate("data/js/value_add_window.js");
             $button_handler_template->set_var("session_id", $_GET['session_id']);
             $button_handler_template->set_var("folder_id", $_POST['folder_id']);
             $button_handler = $button_handler_template->get_string();
             $button_handler_caption = "Add";
             $additional_script_template = new JSTemplate("data/js/value_add_window_additional.js");
             $additional_script_template->set_var("decimal_separator", $regional->get_decimal_separator());
             $additional_script_template->set_var("thousand_separator", $regional->get_thousand_separator());
             $additional_script_template->set_var("session_id", $_GET['session_id']);
             $additional_script = $additional_script_template->get_string();
             $array = array("content" => $html, "content_caption" => $html_caption, "handler" => $button_handler, "handler_caption" => $button_handler_caption, "additional_script" => $additional_script);
             return json_encode($array);
             break;
         case "value_delete":
             if (isset($_POST['sure'])) {
                 self::delete_value($_POST['value_id']);
             } else {
                 $template = new HTMLTemplate("data/value_delete_window.html");
                 $button_handler_template = new JSTemplate("data/js/value_delete_window.js");
                 $button_handler_template->set_var("session_id", $_GET['session_id']);
                 $button_handler_template->set_var("value_id", $_POST['value_id']);
                 $button_handler = $button_handler_template->get_string();
                 $button_handler_caption = "Delete";
                 $html_caption = "Delete Value";
                 $html = $template->get_string();
             }
             break;
         case "permission":
             require_once "data.ajax.php";
             if (isset($_POST['permissions'])) {
                 $success = DataAjax::change_permission(json_decode($_POST['permissions']), "Value");
                 return $success;
             } else {
                 $permission = DataAjax::permission_window();
                 $button_handler_template = new JSTemplate("data/js/value_permission_window.js");
                 $button_handler_template->set_var("session_id", $_GET['session_id']);
                 $button_handler_template->set_var("value_id", $_POST['value_id']);
                 $button_handler = $button_handler_template->get_string();
                 $button_handler_caption = "Change";
                 $html_caption = "Change permission";
                 $html = $permission;
             }
             break;
     }
     $array = array("content" => $html, "content_caption" => $html_caption, "handler" => $button_handler, "handler_caption" => $button_handler_caption);
     return json_encode($array);
 }
Beispiel #5
0
 /**
  * @param string $alias
  */
 public static function ajax_handler($alias)
 {
     switch ($_GET['run']) {
         case "list_data_browser":
             require_once "ajax/data.ajax.php";
             echo DataAjax::list_data_browser($_POST['column_array'], $_POST['argument_array'], $_POST['get_array'], $_POST['css_page_id'], $_POST['css_row_sort_id'], $_POST['entries_per_page'], $_GET['page'], $_GET['sortvalue'], $_GET['sortmethod']);
             break;
         case "count_data_browser":
             require_once "ajax/data.ajax.php";
             echo DataAjax::count_data_browser($_POST['argument_array']);
             break;
         case "list_file_items":
             require_once "ajax/file.ajax.php";
             echo FileAjax::list_file_items($_POST['column_array'], $_POST['argument_array'], $_POST['css_page_id'], $_POST['css_row_sort_id'], $_GET['page'], $_GET['sortvalue'], $_GET['sortmethod']);
             break;
             // Data Browser
         // Data Browser
         case "get_data_browser_path":
             require_once "ajax/data_browser.ajax.php";
             echo DataBrowserAjax::get_data_browser_path($_POST['folder_id'], $_POST['virtual_folder_id']);
             break;
         case "get_data_browser_path_cleared":
             require_once "ajax/data_browser.ajax.php";
             echo DataBrowserAjax::get_data_browser_path_cleared($_POST['folder_id'], $_POST['virtual_folder_id']);
             break;
         case "get_context_sensitive_file_menu":
             require_once "ajax/data_browser.ajax.php";
             echo DataBrowserAjax::get_context_sensitive_file_menu($_POST['id']);
             break;
         case "get_context_sensitive_folder_menu":
             require_once "ajax/data_browser.ajax.php";
             echo DataBrowserAjax::get_context_sensitive_folder_menu($_POST['id']);
             break;
         case "get_context_sensitive_value_menu":
             require_once "ajax/data_browser.ajax.php";
             echo DataBrowserAjax::get_context_sensitive_value_menu($_POST['id']);
             break;
         case "get_context_sensitive_parameter_menu":
             require_once "ajax/data_browser.ajax.php";
             echo DataBrowserAjax::get_context_sensitive_parameter_menu($_POST['id']);
             break;
         case "get_browser_menu":
             require_once "ajax/data_browser.ajax.php";
             echo DataBrowserAjax::get_browser_menu($_POST['folder_id']);
             break;
         case "delete_stack":
             require_once "ajax/data_browser.ajax.php";
             echo DataBrowserAjax::delete_stack();
             break;
             // File
         // File
         case "file_list_versions":
             require_once "ajax/file.ajax.php";
             echo FileAjax::list_versions($_POST['column_array'], $_POST['argument_array'], $_POST['get_array'], $_POST['css_page_id'], $_POST['css_row_sort_id'], $_POST['entries_per_page'], $_GET['page'], $_GET['sortvalue'], $_GET['sortmethod']);
             break;
         case "file_count_versions":
             require_once "ajax/file.ajax.php";
             echo FileAjax::count_versions($_POST['argument_array']);
             break;
         case "file_add":
             require_once "ajax/file.ajax.php";
             echo FileAjax::add_file($_POST['folder_id']);
             break;
         case "file_delete":
             require_once "ajax/file.ajax.php";
             echo FileAjax::get_data_browser_link_html_and_button_handler("file_delete");
             break;
         case "file_update":
             require_once "ajax/file.ajax.php";
             echo FileAjax::get_data_browser_link_html_and_button_handler("file_update");
             break;
         case "file_update_minor":
             require_once "ajax/file.ajax.php";
             echo FileAjax::get_data_browser_link_html_and_button_handler("file_update_minor");
             break;
         case "file_permission":
             require_once "ajax/file.ajax.php";
             echo FileAjax::get_data_browser_link_html_and_button_handler("permission");
             break;
             // Value
         // Value
         case "value_list_versions":
             require_once "ajax/value.ajax.php";
             echo ValueAjax::list_versions($_POST['column_array'], $_POST['argument_array'], $_POST['get_array'], $_POST['css_page_id'], $_POST['css_row_sort_id'], $_POST['entries_per_page'], $_GET['page'], $_GET['sortvalue'], $_GET['sortmethod']);
             break;
         case "value_count_versions":
             require_once "ajax/value.ajax.php";
             echo ValueAjax::count_versions($_POST['argument_array']);
             break;
         case "value_add":
             require_once "ajax/value.ajax.php";
             echo ValueAjax::get_data_browser_link_html_and_button_handler("value_add");
             break;
         case "value_delete":
             require_once "ajax/value.ajax.php";
             echo ValueAjax::get_data_browser_link_html_and_button_handler("value_delete");
             break;
         case "value_permission":
             require_once "ajax/value.ajax.php";
             echo ValueAjax::get_data_browser_link_html_and_button_handler("permission");
             break;
         case "value_add_as_item":
             require_once "ajax/value.ajax.php";
             echo ValueAjax::add_as_item($_POST['folder_id'], $_POST['type_id'], $_POST['value_array'], $_POST['get_array']);
             break;
         case "value_add_as_item_window":
             require_once "ajax/value.ajax.php";
             echo ValueAjax::add_as_item_window($_POST['get_array'], $_POST['type_array'], $_POST['folder_id']);
             break;
         case "value_update":
             require_once "ajax/value.ajax.php";
             echo ValueAjax::update($_POST['value_id'], $_POST['version'], $_POST['value_array'], true);
             break;
         case "value_update_minor":
             require_once "ajax/value.ajax.php";
             echo ValueAjax::update($_POST['value_id'], $_POST['version'], $_POST['value_array'], false);
             break;
             // Folder
         // Folder
         case "folder_add":
             require_once "ajax/folder.ajax.php";
             echo FolderAjax::get_data_browser_link_html_and_button_handler("folder_add");
             break;
         case "folder_delete":
             require_once "ajax/folder.ajax.php";
             echo FolderAjax::get_data_browser_link_html_and_button_handler("folder_delete");
             break;
         case "folder_rename":
             require_once "ajax/folder.ajax.php";
             echo FolderAjax::get_data_browser_link_html_and_button_handler("folder_rename");
             break;
         case "folder_permission":
             require_once "ajax/folder.ajax.php";
             echo FolderAjax::get_data_browser_link_html_and_button_handler("permission");
             break;
             // Parameter
         // Parameter
         case "parameter_list_versions":
             require_once "ajax/parameter.ajax.php";
             echo ParameterAjax::list_versions($_POST['column_array'], $_POST['argument_array'], $_POST['get_array'], $_POST['css_page_id'], $_POST['css_row_sort_id'], $_POST['entries_per_page'], $_GET['page'], $_GET['sortvalue'], $_GET['sortmethod']);
             break;
         case "parameter_count_versions":
             require_once "ajax/parameter.ajax.php";
             echo ParameterAjax::count_versions($_POST['argument_array']);
             break;
         case "parameter_add_as_item":
             require_once "ajax/parameter.ajax.php";
             echo ParameterAjax::add_as_item($_POST['folder_id'], $_POST['type_id'], $_POST['limit_id'], $_POST['parameter_array'], $_POST['get_array']);
             break;
         case "parameter_update":
             require_once "ajax/parameter.ajax.php";
             echo ParameterAjax::update($_GET['parameter_id'], $_POST['parameter_array'], $_POST['limit_id'], $_POST['major'], $_POST['current']);
             break;
         case "parameter_get_limits":
             require_once "ajax/parameter.ajax.php";
             echo ParameterAjax::get_limits($_POST['parameter_template_id'], $_POST['parameter_limit_id']);
             break;
         case "parameter_get_methods":
             require_once "ajax/parameter.ajax.php";
             echo ParameterAjax::get_methods();
             break;
         case "parameter_delete":
             require_once "ajax/parameter.ajax.php";
             echo ParameterAjax::get_data_browser_link_html_and_button_handler("parameter_delete");
             break;
         case "parameter_permission":
             require_once "ajax/parameter.ajax.php";
             echo ParameterAjax::get_data_browser_link_html_and_button_handler("permission");
             break;
             // Search
         // Search
         case "search_data_list_data":
             require_once "ajax/data_search.ajax.php";
             echo DataSearchAjax::list_data($_POST['column_array'], $_POST['argument_array'], $_POST['css_page_id'], $_POST['css_row_sort_id'], $_POST['entries_per_page'], $_GET['page'], $_GET['sortvalue'], $_GET['sortmethod']);
             break;
         case "search_data_count_data":
             require_once "ajax/data_search.ajax.php";
             echo DataSearchAjax::count_data($_POST['argument_array']);
             break;
             // Image Types
         // Image Types
         case "get_allowed_image_types":
             require_once "ajax/data.ajax.php";
             echo DataAjax::get_allowed_image_types();
             break;
             // Admin
         // Admin
         case "admin_list_value_templates":
             require_once "ajax/admin/admin_value_template.ajax.php";
             echo AdminValueTemplateAjax::list_templates($_POST['column_array'], $_POST['argument_array'], $_POST['get_array'], $_POST['css_page_id'], $_POST['css_row_sort_id'], $_POST['entries_per_page'], $_GET['page'], $_GET['sortvalue'], $_GET['sortmethod']);
             break;
         case "admin_count_value_templates":
             require_once "ajax/admin/admin_value_template.ajax.php";
             echo AdminValueTemplateAjax::count_templates($_POST['argument_array']);
             break;
         case "admin_list_parameter_templates":
             require_once "ajax/admin/admin_parameter_template.ajax.php";
             echo AdminParameterTemplateAjax::list_templates($_POST['column_array'], $_POST['argument_array'], $_POST['get_array'], $_POST['css_page_id'], $_POST['css_row_sort_id'], $_POST['entries_per_page'], $_GET['page'], $_GET['sortvalue'], $_GET['sortmethod']);
             break;
         case "admin_count_parameter_templates":
             require_once "ajax/admin/admin_parameter_template.ajax.php";
             echo AdminParameterTemplateAjax::count_templates($_POST['argument_array']);
             break;
         case "admin_add_parameter_template":
             require_once "ajax/admin/admin_parameter_template.ajax.php";
             echo AdminParameterTemplateAjax::add_template($_POST['name'], $_POST['internal_name'], $_POST['json_object_string'], $_POST['json_limit_string']);
             break;
         case "admin_edit_parameter_template":
             require_once "ajax/admin/admin_parameter_template.ajax.php";
             echo AdminParameterTemplateAjax::edit_template($_GET['id'], $_POST['name'], $_POST['json_object_string'], $_POST['json_limit_string']);
             break;
         case "admin_delete_parameter_template":
             require_once "ajax/admin/admin_parameter_template.ajax.php";
             echo AdminParameterTemplateAjax::delete_template($_POST['id']);
             break;
         case "admin_parameter_template_exist_internal_name":
             require_once "ajax/admin/admin_parameter_template.ajax.php";
             echo AdminParameterTemplateAjax::exist_internal_name($_POST['internal_name']);
             break;
         case "admin_list_parameter_methods":
             require_once "ajax/admin/admin_parameter_method.ajax.php";
             echo AdminParameterMethodAjax::list_methods($_POST['column_array'], $_POST['argument_array'], $_POST['get_array'], $_POST['css_page_id'], $_POST['css_row_sort_id'], $_POST['entries_per_page'], $_GET['page'], $_GET['sortvalue'], $_GET['sortmethod']);
             break;
         case "admin_count_parameter_methods":
             require_once "ajax/admin/admin_parameter_method.ajax.php";
             echo AdminParameterMethodAjax::count_methods($_POST['argument_array']);
             break;
         case "admin_add_parameter_method":
             require_once "ajax/admin/admin_parameter_method.ajax.php";
             echo AdminParameterMethodAjax::add_method($_POST['name']);
             break;
         case "admin_edit_parameter_method":
             require_once "ajax/admin/admin_parameter_method.ajax.php";
             echo AdminParameterMethodAjax::edit_method($_POST['id'], $_POST['name']);
             break;
         case "admin_delete_parameter_method":
             require_once "ajax/admin/admin_parameter_method.ajax.php";
             echo AdminParameterMethodAjax::delete_method($_POST['id']);
             break;
         case "admin_parameter_method_get_name":
             require_once "ajax/admin/admin_parameter_method.ajax.php";
             echo AdminParameterMethodAjax::get_name($_POST['id']);
             break;
         case "admin_parameter_method_exist_name":
             require_once "ajax/admin/admin_parameter_method.ajax.php";
             echo AdminParameterMethodAjax::exist_name($_POST['name']);
             break;
             // Navigation
         // Navigation
         case "navigation_data":
             require_once "ajax/navigation/data_navigation.ajax.php";
             switch ($_GET['action']) {
                 case "get_name":
                     echo DataNavigationAjax::get_name();
                     break;
                 case "get_html":
                     echo DataNavigationAjax::get_html();
                     break;
                 case "get_array":
                     echo DataNavigationAjax::get_array();
                     break;
                 case "set_array":
                     echo DataNavigationAjax::set_array($_POST['array']);
                     break;
                 case "get_children":
                     echo DataNavigationAjax::get_children($_POST['id']);
                     break;
             }
             break;
         case "navigation_folder":
             require_once "ajax/folder.ajax.php";
             switch ($_GET['action']) {
                 case "get_array":
                     echo FolderAjax::get_array();
                     break;
                 case "get_children":
                     echo FolderAjax::get_children($_POST['id']);
                     break;
             }
             break;
     }
 }