本文整理匯總了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'));
}
}