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


PHP iPHP::PG方法代码示例

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


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

示例1: multiple_device

 /**
  * 多终端适配
  * @param  [type] &$config [系统配置]
  * @return [type]          [description]
  */
 private static function multiple_device(&$config)
 {
     $template = $config['template'];
     $_device = iPHP::PG('device');
     if ($_device) {
         /**
          * 判断指定设备
          * @var [type]
          */
         foreach ((array) $template['device'] as $key => $device) {
             if ($device['tpl'] && ($device['ua'] == $_device || $device['name'] == $_device)) {
                 $device_name = $device['name'];
                 $device_tpl = $device['tpl'];
                 $domain = $device['domain'];
                 break;
             }
         }
     }
     /**
      * 无指定设备 判断USER_AGENT
      */
     if (empty($device_tpl)) {
         foreach ((array) $template['device'] as $key => $device) {
             if ($device['tpl'] && self::device_agent($device['ua'])) {
                 $device_name = $device['name'];
                 $device_tpl = $device['tpl'];
                 $domain = $device['domain'];
                 break;
             }
         }
     }
     iPHP::$mobile = false;
     if ($device_tpl) {
         //设备模板
         $def_tpl = $device_tpl;
     } else {
         //检查是否移动设备
         if (self::device_agent($template['mobile']['agent'])) {
             iPHP::$mobile = true;
             $mobile_tpl = $template['mobile']['tpl'];
             $device_name = 'mobile';
             $def_tpl = $mobile_tpl;
             $domain = $template['mobile']['domain'];
         }
     }
     if (empty($def_tpl)) {
         $device_name = 'desktop';
         $def_tpl = $template['desktop']['tpl'];
         $domain = false;
     }
     define('iPHP_ROUTER_URL', $config['router']['URL']);
     $domain && ($config['router'] = str_replace($config['router']['URL'], $domain, $config['router']));
     define('iPHP_DEFAULT_TPL', $def_tpl);
     define('iPHP_MOBILE_TPL', $mobile_tpl);
     define('iPHP_DEVICE', $device_name);
     define('iPHP_HOST', $config['router']['URL']);
     header("Access-Control-Allow-Origin: " . iPHP_HOST);
     header('Access-Control-Allow-Headers: X-Requested-With,X_Requested_With');
 }
开发者ID:sunhk25,项目名称:iCMS,代码行数:64,代码来源:iPHP.class.php

示例2: defined

 * @licence http://www.idreamsoft.com/license.php
 * @version 6.0.0
 * @$Id: admincp.class.php 2361 2014-02-22 01:52:39Z coolmoo $
 */
defined('iPHP') or exit('What are you doing?');
iDB::$show_errors = true;
iPHP::$dialog['title'] = 'iCMS';
define('iCMS_SUPERADMIN_UID', '1');
define('__ADMINCP__', __SELF__ . '?app');
define('ACP_PATH', iPHP_APP_DIR . '/admincp');
define('ACP_HOST', "http://" . $_SERVER['HTTP_HOST']);
require iPHP_APP_CORE . '/iMenu.class.php';
require iPHP_APP_CORE . '/iMember.class.php';
iMember::$LOGIN_TPL = ACP_PATH;
iMember::$AUTH = 'ADMIN_AUTH';
iMember::$AJAX = iPHP::PG('ajax');
$_GET['do'] == 'seccode' && iACP::get_seccode();
class iACP
{
    public static $apps = NULL;
    public static $frames = NULL;
    public static $menu = NULL;
    public static $app = NULL;
    public static $app_name = NULL;
    public static $app_do = NULL;
    public static $app_args = NULL;
    public static $app_method = NULL;
    public static $app_tpl = NULL;
    public static $app_path = NULL;
    public static $app_file = NULL;
    public static function init()
开发者ID:Junred,项目名称:iCMS,代码行数:31,代码来源:iACP.class.php


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