• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP getFullUrl函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中getFullUrl函数的典型用法代码示例。如果您正苦于以下问题:PHP getFullUrl函数的具体用法?PHP getFullUrl怎么用?PHP getFullUrl使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: getNewsFromAgency

function getNewsFromAgency()
{
    //Retrieve recent news and set them into context
    $newest_news_url = sprintf("http://www.xeshoppingmall.com/?module=newsagency&act=getNewsagencyArticle&inst=notice&top=6&loc=%s", _XE_LOCATION_);
    $cache_file = sprintf("%sfiles/cache/nstore_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;
            }
            return $news;
        }
    }
}
开发者ID:umjinsun12,项目名称:dngshin,代码行数:30,代码来源:functions.php


示例2: triggerAroundmapInsert

 /**
  * @brief xe 게시판 템플릿(입력,수정폼,보기)에 주변지도모듈을 삽입한다.
  * @param $content 삽입할 게시판의 컨텐츠
  * @return 
  */
 function triggerAroundmapInsert(&$content)
 {
     // 현재의 액션/모듈번호 값 가져오기
     $act = Context::get('act');
     $module_info = Context::get("module_info");
     $module_srl = $module_info->module_srl;
     $oModuleModel =& getModel('module');
     $this->module_config = $oModuleModel->getModuleConfig('aroundmap');
     // aroundmap모듈이 사용가능한 상태 인지 확인
     if (!$this->isAroundmapEnable($act, $module_srl)) {
         return new Object();
     }
     // aroundmap모듈에 필요한 값 저장
     $document_srl = Context::get('document_srl');
     $output = $this->setAroundmapValues($document_srl);
     // 템플릿 파일에 aroundmap 모듈 삽입
     if ($act == 'dispBoardWrite') {
         // 쓰기/수정 페이지
         $content = preg_replace_callback('(<!-- 파일 업로드 영역 -->)', 'aroundmapController::insertWriteMap', $content);
     } else {
         // 보기 페이지
         // Use Sphinx if useSphinx is checked, or use mysql.
         if (strcmp($this->module_config->useSphinx, 'true') == 0) {
             $aroundmapList = $this->getAroundmapListSphinx($document_srl, $output->data->lat, $output->data->lon);
         } else {
             $aroundmapList = $this->getAroundmapListMysql($document_srl, $output->data->lat, $output->data->lon);
         }
         Context::set('aroundmapList', $aroundmapList);
         Context::Set('full_url', getFullUrl(''));
         $content = preg_replace_callback('/<\\!--AfterDocument\\(([0-9]*),([0-9\\-]*)\\)-->/i', 'aroundmapController::insertViewMap', $content);
     }
     return new Object();
 }
开发者ID:umjinsun12,项目名称:dngshin,代码行数:38,代码来源:aroundmap.controller.php


示例3: processPaynoty

	function processPaynoty(&$config,&$obj,&$sender,&$module_info) 
	{
		// message content
		$sms_message = $this->mergeKeywords($config->content, $obj);
		$sms_message = $this->mergeKeywords($sms_message, $module_info);
		$sms_message = str_replace("&nbsp;", "", strip_tags($sms_message));

		// mail content
		$mail_content = $this->mergeKeywords($config->mail_content, $obj);
		$mail_content = $this->mergeKeywords($mail_content, $module_info);

/*
		// get document info.
		$oDocumentModel = &getModel('document');
		$oDocument = $oDocumentModel->getDocument($obj->document_srl);
		debugPrint('oDocument : ' . serialize($oDocument));
 */

		$tmp_obj->article_url = getFullUrl('','document_srl', $obj->document_srl);
		$tmp_content = $this->mergeKeywords($mail_content, $tmp_obj);
		$tmp_message = $this->mergeKeywords($sms_message, $tmp_obj);
		$output = $this->sendMessages($tmp_message, $tmp_content, $obj->order_title, $sender, $config);
		if (!$output->toBool()) return $output;
		return new Object();
	}
开发者ID:WEN2ER,项目名称:nurigo,代码行数:25,代码来源:paynoty.controller.php


