コード例 #1
0
ファイル: sample_common.io.php プロジェクト: suxinde2009/www
 public static function tab_header()
 {
     $tab_io = new Tab_IO();
     // Main Page
     $paramquery['username'] = $_GET['username'];
     $paramquery['session_id'] = $_GET['session_id'];
     $paramquery['nav'] = "sample";
     $paramquery['run'] = "detail";
     $paramquery['sample_id'] = $_GET['sample_id'];
     $params = http_build_query($paramquery, '', '&');
     unset($paramquery);
     $tab_io->add("main", Language::get_message("SampleGeneralDetailTabMainPage", "general"), $params, false);
     // Parent Item Dialogs
     $module_dialog_array = ModuleDialog::list_dialogs_by_type("parent_item_list");
     if (is_array($module_dialog_array) and count($module_dialog_array) >= 1) {
         foreach ($module_dialog_array as $key => $value) {
             $paramquery['username'] = $_GET['username'];
             $paramquery['session_id'] = $_GET['session_id'];
             $paramquery['nav'] = "sample";
             $paramquery['run'] = "parent_item_list";
             $paramquery['sample_id'] = $_GET['sample_id'];
             $paramquery['dialog'] = $value['internal_name'];
             $params = http_build_query($paramquery, '', '&');
             $tab_io->add("pil_" . $value['internal_name'], Language::get_message($value['language_address'], "dialog"), $params, false);
         }
     }
     // Item Lister Dialogs
     $module_dialog_array = ModuleDialog::list_dialogs_by_type("item_list");
     if (is_array($module_dialog_array) and count($module_dialog_array) >= 1) {
         foreach ($module_dialog_array as $key => $value) {
             $paramquery['username'] = $_GET['username'];
             $paramquery['session_id'] = $_GET['session_id'];
             $paramquery['nav'] = "sample";
             $paramquery['run'] = "item_list";
             $paramquery['sample_id'] = $_GET['sample_id'];
             $paramquery['dialog'] = $value['internal_name'];
             $params = http_build_query($paramquery, '', '&');
             $tab_io->add("il_" . $value['internal_name'], Language::get_message($value['language_address'], "dialog"), $params, false);
         }
     }
     if ($_GET['run'] != "parent_item_list" and $_GET['run'] != "item_list") {
         $tab_io->activate("main");
     } else {
         if ($_GET['run'] == "item_list" and $_GET['dialog']) {
             $tab_io->activate("il_" . $_GET['dialog']);
         } elseif ($_GET['run'] == "parent_item_list" and $_GET['dialog']) {
             $tab_io->activate("pil_" . $_GET['dialog']);
         } else {
             $tab_io->activate("main");
         }
     }
     $tab_io->output();
 }
コード例 #2
0
 /**
  * @throws EquipmentTypeIDMissingException
  */
 public static function detail()
 {
     if ($_GET['id']) {
         $tab_io = new Tab_IO();
         $paramquery = $_GET;
         unset($paramquery['tab']);
         $params = http_build_query($paramquery, '', '&');
         $tab_io->add("detail", "Details", $params, false);
         $paramquery = $_GET;
         $paramquery['tab'] = "responsible_persons";
         $params = http_build_query($paramquery, '', '&');
         $tab_io->add("responsible_persons", "Responsible Persons", $params, false);
         $paramquery = $_GET;
         $paramquery['tab'] = "organisaiton_units";
         $params = http_build_query($paramquery, '', '&');
         $tab_io->add("organisaiton_units", "Organisation Units", $params, false);
         switch ($_GET['tab']) {
             case "responsible_persons":
                 $tab_io->activate("responsible_persons");
                 break;
             case "organisaiton_units":
                 $tab_io->activate("organisaiton_units");
                 break;
             default:
                 $tab_io->activate("detail");
                 break;
         }
         $tab_io->output();
         switch ($_GET['tab']) {
             case "responsible_persons":
                 self::detail_reponsible_persons();
                 break;
             case "organisaiton_units":
                 self::detail_organisation_units();
                 break;
             default:
                 self::detail_home();
                 break;
         }
     } else {
         throw new EquipmentTypeIDMissingException();
     }
 }
