本文整理汇总了PHP中isMobile函数的典型用法代码示例。如果您正苦于以下问题:PHP isMobile函数的具体用法?PHP isMobile怎么用?PHP isMobile使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了isMobile函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: cs_shortcode_menu_render
function cs_shortcode_menu_render($atts)
{
extract(shortcode_atts(array('title' => '', 'nav_menu' => '', 'el_class' => '', 'menu_align' => 'left', 'menu_line_height' => '80', 'css' => '', 'bg_image' => '', 'bg_color' => '', 'bg_image_repeat' => '', 'padding' => '', 'margin_bottom' => ''), $atts));
ob_start();
global $smof_data;
$css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'cs_custom_header_menu' . $el_class . $el_class . vc_shortcode_custom_css_class($css, ' '), 'cs-shortcode-menu', $atts);
?>
<div id="menu" class="cs_mega_menu main-menu cs-menu-align-<?php
echo $menu_align;
?>
cs-menu-line-height-<?php
echo $menu_line_height;
?>
<?php
echo $css_class;
?>
">
<div class="main-menu-content cshero-menu-dropdown clearfix nav-menu cshero-mobile">
<?php
$menus = wp_get_nav_menus();
if ($nav_menu) {
echo '<ul class="cshero-dropdown main-menu">';
wp_nav_menu(array('theme_location' => 'main_navigation', 'menu' => $nav_menu, 'depth' => 5, 'container' => false, 'menu_id' => 'nav', 'items_wrap' => '%3$s', 'walker' => new HeroMenuWalker()));
if (is_active_sidebar('cshero-header-content-widget-1')) {
?>
<li>
<div class="header-cart-search">
<?php
if (!function_exists('dynamic_sidebar') || !dynamic_sidebar("Header Content Widget 1")) {
}
?>
</div>
</li>
<?php
}
if (isset($smof_data['enable_hidden_sidebar']) && $smof_data['enable_hidden_sidebar'] && !isMobile()) {
?>
<li>
<a href="#"><i class="fa fa-navicon cs_open"></i></a>
</li>
<?php
}
echo '</ul>';
} elseif (empty($menus)) {
echo '<div class="menu-pages">';
wp_nav_menu(array('depth' => 5, 'container' => false, 'menu_id' => 'nav', 'items_wrap' => '%3$s'));
echo '</div>';
} else {
echo '<ul class="cshero-dropdown main-menu">';
wp_nav_menu(array('depth' => 5, 'container' => false, 'menu_id' => 'nav', 'items_wrap' => '%3$s', 'walker' => new HeroMenuWalker()));
echo '</ul>';
}
?>
</div>
</div>
<button type="button" class="btn btn-default btn-navbar navbar-toggle" data-toggle="collapse" data-target="#cshero-main-menu-mobile"><i class="fa fa-align-justify"></i></button>
<div id="cshero-main-menu-mobile" class="collapse navbar-collapse cshero-mmenu"></div>
<?php
return ob_get_clean();
}
开发者ID:daanbakker1995,项目名称:vanteun,代码行数:60,代码来源:menu.php
示例2: commonAssign
/**
* Add common assign for simple mode on list page
*/
function commonAssign()
{
parent::commonAssign();
//search permissions
$searchPermis = $this->permis[$this->tName]['search'];
//export permissions
$exportPermis = $this->permis[$this->tName]['export'];
//add edit delete print export links
$this->xt->assign("record_controls_block", $this->permis[$this->tName]['export'] || $this->permis[$this->tName]['add'] || $this->permis[$this->tName]['delete'] || $this->permis[$this->tName]['edit']);
// adds style displat none to hiderecord controls, edit selected, delete selected, export selected and print selected if found 0 recs
$this->xt->assign("details_block", $searchPermis && $this->rowsFound);
if ($searchPermis && count($this->arrRecsPerPage) && ($this->rowsFound || $this->listAjax == LIST_AJAX)) {
$this->xt->assign("recordspp_block", true);
$this->createPerPage();
}
$this->xt->assign("pages_block", $searchPermis && $this->rowsFound);
$this->xt->assign("pages_attrs", "id=\"pageOf" . $this->id . "\" name=\"pageOf" . $this->id . "\"");
$this->xt->assign("shiftstyle_block", true);
$this->xt->assign("left_block", true);
//$this->xt->assign("toplinks_block", true);
//export selected link and attr
$this->xt->assign("exportselected_link", $exportPermis);
$this->xt->assign("exportselectedlink_span", $this->buttonShowHideStyle());
$this->xt->assign("exportselectedlink_attrs", $this->getPrintExportLinkAttrs('export'));
// print links and attrs
$this->xt->assign("prints_block", $exportPermis);
$this->xt->assign("print_link", $exportPermis);
$this->xt->assign("printlink_attrs", "id='print_" . $this->id . "' name='print_" . $this->id . "'");
//print selected link and attr
$this->xt->assign("printselected_link", $exportPermis);
$this->xt->assign("printselectedlink_attrs", $this->getPrintExportLinkAttrs('print'));
$this->xt->assign("printselectedlink_span", $this->buttonShowHideStyle());
//print all link and attr
$this->xt->assign("printall_link", $exportPermis);
$this->xt->assign("printalllink_attrs", "id='printAll_" . $this->id . "' name='printAll_" . $this->id . "'");
//export link and attr
$this->xt->assign("export_link", $exportPermis);
$this->xt->assign("exportlink_attrs", "id = 'export_" . $this->id . "'\r\n\t\t\t\t\t\t name = 'export_" . $this->id . "'\r\n\t\t\t\t\t\t onclick=\"window.open(this.href,'wExport');return false;\"");
//add link and attr
$this->xt->assign("add_link", $this->permis[$this->tName]['add']);
$this->xt->assign("addlink_attrs", "href='" . $this->shortTableName . "_add.php' id=\"addButton" . $this->id . "\"");
//advanced search and attr
$this->xt->assign("advsearchlink_attrs", "id=\"advButton" . $this->id . "\"");
//select all link and attr
$this->selectAllLinkAttrs();
//edit selected link and attr
$this->editSelectedLinkAttrs();
//save all link, attr, span
$this->saveAllLinkAttrs();
//cansel all link, attr, span
$this->cancelAllLinkAttrs();
$this->xt->assign("grid_block", true);
$this->xt->assign('menu_block', $this->isShowMenu() || $this->isAdminTable());
$this->xt->assign("languages_block", true);
if (isMobile()) {
$this->xt->assign('morelinkmobile_block', true);
$this->xt->assign('tableinfomobile_block', true);
$this->xt->displayBrickHidden("vmsearch2");
}
}
开发者ID:aagusti,项目名称:padl-tng,代码行数:63,代码来源:listpage_simple.php
示例3: loadProductsListHtml
function loadProductsListHtml($cat)
{
$args = array('post_type' => 'product', 'product_cat' => $cat, 'posts_per_page' => -1);
$loop = new WP_Query($args);
while ($loop->have_posts()) {
$loop->the_post();
global $product;
$prod_html .= '<div class="product">';
$prod_html .= $product->get_image('shop_single');
$prod_html .= '<div class="product-info">';
if (!isMobile()) {
$prod_title = str_replace(" • ", "</br>", $product->get_title());
} else {
$prod_title = str_replace(" • ", " ", $product->get_title());
}
$prod_html .= '<h4>' . $prod_title . '</h4>';
$prod_html .= '<p class="excerpt">' . $product->get_post_data()->post_excerpt . '</p>';
$prod_html .= '<a class="more-info" href="' . $product->get_permalink() . '">Saiba mais</a>';
//$prod_html.= '<div class="product-info-accordion">';
//$prod_html.=mountAttributesAccordion($product->get_attributes(),$product->id);
//$prod_html.= '</div><!--end product-info-accordion-->';
$prod_html .= '</div><!--end product info-->';
$prod_html .= '</div><!--end product-->';
}
echo $prod_html;
wp_reset_postdata();
}
开发者ID:srwonka,项目名称:git-paneladopet,代码行数:27,代码来源:page-custom-products.php
示例4: index
public function index()
{
$mobile = 13542147474;
dump(isMobile($mobile));
echo 1111;
// $this->show('<style type="text/css">*{ padding: 0; margin: 0; } div{ padding: 4px 48px;} body{ background: #fff; font-family: "微软雅黑"; color: #333;font-size:24px} h1{ font-size: 100px; font-weight: normal; margin-bottom: 12px; } p{ line-height: 1.8em; font-size: 36px } a,a:hover,{color:blue;}</style><div style="padding: 24px 48px;"> <h1>:)</h1><p>欢迎使用 <b>ThinkPHP</b>!</p><br/>版本 V{$Think.version}</div><script type="text/javascript" src="http://ad.topthink.com/Public/static/client.js"></script><thinkad id="ad_55e75dfae343f5a1"></thinkad><script type="text/javascript" src="http://tajs.qq.com/stats?sId=9347272" charset="UTF-8"></script>','utf-8');
}
开发者ID:linhanwei,项目名称:TP,代码行数:7,代码来源:IndexController.class.php
示例5: songContainer
function songContainer($path, $title, $artist, $album, $length, $background, $class = "songContainer", $liked = 0)
{
if (!$artist) {
$artist = "Unknown";
}
if ($liked) {
$title = " " . $title;
}
$tileTextSize = isMobile() ? 17 : 14;
$tileTextSize .= "px;";
$containerStyle = "background: {$background};";
echo "<div data-path='{$path}' data-title='{$title}' data-artist='{$artist}' data-album='{$album}' data-length='{$length}' data-liked='{$liked}' class='{$class}' style='{$containerStyle}'>";
if ($class == "songContainer") {
echo "<div class='songInformation'>";
if (!isMobile()) {
echo "<div style='font-size: {$tileTextSize}'> <span class='songLength'>{$length}</span></div>";
}
echo "<div style='font-size: {$tileTextSize}'> <span class='songArtist'>{$artist}</span></div>";
if ($album) {
echo "<div style='font-size: {$tileTextSize}'> <span class='songAlbum'>{$album}</span></div>";
}
echo "<br> </div>";
}
echo "<div style='font-size: {$tileTextSize}'><span class='songTitle'>{$title}</span></div>";
echo "</div>";
}
开发者ID:andrew4699,项目名称:Media-Center,代码行数:26,代码来源:main.php
示例6: getPhoneCode
public function getPhoneCode()
{
$mobile = I('mobile');
//手机号码
//验证手机号码格式
if (!isMobile($mobile)) {
$this->ajaxReturn(0, "手机号码格式错误", -1);
}
//判断手机号码是否存在
if (M('user')->where(array('mobile' => $mobile))->count('id') == 0) {
$this->ajaxReturn(0, "手机号码不存在", -2);
}
//发送短信验证码
$mobileCode = createMoibleCode();
if (sendMobileCode($mobile, '验证码:' . $mobileCode)) {
session('mobile', $mobile);
//注册手机号码传入session
session('mobileCode', $mobileCode);
//短信验证码传入session
session('mobileCodeTime', time());
//注册时间传入session
$this->ajaxReturn(0, "操作成功", 1);
} else {
$this->ajaxReturn(0, "系统错误", -101);
}
}
开发者ID:omusico,项目名称:thinkphp_cuhere,代码行数:26,代码来源:LoginAction.class.php
示例7: buildControl
function buildControl($value, $mode, $fieldNum, $validate, $additionalCtrlParams, $data)
{
parent::buildControl($value, $mode, $fieldNum, $validate, $additionalCtrlParams, $data);
$nWidth = $this->pageObject->pSetEdit->getNCols($this->field);
$nHeight = $this->pageObject->pSetEdit->getNRows($this->field);
if ($this->pageObject->pSetEdit->isUseRTE($this->field)) {
$value = $this->RTESafe($value);
// creating src url
$browser = "";
if (@$_REQUEST["browser"] == "ie") {
$browser = "&browser=ie";
}
// add JS code
echo "<iframe frameborder=\"0\" vspace=\"0\" hspace=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\" id=\"" . $this->cfield . "\" " . (($mode == MODE_INLINE_EDIT || $mode == MODE_INLINE_ADD) && $this->is508 == true ? "alt=\"" . $this->strLabel . "\" " : "") . "name=\"" . $this->cfield . "\" title=\"Basic rich text editor\" style='";
if (!isMobile()) {
echo "width: " . ($nWidth + 1) . "px;";
}
echo "height: " . ($nHeight + 100) . "px;'";
echo " src=\"" . GetTableLink("rte", "", "ptype=" . $this->pageObject->pageType . "&table=" . GetTableURL($this->pageObject->tName) . "&" . "id=" . $this->id . "&" . $this->iquery . $browser . "&" . ($mode == MODE_ADD || $mode == MODE_INLINE_ADD ? "action=add" : '')) . "\">";
echo "</iframe>";
} else {
echo '<textarea id="' . $this->cfield . '" ' . (($mode == MODE_INLINE_EDIT || $mode == MODE_INLINE_ADD) && $this->is508 == true ? 'alt="' . $this->strLabel . '" ' : '') . 'name="' . $this->cfield . '" style="';
if (!isMobile()) {
echo "width: " . $nWidth . "px;";
}
echo 'height: ' . $nHeight . 'px;">' . runner_htmlspecialchars($value) . '</textarea>';
}
$this->buildControlEnd($validate);
}
开发者ID:ryanblanchard,项目名称:Dashboard,代码行数:29,代码来源:TextAreaField.php
示例8: _initialize
public function _initialize()
{
if (isMobile()) {
$this->redirect('index/Mobile/index?items_id =' . I('get.item_id'));
return 0;
}
}
开发者ID:CreateBigChange,项目名称:daymeng,代码行数:7,代码来源:DetailAction.class.php
示例9: _initialize
public function _initialize()
{
if (isMobile()) {
$this->redirect('Weixin/Jobs/pageJobs');
}
//验证是否为管理员登陆
if (session('user')['adminname'] == "luobo") {
session("user", null);
}
//定位城市
$nowCity = session("nowCity");
if (empty($nowCity)) {
$nowCity = "威海市";
session("nowCity", $nowCity);
$ip = get_client_ip();
if ($ip != "0.0.0.0") {
$data = file_get_contents("http://ip.taobao.com/service/getIpInfo.php?ip=" . $ip);
$data = json_decode($data, TRUE);
if ($data['code'] == 0) {
$db = M("city");
$city = str_replace("市", "", $data['data']['city']);
$where['name'] = array('like', "%" . $city . "%");
$re = $db->where($where)->find();
if ($re) {
$nowCity = $re['name'];
session("nowCity", $nowCity);
}
}
}
}
$this->assign("nowCity", $nowCity);
$sql = "SELECT * FROM job_level2 ORDER BY RAND() LIMIT 5";
$level2RandomList = M()->query($sql);
$this->assign("level2RandomList", $level2RandomList);
}
开发者ID:happyxiaod,项目名称:luobojianzhi,代码行数:35,代码来源:IndexController.class.php
示例10: index_action
function index_action()
{
if (isMobile()) {
include template('project_m');
} else {
include template('project');
}
}
开发者ID:Tolecen,项目名称:YouthFundWebSite,代码行数:8,代码来源:project.class.php
示例11: base_render_before
/**
* Remove mobile rendering from our custom non-forum pages.
*
* @param $sender
*/
public function base_render_before($sender)
{
$userFacing = $sender->MasterView == 'default' || $sender->MasterView == '';
$onForumPage = !in_array(strtolower($sender->Application), array('vanilla', 'conversations', 'dashboard'));
if ($userFacing && isMobile() && $onForumPage) {
// Use the main theme instead of mobile
$sender->Theme = c('Garden.Theme');
Gdn::pluginManager()->unregisterPlugin('MobileThemeHooks');
}
}
开发者ID:vanilla,项目名称:community,代码行数:15,代码来源:class.hooks.php
示例12: isMobileForWordPress
function isMobileForWordPress()
{
global $isMobileDevice;
if (isMobile()) {
$isMobileDevice = 1;
} else {
$isMobileDevice = 0;
}
return $isMobileDevice;
}
开发者ID:adams0917,项目名称:woocommerce_eht,代码行数:10,代码来源:admin_init.php
示例13: execApp
/**
* 执行App控制器
* @access public
* @return void
*/
public static function execApp()
{
//防止CSRF
if (strtoupper($_SERVER['REQUEST_METHOD']) == 'POST' && stripos($_SERVER['HTTP_REFERER'], SITE_URL) !== 0 && $_SERVER['HTTP_USER_AGENT'] !== 'Shockwave Flash') {
die('illegal request.');
}
// 使用手持设备时, 对用户的访问默认跳转至移动版, 除非用户指定访问普通版
if ($_SESSION['wap_to_normal'] != '1' && cookie('wap_to_normal') != '1' && $_REQUEST['wap_to_normal'] != '1' && !isiPad()) {
// 根据各应用的配置来判断是否存在手机版访问配置文件
$publicAccess = array('message', 'register', 'feed');
if (APP_NAME == 'public' && !in_array(strtolower(MODULE_NAME), $publicAccess) && strtolower(ACTION_NAME) != 'message' && isMobile() && in_array('wap', C('DEFAULT_APPS'))) {
// 智能手机到3G版
if (APP_NAME == 'public' && (isiPhone() || isAndroid())) {
// iOS和Android跳转至3G版
U('w3g/Index/index', '', true);
} else {
// 其他手机跳转至WAP版
U('wap/Index/index', '', true);
}
}
}
// 加载所有插件
if (C('APP_PLUGIN_ON')) {
tsload(CORE_LIB_PATH . '/addons.class.php');
tsload(CORE_LIB_PATH . '/addons/Hooks.class.php');
tsload(CORE_LIB_PATH . '/addons/AbstractAddons.class.php');
tsload(CORE_LIB_PATH . '/addons/NormalAddons.class.php');
tsload(CORE_LIB_PATH . '/addons/SimpleAddons.class.php');
tsload(CORE_LIB_PATH . '/addons/TagsAbstract.class.php');
Addons::loadAllValidAddons();
}
//创建Action控制器实例
$className = MODULE_NAME . 'Action';
tsload(APP_ACTION_PATH . '/' . $className . '.class.php');
if (!class_exists($className)) {
$className = 'EmptyAction';
tsload(APP_ACTION_PATH . '/EmptyAction.class.php');
if (!class_exists($className)) {
throw_exception(L('_MODULE_NOT_EXIST_') . ' ' . MODULE_NAME);
}
}
$module = new $className();
//异常处理
if (!$module) {
// 模块不存在 抛出异常
throw_exception(L('_MODULE_NOT_EXIST_') . ' ' . MODULE_NAME);
}
//获取当前操作名
$action = ACTION_NAME;
//执行当前操作
call_user_func(array(&$module, $action));
//执行计划任务
model('Schedule')->run();
return;
}
开发者ID:yang7hua,项目名称:hunshe,代码行数:60,代码来源:App.class.php
示例14: webInit
public function webInit($mustSignin = false)
{
if (!isMobile()) {
header('location:/index.php?s=/Index/Index');
exit;
}
if (!session('wcInfo')) {
$this->loginMode();
//exit();
}
}
开发者ID:tearys,项目名称:lucky,代码行数:11,代码来源:BaseController.class.php
示例15: getCtrlParamsArr
function getCtrlParamsArr($fName, $recId, $fieldNum = 0, $value, $renderHidden = false, $isCached = true)
{
$control = parent::getCtrlParamsArr($fName, $recId, $fieldNum, $value, $renderHidden, $isCached);
$control["params"]["additionalCtrlParams"]['skipDependencies'] = true;
$control["params"]["additionalCtrlParams"]["style"] = isMobile() ? 'width: 35%;' : 'width: 115px;';
$ctrlsMap = array('controls' => array());
$ctrlsMap['controls']["skipDependencies"] = true;
$ctrlsMap['controls']["style"] = isMobile() ? 'width: 35%;' : 'width: 115px;';
$this->pageObj->fillControlsMap($ctrlsMap, true);
return $control;
}
开发者ID:aagusti,项目名称:padl-tng,代码行数:11,代码来源:panelsearchcontrol.php
示例16: getCtrlParamsArr
/**
* Get controls attrs only for the Search panel
* @param String fName The search field's name
* @param Number recId The search field row's Id
* @param Number fieldNum The search field control's index (0 for the first, 1 for the second)
* @param String value The search control's value
* @param String opt The search control's search option
* @param Boolean renderHidden Indicator showing if the search control is visible
* @param Boolean isCached Indicator showing if the search control is cached
* @return Array
*/
function getCtrlParamsArr($fName, $recId, $fieldNum, $value, $opt, $renderHidden = false, $isCached = true)
{
$parameters = parent::buildCtrlParamsArr($fName, $recId, $fieldNum, $value, $opt, $renderHidden, $isCached);
$control = array();
$parameters["additionalCtrlParams"]['skipDependencies'] = true;
$parameters["additionalCtrlParams"]["searchPanelControl"] = true;
$parameters["additionalCtrlParams"]["style"] = isMobile() ? 'width: 35%;' : 'width: 115px;';
$ctrlsMap = $this->getExtraControlMap();
$this->pageObj->fillControlsMap($ctrlsMap, true);
AssignFunction($control, "xt_buildeditcontrol", $parameters);
return $control;
}
开发者ID:ryanblanchard,项目名称:Dashboard,代码行数:23,代码来源:panelsearchcontrol.php
示例17: saveSearchLog
public function saveSearchLog($CuisineID, $FoodTypeID, $Keyword, $Composition, $FoodProcess, $PriceRange, $EstPeople)
{
$browser = $this->getBrowser();
$ip = $this->getRealUserIp();
$device = 'Desktop';
if (isMobile()) {
$device = 'Mobile';
}
$resUserLog = $this->db->query('CALL InsertSearchLog(?,?,?,?,?,?,?,?,?,?,?,?,?)', array($CuisineID, $FoodTypeID, $Keyword, $Composition, $FoodProcess, $PriceRange, $EstPeople, $this->session->userdata('userid'), isset($browser['browser']) ? $browser['browser'] : false, isset($browser['version']) ? $browser['browser'] : false, !empty($ip) ? $ip : false, !empty($device) ? $device : false, isset($browser['os']) ? $browser['os'] : false));
$query_result = $resUserLog->result();
$resUserLog->next_result();
}
开发者ID:angelamuliawan,项目名称:rd,代码行数:12,代码来源:AB_Controller.php
示例18: trace
public function trace($url)
{
// session ( "access_trace_data", null);
$ses = session("access_trace_data");
if ($ses == null) {
// 用户首次登录
$data["session_id"] = session_id();
$data["thedate"] = date("Y-m-d H:i:s", time());
$data["url"] = $url;
if (isMobile()) {
$data["location"] = "手机";
} else {
$ipLocation = new \Org\Net\IpLocation('QQWry.dat');
// 实例化类 参数表示IP地址库文件
$ip = get_client_ip();
$data["ip"] = $ip;
$area = $ipLocation->getlocation($ip);
// '203.34.5.66'); // 获取某个IP地址所在的位置
$author_location = iconv('gbk', 'utf-8', $area['country'] . $area['area']);
$data["location"] = $author_location;
}
session("access_trace_data", $data);
// 设置用户已登录
self::updateCounter($data);
} else {
// 检查是否已经是下一天
$today = date("Y-m-d", time());
$data = session("access_trace_data");
if ($today > substr($data["thedate"], 0, 10)) {
$data = session("access_trace_data");
$data["thedate"] = date("Y-m-d H:i:s", time());
self::updateCounter($data);
}
}
$counter = session("access_trace_counter");
$m = M("AccessTraceCounter");
// 网站发布总天数
$totalNo = $m->query("select count(distinct(date(thedate))) as c from think_access_trace_counter");
$totalDay = intval($totalNo[0]["c"]) - 1;
// 日均访问量
$counter["avgNo"] = (int) (intval($counter["totalNo"]) / $totalDay);
// 最高访问量
$totalNo = $m->query("select count(*) as c from think_access_trace_counter group by date(thedate) order by c desc");
$counter["maxNo"] = $totalNo[0]["c"];
$data = session("access_trace_data");
$data["thedate"] = date("Y-m-d H:i:s", time());
$data["url"] = $url;
// 记录访问详细信息
$m = M("AccessTraceDetails");
$m->add($data);
$this->ajaxReturn($counter);
}
开发者ID:vistajin,项目名称:dmx-php,代码行数:52,代码来源:AccessTraceController.class.php
示例19: _initialize
public function _initialize()
{
$result = M('dm_items')->query('select id,begin_time from dm_items where item_check = 3');
foreach ($result as $key => $value) {
if ($value['begin_time'] < time()) {
M('dm_items')->query("update dm_items set item_check=1 where id = {$value['id']} ");
}
}
// 查看项目是不是已经该上线了
if (isMobile()) {
$this->redirect('index/Mobile/mb');
}
}
开发者ID:CreateBigChange,项目名称:daymeng,代码行数:13,代码来源:IndexAction.class.php
示例20: _initialize
protected function _initialize()
{
//读取网站配置
$this->siteinfo = M('siteinfo')->where('id=1')->find();
//判断网站是否正常
if ($this->siteinfo['sitestatus'] == '0') {
//关闭状态
$this->redirect('Public/errors');
}
//判断电脑还是手机
if (!isMobile()) {
$this->redirect('Index/index');
}
}
开发者ID:shishidong,项目名称:wxplatform,代码行数:14,代码来源:WapController.class.php
注:本文中的isMobile函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论