示例4: dispGgmailingRequest

 function dispGgmailingRequest()
 {
     $args = Context::getRequestVars();
     $oModuleModel =& getModel('module');
     $config = $oModuleModel->getModuleConfig('ggmailing');
     $this->config = $config;
     Context::set('config', $config);
     $dmn = getFullUrl('');
     $dmn = parse_url($dmn);
     $domain = substr($dmn['host'] . $dmn['path'], 0, -1);
     $domain = str_replace('www.', '', $domain);
     $ggmailing_serv_url = $config->ggmailing_serv_url;
     if ($config->ggmailing_ssl == 'N' || !$config->ggmailing_ssl) {
         $ggmailing_ssl = 'http://';
         $ggmailing_ssl_port = '';
     } elseif ($config->ggmailing_ssl == 'Y') {
         $ggmailing_ssl = 'https://';
         $ggmailing_ssl_port = ':' . $config->ggmailing_ssl_port;
     }
     $url = $ggmailing_ssl . $ggmailing_serv_url . $ggmailing_ssl_port . '/index.php';
     // 헤더, 공지, 전송완료값 모두 처리
     $post_data = array('act' => 'dispWwapimanagerRequest', 'authkey' => $config->ggmailing_authkey, 'mid' => 'auth_woorimail', 'domain' => $domain, 'type' => 'ggmailing', 'notice_mid' => $args->notice_mid, 'ggmailing_document_srl' => $args->ggmailing_document_srl, 'ggmailing_send_srl' => $args->ggmailing_send_srl);
     // 비동기
     $response = $this->curl_request_async($url, $post_data, $type = 'POST', $output = 'json');
     Context::set('args', $args);
     Context::set('response', $response);
     $this->setTemplateFile('request');
 }
开发者ID:ForPeople,项目名称:WooriAlim,代码行数:28,代码来源:ggmailing.view.php


示例5: getModuleFeedUrl

 /**
  * Create the Feed url.
  *
  * @param string $vid Vid
  * @param string $mid mid
  * @param string $format Feed format. rss | atom
  * @param bool $absolute_url
  * @return string
  */
 function getModuleFeedUrl($vid, $mid, $format = 'rss', $absolute_url = false)
 {
     if ($absolute_url) {
         return getFullUrl('', 'vid', $vid, 'mid', $mid, 'act', $format);
     } else {
         return getUrl('', 'vid', $vid, 'mid', $mid, 'act', $format);
     }
 }
开发者ID:kimkucheol,项目名称:xe-core,代码行数:17,代码来源:rss.model.php


示例6: checkLicense

 function checkLicense($prodid, $user_id, $serial_number, $force = FALSE)
 {
     $hostinfo = array($_SERVER['SERVER_ADDR'], $_SERVER['SERVER_NAME'], $_SERVER['HTTP_HOST']);
     $agency_url = sprintf("http://www.xeshoppingmall.com/?module=drmagency&act=getDrmagencyLicense&prodid=%s&hostinfo=%s&user=%s&serial=%s", $prodid, implode(',', $hostinfo), $user_id, $serial_number);
     $cache_file = sprintf("%sfiles/cache/license_%s.cache.php", _XE_PATH_, $prodid);
     if (!file_exists($cache_file) || filemtime($cache_file) + 60 * 60 < time() || $force == TRUE) {
         FileHandler::writeFile($cache_file, '');
         FileHandler::getRemoteFile($agency_url, $cache_file, null, 1, 'GET', 'text/html', array('REQUESTURL' => getFullUrl('')));
     }
     return $cache_file;
 }
开发者ID:WEN2ER,项目名称:nurigo,代码行数:11,代码来源:license.model.php


示例7: dispTextmessageAdminIndex

 /**
  * @brief Display Super Admin Dashboard
  **/
 function dispTextmessageAdminIndex()
 {
     $oTextmessageModel = getModel('textmessage');
     $config = $oTextmessageModel->getConfig();
     if (!$config) {
         Context::set('isSetupCompleted', false);
     } else {
         Context::set('isSetupCompleted', true);
     }
     Context::set('config', $config);
     //Retrieve recent news and set them into context
     $newest_news_url = sprintf("http://www.coolsms.co.kr/?module=newsagency&act=getNewsagencyArticle&inst=notice&loc=%s", _XE_LOCATION_);
     $cache_file = sprintf("%sfiles/cache/cool_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 textmessage registration 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 = new stdClass();
                 $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);
     }
     $this->setTemplateFile('index');
 }
开发者ID:bjrambo,项目名称:nurigo,代码行数:44,代码来源:textmessage.admin.view.php


示例8: dispSyndicationAdminConfig

 public function dispSyndicationAdminConfig()
 {
     $oModuleModel = getModel('module');
     $module_config = $oModuleModel->getModuleConfig('syndication');
     if (!$module_config->target_services) {
         $module_config->target_services = array();
     }
     foreach ($this->services as $key => $val) {
         unset($obj);
         $obj = new stdClass();
         $obj->service = $key;
         $obj->ping = $val;
         $obj->selected = in_array($key, $module_config->target_services) ? true : false;
         $services[] = $obj;
     }
     Context::set('services', $services);
     if (!$module_config->site_url) {
         $module_config->site_url = Context::getDefaultUrl() ? Context::getDefaultUrl() : getFullUrl();
     }
     Context::set('site_url', preg_replace('/^(http|https):\\/\\//i', '', $module_config->site_url));
     if (!$module_config->year) {
         $module_config->year = date("Y");
     }
     Context::set('year', $module_config->year);
     $output = executeQueryArray('syndication.getExceptModules');
     $except_module_list = array();
     if ($output->data && count($output->data) > 0) {
         foreach ($output->data as $item) {
             $except_module_list[] = $item;
         }
     }
     Context::set('except_module', $except_module_list);
     //Security
     $security = new Security();
     $security->encodeHTML('services..service', 'except_module..ping');
     $security->encodeHTML('except_module..mid', 'except_module..browser_title');
     $this->setTemplatePath($this->module_path . 'tpl');
     $this->setTemplateFile('config');
 }