コード例 #3
0
ファイル: admin_group.io.php プロジェクト: suxinde2009/www
 /**
  * @throws BaseModuleDialogMethodNotFoundException
  * @throws BaseModuleDialogClassNotFoundException
  * @throws BaseModuleDialogFileNotFoundException
  * @throws GroupIDMissingException
  */
 public static function detail()
 {
     if ($_GET['id']) {
         $tab_io = new Tab_IO();
         $paramquery = $_GET;
         unset($paramquery['tab']);
         $params = http_build_query($paramquery, '', '&');
         $tab_io->add("detail", "Group Details", $params, false);
         $paramquery = $_GET;
         $paramquery['tab'] = "users";
         $params = http_build_query($paramquery, '', '&');
         $tab_io->add("users", "Users", $params, false);
         $module_dialog_array = ModuleDialog::list_dialogs_by_type("group_admin_detail");
         if (is_array($module_dialog_array) and count($module_dialog_array) >= 1) {
             foreach ($module_dialog_array as $key => $value) {
                 $paramquery = $_GET;
                 $paramquery['tab'] = "dialog";
                 $paramquery['sub_dialog'] = $value['internal_name'];
                 $params = http_build_query($paramquery, '', '&');
                 $tab_io->add($value['internal_name'], Language::get_message($value['language_address'], "dialog"), $params, false);
             }
         }
         switch ($_GET['tab']) {
             case "users":
                 $tab_io->activate("users");
                 break;
             case "dialog":
                 $tab_io->activate($_GET['sub_dialog']);
                 break;
             default:
                 $tab_io->activate("detail");
                 break;
         }
         $tab_io->output();
         switch ($_GET['tab']) {
             case "users":
                 self::detail_users();
                 break;
             case "dialog":
                 $module_dialog = ModuleDialog::get_by_type_and_internal_name("group_admin_detail", $_GET['sub_dialog']);
                 if (file_exists($module_dialog['class_path'])) {
                     require_once $module_dialog['class_path'];
                     if (class_exists($module_dialog['class'])) {
                         if (method_exists($module_dialog['class'], $module_dialog['method'])) {
                             $module_dialog['class']::$module_dialog['method']($_GET['id']);
                         } else {
                             throw new BaseModuleDialogMethodNotFoundException();
                         }
                     } else {
                         throw new BaseModuleDialogClassNotFoundException();
                     }
                 } else {
                     throw new BaseModuleDialogFileNotFoundException();
                 }
                 break;
             default:
                 self::detail_home();
                 break;
         }
     } else {
         throw new GroupIDMissingException();
     }
 }
