本文整理汇总了PHP中checkmobile函数的典型用法代码示例。如果您正苦于以下问题:PHP checkmobile函数的具体用法?PHP checkmobile怎么用?PHP checkmobile使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了checkmobile函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _init_env
private function _init_env()
{
error_reporting(E_ERROR);
define('MAGIC_QUOTES_GPC', function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc());
// ' " \ NULL 等字符转义 当magic_quotes_gpc=On的时候,函数get_magic_quotes_gpc()就会返回1
define('GZIP', function_exists('ob_gzhandler'));
// ob 缓存压缩输出
if (function_exists('date_default_timezone_set')) {
@date_default_timezone_set('Etc/GMT-8');
//东八区 北京时间
}
define('TIMESTAMP', time());
if (!defined('BLOG_FUNCTION') && !@(include BLOG_ROOT . '/source/functions.php')) {
exit('functions.php is missing');
}
define('IS_ROBOT', checkrobot());
global $_B;
$_B = array('uid' => 0, 'username' => '', 'groupid' => 0, 'timestamp' => TIMESTAMP, 'clientip' => $this->_get_client_ip(), 'mobile' => '', 'agent' => '', 'admin' => 0);
checkmobile();
$_B['PHP_SELF'] = bhtmlspecialchars($this->_get_script_url());
$_B['basefilename'] = basename($_B['PHP_SELF']);
$sitepath = substr($_B['PHP_SELF'], 0, strrpos($_B['PHP_SELF'], '/'));
$_B['siteurl'] = bhtmlspecialchars('http://' . $_SERVER['HTTP_HOST'] . $sitepath . '/');
getReferer();
$url = parse_url($_B['siteurl']);
$_B['siteroot'] = isset($url['path']) ? $url['path'] : '';
$_B['siteport'] = empty($_SERVER['SERVER_PORT']) || $_SERVER['SERVER_PORT'] == '80' ? '' : ':' . $_SERVER['SERVER_PORT'];
$this->b =& $_B;
}
示例2: index
function index()
{
////面包屑导航
// $data['headpagemenu']=array(
// 0=>array('name'=>'后台','link'=>"admin.php"),
// 1=>array('name'=>'网站概况','link'=>""),
// );
// $data['headpagetitle']="网站概况";
////左侧菜单
// $data['menumod']="index";
$product_tech = $this->config->item("product_tech");
$res = array();
foreach ($product_tech[4] as $key => $row) {
$list = fetch_array("select p.* from " . dbtable("product_tech") . " t," . dbtable("product") . " p where t.pid=p.id and t.type='{$key}'");
$res[$key] = $list;
}
$data["list"] = $res;
if (checkmobile()) {
$this->load->view('mobile/safety', $data);
} else {
$data['tech_type'] = "4";
$data['type_id'] = "4_1";
$this->load->view('safety', $data);
}
}
示例3: index
function index()
{
////面包屑导航
// $data['headpagemenu']=array(
// 0=>array('name'=>'后台','link'=>"admin.php"),
// 1=>array('name'=>'网站概况','link'=>""),
// );
// $data['headpagetitle']="网站概况";
////左侧菜单
// $data['menumod']="index";
if (checkmobile()) {
$this->load->view('mobile/slblinchina');
} else {
$this->load->view('branch');
}
}
示例4: createOrder
public function createOrder($options)
{
//检测手机号码格式
$chkmobile = checkmobile($options['mobile']);
if ($chkmobile !== 0) {
return $chkmobile;
}
//var_dump($options);
$userinfo = D('Member')->certificate($options['key']);
if (!is_array($userinfo)) {
return $userinfo;
}
//20002
$orderModel = M('51_orders');
//填充订单数据 status - 0: 进行中,1:已结束,2:已取消, 999:已删除
$orderdata['orderid'] = get_order_sn();
//订单号
$orderdata['uid'] = $userinfo['uid'];
$orderdata['status'] = 0;
$orderdata['options'] = array2string($options);
print_r(string2array($orderdata['options']));
$result = $orderModel->create($orderdata);
}
示例5: showtype
showtype('', 'bottom');
echo '<br /><center><input type="submit" class="button" name="regsubmit" value="' . $lang['submit'] . '" onclick="this.form.target=\'register\';"><iframe name="register" style="display: none"></iframe> <input type="button" class="button" value="' . $lang['cancel'] . '" onclick="window.location=\'admincp.php?action=insenz\'"></center></form>
<script type="text/javascript" src="./include/javascript/insenz_reg.js"></script>';
} else {
$username = checkusername($username);
$password = checkpassword($password, $password2);
$name = checkname($name);
$idcard = checkidcard($idcard);
$email1 = checkemail($email1, 'email1');
$email2 = $email2 ? checkemail($email2, 'email2') : '';
$qq = checkqq($qq);
$msn = $msn ? checkemail($msn, 'msn') : '';
$tel3 = $tel3 != $lang['insenz_register_extension'] ? intval($tel3) : '';
$tel = checktel($tel1, $tel2, $tel3, 'tel');
$fax = $fax2 ? checktel($fax1, $fax2, $fax3, 'fax') : '';
$mobile = checkmobile($mobile);
$cpc = checkcpc($country, $province, $city);
$country = $cpc[0];
$province = $cpc[1];
$city = $cpc[2];
$address = checkaddress($address);
$postcode = checkpostcode($postcode);
$alipay = checkemail($alipay, $lang['insenz_register_alipay']);
$response = insenz_request('<cmd id="checkHandle"><handle>' . $username . '</handle></cmd>');
if ($response['status']) {
insenz_alert($response['data']);
} else {
$response = $response['data']['response'][0]['data'][0]['VALUE'];
}
if ($response == 'handle_exists') {
insenz_alert('insenz_usernameexists', 'username');
示例6: define
<?php
//视图文件夹
//判断流览器类型,checkmobile 返回为真,则是手机浏览器;今后如开发 app 客户端,则还应加入一个客户端的识别;
if (checkmobile()) {
define('VIEW', 'themes' . DS . 'mob');
} else {
define('VIEW', 'themes');
}
//数据库服务器名
define('HOST', 'localhost');
//数据库用户名
define('HOST_USER', 'root');
//数据表
define('HOST_TAB', 'union');
//数据库密码
define('HOST_PASS', 'danlp0928');
//用户目录
define('US', 'user');
//用户目录分支
$usdir = array('img', 'doc', 'muisc', 'log');
define('BIGNUM', '999989999');
//全局最大的数据库记录个数,超过这个,将扩容//
//商品类型
$prod_type = array(1 => "女装", 2 => "男装", 3 => "美食", 4 => "数码", 5 => "新奇特", 6 => "预定");
//商品预定(待定)
//$prod_buynow = array(1=>"预定",2=>"发售");
//会员注册、登陆类型
$user_type = array(1 => "超级分享家", 2 => "设计师", 3 => "制造商", 4 => "审核员", 5 => "管理员", 6 => "卖家", 7 => "超级管理");
//商品状态
$prod_zhuantai = array(1 => "待审核", 2 => "通过", 3 => "不通过");
示例7: header
}
if ($DB->query("select * from wjob_config where id='1'") == FALSE) {
header('Content-type:text/html;charset=utf-8');
echo '<div class="row">你还没安装!<a href="install/">点此安装</a></div>';
exit;
}
$conf = $DB->get_row("SELECT * FROM wjob_config WHERE id='1' limit 1");
//获取系统配置
include_once ROOT . "includes/signapi.php";
include_once ROOT . "includes/function.php";
include_once ROOT . "includes/qq.func.php";
//界面样式
if ((!checkpc() || !file_exists(ROOT . 'template/index.html')) && $mod == 'home') {
$mod = 'index';
}
if (checkmobile() == true) {
$theme = isset($_COOKIE["uachar"]) ? $_COOKIE["uachar"] : 'mobile';
}
if (!isset($theme)) {
$theme = isset($_COOKIE["uachar"]) ? $_COOKIE["uachar"] : 'default';
}
if ($mod == 'head') {
$theme = 'mobile';
}
if ($conf['css2'] == 0) {
$theme = 'mobile';
}
define('TEMPLATE_ROOT', ROOT . '/template/' . $theme . '/');
define('PUBLIC_ROOT', ROOT . '/template/public/');
if ($conf['version'] <= '5040') {
header('Content-type:text/html;charset=utf-8');
示例8: check_forget_mobile_validate
/**
* 找回密码手机号验证
* @param string $pmobile
*/
public function check_forget_mobile_validate($pmobile = '')
{
$mobile = !empty($pmobile) ? $pmobile : $this->input->post('mobile', true);
if (empty($mobile)) {
$response = array('result' => false, 'tip_type' => 'mobile', 'msg' => $this->lang->line('mobile_empty'));
exit(json_encode($response));
} else {
if (!checkmobile($mobile)) {
$response = array('result' => false, 'tip_type' => 'mobile', 'msg' => $this->lang->line('mobile_error'));
exit(json_encode($response));
} else {
$user = $this->member->get_user(array('mobile', 'mobilestatus'), array('mobile' => $mobile));
if (empty($user)) {
$response = array('result' => false, 'tip_type' => 'mobile', 'msg' => $this->lang->line('mobile_dismatch'));
exit(json_encode($response));
} else {
!$user['mobilestatus'] && exit(json_encode(array('result' => false, 'tip_type' => 'mobile', 'msg' => $this->lang->line('mobile_noactivate'))));
if (!empty($pmobile)) {
return;
} else {
$response = array('result' => true, 'tip_type' => 'mobile', 'msg' => '');
exit(json_encode($response));
}
}
}
}
}
示例9:
</table>
<?php
if ($totalRows_news != 0) {
?>
<table>
<tr>
<td class="dataHeadingList">Date</td>
<td class="dataHeadingList">Headline</td>
<td class="dataHeadingList">Text</td>
<td class="dataHeadingList">Posted By</td>
<?php
if ($row_user['userLevel'] == "1") {
?>
<td class="dataHeadingList"> </td>
<td class="dataHeadingList"><?php
if (!checkmobile()) {
?>
<div id="helpInline"><a href="includes/admin_icons.inc.php?dbTable=<?php
echo $dbTable;
?>
&KeepThis=true&TB_iframe=true&height=450&width=800" title="Administration Icon Reference" class="thickbox"><img src="<?php
echo $imageSrc;
?>
information.png" align="absmiddle" border="0" alt="Admin Icon Reference" title="Administration Icon Reference"></a></div><?php
} else {
echo " ";
}
?>
</td>
<?php
}
示例10: result
function result()
{
$section_value = $_POST['section_value'];
if (empty($section_value)) {
alert("请选择试题!");
}
$re_value = sel_product($section_value);
$if_value = $re_value['data'];
if (empty($if_value)) {
alert("没有找到符合你要求的床垫!");
}
$where = "";
if ($re_value['status'] == "1") {
$restype = fetch_array("select id from " . dbtable("product_type") . " where upid='2'");
$type_id = "";
foreach ($restype as $key => $row) {
if ($key != 0) {
$type_id .= ",";
}
$type_id .= "'" . $row['id'] . "'";
}
$where .= " p.tid in ({$type_id}) ";
} else {
$if_value = $re_value['data'];
$where .= " p.stitle in ({$if_value})";
}
// $sel_value=explode(",",$section_value);
// $pro_name[1]='"经典超级保背健","经典呵背","温度智慧 I 1600","温度智慧 II 1600","皇家皇冠","皇家红宝石"';
// $image[1]=array("jdcjbbj.jpg","jdkb.jpg","wdzh1600.jpg","wdzh2600.jpg","hjhg.jpg","hjhbs.jpg");
// $pro_name[2]='"经典A-B保背健","经典豪华保背健","温度智慧 I 1200","温度智慧 II 1200","皇家红宝石","帝冠"';
// $image[2]=array("jdab.jpg","jdahbbj.jpg","wdzh1200.jpg","wdzh2200.jpg","hjhbs.jpg","dg.jpg");
// $pro_name[3]='"经典超级保背健","经典呵背","温度智慧 I 1600","温度智慧 II 1600","皇家金钻石","传家宝"';
// $image[3]=array("jdcjbbj.jpg","jdhb.jpg","wdzh1600.jpg","wdzh2600.jpg","hjjzs.jpg","cjb.jpg");
// $pro_name[4]='"温度智慧 II 1600","皇家金钻石","传家宝"';
// $image[3]=array("wdzh2600.jpg","hjjzs.jpg","cjb.jpg");
// $pro_name[5]='"经典薄款保背健","经典保背健","经典A-B保背健","温度智慧 I 1200","温度智慧 II 1200","皇家蓝宝石","皇家绿宝石"';
// $image[3]=array("jdpkbbj.jpg","jdbb.jpg","jdab.jpg","wdzh1200.jpg","wdzh2200.jpg","hjlbs.jpg","hjlbs.jpg",);
///*
// * 搜索产品的结果只按第四题目的选择进行产品筛选
// * 1表示羽毛,2表示棉花,3表示木头,4表示沙滩,5表示草地
// */
// switch($sel_value['3'])
// {
// case "1":
// case "2":
// case "3":
// case "4":
// case "5":
// $key=$sel_value[3];
// $res=fetch_array("select p.*,t.tname from ".dbtable("product")." p ,".dbtable("product_type")." t where p.tid=t.id and p.stitle in (".$where.") and p.status=1 order by t.displayorder");
// foreach($res as $key=>$row)
// {
// $pid=$row['id'];
// $resimage=fetch_one_array("select imgurl from ".dbtable("product_img")." where pid='".$pid."' and status='1' order by displayorder limit 1");
// $res[$key]['imgurl']=$resimage['imgurl'];
// }
// $data['res']=$res;
// break;
// }
// $pro_data=array();
// $key=0;
// for($i=0;$i<count($if_value);$i++)
// {
// $where ="p.stitle='".$if_value[$i]."'";
// $res=fetch_one_array("select p.*,t.tname from ".dbtable("product")." p ,".dbtable("product_type")." t where p.tid=t.id and ".$where." and p.status=1 order by t.displayorder");
// if(!empty($res['id']))
// {
// $pid=$res['id'];
// $pro_data[$key]=$res;
// $resimage=fetch_one_array("select imgurl from ".dbtable("product_img")." where pid='".$pid."' and status='1' order by displayorder limit 1");
// $pro_data[$key]['imgurl']=$resimage['imgurl'];
// $key++;
// }
// }
$res = fetch_array("select p.*,t.tname from " . dbtable("product") . " p ," . dbtable("product_type") . " t where p.tid=t.id and (" . $where . ") and p.status=1 order by t.displayorder");
foreach ($res as $key => $row) {
$pid = $row['id'];
$resimage = fetch_one_array("select imgurl from " . dbtable("product_img") . " where pid='" . $pid . "' and status='1' order by displayorder limit 1");
$res[$key]['imgurl'] = $resimage['imgurl'];
}
$data['res_list'] = $res;
if (checkmobile()) {
$this->load->view('mobile/selection_result', $data);
} else {
$this->load->view('selection_result', $data);
}
}
示例11: output
function output()
{
global $_G;
if (defined('DZZ_OUTPUTED')) {
return;
} else {
define('DZZ_OUTPUTED', 1);
}
if ($_G['setting']['ftp']['connid']) {
@ftp_close($_G['setting']['ftp']['connid']);
}
$_G['setting']['ftp'] = array();
if (defined('CACHE_FILE') && CACHE_FILE && !defined('CACHE_FORBIDDEN') && !defined('IN_MOBILE') && !checkmobile()) {
if (diskfreespace(DZZ_ROOT . './' . $_G['setting']['cachethreaddir']) > 1000000) {
if ($fp = @fopen(CACHE_FILE, 'w')) {
flock($fp, LOCK_EX);
fwrite($fp, empty($content) ? ob_get_contents() : $content);
}
@fclose($fp);
chmod(CACHE_FILE, 0777);
}
}
if (defined('DZZ_DEBUG') && DZZ_DEBUG && @(include libfile('function/debug'))) {
function_exists('debugmessage') && debugmessage();
}
}
示例12: aboutus
function aboutus()
{
if (checkmobile()) {
$type = getgpc("type");
$type = $type ? $type : 1;
$data['type'] = $type;
$this->load->view('mobile/introduce', $data);
// $this->load->view('mobile/aboutus');
} else {
$this->load->view('aboutus');
}
}
示例13: header
<?php
header("Content-type: text/html; charset=utf8");
define('IN_TIPASK', TRUE);
define('TIPASK_ROOT', substr(dirname(__FILE__), 0, -4));
// 普通的 http 通知方式
error_reporting(0);
defined('MAGIC_QUOTES_GPC') || define('MAGIC_QUOTES_GPC', get_magic_quotes_gpc());
require_once TIPASK_ROOT . '/lib/global.func.php';
$check_type = trim($_GET['type']);
$check_type = in_array($check_type, array('mobile', 'weixin', 'tel', 'qq')) ? $check_type : 'mobile';
$value = trim($_GET['value']);
if ($check_type == 'mobile') {
if ($value != "") {
$result = checkmobile($value);
if ($result) {
$return = array('return' => 1);
} else {
$return = array('return' => 0, 'comment' => '请输入正确格式的手机号');
}
} else {
$return = array('return' => 0, 'comment' => '请输入正确格式的手机号');
}
} elseif ($check_type == 'qq') {
if ($value != "") {
$result = isQQ($value);
if ($result) {
$return = array('return' => 1);
} else {
$return = array('return' => 0, 'comment' => '请输入正确格式的QQ号');
}
示例14: _init_mobile
static function _init_mobile()
{
global $_G;
if ($_G[setting][qq_zone_url]) {
$host = str_replace(array('http://', '/'), '', $_G[setting][qq_zone_url]);
if ($host == $_G[host]) {
$_G[qq_zone] = 1;
}
}
$mobile = checkmobile();
//手台设定的,手机版强制跳转到某个网站
if ($_G['mobile'] && $_G['setting']['mobile_jump']) {
$url1 = parse_url($_G['siteurl']);
$url2 = parse_url($_G['setting']['mobile_jump']);
if ($url1 !== false && $url2 !== false && $url1['host'] != $url2['host']) {
_header("Location:" . $_G['setting']['mobile_jump']);
}
}
if ($_G[setting][mobile_status] == 0) {
$_G['mobile'] = false;
return false;
}
if (isset($_GET['mobile'])) {
if ($_GET['mobile'] == 'no') {
//强制pc版
$mobile = false;
dsetcookie('nomobile', 1, 86400 * 3);
} else {
if ($_GET['mobile'] == 'yes') {
//强制是手机版
dsetcookie('nomobile', 2, 86400 * 3);
$mobile = true;
}
}
}
$is_mobile = getcookie('nomobile');
if ($is_mobile == 1) {
$mobile = false;
} else {
if ($is_mobile == 2) {
$mobile = true;
}
}
$_G['mobile'] = $mobile;
define('MOBILE', $mobile);
define('PAD', $_G['pad']);
}
示例15: onsuggest
function onsuggest()
{
$question_type = "suggest";
$question_type_list = $this->ask_config->getQuestionType();
$title = "服务中心-我要" . $question_type_list[$question_type];
$all_num = $_ENV['question']->total_question();
$qtypeId = isset($this->get[2]) ? intval($this->get[2]) : (isset($this->post['qtypeId']) ? intval($this->post['qtypeId']) : 0);
$loginName = $this->ask_front_name;
$allQtype = $_ENV['qtype']->GetAllQType(1, "", 0);
if (!isset($allQtype[$qtypeId])) {
header("Location: http://sc.5173.com/index.php?question/ask_skip.html");
}
$subList = $_ENV['qtype']->GetSubList($qtypeId);
if (!empty($subList)) {
header("Location: http://sc.5173.com/index.php?question/subList/suggest/{$qtypeId}.html");
}
$qtypeName = $allQtype[$qtypeId];
$operatorInfo = '';
// 获取我的专属客服
if ($this->ask_front_name == '游客') {
$selfAuthor_where = '';
// 获取专属客服条件
} else {
$t_cid = $_ENV['question']->getType(3);
$operatorInfo = $_ENV['operator']->getMySelfAuthor($this->ask_front_name);
$selfAuthor_where = $_ENV['question']->front_selfAuthor_where($operatorInfo['login_name'], '', 1, $t_cid);
}
if ($selfAuthor_where) {
$selfAuthorNum = $_ENV['question']->front_mySelfAuthorNum($selfAuthor_where);
} else {
$selfAuthorNum = 0;
}
$url = '';
if ($qtypeName['pid'] > 0) {
$url = '<a href="http://sc.5173.com/index.php?question/subList/suggest/' . $qtypeName['pid'] . '.html">选择' . $allQtype[$qtypeName['pid']]['name'] . '类' . $question_type_list[$question_type] . '</a> >  ';
}
//未登陆跳转地址
$login_url = "http://" . config::FRONT_LOGIN_DOMAIN . "/?returnUrl=" . urlencode(curPageURL());
$display_yzm = false;
if ($this->ask_front_name != '游客') {
$contact = $this->cache->get(md5('SJ' . $this->ask_front_id));
if (false === $contact) {
$contact = get_mobile($this->ask_front_id);
if (!empty($contact)) {
$this->cache->set(md5('SJ' . $this->ask_front_id), $contact, 1800);
}
//缓存30分钟
}
if (!empty($contact)) {
$en_contact = substr_replace($contact, '****', 3, 4);
}
}
$suggest_title = isset($this->post['title']) ? htmlspecialchars(trim($this->post['title'])) : '';
$description = isset($this->post['description']) && $this->post['description'] != "我们非常重视您的" . $question_type_list[$question_type] . ",请在这里告诉我们" ? htmlspecialchars(trim($this->post['description'])) : '';
$contact_num = isset($this->post['contact_num']) ? htmlspecialchars($this->post['contact_num']) : (isset($en_contact) ? $en_contact : '');
$J_code = isset($this->post['J_code']) ? strtolower(htmlspecialchars($this->post['J_code'])) : '';
if ($this->ask_front_name == '游客') {
$author = isset($this->post['author']) && $this->post['author'] != '请输入5173用户名' ? trim($this->post['author']) : '';
$author_id = '';
} else {
$author_id = $this->ask_front_id;
$author = $this->ask_front_name;
}
$t_yzm = tcookie('yzm');
if (empty($t_yzm)) {
tcookie('yzm', time(), 1800);
//存放半个小时
} else {
$over_time = time() - $t_yzm;
//距离现在的秒数
if ($over_time < 1800) {
$display_yzm = true;
} else {
tcookie('yzm', '', time() - 3600);
//删除
}
}
if ($this->ask_front_name != '游客') {
$display_yzm = false;
}
//登陆用户不显示验证码
if (isset($this->post['contact'])) {
$comment['contact'] = $this->post['contact'];
} else {
$comment['contact']['mobile'] = isset($en_contact) ? $en_contact : '';
}
$flag = 0;
if (isset($this->post['act'])) {
if (isset($this->post['contact'])) {
$comment['contact'] = $this->post['contact'];
if ($comment['contact']['mobile'] != "") {
if (isset($en_contact) && $comment['contact']['mobile'] == $en_contact) {
$comment['contact']['mobile'] = $contact;
}
if (!checkmobile($comment['contact']['mobile'])) {
$errorMsg['mobile'] = '手机号';
unset($comment['contact']['mobile']);
} else {
$flag++;
}
//.........这里部分代码省略.........