开发者ID:JeonJonguk,项目名称:Pull-Request-Test,代码行数:39,代码来源:syndication.admin.view.php


示例9: dispSyndicationAdminConfig

 public function dispSyndicationAdminConfig()
 {
     $oModuleModel = getModel('module');
     $module_config = $oModuleModel->getModuleConfig('syndication');
     $oSyndicationModel = getModel('syndication');
     Context::set('ping_log', $oSyndicationModel->getResentPingLog());
     if (!$module_config->syndication_use) {
         $module_config->syndication_use = 'Y';
     }
     if (!$module_config->site_url) {
         $module_config->site_url = Context::getDefaultUrl() ? Context::getDefaultUrl() : getFullUrl();
     }
     if (!$module_config->year) {
         $module_config->year = date("Y");
     }
     if (!isset($module_config->syndication_password)) {
         $module_config->syndication_password = uniqid();
     }
     Context::set('syndication_use', $module_config->syndication_use);
     Context::set('site_url', preg_replace('/^(http|https):\\/\\//i', '', $module_config->site_url));
     Context::set('year', $module_config->year);
     Context::set('syndication_token', $module_config->syndication_token);
     Context::set('syndication_password', $module_config->syndication_password);
     $output = executeQueryArray('syndication.getExceptModules');
     $except_module_list = array();
     if ($output->data && count($output->data) > 0) {
         foreach ($output->data as $item) {
             $except_module_list[] = $item;
         }
     }
     Context::set('except_module', $except_module_list);
     //Security
     $security = new Security();
     $security->encodeHTML('services..service', 'except_module..ping');
     $security->encodeHTML('except_module..mid', 'except_module..browser_title');
     $this->setTemplatePath($this->module_path . 'tpl');
     $this->setTemplateFile('config');
 }
开发者ID:leehankyeol,项目名称:JaWeTip,代码行数:38,代码来源:syndication.admin.view.php


示例10: procMemberModifyEmailAddress

 function procMemberModifyEmailAddress()
 {
     if (!Context::get('is_logged')) {
         return $this->stop('msg_not_logged');
     }
     $member_info = Context::get('logged_info');
     $newEmail = Context::get('email_address');
     if (!$newEmail) {
         return $this->stop('msg_invalid_request');
     }
     $oMemberModel = getModel('member');
     $member_srl = $oMemberModel->getMemberSrlByEmailAddress($newEmail);
     if ($member_srl) {
         return new Object(-1, 'msg_exists_email_address');
     }
     if ($_SESSION['rechecked_password_step'] != 'INPUT_DATA') {
         return $this->stop('msg_invalid_request');
     }
     unset($_SESSION['rechecked_password_step']);
     $auth_args = new stdClass();
     $auth_args->user_id = $newEmail;
     $auth_args->member_srl = $member_info->member_srl;
     $auth_args->auth_key = md5(rand(0, 999999));
     $auth_args->new_password = 'XE_change_emaill_address';
     $output = executeQuery('member.insertAuthMail', $auth_args);
     if (!$output->toBool()) {
         $oDB->rollback();
         return $output;
     }
     $oModuleModel = getModel('module');
     $member_config = $oModuleModel->getModuleConfig('member');
     $tpl_path = sprintf('%sskins/%s', $this->module_path, $member_config->skin);
     if (!is_dir($tpl_path)) {
         $tpl_path = sprintf('%sskins/%s', $this->module_path, 'default');
     }
     global $lang;
     $memberInfo = array();
     $memberInfo[$lang->email_address] = $member_info->email_address;
     $memberInfo[$lang->nick_name] = $member_info->nick_name;
     Context::set('memberInfo', $memberInfo);
     Context::set('newEmail', $newEmail);
     $auth_url = getFullUrl('', 'module', 'member', 'act', 'procMemberAuthEmailAddress', 'member_srl', $member_info->member_srl, 'auth_key', $auth_args->auth_key);
     Context::set('auth_url', $auth_url);
     $oTemplate =& TemplateHandler::getInstance();
     $content = $oTemplate->compile($tpl_path, 'confirm_member_new_email');
     $oMail = new Mail();
     $oMail->setTitle(Context::getLang('title_modify_email_address'));
     $oMail->setContent($content);
     $oMail->setSender($member_config->webmaster_name ? $member_config->webmaster_name : 'webmaster', $member_config->webmaster_email);
     $oMail->setReceiptor($member_info->nick_name, $newEmail);
     $result = $oMail->send();
     $msg = sprintf(Context::getLang('msg_confirm_mail_sent'), $newEmail);
     $this->setMessage($msg);
     $returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'mid', Context::get('mid'), 'act', '');
     $this->setRedirectUrl($returnUrl);
 }
