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


PHP Context::set方法代码示例

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


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

示例1: dispCommentAdminDeclared

 /**
  * @brief 관리자 페이지의 신고 목록 보기
  **/
 function dispCommentAdminDeclared()
 {
     // 목록을 구하기 위한 옵션
     $args->page = Context::get('page');
     ///< 페이지
     $args->list_count = 30;
     ///< 한페이지에 보여줄 글 수
     $args->page_count = 10;
     ///< 페이지 네비게이션에 나타날 페이지의 수
     $args->sort_index = 'comment_declared.declared_count';
     ///< 소팅 값
     $args->order_type = 'desc';
     ///< 소팅 정렬 값
     // 목록을 구함
     $declared_output = executeQuery('comment.getDeclaredList', $args);
     if ($declared_output->data && count($declared_output->data)) {
         $comment_list = array();
         $oCommentModel =& getModel('comment');
         foreach ($declared_output->data as $key => $comment) {
             $comment_list[$key] = new commentItem();
             $comment_list[$key]->setAttribute($comment);
         }
         $declared_output->data = $comment_list;
     }
     // 템플릿에 쓰기 위해서 comment_model::getCommentList() 의 return object에 있는 값들을 세팅
     Context::set('total_count', $declared_output->total_count);
     Context::set('total_page', $declared_output->total_page);
     Context::set('page', $declared_output->page);
     Context::set('comment_list', $declared_output->data);
     Context::set('page_navigation', $declared_output->page_navigation);
     // 템플릿 지정
     $this->setTemplatePath($this->module_path . 'tpl');
     $this->setTemplateFile('declared_list');
 }
开发者ID:hottaro,项目名称:xpressengine,代码行数:37,代码来源:comment.admin.view.php

示例2: getCommunicationAdminColorset

 /**
  * the html to select colorset of the skin
  * @return void
  */
 function getCommunicationAdminColorset()
 {
     $skin = Context::get('skin');
     $type = Context::get('type') == 'P' ? 'P' : 'M';
     Context::set('type', $type);
     if ($type == 'P') {
         $dir = 'skins';
     } else {
         $dir = 'm.skins';
     }
     if (!$skin) {
         $tpl = "";
     } else {
         $oModuleModel = getModel('module');
         $skin_info = $oModuleModel->loadSkinInfo($this->module_path, $skin, $dir);
         Context::set('skin_info', $skin_info);
         $oModuleModel = getModel('module');
         $communication_config = $oModuleModel->getModuleConfig('communication');
         if (!$communication_config->colorset) {
             $communication_config->colorset = "white";
         }
         Context::set('communication_config', $communication_config);
         $security = new Security();
         $security->encodeHTML('skin_info.colorset..title', 'skin_info.colorset..name');
         $security->encodeHTML('skin_info.colorset..name');
         $oTemplate = TemplateHandler::getInstance();
         $tpl = $oTemplate->compile($this->module_path . 'tpl', 'colorset_list');
     }
     $this->add('tpl', $tpl);
     $this->add('type', $type);
 }
开发者ID:umjinsun12,项目名称:dngshin,代码行数:35,代码来源:communication.admin.model.php

示例3: dispStore_searchAdminSkinInfo

	/**
	 * Skin Settings
	 *
	 * @return Object
	 */
	function dispStore_searchAdminSkinInfo()
	{
		$oModuleModel = getModel('module');
		$module_srl = Context::get('module_srl');
		// module_srl이 넘어오면 해당 모듈의 정보를 미리 구해 놓음
		if($module_srl) 
		{
			$module_info = $oModuleModel->getModuleInfoByModuleSrl($module_srl);
			if(!$module_info) 
			{
				Context::set('module_srl','');
				$this->act = 'list';
			}
			else
			{
				$oModuleModel->syncModuleToSite($module_info);
				$this->module_info = $module_info;
				Context::set('module_info',$module_info);
			}
		}

		// 공통 모듈 권한 설정 페이지 호출
		$oModuleAdminModel = getAdminModel('module');
		$skin_content = $oModuleAdminModel->getModuleSkinHTML($this->module_info->module_srl);
		Context::set('skin_content', $skin_content);
		$this->setTemplateFile('skininfo');
	}
开发者ID:WEN2ER,项目名称:nurigo,代码行数:32,代码来源:store_search.admin.view.php

