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


PHP Mobile::isMobileCheckByAgent方法代码示例

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


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

示例1: procModule


//.........这里部分代码省略.........
                     $this->error = 'msg_is_not_manager';
                     $oMessageObject =& ModuleHandler::getModuleInstance('message', 'view');
                     $oMessageObject->setError(-1);
                     $oMessageObject->setMessage($this->error);
                     $oMessageObject->dispMessage();
                     return $oMessageObject;
                 }
             }
         } else {
             if ($xml_info->default_index_act && method_exists($oModule, $xml_info->default_index_act)) {
                 $this->act = $xml_info->default_index_act;
             } else {
                 $this->error = 'msg_invalid_request';
                 $oModule->setError(-1);
                 $oModule->setMessage($this->error);
                 return $oModule;
             }
         }
     }
     // ruleset check...
     if (!empty($ruleset)) {
         $rulesetModule = $forward->module ? $forward->module : $this->module;
         $rulesetFile = $oModuleModel->getValidatorFilePath($rulesetModule, $ruleset, $this->mid);
         if (!empty($rulesetFile)) {
             if ($_SESSION['XE_VALIDATOR_ERROR_LANG']) {
                 $errorLang = $_SESSION['XE_VALIDATOR_ERROR_LANG'];
                 foreach ($errorLang as $key => $val) {
                     Context::setLang($key, $val);
                 }
                 unset($_SESSION['XE_VALIDATOR_ERROR_LANG']);
             }
             $Validator = new Validator($rulesetFile);
             $result = $Validator->validate();
             if (!$result) {
                 $lastError = $Validator->getLastError();
                 $returnUrl = Context::get('error_return_url');
                 $errorMsg = $lastError['msg'] ? $lastError['msg'] : 'validation error';
                 //for xml response
                 $oModule->setError(-1);
                 $oModule->setMessage($errorMsg);
                 //for html redirect
                 $this->error = $errorMsg;
                 $_SESSION['XE_VALIDATOR_ERROR'] = -1;
                 $_SESSION['XE_VALIDATOR_MESSAGE'] = $this->error;
                 $_SESSION['XE_VALIDATOR_MESSAGE_TYPE'] = 'error';
                 $_SESSION['XE_VALIDATOR_RETURN_URL'] = $returnUrl;
                 $this->_setInputValueToSession();
                 return $oModule;
             }
         }
     }
     $oModule->setAct($this->act);
     $this->module_info->module_type = $type;
     $oModule->setModuleInfo($this->module_info, $xml_info);
     if ($type == "view" && $this->module_info->use_mobile == "Y" && Mobile::isMobileCheckByAgent()) {
         global $lang;
         $header = '<style type="text/css">div.xe_mobile{opacity:0.7;margin:1em 0;padding:.5em;background:#333;border:1px solid #666;border-left:0;border-right:0}p.xe_mobile{text-align:center;margin:1em 0}a.xe_mobile{color:#ff0;font-weight:bold;font-size:24px}@media only screen and (min-width:500px){a.xe_mobile{font-size:15px}}</style>';
         $footer = '<div class="xe_mobile"><p class="xe_mobile"><a class="xe_mobile" href="' . getUrl('m', '1') . '">' . $lang->msg_pc_to_mobile . '</a></p></div>';
         Context::addHtmlHeader($header);
         Context::addHtmlFooter($footer);
     }
     if ($type == "view" && $kind != 'admin') {
         $module_config = $oModuleModel->getModuleConfig('module');
         if ($module_config->htmlFooter) {
             Context::addHtmlFooter($module_config->htmlFooter);
         }
     }
     // if failed message exists in session, set context
     $this->_setInputErrorToContext();
     $procResult = $oModule->proc();
     $methodList = array('XMLRPC' => 1, 'JSON' => 1);
     if (!$oModule->stop_proc && !isset($methodList[Context::getRequestMethod()])) {
         $error = $oModule->getError();
         $message = $oModule->getMessage();
         $messageType = $oModule->getMessageType();
         $redirectUrl = $oModule->getRedirectUrl();
         if (!$procResult) {
             $this->error = $message;
             if (!$redirectUrl && Context::get('error_return_url')) {
                 $redirectUrl = Context::get('error_return_url');
             }
             $this->_setInputValueToSession();
         } else {
             if (count($_SESSION['INPUT_ERROR'])) {
                 Context::set('INPUT_ERROR', $_SESSION['INPUT_ERROR']);
                 $_SESSION['INPUT_ERROR'] = '';
             }
         }
         $_SESSION['XE_VALIDATOR_ERROR'] = $error;
         if ($message != 'success') {
             $_SESSION['XE_VALIDATOR_MESSAGE'] = $message;
         }
         $_SESSION['XE_VALIDATOR_MESSAGE_TYPE'] = $messageType;
         if (Context::get('xeVirtualRequestMethod') != 'xml') {
             $_SESSION['XE_VALIDATOR_RETURN_URL'] = $redirectUrl;
         }
     }
     unset($logged_info);
     return $oModule;
 }