开发者ID:Gunmania,项目名称:xe-core,代码行数:56,代码来源:member.controller.php


示例11: sendToUpperReplier

 /**
  * send to upper repliers
  */
 function sendToUpperReplier($upperComment, $mobileContent, $mailContent, $title, &$commentInfo, &$config)
 {
     // get the references of module MVC instances.
     $oMemberModel =& getModel('member');
     // get member_info
     $member_info = $oMemberModel->getMemberInfoByMemberSrl($upperComment->member_srl);
     $upperReplier = $this->getCommentMemberInfo($upperComment);
     $recipientNumber = $this->getRecipientNumberForUpperReplier($member_info, $config);
     $senderNumber = $config->sender_phone;
     $recipientEmailAddress = $upperReplier->email_address;
     $recipientName = $upperReplier->nick_name;
     if (!$senderEmailAddress) {
         $senderEmailAddress = $commentInfo->email_address;
     }
     if (!$senderName) {
         $senderName = $commentInfo->nick_name;
     }
     $senderEmailAddress = $config->email_sender_address;
     $senderName = $config->email_sender_name;
     if (!$senderEmailAddress) {
         $senderEmailAddress = $recipientEmailAddress;
     }
     if (!$senderName) {
         $senderName = $recipientName;
     }
     $tmpObj->article_url = getFullUrl('', 'document_srl', $commentInfo->document_srl) . '#comment_' . $commentInfo->parent_srl;
     $tmpContent = $this->mergeKeywords($mailContent, $tmpObj);
     $tmpMessage = $this->mergeKeywords($mobileContent, $tmpObj);
     $this->sendMessages($recipientNumber, $senderNumber, $recipientEmailAddress, $recipientName, $senderEmailAddress, $senderName, $tmpMessage, $tmpContent, $title, $config, $commentInfo);
 }
开发者ID:kang85,项目名称:xe-module-notification,代码行数:33,代码来源:notification.controller.php


示例12: triggerBeforeDisplay

 function triggerBeforeDisplay(&$output_content)
 {
     if (Context::getResponseMethod() != 'HTML') {
         return;
     }
     if (Context::get('module') == 'admin') {
         return;
     }
     $oModuleModel = getModel('module');
     $config = $this->getConfig();
     $logged_info = Context::get('logged_info');
     $current_module_info = Context::get('current_module_info');
     $site_module_info = Context::get('site_module_info');
     $document_srl = Context::get('document_srl');
     $is_article = false;
     $is_index = $current_module_info->module_srl == $site_module_info->module_srl ? true : false;
     $piece = new stdClass();
     $piece->document_title = null;
     $piece->type = 'website';
     $piece->url = getFullUrl('');
     $piece->title = Context::getBrowserTitle();
     $piece->description = $config->site_description;
     $piece->keywords = $config->site_keywords;
     $piece->image = array();
     $piece->author = null;
     if ($document_srl) {
         $oDocument = Context::get('oDocument');
         if (!is_a($oDocument, 'documentItem')) {
             $oDocumentModel = getModel('document');
             $oDocument = $oDocumentModel->getDocument($document_srl);
         }
         if (is_a($oDocument, 'documentItem') && $document_srl == $oDocument->document_srl) {
             $is_article = true;
         }
     }
     // 문서 데이터 수집
     if ($is_article) {
         if (!$oDocument->isSecret()) {
             $piece->document_title = $oDocument->getTitleText();
             $piece->url = getFullUrl('', 'mid', $current_module_info->mid, 'document_srl', $document_srl);
             $piece->type = 'article';
             $piece->description = trim(str_replace('&nbsp;', ' ', $oDocument->getContentText(400)));
             $piece->author = $oDocument->getNickName();
             if (count($oDocument->get('tag_list'))) {
                 $tags = implode(',', $oDocument->get('tag_list'));
                 if ($tags) {
                     $piece->keywords = $tags;
                 }
             }
             if ($oDocument->hasUploadedFiles()) {
                 $image_ext = array('bmp', 'gif', 'jpg', 'jpeg', 'png');
                 foreach ($oDocument->getUploadedFiles() as $file) {
                     if ($file->isvalid != 'Y') {
                         continue;
                     }
                     $ext = array_pop(explode('.', $file->uploaded_filename));
                     if (!in_array(strtolower($ext), $image_ext)) {
                         continue;
                     }
                     $piece->image[] = Context::get('request_uri') . $file->uploaded_filename;
                 }
             }
         } else {
             $piece->url = getFullUrl('', 'mid', $current_module_info->mid);
         }
     } else {
         if (!$is_index) {
             $page = Context::get('page') > 1 ? Context::get('page') : null;
             $piece->url = getNotEncodedFullUrl('mid', $current_module_info->mid, 'page', $page);
         }
     }
     $piece->title = $this->getBrowserTitle($piece->document_title);
     if ($config->site_image_url) {
         $piece->image[] = $config->site_image_url;
     }
     $this->addLink('canonical', $piece->url);
     $this->addMeta('keywords', $piece->keywords);
     $this->addMeta('description', $piece->description);
     // Open Graph
     $this->addMeta('og:type', $piece->type);
     $this->addMeta('og:url', $piece->url);
     $this->addMeta('og:site_name', $config->site_name);
     $this->addMeta('og:title', $piece->title);
     $this->addMeta('og:description', $piece->description);
     $this->addMeta('og:article:author', $piece->author);
     foreach ($piece->image as $img) {
         $this->addMeta('og:image', $img);
     }
     $this->canonical_url = $piece->url;
     $this->applySEO();
     if ($config->use_optimize_title == 'Y') {
         Context::setBrowserTitle($piece->title);
     }
 }
