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

PHP Mobile类代码示例

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

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



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

示例1: process

 function process(Mobile_API_Request $request)
 {
     $current_user = $this->getActiveUser();
     $query = $request->get('query');
     $nextPage = 0;
     $queryResult = false;
     if (preg_match("/(.*) LIMIT[^;]+;/i", $query)) {
         $queryResult = vtws_query($query, $current_user);
     } else {
         // Implicit limit and paging
         $query = rtrim($query, ";");
         $currentPage = intval($request->get('page', 0));
         $FETCH_LIMIT = Mobile::config('API_RECORD_FETCH_LIMIT');
         $startLimit = $currentPage * $FETCH_LIMIT;
         $queryWithLimit = sprintf("%s LIMIT %u,%u;", $query, $startLimit, $FETCH_LIMIT + 1);
         $queryResult = vtws_query($queryWithLimit, $current_user);
         // Determine paging
         $hasNextPage = count($queryResult) > $FETCH_LIMIT;
         if ($hasNextPage) {
             array_pop($queryResult);
             // Avoid sending next page record now
             $nextPage = $currentPage + 1;
         }
     }
     $records = array();
     if (!empty($queryResult)) {
         foreach ($queryResult as $recordValues) {
             $records[] = $this->processQueryResultRecord($recordValues, $current_user);
         }
     }
     $result = array('records' => $records, 'nextPage' => $nextPage);
     $response = new Mobile_API_Response();
     $response->setResult($result);
     return $response;
 }
开发者ID:hbsman,项目名称:vtigercrm-5.3.0-ja,代码行数:35,代码来源:Query.php