コード例 #4
0
ファイル: project_common.io.php プロジェクト: suxinde2009/www
 /**
  * @todo reactivate schedule after workflow integration
  */
 public static function tab_header()
 {
     if ($_GET['project_id']) {
         $tab_io = new Tab_IO();
         // Main Page
         $paramquery['username'] = $_GET['username'];
         $paramquery['session_id'] = $_GET['session_id'];
         $paramquery['nav'] = "project";
         $paramquery['run'] = "detail";
         $paramquery['project_id'] = $_GET['project_id'];
         $params = http_build_query($paramquery, '', '&');
         unset($paramquery);
         $tab_io->add("main", Language::get_message("ProjectGeneralDetailTabMainPage", "general"), $params, false);
         // Log
         $paramquery['username'] = $_GET['username'];
         $paramquery['session_id'] = $_GET['session_id'];
         $paramquery['nav'] = "project";
         $paramquery['run'] = "log";
         $paramquery['project_id'] = $_GET['project_id'];
         $params = http_build_query($paramquery, '', '&');
         unset($paramquery);
         $tab_io->add("log", Language::get_message("ProjectGeneralDetailTabLog", "general"), $params, false);
         // Structure
         $paramquery['username'] = $_GET['username'];
         $paramquery['session_id'] = $_GET['session_id'];
         $paramquery['nav'] = "project";
         $paramquery['run'] = "structure";
         $paramquery['project_id'] = $_GET['project_id'];
         $params = http_build_query($paramquery, '', '&');
         unset($paramquery);
         $tab_io->add("structure", Language::get_message("ProjectGeneralDetailTabStructure", "general"), $params, false);
         // Schedule
         /*
         $paramquery['username'] 	= $_GET['username'];
         $paramquery['session_id'] 	= $_GET['session_id'];
         $paramquery['nav']			= "project";
         $paramquery['run']			= "schedule";
         $paramquery['project_id']	= $_GET['project_id'];
         $params 					= http_build_query($paramquery,'','&');
         unset($paramquery);
         
         $tab_io->add("schedule", Language::get_message("ProjectGeneralDetailTabSchedule", "general"), $params, false);
         */
         // Item Lister Dialogs
         $module_dialog_array = ModuleDialog::list_dialogs_by_type("item_list");
         if (is_array($module_dialog_array) and count($module_dialog_array) >= 1) {
             foreach ($module_dialog_array as $key => $value) {
                 $paramquery['username'] = $_GET['username'];
                 $paramquery['session_id'] = $_GET['session_id'];
                 $paramquery['nav'] = "project";
                 $paramquery['run'] = "item_list";
                 $paramquery['project_id'] = $_GET['project_id'];
                 $paramquery['dialog'] = $value['internal_name'];
                 $params = http_build_query($paramquery, '', '&');
                 $tab_io->add($value['internal_name'], Language::get_message($value['language_address'], "dialog"), $params, false);
             }
         }
         // Administration
         $project_security = new ProjectSecurity($_GET['project_id']);
         if ($project_security->is_access(2, false) or $project_security->is_access(3, false) or $project_security->is_access(4, false) or $project_security->is_access(5, false) or $project_security->is_access(6, false) or $project_security->is_access(7, false)) {
             $paramquery['username'] = $_GET['username'];
             $paramquery['session_id'] = $_GET['session_id'];
             $paramquery['nav'] = "project";
             $paramquery['run'] = "admin";
             $paramquery['project_id'] = $_GET['project_id'];
             unset($paramquery['dialog']);
             $params = http_build_query($paramquery, '', '&');
             unset($paramquery);
             $tab_io->add("admin", Language::get_message("ProjectGeneralDetailTabAdministration", "general"), $params, false, false);
         }
         if ($_GET['run'] != "item_add" and $_GET['run'] != "item_list") {
             switch ($_GET['run']) {
                 case "log":
                 case "log_detail":
                 case "log_add":
                     $tab_io->activate("log");
                     break;
                 case "structure":
                     $tab_io->activate("structure");
                     break;
                 case "add_task":
                 case "task_delete":
                 case "task_detail":
                 case "schedule":
                 case "show_tasks":
                 case "task_edit_start":
                 case "task_edit_end":
                     $tab_io->activate("schedule");
                     break;
                 case "admin":
                     $tab_io->activate("admin");
                     break;
                 default:
                     if (strpos($_GET['run'], "admin_") === 0) {
                         $tab_io->activate("admin");
                     } else {
                         $tab_io->activate("main");
                     }
                     break;
             }
         } else {
             if ($_GET['run'] == "item_list" and $_GET['dialog']) {
                 $tab_io->activate($_GET['dialog']);
             } else {
                 $tab_io->activate("main");
             }
         }
         $tab_io->output();
     }
 }
コード例 #5
0
ファイル: admin_general.io.php プロジェクト: suxinde2009/www
 public static function handler()
 {
     $tab_io = new Tab_IO();
     $paramquery = $_GET;
     $paramquery['action'] = "list_languages";
     $params = http_build_query($paramquery, '', '&');
     $tab_io->add("languages", Language::get_message("BaseGeneralAdminGeneralTabLanguages", "general"), $params, false);
     $paramquery = $_GET;
     $paramquery['action'] = "list_timezones";
     $params = http_build_query($paramquery, '', '&');
     $tab_io->add("timezones", Language::get_message("BaseGeneralAdminGeneralTabTimezones", "general"), $params, false);
     $paramquery = $_GET;
     $paramquery['action'] = "list_paper_sizes";
     $params = http_build_query($paramquery, '', '&');
     $tab_io->add("paper-sizes", Language::get_message("BaseGeneralAdminGeneralTabPaperSizes", "general"), $params, false);
     $paramquery = $_GET;
     $paramquery['action'] = "list_measuring_units";
     $params = http_build_query($paramquery, '', '&');
     $tab_io->add("measuring-units", Language::get_message("BaseGeneralAdminGeneralTabMeasuringUnits", "general"), $params, false);
     $paramquery = $_GET;
     $paramquery['action'] = "list_measuring_unit_ratios";
     $params = http_build_query($paramquery, '', '&');
     $tab_io->add("measuring-unit-ratios", Language::get_message("BaseGeneralAdminGeneralTabMeasuringUnitRatios", "general"), $params, false);
     $paramquery = $_GET;
     $paramquery['action'] = "list_measuring_unit_categories";
     $params = http_build_query($paramquery, '', '&');
     $tab_io->add("measuring-unit-categories", Language::get_message("BaseGeneralAdminGeneralTabMeasuringUnitCategories", "general"), $params, false);
     $paramquery = $_GET;
     $paramquery['action'] = "list_currencies";
     $params = http_build_query($paramquery, '', '&');
     $tab_io->add("currencies", Language::get_message("BaseGeneralAdminGeneralTabCurrencies", "general"), $params, false);
     switch ($_GET['action']) {
         case "list_timezones":
             $tab_io->activate("timezones");
             break;
         case "list_paper_sizes":
             $tab_io->activate("paper-sizes");
             break;
         case "list_measuring_units":
             $tab_io->activate("measuring-units");
             break;
         case "list_measuring_unit_ratios":
             $tab_io->activate("measuring-unit-ratios");
             break;
         case "list_measuring_unit_categories":
             $tab_io->activate("measuring-unit-categories");
             break;
         case "list_currencies":
             $tab_io->activate("currencies");
             break;
         default:
             $tab_io->activate("languages");
             break;
     }
     $tab_io->output();
     switch ($_GET['action']) {
         case "list_timezones":
             self::list_timezones();
             break;
         case "list_paper_sizes":
             self::list_paper_sizes();
             break;
         case "list_measuring_units":
             self::list_measuring_units();
             break;
         case "list_measuring_unit_ratios":
             self::list_measuring_unit_ratios();
             break;
         case "list_measuring_unit_categories":
             self::list_measuring_unit_categories();
             break;
         case "list_currencies":
             self::list_currencies();
             break;
         default:
             self::list_languages();
             break;
     }
 }