开发者ID:misol,项目名称:xe-module-seo,代码行数:94,代码来源:seo.controller.php


示例13: notify

 function notify($type, $content)
 {
     // useNotify가 아니면 return
     if (!$this->useNotify()) {
         return;
     }
     // 글쓴이가 로그인 유저가 아니면 패스~
     if (!$this->get('member_srl')) {
         return;
     }
     // 현재 로그인한 사용자와 글을 쓴 사용자를 비교하여 동일하면 return
     $logged_info = Context::get('logged_info');
     if ($logged_info->member_srl == $this->get('member_srl')) {
         return;
     }
     // 원본글의 주소를 구함
     $oDocumentModel =& getModel('document');
     $oDocument = $oDocumentModel->getDocument($this->get('document_srl'));
     // 변수 정리
     if ($type) {
         $title = "[" . $type . "] ";
     }
     $title .= cut_str(strip_tags($content), 30, '...');
     $content = sprintf('%s<br /><br />from : <a href="%s#comment_%s" onclick="window.open(this.href);return false;">%s</a>', $content, getFullUrl('', 'document_srl', $this->get('document_srl')), $this->get('comment_srl'), getFullUrl('', 'document_srl', $this->get('document_srl')));
     $receiver_srl = $this->get('member_srl');
     $sender_member_srl = $logged_info->member_srl;
     // 쪽지 발송
     $oCommunicationController =& getController('communication');
     $oCommunicationController->sendMessage($sender_member_srl, $receiver_srl, $title, $content, false);
 }
开发者ID:hottaro,项目名称:xpressengine,代码行数:30,代码来源:comment.item.php