示例4: dispCommentDeclare

 /**
  * Report an improper comment
  * @return void
  */
 function dispCommentDeclare()
 {
     $this->setLayoutFile('popup_layout');
     $comment_srl = Context::get('target_srl');
     $oMemberModel = getModel('member');
     // A message appears if the user is not logged-in
     if (!$oMemberModel->isLogged()) {
         return $this->stop('msg_not_logged');
     }
     // Create the comment object.
     $oCommentModel = getModel('comment');
     // Creates an object for displaying the selected comment
     $oComment = $oCommentModel->getComment($comment_srl);
     if (!$oComment->isExists()) {
         return new Object(-1, 'msg_invalid_request');
     }
     // Check permissions
     if (!$oComment->isAccessible()) {
         return new Object(-1, 'msg_not_permitted');
     }
     // Browser title settings
     Context::set('target_comment', $oComment);
     Context::set('target_srl', $comment_srl);
     $this->setTemplatePath($this->module_path . 'tpl');
     $this->setTemplateFile('declare_comment');
 }
开发者ID:rhymix,项目名称:rhymix,代码行数:30,代码来源:comment.view.php

示例5: __makeMenu

function __makeMenu(&$list, $parent_srl)
{
    $oMenuAdminController = getAdminController('menu');
    foreach ($list as $idx => &$item) {
        Context::set('parent_srl', $parent_srl, TRUE);
        Context::set('menu_name', $item['menu_name'], TRUE);
        Context::set('module_type', $item['module_type'], TRUE);
        Context::set('module_id', $item['module_id'], TRUE);
        if ($item['is_shortcut'] === 'Y') {
            Context::set('is_shortcut', $item['is_shortcut'], TRUE);
            Context::set('shortcut_target', $item['shortcut_target'], TRUE);
        } else {
            Context::set('is_shortcut', 'N', TRUE);
            Context::set('shortcut_target', null, TRUE);
        }
        $output = $oMenuAdminController->procMenuAdminInsertItem();
        if ($output instanceof Object && !$output->toBool()) {
            return $output;
        }
        $menu_srl = $oMenuAdminController->get('menu_item_srl');
        $item['menu_srl'] = $menu_srl;
        if ($item['list']) {
            __makeMenu($item['list'], $menu_srl);
        }
    }
}
开发者ID:kimkucheol,项目名称:xe-core,代码行数:26,代码来源:ko.install.php

示例6: getNewsFromAgency

 function getNewsFromAgency()
 {
     //Retrieve recent news and set them into context
     $newest_news_url = sprintf("http://store.nurigo.net/?module=newsagency&act=getNewsagencyArticle&inst=notice&top=6&loc=%s", _XE_LOCATION_);
     $cache_file = sprintf("%sfiles/cache/license_news.%s.cache.php", _XE_PATH_, _XE_LOCATION_);
     if (!file_exists($cache_file) || filemtime($cache_file) + 60 * 60 < time()) {
         // Considering if data cannot be retrieved due to network problem, modify filemtime to prevent trying to reload again when refreshing textmessageistration page
         // Ensure to access the textmessageistration page even though news cannot be displayed
         FileHandler::writeFile($cache_file, '');
         FileHandler::getRemoteFile($newest_news_url, $cache_file, null, 1, 'GET', 'text/html', array('REQUESTURL' => getFullUrl('')));
     }
     if (file_exists($cache_file)) {
         $oXml = new XmlParser();
         $buff = $oXml->parse(FileHandler::readFile($cache_file));
         $item = $buff->zbxe_news->item;
         if ($item) {
             if (!is_array($item)) {
                 $item = array($item);
             }
             foreach ($item as $key => $val) {
                 $obj = null;
                 $obj->title = $val->body;
                 $obj->date = $val->attrs->date;
                 $obj->url = $val->attrs->url;
                 $news[] = $obj;
             }
             Context::set('news', $news);
         }
         Context::set('released_version', $buff->zbxe_news->attrs->released_version);
         Context::set('download_link', $buff->zbxe_news->attrs->download_link);
     }
 }
开发者ID:WEN2ER,项目名称:nurigo,代码行数:32,代码来源:license.admin.view.php