コード例 #6
0
 public static function handler()
 {
     if ($_GET['id']) {
         if ($_GET['action'] != "delete" and $_GET['action'] != "add_child" and $_GET['action'] != "upwards" and $_GET['action'] != "downwards") {
             $tab_io = new Tab_IO();
             $paramquery = $_GET;
             $paramquery['action'] = "detail";
             $params = http_build_query($paramquery, '', '&');
             $tab_io->add("general", "General", $params, false);
             $paramquery = $_GET;
             $paramquery['action'] = "detail_owner";
             $params = http_build_query($paramquery, '', '&');
             $tab_io->add("owners", "Owners", $params, false);
             $paramquery = $_GET;
             $paramquery['action'] = "detail_leader";
             $params = http_build_query($paramquery, '', '&');
             $tab_io->add("leaders", "Leaders", $params, false);
             $paramquery = $_GET;
             $paramquery['action'] = "detail_member";
             $params = http_build_query($paramquery, '', '&');
             $tab_io->add("members", "Members", $params, false);
             $paramquery = $_GET;
             $paramquery['action'] = "detail_qm";
             $params = http_build_query($paramquery, '', '&');
             $tab_io->add("qm", "Q.-Managers", $params, false);
             $paramquery = $_GET;
             $paramquery['action'] = "detail_group";
             $params = http_build_query($paramquery, '', '&');
             $tab_io->add("groups", "Groups", $params, false);
             $paramquery = $_GET;
             $paramquery['action'] = "detail_address";
             $params = http_build_query($paramquery, '', '&');
             $tab_io->add("addresses", "Addresses", $params, false);
             switch ($_GET['action']) {
                 case "detail_owner":
                     $tab_io->activate("owners");
                     break;
                 case "detail_leader":
                     $tab_io->activate("leaders");
                     break;
                 case "detail_member":
                     $tab_io->activate("members");
                     break;
                 case "detail_qm":
                     $tab_io->activate("qm");
                     break;
                 case "detail_group":
                     $tab_io->activate("groups");
                     break;
                 case "detail_address":
                     $tab_io->activate("addresses");
                     break;
                 default:
                     $tab_io->activate("general");
                     break;
             }
             $tab_io->output();
         }
     }
     switch ($_GET['action']) {
         case "add":
         case "add_child":
             self::create();
             break;
         case "delete":
             self::delete();
             break;
         case "detail":
             self::detail();
             break;
         case "detail_owner":
             self::detail_owner();
             break;
         case "detail_leader":
             self::detail_leader();
             break;
         case "detail_member":
             self::detail_member();
             break;
         case "detail_qm":
             self::detail_quality_manager();
             break;
         case "detail_group":
             self::detail_group();
             break;
         case "detail_address":
             self::detail_address();
             break;
         case "rename":
             self::rename();
             break;
         case "upwards":
             self::upwards();
             break;
         case "downwards":
             self::downwards();
             break;
         case "toogle_visible":
             self::toogle_visible();
             break;
         default:
             self::home();
             break;
     }
 }