开发者ID:relip,项目名称:xe-core,代码行数:101,代码来源:ModuleHandler.class.php

示例2:

        echo $__Context->oDocument->document_srl;
        ?>
"><?php 
        echo $__Context->lang->homepage;
        ?>
</label>
			<input type="text" name="homepage" id="homepage_<?php 
        echo $__Context->oDocument->document_srl;
        ?>
" class="itx m_h" />
		</span>
		<?php 
    }
    ?>
		<?php 
    if ($__Context->mi->cmt_wrt == 'editor' || Mobile::isMobileCheckByAgent()) {
        ?>
<button type="submit" class="btn fr"><?php 
        echo $__Context->lang->cmd_registration;
        ?>
</button><?php 
    }
    ?>
		<div class="opt_chk">
			<?php 
    if ($__Context->is_logged) {
        ?>
			<input type="checkbox" name="notify_message" value="Y" id="notify_message_<?php 
        echo $__Context->oDocument->document_srl;
        ?>
"<?php 
开发者ID:umjinsun12,项目名称:dngshin,代码行数:31,代码来源:9c5c45b633394a2f0bedc860a096fb4c.compiled.php

示例3: jQuery

  jQuery(this).animate({right:301}, speed);
  jQuery('.<?php 
echo $__Context->skin_topdiv_class;
?>
 .map_list_wrap').animate({right:0}, speed);
  jQuery(this).html('&raquo;');
},function(){
  jQuery(this).animate({right:0}, speed);
  jQuery('.<?php 
echo $__Context->skin_topdiv_class;
?>
 .map_list_wrap').animate({right:-302}, speed);
  jQuery(this).html('&laquo;');
});
<?php 
if (Mobile::isMobileCheckByAgent() || $__Context->m == 1) {
    ?>
  var fancybox_width = '100%';
  var fancybox_height = '80%';
<?php 
} else {
    ?>
  var fancybox_width = '80%';
  var fancybox_height = '80%';
<?php 
}
?>
//VR 팬시박스 설정
jQuery('.<?php 
echo $__Context->skin_topdiv_class;
?>
开发者ID:umjinsun12,项目名称:dngshin,代码行数:31,代码来源:281b512b24747ae4c1615d591b035649.compiled.php

示例4:

if (!$__Context->enable_default_component) {
    ?>
			settings.enableToolbar = false;
			settings.ckeconfig.toolbarCanCollapse = false;
		<?php 
}
?>
		<?php 
if (!$__Context->enable_component) {
    ?>
			settings.loadXeComponent = false;
		<?php 
}
?>
		<?php 
if ($__Context->module_type === 'comment' || Mobile::isMobileCheckByAgent()) {
    ?>
			settings.ckeconfig.toolbarStartupExpanded = false;
		<?php 
}
?>
		
		<?php 
if (!$__Context->html_mode) {
    ?>
			settings.ckeconfig.removeButtons = 'Save,Preview,Print,Cut,Copy,Paste,Source';
		<?php 
}
?>
		<?php 
if ($__Context->css_content) {
开发者ID:einsss,项目名称:counsel_project,代码行数:31,代码来源:2aaabacc178ee153180eecb4e6184ffd.compiled.php

示例5: array

if (!defined("__XE__")) {
    exit;
}
$__tpl = TemplateHandler::getInstance();
echo $__tpl->compile('modules/board/skins/sketchbook5_youtube', '_header.html');
?>
<!--#Meta:modules/board/skins/sketchbook5_youtube/js/editor.js--><?php 
$__tmp = array('modules/board/skins/sketchbook5_youtube/js/editor.js', 'body', '', '');
Context::loadFile($__tmp);
unset($__tmp);
if (Mobile::isMobileCheckByAgent()) {
    $__tpl = TemplateHandler::getInstance();
    echo $__tpl->compile('modules/board/skins/sketchbook5_youtube', '_write_form_mobile.html');
}
if (!Mobile::isMobileCheckByAgent()) {
    ?>
<form action="./" method="post" onsubmit="return procFilter(this, window.insert)" class="bd_wrt bd_wrt_main clear"><input type="hidden" name="error_return_url" value="<?php 
    echo htmlspecialchars(getRequestUriByServerEnviroment(), ENT_COMPAT | ENT_HTML401, 'UTF-8', false);
    ?>
" /><input type="hidden" name="act" value="<?php 
    echo $__Context->act;
    ?>
" /><input type="hidden" name="vid" value="<?php 
    echo $__Context->vid;
    ?>
" />
	<input type="hidden" name="mid" value="<?php 
    echo $__Context->mid;
    ?>
" />
开发者ID:umjinsun12,项目名称:dngshin,代码行数:30,代码来源:21f2ea97cdc55d3609a7163de5911d74.compiled.php

示例6: procModule


//.........这里部分代码省略.........
             if ($xml_info->default_index_act && method_exists($oModule, $xml_info->default_index_act)) {
                 $this->act = $xml_info->default_index_act;
             } else {
                 $this->error = 'msg_invalid_request';
                 $oModule->setError(-1);
                 $oModule->setMessage($this->error);
                 return $oModule;
             }
         }
     }
     // ruleset check...
     if (!empty($ruleset)) {
         $rulesetModule = $forward->module ? $forward->module : $this->module;
         $rulesetFile = $oModuleModel->getValidatorFilePath($rulesetModule, $ruleset, $this->mid);
         if (!empty($rulesetFile)) {
             if ($_SESSION['XE_VALIDATOR_ERROR_LANG']) {
                 $errorLang = $_SESSION['XE_VALIDATOR_ERROR_LANG'];
                 foreach ($errorLang as $key => $val) {
                     Context::setLang($key, $val);
                 }
                 unset($_SESSION['XE_VALIDATOR_ERROR_LANG']);
             }
             $Validator = new Validator($rulesetFile);
             $result = $Validator->validate();
             if (!$result) {
                 $lastError = $Validator->getLastError();
                 $returnUrl = Context::get('error_return_url');
                 $errorMsg = $lastError['msg'] ? $lastError['msg'] : 'validation error';
                 //for xml response
                 $oModule->setError(-1);
                 $oModule->setMessage($errorMsg);
                 //for html redirect
                 $this->error = $errorMsg;
                 $_SESSION['XE_VALIDATOR_ERROR'] = -1;
                 $_SESSION['XE_VALIDATOR_MESSAGE'] = $this->error;
                 $_SESSION['XE_VALIDATOR_MESSAGE_TYPE'] = 'error';
                 $_SESSION['XE_VALIDATOR_RETURN_URL'] = $returnUrl;
                 $_SESSION['XE_VALIDATOR_ID'] = Context::get('xe_validator_id');
                 $this->_setInputValueToSession();
                 return $oModule;
             }
         }
     }
     $oModule->setAct($this->act);
     $this->module_info->module_type = $type;
     $oModule->setModuleInfo($this->module_info, $xml_info);
     $skipAct = array('dispEditorConfigPreview' => 1, 'dispLayoutPreviewWithModule' => 1);
     $db_use_mobile = Mobile::isMobileEnabled();
     if ($type == "view" && $this->module_info->use_mobile == "Y" && Mobile::isMobileCheckByAgent() && !isset($skipAct[Context::get('act')]) && $db_use_mobile === true) {
         global $lang;
         $header = '<style>div.xe_mobile{opacity:0.7;margin:1em 0;padding:.5em;background:#333;border:1px solid #666;border-left:0;border-right:0}p.xe_mobile{text-align:center;margin:1em 0}a.xe_mobile{color:#ff0;font-weight:bold;font-size:24px}@media only screen and (min-width:500px){a.xe_mobile{font-size:15px}}</style>';
         $footer = '<div class="xe_mobile"><p class="xe_mobile"><a class="xe_mobile" href="' . getUrl('m', '1') . '">' . $lang->msg_pc_to_mobile . '</a></p></div>';
         Context::addHtmlHeader($header);
         Context::addHtmlFooter($footer);
     }
     if ($type == "view" && $kind != 'admin') {
         $module_config = $oModuleModel->getModuleConfig('module');
         if ($module_config->htmlFooter) {
             Context::addHtmlFooter($module_config->htmlFooter);
         }
         if ($module_config->siteTitle) {
             $siteTitle = Context::getBrowserTitle();
             if (!$siteTitle) {
                 Context::setBrowserTitle($module_config->siteTitle);
             }
         }
     }
     // if failed message exists in session, set context
     $this->_setInputErrorToContext();
     $procResult = $oModule->proc();
     $methodList = array('XMLRPC' => 1, 'JSON' => 1, 'JS_CALLBACK' => 1);
     if (!$oModule->stop_proc && !isset($methodList[Context::getRequestMethod()])) {
         $error = $oModule->getError();
         $message = $oModule->getMessage();
         $messageType = $oModule->getMessageType();
         $redirectUrl = $oModule->getRedirectUrl();
         if ($messageType == 'error') {
             debugPrint($message, 'ERROR');
         }
         if (!$procResult) {
             $this->error = $message;
             if (!$redirectUrl && Context::get('error_return_url')) {
                 $redirectUrl = Context::get('error_return_url');
             }
             $this->_setInputValueToSession();
         } else {
         }
         $_SESSION['XE_VALIDATOR_ERROR'] = $error;
         $_SESSION['XE_VALIDATOR_ID'] = Context::get('xe_validator_id');
         if ($message != 'success') {
             $_SESSION['XE_VALIDATOR_MESSAGE'] = $message;
         }
         $_SESSION['XE_VALIDATOR_MESSAGE_TYPE'] = $messageType;
         if (Context::get('xeVirtualRequestMethod') != 'xml') {
             $_SESSION['XE_VALIDATOR_RETURN_URL'] = $redirectUrl;
         }
     }
     unset($logged_info);
     return $oModule;
 }
开发者ID:kimkucheol,项目名称:xe-core,代码行数:101,代码来源:ModuleHandler.class.php

示例7:

if ($__Context->mi->lst_viewer == 'Y') {
    ?>
var lstViewer = 1;
var viewerTx = '<?php 
    echo $__Context->lang->with_viewer;
    ?>
';
<?php 
}
if ($__Context->mi->files_type) {
    ?>
var bdFiles_type = 1;
<?php 
}
if ($__Context->mi->img_opt) {
    ?>
var bdImg_opt = 1;
<?php 
}
if ($__Context->mi->img_link || !Mobile::isMobileCheckByAgent()) {
    ?>
var bdImg_link = 0;
<?php 
}
if ($__Context->mi->rd_nav_side || $__Context->mi->default_style == 'blog' || $__Context->mi->default_style == 'viewer') {
    ?>
var rd_nav_side = 0;
<?php 
}
?>
//]]></script>
开发者ID:umjinsun12,项目名称:dngshin,代码行数:31,代码来源:14b39955224b0b30039c9c77b74946a4.compiled.php

示例8: getUrl

	<div class="fl">
		<?php 
            if (@in_array(home, $__Context->mi->btm_mn)) {
                ?>
<a class="btn_img" href="<?php 
                echo getUrl('', 'mid', $__Context->mid, 'page', $__Context->page, 'document_srl', '', 'listStyle', $__Context->listStyle);
                ?>
"><i class="ico_16px list"></i> <?php 
                echo $__Context->lang->cmd_list;
                ?>
</a><?php 
            }
            ?>
		
		<?php 
            if ($__Context->mi->srch_btm != 'N' && !Mobile::isMobileCheckByAgent()) {
                ?>
<form action="<?php 
                echo getUrl();
                ?>
" method="get" onsubmit="return procFilter(this, search)" id="bd_srch_btm" <?php 
                if ($__Context->mi->srch_btm == 2 || $__Context->search_keyword) {
                    ?>
 class="on"<?php 
                }
                ?>
><input type="hidden" name="act" value="<?php 
                echo $__Context->act;
                ?>
" />
			<input type="hidden" name="vid" value="<?php 
开发者ID:umjinsun12,项目名称:dngshin,代码行数:31,代码来源:ee14787b429fa56ad320e4c02d2041f9.compiled.php

示例9: proc

 function proc($args)
 {
     $oDocumentModel =& getModel('document');
     //��� ���� ����
     $map_obj->module_srl = $args->module_srls;
     if ($args->list_count) {
         $map_obj->list_count = $args->list_count;
     } else {
         $map_obj->list_count = 20;
     }
     if ($args->page_count) {
         $map_obj->page_count = $args->page_count;
     } else {
         $map_obj->page_count = 10;
     }
     if ($args->order_target) {
         $map_obj->sort_index = $args->order_target;
     } else {
         $map_obj->sort_index = 'regdate';
     }
     if ($args->order_type) {
         $map_obj->order_type = $args->order_type;
     } else {
         $map_obj->order_type = 'desc';
     }
     if ($args->shuffle_type) {
         $map_obj->shuffle_type = $args->shuffle_type;
     } else {
         $map_obj->shuffle_type = 'N';
     }
     if ($args->show_list) {
         $map_obj->show_list = $args->show_list;
     } else {
         $map_obj->show_list = 'Y';
     }
     //���� ���۽� ó������
     if (Context::get('xenara_ajax') == 'y') {
         if (Context::get('lat_south')) {
             $map_obj->min_map_latitude = Context::get('lat_south');
         }
         if (Context::get('lat_north')) {
             $map_obj->max_map_latitude = Context::get('lat_north');
         }
         if (Context::get('lng_west')) {
             $map_obj->min_map_longitude = Context::get('lng_west');
         }
         if (Context::get('lng_east')) {
             $map_obj->max_map_longitude = Context::get('lng_east');
         }
     }
     //��������Ʈ ���� �� ���� ����
     $map_output = executeQueryArray('widgets.widget_maplist.getMapDocumentList', $map_obj);
     $map_list = $map_output->data;
     //������� ��������
     if ($map_obj->shuffle_type == 'Y') {
         shuffle($map_list);
     }
     //�����⺻ ���� ����
     if ($args->map_width) {
         $map_obj->map_width = $args->map_width . 'px';
     } else {
         $map_obj->map_width = '100%';
     }
     if ($args->map_height) {
         $map_obj->map_height = $args->map_height;
     } else {
         $map_obj->map_height = '500';
     }
     //����ġ ���� ������ ����
     if ($args->current_type) {
         $map_obj->current_type = $args->current_type;
     } else {
         $map_obj->current_type = 'N';
     }
     //������� ���
     if (Mobile::isMobileCheckByAgent()) {
         if ($args->m_map_width) {
             $map_obj->map_width = $args->m_map_width;
         } else {
             $map_obj->map_width = '100%';
         }
         if ($args->m_map_height) {
             $map_obj->map_height = $args->m_map_height;
         } else {
             $map_obj->map_height = '300';
         }
     }
     //�������� ���� ����
     if ($args->google_map_key) {
         $map_obj->google_map_key = $args->google_map_key;
     }
     if ($args->google_markercluster) {
         $map_obj->google_markercluster = $args->google_markercluster;
     } else {
         $map_obj->google_markercluster = 'Y';
     }
     if ($args->map_zoom) {
         $map_obj->map_zoom = $args->map_zoom;
     } else {
         $map_obj->map_zoom = 13;
//.........这里部分代码省略.........
开发者ID:umjinsun12,项目名称:dngshin,代码行数:101,代码来源:widget_maplist.class.php

示例10: triggerReviewForm

 /**
  * @brief triggered by epay.processReview(after)
  * @return payment review form
  */
 function triggerReviewForm(&$in_args)
 {
     $oModuleModel = getModel('module');
     // load module config
     $module_info = $oModuleModel->getModuleInfoByModuleSrl($in_args->module_srl);
     if (!$module_info->skin) {
         $module_info->skin = 'default';
     }
     // load skin config
     $oModuleModel->syncSkinInfoToModuleInfo($module_info);
     Context::set('ncart_module_info', $module_info);
     // load cart info.
     $oNcartModel = getModel('ncart');
     $cart_info = $oNcartModel->getCartInfo($in_args->cartnos, null, null, $in_args->delivfee_inadvance);
     Context::set('cart_info', $cart_info);
     // compile template file
     if (Mobile::isMobileCheckByAgent()) {
         $template_path = sprintf('%sm.skins/%s', $this->module_path, $module_info->mskin);
     } else {
         $template_path = sprintf('%sskins/%s', $this->module_path, $module_info->skin);
     }
     $oTemplate =& TemplateHandler::getInstance();
     $in_args->review_form = $oTemplate->compile($template_path, 'reviewform.html');
 }
开发者ID:bjrambo,项目名称:nurigo,代码行数:28,代码来源:ncart.view.php

示例11:

<?php

if (!defined("__ZBXE__")) {
    exit;
}
if ($called_position == 'after_module_proc' && Context::getResponseMethod() == "HTML" && !Mobile::isMobileCheckByAgent()) {
    Context::addCssFile('./addons/prettyphoto/css/prettyPhoto.css');
    Context::addCssFile('./addons/prettyphoto/css/addon.css');
    Context::addJsFile('./addons/prettyphoto/js/jquery.prettyPhoto.js', false, '', null, 'body');
    Context::addJsFile('./addons/prettyphoto/js/addon.js', false, '', null, 'body');
    Context::loadLang('./addons/prettyphoto/lang');
    if (!$addon_info->slideshow) {
        $addon_info->slideshow = "5000";
    }
    if (!$addon_info->auto_slide) {
        $addon_info->auto_slide = "false";
    }
    if (!$addon_info->show_title) {
        $addon_info->show_title = "false";
    }
    if (!$addon_info->opacity) {
        $addon_info->opacity = ".8";
    }
    if (!$addon_info->theme) {
        $addon_info->theme = "pp_default";
    }
    if (!$addon_info->noWidth) {
        $addon_info->noWidth = "100";
    }
    if (!$addon_info->noHeight) {
        $addon_info->noHeight = "100";
开发者ID:noxowl,项目名称:Yojouhankai-Sketchbook5,代码行数:31,代码来源:prettyphoto.addon.php


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