示例7: triggerDispFileAdditionSetup

 /**
  * @brief 서비스형 모듈의 추가 설정을 위한 부분
  * file의 사용 형태에 대한 설정만 받음
  **/
 function triggerDispFileAdditionSetup(&$obj)
 {
     $current_module_srl = Context::get('module_srl');
     $current_module_srls = Context::get('module_srls');
     if (!$current_module_srl && !$current_module_srls) {
         // 선택된 모듈의 정보를 가져옴
         $current_module_info = Context::get('current_module_info');
         $current_module_srl = $current_module_info->module_srl;
         if (!$current_module_srl) {
             return new Object();
         }
     }
     // 선택된 모듈의 file설정을 가져옴
     $oFileModel =& getModel('file');
     $file_config = $oFileModel->getFileModuleConfig($current_module_srl);
     Context::set('file_config', $file_config);
     // 그룹의 설정을 위한 권한 가져오기
     $oMemberModel =& getModel('member');
     $site_module_info = Context::get('site_module_info');
     $group_list = $oMemberModel->getGroups($site_module_info->site_srl);
     Context::set('group_list', $group_list);
     // 템플릿 파일 지정
     $oTemplate =& TemplateHandler::getInstance();
     $tpl = $oTemplate->compile($this->module_path . 'tpl', 'file_module_config');
     $obj .= $tpl;
     return new Object();
 }
开发者ID:hottaro,项目名称:xpressengine,代码行数:31,代码来源:file.view.php

示例8: getPaynotyAdminDelete

	function getPaynotyAdminDelete() 
	{
		// get configs.
		$args->config_srl = Context::get('config_srl');
		$output = executeQuery("paynoty.getConfig", $args);
		$id_list = $output->data->id_list;
		$group_srl_list = $output->data->group_srl_list;
		$config = $output->data;

		$args->config_srls = Context::get('config_srls');
		$output = executeQueryArray("paynoty.getModuleInfoByConfigSrl", $args);
		$mid_list = array();
		if ($output->data) 
		{
			foreach ($output->data as $no => $val) 
			{
				$mid_list[] = $val->mid;
			}
		}
		$config->mid_list = join(',', $mid_list);

		Context::set('config', $config);

		$oTemplate = &TemplateHandler::getInstance();
		$tpl = $oTemplate->compile($this->module_path.'tpl', 'delete');
		$this->add('tpl', str_replace("\n"," ",$tpl));
	}
开发者ID:WEN2ER,项目名称:nurigo,代码行数:27,代码来源:paynoty.admin.model.php

示例9: dispImporterAdminContent

 /**
  * @brief XML 파일을 업로드하는 form 출력
  **/
 function dispImporterAdminContent()
 {
     $this->setTemplatePath($this->module_path . 'tpl');
     $source_type = Context::get('source_type');
     switch ($source_type) {
         case 'member':
             $template_filename = "member";
             break;
         case 'ttxml':
             $oModuleModel =& getModel('module');
             $mid_list = $oModuleModel->getMidList();
             Context::set('mid_list', $mid_list);
             $template_filename = "ttxml";
             break;
         case 'module':
             $oModuleModel =& getModel('module');
             $mid_list = $oModuleModel->getMidList();
             Context::set('mid_list', $mid_list);
             $template_filename = "module";
             break;
         case 'message':
             $template_filename = "message";
             break;
         case 'sync':
             $template_filename = "sync";
             break;
         default:
             $template_filename = "index";
             break;
     }
     $this->setTemplateFile($template_filename);
 }
开发者ID:hottaro,项目名称:xpressengine,代码行数:35,代码来源:importer.admin.view.php

示例10: dispInipaymobileForm

 /**
  * @brief epay.getPaymentForm 에서 호출됨, 이니시스 모바일 결제폼 출력
  */
 function dispInipaymobileForm()
 {
     $oEpayController =& getController('epay');
     // get products info using cartnos
     $reviewOutput = $oEpayController->reviewOrder();
     if (!$reviewOutput->toBool()) {
         return $reviewOutput;
     }
     Context::set('review_form', $reviewOutput->review_form);
     Context::set('item_name', $reviewOutput->item_name);
     Context::set('price', $reviewOutput->price);
     Context::set('transaction_srl', $reviewOutput->transaction_srl);
     Context::set('order_srl', $reviewOutput->order_srl);
     Context::set('purchaser_name', $reviewOutput->purchaser_name);
     Context::set('purchaser_email', $reviewOutput->purchaser_email);
     Context::set('purchaser_telnum', $reviewOutput->purchaser_telnum);
     /**
      * next_url 및 return_url 에 url 구성은 http://domain/directory?var=val 형식으로 ?var1=val1&var2=val2 처럼 &은 허용되지 않는다. 그래서 부득이하게 n_page 에 transaction_srl을 담아오면 next_url로, r_page에 transaction_srl을 담아오면 return_url로 처리한다.
      */
     $transaction_srl = $reviewOutput->transaction_srl;
     // 가상계좌, 안심클릭시 (n_page)
     Context::set('next_url', getNotEncodedFullUrl('') . $this->module_info->mid . '?n_page=' . $transaction_srl);
     // ISP 결제시 (r_page), 결제처리는 noti_url이 호출되어 처리되므로 여기서는 그냥 결과만 보여줌
     Context::set('return_url', getNotEncodedFullUrl('') . $this->module_info->mid . '?r_page=' . $transaction_srl);
     // ISP 결제시 처리 URL 지정
     Context::set('noti_url', getNotEncodedFullUrl('') . $this->module_info->mid . '?noti_page=' . $transaction_srl);
     $this->setTemplateFile('formdata');
 }