示例14: makeGnbUrl

 /**
  * Include admin menu php file and make menu url
  * Setting admin logo, newest news setting
  * @return void
  */
 function makeGnbUrl($module = 'admin')
 {
     global $lang;
     // Check is_shortcut column
     $oDB = DB::getInstance();
     if (!$oDB->isColumnExists('menu_item', 'is_shortcut')) {
         return;
     }
     $oAdminAdminModel = getAdminModel('admin');
     $lang->menu_gnb_sub = $oAdminAdminModel->getAdminMenuLang();
     $result = $oAdminAdminModel->checkAdminMenu();
     include $result->php_file;
     $oModuleModel = getModel('module');
     // get current menu's subMenuTitle
     $moduleActionInfo = $oModuleModel->getModuleActionXml($module);
     $currentAct = Context::get('act');
     $subMenuTitle = '';
     foreach ((array) $moduleActionInfo->menu as $key => $value) {
         if (isset($value->acts) && is_array($value->acts) && in_array($currentAct, $value->acts)) {
             $subMenuTitle = $value->title;
             break;
         }
     }
     // get current menu's srl(=parentSrl)
     $parentSrl = 0;
     $oMenuAdminConroller = getAdminController('menu');
     foreach ((array) $menu->list as $parentKey => $parentMenu) {
         if (!is_array($parentMenu['list']) || !count($parentMenu['list'])) {
             continue;
         }
         if ($parentMenu['href'] == '#' && count($parentMenu['list'])) {
             $firstChild = current($parentMenu['list']);
             $menu->list[$parentKey]['href'] = $firstChild['href'];
         }
         foreach ($parentMenu['list'] as $childKey => $childMenu) {
             if ($subMenuTitle == $childMenu['text'] && $parentSrl == 0) {
                 $parentSrl = $childMenu['parent_srl'];
             }
         }
     }
     // Admin logo, title setup
     $objConfig = $oModuleModel->getModuleConfig('admin');
     $gnbTitleInfo = new stdClass();
     $gnbTitleInfo->adminTitle = $objConfig->adminTitle ? $objConfig->adminTitle : 'XE Admin';
     $gnbTitleInfo->adminLogo = $objConfig->adminLogo ? $objConfig->adminLogo : 'modules/admin/tpl/img/xe.h1.png';
     $browserTitle = ($subMenuTitle ? $subMenuTitle : 'Dashboard') . ' - ' . $gnbTitleInfo->adminTitle;
     // Get list of favorite
     $oAdminAdminModel = getAdminModel('admin');
     $output = $oAdminAdminModel->getFavoriteList(0, true);
     Context::set('favorite_list', $output->get('favoriteList'));
     // Retrieve recent news and set them into context,
     // move from index method, because use in admin footer
     $newest_news_url = sprintf("http://news.xpressengine.com/%s/news.php?version=%s&package=%s", _XE_LOCATION_, __XE_VERSION__, _XE_PACKAGE_);
     $cache_file = sprintf("%sfiles/cache/newest_news.%s.cache.php", _XE_PATH_, _XE_LOCATION_);
     if (!file_exists($cache_file) || filemtime($cache_file) + 60 * 60 < $_SERVER['REQUEST_TIME']) {
         // Considering if data cannot be retrieved due to network problem, modify filemtime to prevent trying to reload again when refreshing administration page
         // Ensure to access the administration 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 = new stdClass();
                 $obj->title = $val->body;
                 $obj->date = $val->attrs->date;
                 $obj->url = $val->attrs->url;
                 $news[] = $obj;
             }
             Context::set('news', $news);
             if (isset($news) && is_array($news)) {
                 Context::set('latestVersion', array_shift($news));
             }
         }
         Context::set('released_version', $buff->zbxe_news->attrs->released_version);
         Context::set('download_link', $buff->zbxe_news->attrs->download_link);
     }
     Context::set('subMenuTitle', $subMenuTitle);
     Context::set('gnbUrlList', $menu->list);
     Context::set('parentSrl', $parentSrl);
     Context::set('gnb_title_info', $gnbTitleInfo);
     Context::setBrowserTitle($browserTitle);
 }
开发者ID:kimkucheol,项目名称:xe-core,代码行数:94,代码来源:admin.admin.view.php


示例15: dispNproductItemDetail

 /**
  * @brief display item detail info
  */
 function dispNproductItemDetail()
 {
     if ($_COOKIE['mobile'] == "true") {
         Context::set('is_mobile', 'true');
     }
     $oDocumentModel =& getModel('document');
     $oFileModel =& getModel('file');
     $oNproductModel =& getModel('nproduct');
     $oStoreReviewModel =& getModel('store_review');
     $item_srl = Context::get('item_srl');
     $document_srl = Context::get('document_srl');
     Context::set('list_config', $oNproductModel->getDetailListConfig($this->module_info->module_srl));
     // get config
     $config = $oNproductModel->getModuleConfig();
     Context::set('config', $config);
     // item info
     if ($item_srl) {
         $args->item_srl = $item_srl;
     } else {
         if ($document_srl) {
             $args->document_srl = $document_srl;
         } else {
             return new Object(-1, 'Item Not Found.');
         }
     }
     $output = executeQuery('nproduct.getItemInfo', $args);
     if (!$output->toBool()) {
         return $output;
     }
     $item_info = $output->data;
     // thumbnail
     if ($item_info->thumb_file_srl) {
         $file = $oFileModel->getFile($item_info->thumb_file_srl);
         if ($file) {
             $item_info->thumbnail_url = getFullUrl() . $file->download_url;
         }
     }
     $item_info = new nproductItem($item_info, $config->currency, $config->as_sign, $config->decimals);
     // category
     $this->getCategoryTree($this->module_info->module_srl);
     // document
     $oDocument = $oDocumentModel->getDocument($item_info->document_srl);
     Context::set('oDocument', $oDocument);
     if ($item_info->item_srl) {
         $review_list = $oNproductModel->getReviews($item_info);
         Context::set('review_list', $review_list);
     }
     $output = $oNproductModel->discountItem($item_info);
     $item_info->discounted_price = $output->discounted_price;
     $item_info->discount_amount = $output->discount_amount;
     $item_info->discount_info = $output->discount_info;
     Context::set('discounted_price', $output->discounted_price);
     Context::set('discount_amount', $output->discount_amount);
     Context::set('discount_info', $output->discount_info);
     // get options
     $args->item_srl = $item_info->item_srl;
     $output = executeQueryArray('nproduct.getOptions', $args);
     Context::set('options', $output->data);
     // set browser title
     Context::setBrowserTitle(strip_tags($item_info->item_name) . ' - ' . Context::getBrowserTitle());
     // get related items information
     if ($item_info->related_items) {
         if (!$this->isJson($item_info->related_items)) {
             $item_info->related_items = $this->convertCsvToJson($item_info->related_items);
         }
         $relatedItems = json_decode($item_info->related_items);
         $relatedItemSrls = array();
         foreach ($relatedItems as $key => $val) {
             $relatedItemSrls[] = $val->item_srl;
         }
         if (count($relatedItemSrls)) {
             $item_info->related_items = $oNproductModel->getItemList(implode(',', $relatedItemSrls), 999);
         }
     }
     $trigger_output = ModuleHandler::triggerCall('nproduct.dispNproductItemDetail', 'before', $item_info);
     if (!$trigger_output->toBool()) {
         return $trigger_output;
     }
     // pass variables to html template
     Context::set('category', $item_info->category_id);
     Context::set('item_srl', $item_info->item_srl);
     Context::set('item_info', $item_info);
     $extra_vars = NExtraItemList::getList($item_info);
     Context::set('extra_vars', $extra_vars);
     $this->setTemplateFile('itemdetail');
 }
