当前位置: 首页>>代码示例>>PHP>>正文


PHP Sample::get_organisation_unit_id方法代码示例

本文整理汇总了PHP中Sample::get_organisation_unit_id方法的典型用法代码示例。如果您正苦于以下问题:PHP Sample::get_organisation_unit_id方法的具体用法?PHP Sample::get_organisation_unit_id怎么用?PHP Sample::get_organisation_unit_id使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Sample的用法示例。


在下文中一共展示了Sample::get_organisation_unit_id方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: create

 /**
  * @param array $type_array
  * @param array $category_array
  * @param integer $organisation_id
  * @param string $holder_class
  * @param integer $holder_id
  */
 public static function create($type_array = null, $category_array = null, $organisation_unit_id = null, $holder_class = null, $holder_id = null)
 {
     global $session;
     if ($_GET['run'] == "new_subsample" and is_numeric($_GET['sample_id'])) {
         $sample = new Sample($_GET['sample_id']);
         $organisation_unit_id = $sample->get_organisation_unit_id();
         $holder_class = "Sample";
         $holder_id = $_GET['sample_id'];
         $paramquery = array();
         $paramquery['username'] = $_GET['username'];
         $paramquery['session_id'] = $_GET['session_id'];
         $paramquery['nav'] = "sample";
         $paramquery['run'] = "detail";
         $paramquery['sample_id'] = $_GET['sample_id'];
         $_GET['retrace'] = base64_encode(serialize($paramquery));
     }
     if ($_GET['run'] == "item_add" or $_GET['run'] == "new_subsample" and is_numeric($_GET['sample_id'])) {
         if ($session->is_value("ADD_ITEM_TEMP_KEYWORDS_" . $_GET['idk_unique_id']) == true) {
             $session->write_value("SAMPLE_ITEM_KEYWORDS", $session->read_value("ADD_ITEM_TEMP_KEYWORDS_" . $_GET['idk_unique_id']));
         } else {
             $session->write_value("SAMPLE_ITEM_KEYWORDS", null);
         }
         if ($session->is_value("ADD_ITEM_TEMP_DESCRIPTION_" . $_GET['idk_unique_id']) == true) {
             $session->write_value("SAMPLE_ITEM_DESCRIPTION", $session->read_value("ADD_ITEM_TEMP_DESCRIPTION_" . $_GET['idk_unique_id']));
         } else {
             $session->write_value("SAMPLE_ITEM_DESCRIPTION", null);
         }
         if ($_GET['dialog'] == "parentsample") {
             $session->write_value("SAMPLE_ADD_ROLE", "item_parent", true);
         } else {
             $session->write_value("SAMPLE_ADD_ROLE", "item", true);
             $session->write_value("SAMPLE_ADD_ITEM_HOLDER_CLASS", $holder_class, true);
             $session->write_value("SAMPLE_ADD_ITEM_HOLDER_ID", $holder_id, true);
         }
         $session->write_value("SAMPLE_ITEM_RETRACE", $_GET['retrace']);
         $session->write_value("SAMPLE_ITEM_GET_ARRAY", $_GET);
         $session->write_value("SAMPLE_ITEM_TYPE_ARRAY", $type_array);
         $session->write_value("SAMPLE_ORGANISATION_UNIT", $organisation_unit_id);
     } else {
         $session->write_value("SAMPLE_ADD_ROLE", "sample", true);
         $session->delete_value("SAMPLE_RETRACE");
         $session->delete_value("SAMPLE_ITEM_GET_ARRAY");
         $session->delete_value("SAMPLE_ITEM_KEYWORDS");
         $session->delete_value("SAMPLE_ITEM_TYPE_ARRAY");
         $session->delete_value("SAMPLE_ITEM_DESCRIPTION");
     }
     $template = new HTMLTemplate("sample/create_sample.html");
     require_once "core/modules/base/common/io/assistant.io.php";
     $assistant_io = new AssistantIO("ajax.php?nav=sample&run=create_sample", "SampleCreateAssistantField");
     $assistant_io->add_screen(Language::get_message("SampleGeneralCreateTabOrganisationUnit", "general"));
     $assistant_io->add_screen(Language::get_message("SampleGeneralCreateTabSampleType", "general"));
     $assistant_io->add_screen(Language::get_message("SampleGeneralCreateTabSampleInformation", "general"));
     $assistant_io->add_screen(Language::get_message("SampleGeneralCreateTabSampleSpecificInformation", "general"));
     $assistant_io->add_screen(Language::get_message("SampleGeneralCreateTabSummary", "general"));
     $template->set_var("content", $assistant_io->get_content());
     $template->output();
 }
开发者ID:suxinde2009,项目名称:www,代码行数:64,代码来源:sample.io.php


注:本文中的Sample::get_organisation_unit_id方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。