开发者ID:seoeun,项目名称:xe-module-inipaymobile,代码行数:31,代码来源:inipaymobile.view.php

示例11: dispCounterAdminIndex

 /**
  * Admin page 
  *
  * @return Object
  */
 function dispCounterAdminIndex()
 {
     // set today's if no date is given
     $selected_date = (int) Context::get('selected_date');
     if (!$selected_date) {
         $selected_date = date("Ymd");
     }
     Context::set('selected_date', $selected_date);
     // create the counter model object
     $oCounterModel = getModel('counter');
     // get a total count and daily count
     $site_module_info = Context::get('site_module_info');
     $status = $oCounterModel->getStatus(array(0, $selected_date), $site_module_info->site_srl);
     Context::set('total_counter', $status[0]);
     Context::set('selected_day_counter', $status[$selected_date]);
     // get data by time, day, month, and year
     $type = Context::get('type');
     if (!$type) {
         $type = 'day';
         Context::set('type', $type);
     }
     $detail_status = $oCounterModel->getHourlyStatus($type, $selected_date, $site_module_info->site_srl);
     Context::set('detail_status', $detail_status);
     // display
     $this->setTemplateFile('index');
 }
开发者ID:rhymix,项目名称:rhymix,代码行数:31,代码来源:counter.admin.view.php

示例12: triggerDispCommentAdditionSetup

 /**
  * Add a form fot comment setting on the additional setting of module
  * @param string $obj
  * @return string
  */
 function triggerDispCommentAdditionSetup(&$obj)
 {
     $current_module_srl = Context::get('module_srl');
     $current_module_srls = Context::get('module_srls');
     if (!$current_module_srl && !$current_module_srls) {
         // get information of the selected module
         $current_module_info = Context::get('current_module_info');
         $current_module_srl = $current_module_info->module_srl;
         if (!$current_module_srl) {
             return new Object();
         }
     }
     // get the comment configuration
     $oCommentModel =& getModel('comment');
     $comment_config = $oCommentModel->getCommentConfig($current_module_srl);
     Context::set('comment_config', $comment_config);
     // get a group list
     $oMemberModel =& getModel('member');
     $group_list = $oMemberModel->getGroups();
     Context::set('group_list', $group_list);
     // Set a template file
     $oTemplate =& TemplateHandler::getInstance();
     $tpl = $oTemplate->compile($this->module_path . 'tpl', 'comment_module_config');
     $obj .= $tpl;
     return new Object();
 }
开发者ID:relip,项目名称:xe-core,代码行数:31,代码来源:comment.view.php

示例13: dispCommunicationAdminConfig

 /**
  * configuration to manage messages and friends
  * @return void
  */
 function dispCommunicationAdminConfig()
 {
     // Creating an object
     $oEditorModel = getModel('editor');
     $oModuleModel = getModel('module');
     $oLayoutModel = getModel('layout');
     $oCommunicationModel = getModel('communication');
     // get the configurations of communication module
     Context::set('config', $oCommunicationModel->getConfig());
     // get a list of layout
     Context::set('layout_list', $oLayoutModel->getLayoutList());
     // get a list of editor skins
     Context::set('editor_skin_list', $oEditorModel->getEditorSkinList());
     // get a list of communication skins
     Context::set('skin_list', $oModuleModel->getSkins($this->module_path));
     // get a list of communication skins
     Context::set('mobile_skin_list', $oModuleModel->getSkins($this->module_path, 'm.skins'));
     // Get a layout list
     $layout_list = $oLayoutModel->getLayoutList();
     Context::set('layout_list', $layout_list);
     $mlayout_list = $oLayoutModel->getLayoutList(0, 'M');
     Context::set('mlayout_list', $mlayout_list);
     $security = new Security();
     $security->encodeHTML('config..');
     $security->encodeHTML('layout_list..');
     $security->encodeHTML('editor_skin_list..');
     $security->encodeHTML('skin_list..title');
     $security->encodeHTML('mobile_skin_list..title');
     $oMemberModel = getModel('member');
     $group_list = $oMemberModel->getGroups($this->site_srl);
     Context::set('group_list', $group_list);
     // specify a template
     $this->setTemplatePath($this->module_path . 'tpl');
     $this->setTemplateFile('index');
 }