开发者ID:seoeun,项目名称:xe-module-nproduct,代码行数:89,代码来源:nproduct.view.php


示例16: getPermanentUrl

 function getPermanentUrl()
 {
     return getFullUrl('', 'document_srl', $this->get('document_srl'));
 }
开发者ID:jominhyun,项目名称:xe-core,代码行数:4,代码来源:document.item.php


示例17: publish

 function publish()
 {
     $oTextyleModel =& getModel('textyle');
     $oTrackbackController =& getController('trackback');
     if (!$this->oDocument->isExists()) {
         return;
     }
     $oTextyle = $oTextyleModel->getTextyle($this->module_srl);
     if (count($this->trackbacks)) {
         foreach ($this->trackbacks as $trackback_url => $val) {
             $output = $oTrackbackController->sendTrackback($this->oDocument, $trackback_url, $val->charset);
             if ($output->toBool()) {
                 $this->trackbacks[$trackback_url]->log = Context::getLang('published') . ' (' . date("Y-m-d H:i") . ')';
             } else {
                 $this->trackbacks[$trackback_url]->log = $output->getMessage() . ' (' . date("Y-m-d H:i") . ')';
             }
         }
     }
     // fixed link
     $original_content = $this->oDocument->get('content');
     $original_content = preg_replace('/href="(\\.\\/)([^"]*)"/i', 'href="' . getFullUrl() . '$2"', $original_content);
     if (count($this->blogapis)) {
         $apis = $this->getApis();
         foreach ($this->blogapis as $api_srl => $val) {
             if (!$apis[$api_srl] || !$val->reserve) {
                 continue;
             }
             $this->oDocument->add('content', $original_content);
             if ($val->postid) {
                 $output = $this->modifyBlogApi($apis[$api_srl], $val->postid, $val->category);
             } else {
                 $output = $this->sendBlogApi($apis[$api_srl], $val->category);
             }
             if ($output->toBool()) {
                 $this->blogapis[$api_srl]->postid = $output->get('postid');
                 $this->blogapis[$api_srl]->log = Context::getLang('published') . ' (' . date("Y-m-d H:i") . ')';
             } else {
                 $this->blogapis[$api_srl]->postid = null;
                 $this->blogapis[$api_srl]->log = $output->getMessage() . ' (' . date("Y-m-d H:i") . ')';
             }
             $this->blogapis[$api_srl]->reserve = false;
         }
     }
     if ($this->publish_me2day && $oTextyle->getEnableMe2day()) {
         $this->sendMe2day($oTextyle->getMe2dayUserID(), $oTextyle->getMe2dayUserKey());
     }
     if ($this->publish_twitter && $oTextyle->getEnableTwitter()) {
         $this->sendTwitter($oTextyle->getTwitterConsumerKey(), $oTextyle->getTwitterConsumerSecret(), $oTextyle->getTwitterOauthToken(), $oTextyle->getTwitterOauthTokenSecret());
     }
     $this->save();
 }
