本文整理汇总了PHP中check::is_mobile方法的典型用法代码示例。如果您正苦于以下问题:PHP check::is_mobile方法的具体用法?PHP check::is_mobile怎么用?PHP check::is_mobile使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类check
的用法示例。
在下文中一共展示了check::is_mobile方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: check
/**
* 内部验证
*/
private function check($data)
{
session_start();
if (!$this->memberconfig['register']) {
$this->memberMsg(lang('m-reg-0'));
}
if (empty($data['username'])) {
$this->memberMsg(lang('m-reg-7'));
}
if (!check::is_mobile($data['shoujihaoma'])) {
$this->memberMsg(lang('m-reg-9-1'));
}
if ($data['smscode'] !== $_SESSION['smscode'][$data['shoujihaoma']]) {
$this->memberMsg(lang('m-reg-9-2'));
}
if (!$this->is_username($data['username'])) {
$this->memberMsg(${$data}['username'] . lang('m-pms-12'));
}
if (empty($data['password'])) {
$this->memberMsg(lang('m-reg-11'));
}
if ($data['password'] != $data['password2']) {
$this->memberMsg(lang('m-reg-12'));
}
if (!check::is_email($data['email'])) {
$this->memberMsg(lang('m-reg-9'));
}
if ($this->memberconfig['banuser']) {
$users = explode(',', $this->memberconfig['banuser']);
if (in_array($data['username'], $users)) {
$this->memberMsg(lang('m-reg-13', array('1' => $data['username'])));
}
}
if ($this->memberconfig['regiptime']) {
$mcfg = $this->member->from(null, 'regdate,regip')->where('regip=?', client::get_user_ip())->order('regdate DESC')->select(false);
if ($mcfg && time() - $mcfg['regdate'] <= $this->memberconfig['regiptime'] * 3600) {
$this->memberMsg(lang('m-reg-13', array('1' => $this->memberconfig['regiptime'])));
}
}
$member = $this->member->from(null, 'id')->where('email=?', $data['email'])->select(false);
if ($member) {
$this->memberMsg(lang('m-reg-10'));
}
$member = $this->member->from(null, 'id')->where('username=?', $data['username'])->select(false);
if ($member) {
$this->memberMsg(lang('m-reg-8'));
}
}