开发者ID:rhymix,项目名称:rhymix,代码行数:39,代码来源:communication.admin.view.php

示例14: proc

 /**
  * @brief 위젯의 실행 부분
  *
  * ./widgets/위젯/conf/info.xml 에 선언한 extra_vars를 args로 받는다
  * 결과를 만든후 print가 아니라 return 해주어야 한다
  **/
 function proc($args)
 {
     // 제목
     $title = $args->title;
     // 출력된 목록 수
     $list_count = (int) $args->list_count;
     if (!$list_count) {
         $list_count = 5;
     }
     $args->list_count = $list_count;
     // 중복 허용/ 비허용 체크
     if ($args->allow_repetition != 'Y') {
         $output = executeQueryArray('widgets.planet_document.getUniqueNewestDocuments', $args);
     } else {
         $output = executeQueryArray('widgets.planet_document.getNewestDocuments', $args);
     }
     // 플래닛 글 목록 구함
     $oPlanetModel =& getModel('planet');
     Context::set('planet', $planet = $oPlanetModel->getPlanet());
     if (count($output->data)) {
         foreach ($output->data as $key => $val) {
             $document_srl = $val->document_srl;
             $oPlanet = null;
             $oPlanet = new PlanetItem();
             $oPlanet->setAttribute($val);
             $planet_list[] = $oPlanet;
         }
     } else {
         $planet_list = array();
     }
     Context::set('planet_list', $planet_list);
     // 템플릿의 스킨 경로를 지정 (skin, colorset에 따른 값을 설정)
     $tpl_path = sprintf('%sskins/%s', $this->widget_path, $args->skin);
     Context::set('colorset', $args->colorset);
     // 템플릿 파일을 지정
     $tpl_file = 'list';
     if (!$args->thumbnail_width) {
         $args->thumbnail_width = 50;
     }
     if (!$args->thumbnail_height) {
         $args->thumbnail_height = 50;
     }
     $widget_info->thumbnail_width = $args->thumbnail_width;
     $widget_info->thumbnail_height = $args->thumbnail_height;
     $widget_info->domain = Context::getDefaultUrl();
     if (!$args->show_number_of_comments) {
         $args->show_number_of_comments = "N";
     }
     if (!$args->show_author_name) {
         $args->show_author_name = "N";
     }
     $widget_info->show_number_of_comments = $args->show_number_of_comments;
     $widget_info->show_author_name = $args->show_author_name;
     $widget_info->content_cut_size = $args->content_cut_size;
     Context::set('widget_info', $widget_info);
     // 템플릿 컴파일
     $oTemplate =& TemplateHandler::getInstance();
     $output = $oTemplate->compile($tpl_path, $tpl_file);
     return $output;
 }
开发者ID:eondcom,项目名称:xe-planet,代码行数:66,代码来源:planet_document.class.php

示例15: dispMessage

 /**
  * @brief Display messages
  **/
 function dispMessage()
 {
     // Get configurations (using module model object)
     $oModuleModel =& getModel('module');
     $this->module_config = $config = $oModuleModel->getModuleConfig('message', $this->module_info->site_srl);
     if (!$config->skin) {
         $config->skin = 'default';
         $template_path = sprintf('%sskins/%s', $this->module_path, $config->skin);
     } else {
         //check theme
         $config_parse = explode('|@|', $config->skin);
         if (count($config_parse) > 1) {
             $template_path = sprintf('./themes/%s/modules/message/', $config_parse[0]);
         } else {
             $template_path = sprintf('%sskins/%s', $this->module_path, $config->skin);
         }
     }
     // Template path
     $this->setTemplatePath($template_path);
     // Get the member configuration
     $member_config = $oModuleModel->getModuleConfig('member');
     Context::set('member_config', $member_config);
     // Set a flag to check if the https connection is made when using SSL and create https url
     $ssl_mode = false;
     if ($member_config->enable_ssl == 'Y') {
         if (preg_match('/^https:\\/\\//i', Context::getRequestUri())) {
             $ssl_mode = true;
         }
     }
     Context::set('ssl_mode', $ssl_mode);
     Context::set('system_message', nl2br($this->getMessage()));
     $this->setTemplateFile('system_message');
 }
开发者ID:relip,项目名称:xe-core,代码行数:36,代码来源:message.view.php


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