示例2: getUserInfo

 function getUserInfo()
 {
     $uid = intval($this->Get['uid']);
     if ($uid < 1) {
         $uid = MEMBER_ID;
     }
     $is_follow = false;
     $is_blacklist = false;
     if ($uid > 0) {
         $member = Mobile::convert($this->TopicLogic->GetMember($uid));
         if (empty($member)) {
             $error_code = 400;
         } else {
             if ($member['uid'] != MEMBER_ID) {
                 $is_follow = chk_follow(MEMBER_ID, $member['uid']);
                 if (!$is_follow) {
                     Mobile::logic('friend');
                     $FriendLogic = new FriendLogic();
                     $is_blacklist = $FriendLogic->check($member['uid']);
                 }
             }
         }
     } else {
         Mobile::show_message(400);
     }
     include template('user_info');
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:27,代码来源:member.mod.php


示例3: ModuleObject

 function ModuleObject($config)
 {
     $this->MasterObject($config);
     $this->CacheConfig = jconf::get('cache');
     Mobile::is_login();
     $this->Execute();
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:7,代码来源:more.mod.php


示例4: init_flow_handle

 public function init_flow_handle(Flow $flow)
 {
     if (Mobile::is_mobile()) {
         $vars = $flow->vars();
         mb_convert_variables('utf-8', 'utf-8,SJIS-win', $vars);
         $flow->vars($vars);
     }
 }
开发者ID:riaf,项目名称:rhaco2-repository,代码行数:8,代码来源:MobileFlowModule.php


示例5: isMobileDevice

 /**
  * 
  * @return boolean
  */
 private static function isMobileDevice()
 {
     $res = false;
     if (isset($_SESSION['ismobiledevice'])) {
         $res = $_SESSION['ismobiledevice'];
     } else {
         $res = Mobile::isMobileDevice();
     }
     return $res;
 }
开发者ID:srueegger,项目名称:1zu12bB,代码行数:14,代码来源:skincontroller.php


示例6: viewController

 function viewController()
 {
     $smarty = new vtigerCRM_Smarty();
     foreach ($this->parameters as $k => $v) {
         $smarty->assign($k, $v);
     }
     $smarty->assign("IS_SAFARI", Mobile::isSafari());
     $smarty->assign("SKIN", Mobile::config('Default.Skin'));
     return $smarty;
 }
开发者ID:hbsman,项目名称:vtigercrm-5.3.0-ja,代码行数:10,代码来源:Viewer.php


示例7: checkGetMobile

 public static function checkGetMobile()
 {
     if (isset($_GET['tomobile'])) {
         if ($_GET['tomobile'] == 1) {
             Mobile::setMobile(1);
         }
         if ($_GET['tomobile'] == 0) {
             Mobile::setMobile(0);
         }
     }
 }
开发者ID:CapsuleCorpIndonesia,项目名称:elang-combo,代码行数:11,代码来源:Mobile.php


示例8: m_not_mobile

 private function m_not_mobile(&$src, Template $template)
 {
     while (Tag::setof($tag, $src, 'm:not_mobile')) {
         if (!Mobile::is_mobile()) {
             $src = str_replace($tag->plain(), $tag->value(), $src);
         } else {
             $src = str_replace($tag->plain(), '', $src);
         }
     }
     $src = $template->parse_vars($src);
 }
开发者ID:riaf,项目名称:rhaco2-repository,代码行数:11,代码来源:MobileTemplateModule.php


示例9: both

 public static function both($act, $arr = array())
 {
     if (count($arr) > 0) {
         extract($arr);
     }
     if (Mobile::isMob()) {
         $pathname = self::explodeSlash($act);
         if (!@(include $pathname)) {
             self::desk($act, $arr);
         }
     } else {
         self::desk($act, $arr);
     }
 }
开发者ID:CapsuleCorpIndonesia,项目名称:elang-combo,代码行数:14,代码来源:Mold.php


示例10: __construct

 public function __construct($_variables)
 {
     // load parent
     parent::__construct($_variables);
     // define class variables
     $_array = array("mobileplatform" => Mobile::isMobilePlatform(), "ordertimerange" => $this->__config->get('ordertimerange'), "timezone" => $this->__config->get('timezone'), "cachefolder" => $this->__config->get('cachefolder'));
     // load class variables
     $this->loadClassVariables($_array);
     // load the order html
     PageMainData::getOrdersHTML();
     // load the page html
     PageMainHTML::html();
     // render page
     $this->createPage();
 }
开发者ID:xiaoguizhidao,项目名称:magento-invoices,代码行数:15,代码来源:class.PageMain.php


示例11: add_order

 /**
  * @param $customer_id
  * @param $total
  * @return mixed
  */
 public function add_order($customer_id, $delivery_id, $total)
 {
     $detect = new Mobile();
     $device_type = $detect->isMobile() ? $detect->isTablet() ? 'tablet' : 'phone' : 'computer';
     $np_city_ref = Arr::get($_POST, 'np_city_ref');
     $np_address_ref = Arr::get($_POST, 'np_address_ref');
     $city = Arr::get($_POST, 'city');
     $address = Arr::get($_POST, 'address');
     if ($delivery_id = 1) {
         $obj_city = ORM::factory('Novaposhta_City', ['Ref' => $np_city_ref]);
         if ($obj_city->loaded()) {
             $city = $obj_city->DescriptionRu;
         }
         $obj_warehouse = ORM::factory('Novaposhta_Warehouse', ['Ref' => $np_address_ref]);
         if ($obj_warehouse->loaded()) {
             $address = $obj_warehouse->DescriptionRu;
         }
     }
     $obj_order = ORM::factory('Shop_Order');
     $obj_order->customer_id = $customer_id;
     $obj_order->delivery_id = $delivery_id;
     $obj_order->total = $total;
     $obj_order->checked = 0;
     $obj_order->device_type = $device_type;
     $obj_order->oblast = Arr::get($_POST, 'oblast');
     $obj_order->region = Arr::get($_POST, 'region');
     $obj_order->city = $city;
     $obj_order->address = $address;
     $obj_order->np_city_ref = $np_city_ref;
     $obj_order->np_address_ref = $np_address_ref;
     $obj_order->postcode = Arr::get($_POST, 'postcode');
     $obj_order->save();
     $obj_order->number = $obj_order->id . Text::random('nozero', 4);
     $obj_order->save();
     return $obj_order->id;
 }
开发者ID:eok8177,项目名称:shopCMS,代码行数:41,代码来源:Order.php


示例12: Main

 function Main()
 {
     $uid = intval($this->Get['uid']);
     $param = array('limit' => Mobile::config("perpage_def"), 'uid' => $uid);
     $ret = Mobile::convert($this->MTagLogic->getTagList($param));
     if (is_array($ret)) {
         $tag_list = $ret['tag_list'];
         $list_count = $ret['list_count'];
         $total_record = $ret['total_record'];
         $max_id = $ret['max_id'];
     } else {
         Mobile::show_message($ret);
     }
     include template('tag_list');
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:15,代码来源:tag.mod.php


示例13: searchUser

 function searchUser()
 {
     Mobile::logic('member');
     $MemberLogic = new MemberLogic();
     $q = trim($this->Get['q']);
     if (empty($q)) {
         Mobile::error("No Data", 400);
     }
     $param = array('limit' => Mobile::config("perpage_member"), 'nickname' => $q, 'max_id' => $this->Get['max_id']);
     $ret = $MemberLogic->getMemberList($param);
     if (is_array($ret)) {
         Mobile::output($ret);
     } else {
         Mobile::error("No Data", $ret);
     }
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:16,代码来源:search.mod.php


示例14: getHistoryList

 function getHistoryList()
 {
     $uid = intval($this->Get['uid']);
     if (empty($uid)) {
         Mobile::show_message(300);
     }
     $info = Mobile::convert($this->MyPmLogic->getHistoryList(MEMBER_ID, $uid, array("per_page_num" => Mobile::config("perpage_pm"))));
     if (!empty($info)) {
         $pm_list = $info['pm_list'];
         $current_page = empty($info['current_page']) ? 1 : $info['current_page'];
         $next_page = $current_page + 1;
         $total_page = intval($info['total_page']);
         $list_count = count($info['pm_list']);
     } else {
         Mobile::show_message(400);
     }
     include template('pm_list');
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:18,代码来源:pm.mod.php


示例15: __construct

 public function __construct($mainClass, $DbSetting, $WebSetting, $timezone, $js, $css, $nameSpaceForApps)
 {
     parent::__construct($mainClass);
     //start session if needed
     //if(!$this->is_session_started())
     // init whats needed //kalau ga perlu bisa dihilangkan tergantung kebutuhan
     //set globals
     global $activeLang;
     //set the active lang dynamically
     $this->activeLang = $activeLang;
     $this->setGlobalVariables($WebSetting);
     //Initialize DB
     // DbChooser::setDBSelected();
     //DB setting di access di overwrite spy bisa ada choosernya...
     //$skolahDB = DbChooser::getDBSelected();
     //$DbSetting = $this->arrDBSetting[$skolahDB];
     global $DbSetting;
     $this->setDB($DbSetting);
     //overwrite global variable to set photopath for different schools
     global $photo_path;
     global $photo_url;
     define('_PHOTOPATH', $photo_path);
     define('_PHOTOURL', $photo_url);
     //Init Template
     $this->setTemplate($WebSetting);
     //Init Web Parameter
     $this->setParams();
     //Init Timezone
     $this->setTimezone($timezone);
     //Init Mobile Check in untuk menentukan default
     $this->setHardwareType();
     if ($this->getHardwareType() == "mobile") {
         Mobile::setMobile(1);
     }
     //cek to mobile get
     Mobile::checkGetMobile();
     //$nameSpaceForApps
     $this->setNameSpacesForApps($nameSpaceForApps);
     //add css and js
     $this->template->addFilesToHead($js);
     $this->template->addFilesToHead($css);
     //run it
     //$this->run();
 }
开发者ID:CapsuleCorpIndonesia,项目名称:biji_katak,代码行数:44,代码来源:Init.php


示例16: getListing

 function getListing($user)
 {
     function useSortBySettings($a, $b)
     {
         global $displayed_modules;
         $posA = $displayed_modules[$a['name']];
         $posB = $displayed_modules[$b['name']];
         if ($posA == $posB) {
             return 0;
         }
         return $posA < $posB ? -1 : 1;
     }
     //settings information
     global $displayed_modules, $current_language, $app_strings;
     $modulewsids = Mobile_WS_Utils::getEntityModuleWSIds();
     // Disallow modules
     unset($modulewsids['Users']);
     include_once dirname(__FILE__) . '/../../Mobile.Config.php';
     $CRM_Version = Mobile::config('crm_version');
     if ($CRM_Version != '5.2.1') {
         //we use this class only for privilege purposes on types
         $listresult = vtws_listtypes(null, $user, 'en_us');
     } else {
         $listresult = vtws_listtypes($user);
     }
     $listing = array();
     foreach ($listresult['types'] as $index => $modulename) {
         if (!isset($modulewsids[$modulename])) {
             continue;
         }
         if (in_array($modulename, $displayed_modules)) {
             $listing[] = array('id' => $modulewsids[$modulename], 'name' => $modulename, 'isEntity' => $listresult['information'][$modulename]['isEntity'], 'label' => getTranslatedString($modulename, $modulename), 'singular' => getTranslatedString('SINGLE_' . $modulename, $modulename));
         }
     }
     //make sure the active modules are displayed in the order of the $displayed_modules settings entry in MobileSettings.config.php
     $displayed_modules = array_flip($displayed_modules);
     usort($listing, 'useSortBySettings');
     return $listing;
 }
开发者ID:kduqi,项目名称:corebos,代码行数:39,代码来源:LoginAndFetchModules.php


示例17: basename

<?php

//******************************************
//設定
//テンプレートファイル指定
$tempfile = "med/06/" . basename(__FILE__, ".php") . ".html";
//設定終了
//******************************************
require "../../php/Mobile.class.php";
$obj = new Mobile();
$obj->filename = $temp . $tempfile;
$obj->main();
开发者ID:aim-web-projects,项目名称:ann-cosme,代码行数:12,代码来源:index.php


示例18: die

<?php

if (@$magic != "0xDEADBEEF") {
    die("This file cannot be executed directly");
}
if (@is_dir("setup")) {
    $error = new Error("Setup directory exists. You either haven't installed your guestbook, or forgot to delete the setup folder.");
    die($error->showError());
}
if (!file_exists("data.php")) {
    $error = new Error("Data file doesn't exist. Have you installed your guestbook yet?");
    die($error->showError());
}
require_once 'configuration.php';
if ($config['offline']) {
    $error = new Error($config['offlineMessage']);
    die($error->showError());
}
include_once 'classes/mobile/mobile.class.php';
if (Mobile::isMobile($_SERVER['HTTP_USER_AGENT'])) {
    $config['guestbookTheme'] = $config['mobileTheme'];
}
开发者ID:adelnoureddine,项目名称:angora-guestbook,代码行数:22,代码来源:checks.php


示例19: elseif

<?php 
    if ($this->Code != "at_my" && $this->Code != "comment_my") {
        ?>
g_middle_nav_toolbar
<?php 
    } else {
        ?>
g_middle_nav_toolbar_message
<?php 
    }
    ?>
"> <?php 
    if ($this->Code == "home") {
        ?>
 <?php 
        echo Mobile::convert($GLOBALS['_J']['member']['nickname']);
    } elseif ($this->Code == "at_my" || $this->Code == "comment_my") {
        ?>
 <?php 
        $tab_msg_actives[$this->Code] = "g_middle_chute_on";
        ?>
 <div class="g_middle_chute"> <ul> <li class="<?php 
        echo $tab_msg_actives['at_my'];
        ?>
" onclick="changeMessageTab(TAB_MESSAGE_AT);">@我</li> <li class="s <?php 
        echo $tab_msg_actives['comment_my'];
        ?>
" onclick="changeMessageTab(TAB_MESSAGE_COMMENT);">评论</li> </ul> </div> <?php 
    } elseif ($this->Module == "search") {
        ?>
 <?php 
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:31,代码来源:header.php


示例20: url

                <img src="../pixmaps/top/logo_siem.png" border="0" style="margin:10px 0">
                <table align="center" cellspacing='0' cellpadding='0' style="width:300px;background-color:#eeeeee;border-color:#dedede;opacity:0.5;border-radius: 8px;-moz-border-radius: 8px;-webkit-border-radius: 8px;">
                <tr id="fullsrc" style="display:none"><td><img src="../pixmaps/1x1.png" height="22px" border="0"></td><tr>
                <tr><td>
                    <ul id="menu">
                        <li class="button1"><a href="#" ref="status" style="background-image: url('../pixmaps/mobile/icon-status.png');"></a><label>Status</label></li>
                        <li class="button2"><a href="#" ref="alarms" style="background-image: url('../pixmaps/mobile/icon-alarm.png');"></a><label>Alarms</label></li>
                        <li class="button3"><a href="#" ref="tickets" style="background-image: url('../pixmaps/mobile/icon-ticket.png');"></a><label>Tickets</label></li>
                        <li class="button5"><a href="#" ref="unique_siem" style="background-image: url('../pixmaps/mobile/icon-siem_events.png');"></a><label>SIEM</label></li>
                        <li class="button6"><a href="#" ref="logout" style="background-image: url('../pixmaps/mobile/icon-exit.png');"></a><label>Logout</label></li>
                    </ul>
                </td></tr>
                </table>
                <div style='border-top: 1px solid #8CC12D; margin: 130px 10px 0px 10px;'>
                    <span style="margin: 2px 0; float: left; font-size: 10px; color: #CCCCCC;">&copy; Copyright 2012 AlienVault, Inc. - Schema Version <?php 
echo Mobile::get_version();
?>
</span>
                </div>
            </div>
            <div id="main" class="additional-block">
                
                <div id="ajax">
                    <div style="padding-top:10px"><img src='../pixmaps/loading3.gif' align="absmiddle"/>&nbsp;<?php 
echo _("Loading remote content, please wait");
?>
</div>
                </div>
            </div>
        </div>
    </div>
开发者ID:AntBean,项目名称:alienvault-ossim,代码行数:31,代码来源:mobile.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP Mobile_Detect类代码示例发布时间:2022-05-23
下一篇:
PHP MiscLib类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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