开发者ID:google-code-backups,项目名称:xe-textyle,代码行数:51,代码来源:publishObject.class.php


示例18: _addOpenGraphMetadata

 /**
  * Add OpenGraph metadata tags.
  * 
  * @param string $output
  * @return void
  */
 function _addOpenGraphMetadata()
 {
     // Get information about the current request.
     $page_type = 'website';
     $current_module_info = Context::get('current_module_info');
     $site_module_info = Context::get('site_module_info');
     $document_srl = Context::get('document_srl');
     if ($document_srl) {
         $oDocument = Context::get('oDocument') ?: getModel('document')->getDocument($document_srl, false, false);
         if ($oDocument instanceof documentItem && $oDocument->document_srl == $document_srl && !$oDocument->isSecret()) {
             $page_type = 'article';
         }
     }
     // Add basic metadata.
     Context::addOpenGraphData('og:title', Context::getBrowserTitle());
     Context::addOpenGraphData('og:site_name', Context::getSiteTitle());
     if ($page_type === 'article' && config('seo.og_extract_description')) {
         $description = trim(utf8_normalize_spaces($oDocument->getContentText(200)));
     } else {
         $description = Context::getMetaTag('description');
     }
     Context::addOpenGraphData('og:description', $description);
     Context::addMetaTag('description', $description);
     // Add metadata about this page.
     Context::addOpenGraphData('og:type', $page_type);
     if ($page_type === 'article') {
         $canonical_url = getFullUrl('', 'mid', $current_module_info->mid, 'document_srl', $document_srl);
     } elseif (($page = Context::get('page')) > 1) {
         $canonical_url = getFullUrl('', 'mid', $current_module_info->mid, 'page', $page);
     } elseif ($current_module_info->module_srl == $site_module_info->module_srl) {
         $canonical_url = getFullUrl('');
     } else {
         $canonical_url = getFullUrl('', 'mid', $current_module_info->mid);
     }
     Context::addOpenGraphData('og:url', $canonical_url);
     Context::setCanonicalURL($canonical_url);
     // Add metadata about the locale.
     $lang_type = Context::getLangType();
     $locales = (include \RX_BASEDIR . 'common/defaults/locales.php');
     if (isset($locales[$lang_type])) {
         Context::addOpenGraphData('og:locale', $locales[$lang_type]['locale']);
     }
     if ($page_type === 'article' && $oDocument->getLangCode() !== $lang_type && isset($locales[$oDocument->getLangCode()])) {
         Context::addOpenGraphData('og:locale:alternate', $locales[$oDocument->getLangCode()]);
     }
     // Add image.
     if ($page_type === 'article' && config('seo.og_extract_images')) {
         if (($document_images = Rhymix\Framework\Cache::get("seo:document_images:{$document_srl}")) === null) {
             $document_images = array();
             if ($oDocument->hasUploadedFiles()) {
                 foreach ($oDocument->getUploadedFiles() as $file) {
                     if ($file->isvalid !== 'Y' || !preg_match('/\\.(?:bmp|gif|jpe?g|png)$/i', $file->uploaded_filename)) {
                         continue;
                     }
                     list($width, $height) = @getimagesize($file->uploaded_filename);
                     if ($width < 100 && $height < 100) {
                         continue;
                     }
                     $image = array('filepath' => $file->uploaded_filename, 'width' => $width, 'height' => $height);
                     if ($file->cover_image === 'Y') {
                         array_unshift($document_images, $image);
                     } else {
                         $document_images[] = $image;
                     }
                     if (count($document_images) >= 1) {
                         break;
                     }
                 }
             }
             Rhymix\Framework\Cache::set("seo:document_images:{$document_srl}", $document_images, 0, true);
         }
     } else {
         $document_images = null;
     }
     if ($document_images) {
         $first_image = reset($document_images);
         $first_image['filepath'] = preg_replace('/^.\\/files\\//', \RX_BASEURL . 'files/', $first_image['filepath']);
         Context::addOpenGraphData('og:image', Rhymix\Framework\URL::getCurrentDomainURL($first_image['filepath']));
         Context::addOpenGraphData('og:image:width', $first_image['width']);
         Context::addOpenGraphData('og:image:height', $first_image['height']);
     } elseif ($default_image = getAdminModel('admin')->getSiteDefaultImageUrl($width, $height)) {
         Context::addOpenGraphData('og:image', Rhymix\Framework\URL::getCurrentDomainURL($default_image));
         if ($width && $height) {
             Context::addOpenGraphData('og:image:width', $width);
             Context::addOpenGraphData('og:image:height', $height);
         }
     }
     // Add datetime for articles.
     if ($page_type === 'arti 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP getGET函数代码示例发布时间:2022-05-15
下一篇:
PHP getFullNameFromQResult函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap