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

PHP isemail函数代码示例

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

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



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

示例1: register

 public function register($username, $password, $field, $type = 'email')
 {
     $returns = array('uid' => '-1', 'username' => '', 'email' => '', 'mobile' => '', 'userip' => '');
     if (!isset($username) || empty($username) || strlen($username) < 2 || !isset($password) || empty($password) || strlen($password) < 6) {
         return $returns;
     }
     if ($type == 'email' && !isemail($field)) {
         return $returns;
     }
     if ($type == 'mobile' && !ismobile($field)) {
         return $returns;
     }
     $this->group = M('member_group')->where("type='member' AND creditslower>=0")->order('creditslower', 'ASC')->find(1);
     cookie('member_group', serialize($this->group));
     $type = $type == 'mobile' ? $type : 'email';
     $email = $type == 'email' ? $field : '';
     $mobile = $type == 'mobile' ? $field : '';
     $account = array('username' => $username, 'password' => sha1(md5($password)), 'email' => $email, 'mobile' => $mobile, 'gid' => $this->group['gid'], 'status' => 0, 'newpm' => 0, 'emailstatus' => 0, 'avatarstatus' => 0, 'regdate' => TIMESTAMP);
     $this->uid = M('member')->insert($account, true);
     $this->username = $username;
     $this->email = $email;
     $this->mobile = $mobile;
     $returns = array('uid' => $this->uid, 'username' => $this->username, 'email' => $this->email, 'mobile' => $this->mobile, 'userip' => $_SERVER['REMOTE_ADDR']);
     $account['uid'] = $this->uid;
     $this->account = $account;
     cookie('member_account', serialize($account));
     $this->status = $this->getStatus();
     cookie('member_status', serialize($this->status));
     $this->count = $this->getCount();
     cookie('member_count', serialize($this->count));
     $this->profile = $this->getProfile();
     cookie('member_profile', serialize($this->profile));
     return $returns;
 }
开发者ID:xy113,项目名称:XiangBaLaoServer,代码行数:34,代码来源:class.Member.php


示例2: chklogin

 /**
  * 登录验证
  */
 private function chklogin()
 {
     $account = htmlspecialchars(trim($_GET['account_' . FORMHASH]));
     $password = trim($_GET['password_' . FORMHASH]);
     $captchacode = strtolower(trim($_GET['captchacode']));
     $this->checkCaptchacode($captchacode);
     if (strlen($account) < 2) {
         $this->showError('username_verify_failed');
     }
     if (strlen($password) < 6) {
         $this->showError('password_verify_failed');
     }
     $member = new Member();
     if (isemail($account)) {
         $returns = $member->Login($account, $password, 'email');
     } elseif (ismobile($account)) {
         $returns = $member->Login($account, $password, 'mobile');
     } else {
         $returns = $member->Login($account, $password);
     }
     if ($member->uid > 0) {
         $continue = $_GET['continue'];
         $this->showSuccess('login_succeed', $continue, array(), '', true);
     } else {
         $this->showError('login_verify_failed');
     }
 }
开发者ID:xy113,项目名称:XiangBaLaoServer,代码行数:30,代码来源:class.LoginController.php


示例3: save

 /**
  * 保存注册信息
  */
 function save()
 {
     $username = htmlspecialchars(trim($_GET['username_' . FORMHASH]));
     $password = trim($_GET['password_' . FORMHASH]);
     $email = trim($_GET['email_' . FORMHASH]);
     $captchacode = trim($_GET['captchacode']);
     $this->checkCaptchacode($captchacode);
     if (strlen($username) < 2) {
         $this->showError('username_verify_failed');
     }
     if ($this->_verify(array('username' => $username))) {
         $this->showError('username_exists');
     }
     if (empty($email) || !isemail($email)) {
         $this->showError('email_verify_failed');
     }
     if ($this->_verify(array('email' => $email))) {
         $this->showError('email_exists');
     }
     if (empty($password) || strlen($password) < 6) {
         $this->showError('password_verify_failed');
     }
     $member = new Member();
     $returns = $member->register($username, $password, $email, $_GET['type']);
     if ($member->uid > 0) {
         $this->showSuccess('register_succeed', '/?m=home', array(), '', true);
     }
 }
开发者ID:xy113,项目名称:XiangBaLaoServer,代码行数:31,代码来源:class.RegisterController.php


示例4: userlogin

function userlogin($username, $password, $questionid, $answer, $loginfield = 'username')
{
    $return = array();
    if ($loginfield == 'uid') {
        $isuid = 1;
    } elseif ($loginfield == 'email') {
        $isuid = 2;
    } elseif ($loginfield == 'auto') {
        $isuid = 3;
    } else {
        $isuid = 0;
    }
    if (!function_exists('uc_user_login')) {
        loaducenter();
    }
    if ($isuid == 3) {
        if (preg_match('/^[1-9]\\d*$/', $username)) {
            $return['ucresult'] = uc_user_login($username, $password, 1, 1, $questionid, $answer);
        } elseif (isemail($username)) {
            $return['ucresult'] = uc_user_login($username, $password, 2, 1, $questionid, $answer);
        }
        if ($return['ucresult'][0] <= 0) {
            $return['ucresult'] = uc_user_login($username, $password, 0, 1, $questionid, $answer);
        }
    } else {
        $return['ucresult'] = uc_user_login($username, $password, $isuid, 1, $questionid, $answer);
    }
    $tmp = array();
    $duplicate = '';
    list($tmp['uid'], $tmp['username'], $tmp['password'], $tmp['email'], $duplicate) = daddslashes($return['ucresult'], 1);
    $return['ucresult'] = $tmp;
    if ($duplicate && $return['ucresult']['uid'] > 0) {
        if ($olduid = DB::result_first("SELECT uid FROM " . DB::table('common_member') . " WHERE username='" . addslashes($return['ucresult']['username']) . "'")) {
            require_once libfile('function/membermerge');
            if ($olduid != $return['ucresult']['uid']) {
                membermerge($olduid, $return['ucresult']['uid']);
            }
            uc_user_merge_remove($return['ucresult']['username']);
        } else {
            $return['status'] = 0;
            return $return;
        }
    }
    if ($return['ucresult']['uid'] <= 0) {
        $return['status'] = 0;
        return $return;
    }
    $member = DB::fetch_first("SELECT * FROM " . DB::table('common_member') . " WHERE uid='" . $return['ucresult']['uid'] . "'");
    if (!$member) {
        $return['status'] = -1;
        return $return;
    }
    $return['member'] = $member;
    $return['status'] = 1;
    if (addslashes($member['email']) != $return['ucresult']['email']) {
        DB::query("UPDATE " . DB::table('common_member') . " SET email='" . $return['ucresult']['email'] . "' WHERE uid='" . $return['ucresult']['uid'] . "'");
    }
    return $return;
}
开发者ID:pan289091315,项目名称:Discuz,代码行数:59,代码来源:function_member.php


示例5: editUser

 public static function editUser($keyName, $userInfo)
 {
     if (!isemail($userInfo[self::TABLE_EMAIL])) {
         return control_returnCode::REG_ERROR_EMAIL;
     }
     $userInfo[self::TABLE_UPDATETIME] = time();
     self::getDB()->table(self::TABLE_NAME)->where(array(self::TABLE_UNIONKEY => $keyName))->update($userInfo);
     return control_returnCode::REG_TRUE;
 }
开发者ID:knowsee,项目名称:uoke_framework,代码行数:9,代码来源:user.class.php


示例6: userlogin

function userlogin($username, $password, $questionid, $answer, $loginfield = 'username', $ip = '') {
	$return = array();

	if($loginfield == 'uid' && getglobal('setting/uidlogin')) {
		$isuid = 1;
	} elseif($loginfield == 'email') {
		$isuid = 2;
	} elseif($loginfield == 'auto') {
		$isuid = 3;
	} else {
		$isuid = 0;
	}

	if(!function_exists('uc_user_login')) {
		loaducenter();
	}
	if($isuid == 3) {
		if(!strcmp(dintval($username), $username) && getglobal('setting/uidlogin')) {
			$return['ucresult'] = uc_user_login($username, $password, 1, 1, $questionid, $answer, $ip);
		} elseif(isemail($username)) {
			$return['ucresult'] = uc_user_login($username, $password, 2, 1, $questionid, $answer, $ip);
		}
		if($return['ucresult'][0] <= 0 && $return['ucresult'][0] != -3) {
			$return['ucresult'] = uc_user_login(addslashes($username), $password, 0, 1, $questionid, $answer, $ip);
		}
	} else {
		$return['ucresult'] = uc_user_login(addslashes($username), $password, $isuid, 1, $questionid, $answer, $ip);
	}
	$tmp = array();
	$duplicate = '';
	list($tmp['uid'], $tmp['username'], $tmp['password'], $tmp['email'], $duplicate) = $return['ucresult'];
	$return['ucresult'] = $tmp;
	if($duplicate && $return['ucresult']['uid'] > 0 || $return['ucresult']['uid'] <= 0) {
		$return['status'] = 0;
		return $return;
	}

	$member = getuserbyuid($return['ucresult']['uid'], 1);
	if(!$member || empty($member['uid'])) {
		$return['status'] = -1;
		return $return;
	}
	$return['member'] = $member;
	$return['status'] = 1;
	if($member['_inarchive']) {
		C::t('common_member_archive')->move_to_master($member['uid']);
	}
	if($member['email'] != $return['ucresult']['email']) {
		C::t('common_member')->update($return['ucresult']['uid'], array('email' => $return['ucresult']['email']));
	}

	return $return;
}
开发者ID:xDiglett,项目名称:discuzx30,代码行数:53,代码来源:function_member.php


示例7: save

 public function save()
 {
     $accountnew = $_GET['accountnew'];
     $profilenew = $_GET['profilenew'];
     if (isemail($accountnew['email']) || ismobile($accountnew['mobile'])) {
         $this->t('member')->where(array('uid' => $this->uid))->update($accountnew);
     }
     $profilenew['locked'] = 1;
     $profilenew['modified'] = time();
     $this->t('member_profile')->where(array('uid' => $this->uid))->update($profilenew);
     $this->showSuccess('modi_succeed');
 }
开发者ID:xy113,项目名称:XiangBaLaoServer,代码行数:12,代码来源:class.ProfileController.php


示例8: mobcent_threadsort_validator

function mobcent_threadsort_validator($sortoption, $pid)
{
    global $_G, $var;
    $postaction = $_G['tid'] && $pid ? "edit&tid={$_G['tid']}&pid={$pid}" : 'newthread';
    $_G['forum_optiondata'] = array();
    foreach ($_G['forum_checkoption'] as $var => $option) {
        if ($_G['forum_checkoption'][$var]['required'] && ($sortoption[$var] === '' && $_G['forum_checkoption'][$var]['type'] != 'number')) {
            return array('message' => 'threadtype_required_invalid', 'params' => array('{typetitle}' => $_G['forum_checkoption'][$var]['title']));
            //showmessage('threadtype_required_invalid', "forum.php?mod=post&action=$postaction&fid=$_G[fid]&sortid=".$_G['forum_selectsortid'], array('typetitle' => $_G['forum_checkoption'][$var]['title']));
        } elseif ($sortoption[$var] && ($_G['forum_checkoption'][$var]['type'] == 'number' && !is_numeric($sortoption[$var]) || $_G['forum_checkoption'][$var]['type'] == 'email' && !isemail($sortoption[$var]))) {
            return array('message' => 'threadtype_required_invalid', 'params' => array('{typetitle}' => $_G['forum_checkoption'][$var]['title']));
            //showmessage('threadtype_format_invalid', "forum.php?mod=post&action=$postaction&fid=$_G[fid]&sortid=".$_G['forum_selectsortid'], array('typetitle' => $_G['forum_checkoption'][$var]['title']));
        } elseif ($sortoption[$var] && $_G['forum_checkoption'][$var]['maxlength'] && strlen($sortoption[$var]) > $_G['forum_checkoption'][$var]['maxlength']) {
            return array('message' => 'threadtype_toolong_invalid', 'params' => array('{typetitle}' => $_G['forum_checkoption'][$var]['title']));
            // showmessage('threadtype_toolong_invalid', "forum.php?mod=post&action=$postaction&fid=$_G[fid]&sortid=".$_G['forum_selectsortid'], array('typetitle' => $_G['forum_checkoption'][$var]['title']));
        } elseif ($sortoption[$var] && ($_G['forum_checkoption'][$var]['maxnum'] && $sortoption[$var] > $_G['forum_checkoption'][$var]['maxnum'] || $_G['forum_checkoption'][$var]['minnum'] && $sortoption[$var] < $_G['forum_checkoption'][$var]['minnum'])) {
            return array('message' => 'threadtype_num_invalid', 'params' => array('{typetitle}' => $_G['forum_checkoption'][$var]['title']));
            // showmessage('threadtype_num_invalid', "forum.php?mod=post&action=$postaction&fid=$_G[fid]&sortid=".$_G['forum_selectsortid'], array('typetitle' => $_G['forum_checkoption'][$var]['title']));
        } elseif ($sortoption[$var] && $_G['forum_checkoption'][$var]['unchangeable'] && !($_G['tid'] && $pid)) {
            return array('message' => 'threadtype_unchangeable_invalid', 'params' => array('{typetitle}' => $_G['forum_checkoption'][$var]['title']));
            //showmessage('threadtype_unchangeable_invalid', "forum.php?mod=post&action=$postaction&fid=$_G[fid]&sortid=".$_G['forum_selectsortid'], array('typetitle' => $_G['forum_checkoption'][$var]['title']));
        } elseif ($sortoption[$var] && $_G['forum_checkoption'][$var]['type'] == 'select') {
            if ($_G['forum_optionlist'][$_G['forum_checkoption'][$var]['optionid']]['choices'][$sortoption[$var]]['level'] != 1) {
                //判断下拉选择项的必填项是否填写,如果为多级连动选择客户端会发不出去帖子,注释此行
                //return array('message'=>'threadtype_select_invalid','params'=>array('{typetitle}' => $_G['forum_checkoption'][$var]['title']));
                // showmessage('threadtype_select_invalid', "forum.php?mod=post&action=$postaction&fid=$_G[fid]&sortid=".$_G['forum_selectsortid'], array('typetitle' => $_G['forum_checkoption'][$var]['title']));
            }
        }
        if ($_G['forum_checkoption'][$var]['type'] == 'checkbox') {
            $sortoption[$var] = $sortoption[$var] ? implode("\t", $sortoption[$var]) : '';
        } elseif ($_G['forum_checkoption'][$var]['type'] == 'url') {
            $sortoption[$var] = $sortoption[$var] ? substr(strtolower($sortoption[$var]), 0, 4) == 'www.' ? 'http://' . $sortoption[$var] : $sortoption[$var] : '';
        }
        if ($_G['forum_checkoption'][$var]['type'] == 'image') {
            if ($sortoption[$var]['aid']) {
                $_GET['attachnew'][$sortoption[$var]['aid']] = $sortoption[$var];
            }
            $sortoption[$var] = serialize($sortoption[$var]);
        } elseif ($_G['forum_checkoption'][$var]['type'] == 'select') {
            $sortoption[$var] = censor(trim($sortoption[$var]));
        } else {
            $sortoption[$var] = dhtmlspecialchars(censor(trim($sortoption[$var])));
        }
        $_G['forum_optiondata'][$_G['forum_checkoption'][$var]['optionid']] = $sortoption[$var];
    }
    return $_G['forum_optiondata'];
}
开发者ID:caidongyun,项目名称:CS,代码行数:47,代码来源:function_threadsort.php


示例9: showmessage

             //$row = $_SGLOBAL['db']->fetch_array($query);$_SGLOBAL['db']->fetch_array($query)
         }
         //提示用户已经激活过了
         showmessage('identifier_is_active', '', 3);
     }
 }
 //根据学号取得邮箱和激活信息
 //$query = $_SGLOBAL['db']->query("SELECT defaultemail, isactive, emaildateline FROM ".tname('baseprofile')." WHERE collegeid='$collegeid'");
 //$row = $_SGLOBAL['db']->fetch_array($query);
 if (empty($one)) {
     showmessage('collegeid_is_invalid', '', 3);
 }
 $defaultemail = $one['defaultemail'];
 $isactive = $one['isactive'];
 //没有邮箱信息
 if (empty($defaultemail) || !isemail($defaultemail)) {
     showmessage('have_no_email', '', 10);
 }
 if ($isactive > 0) {
     showmessage('collegeid_is_active', '', 3);
 } elseif (empty($isactive)) {
     $nowtime = explode(' ', microtime());
     $tmptime = $nowtime[1];
     //记录邮件发送时间,存入数据库
     $tmptime = $tmptime + $nowtime[0];
     if ($tmptime - intval($row['emaildateline']) <= 1800) {
         showmessage('sendtime_limit');
     }
     //激活成功
     $hash = authcode("{$collegeid}\t{$defaultemail}", 'ENCODE');
     $url = getsiteurl() . 'do.php?ac=' . $_SCONFIG['buaaregister_action'] . '&amp;hash=' . urlencode($hash);
开发者ID:shiyake,项目名称:php-ihome,代码行数:31,代码来源:do_activate.php


示例10: check_limit

 function check_limit()
 {
     $mlimit = $this->field['mlimit'];
     if ($this->field['datatype'] == 'date') {
         $mlimit = 'date';
     } elseif ($this->field['datatype'] == 'int') {
         $mlimit = 'int';
     } elseif ($this->field['datatype'] == 'float') {
         $mlimit = 'number';
     }
     if (empty($this->newvalue) || empty($mlimit)) {
         return true;
     }
     $cname = $this->field['cname'];
     if ($mlimit == 'date' && !isdate($this->newvalue)) {
         $this->error = "{$cname} " . lang('liminpda');
     } elseif ($mlimit == 'int' && !is_numeric($this->newvalue)) {
         $this->error = "{$cname} " . lang('liminpint');
     } elseif ($mlimit == 'number' && !is_numeric($this->newvalue)) {
         $this->error = "{$cname} " . lang('liminpnum');
     } elseif ($mlimit == 'letter' && !preg_match("/^[a-z]+\$/i", $this->newvalue)) {
         $this->error = "{$cname} " . lang('limiinputlett');
     } elseif ($mlimit == 'numberletter' && !preg_match("/^[0-9a-z]+\$/i", $this->newvalue)) {
         $this->error = "{$cname} " . lang('limitinputnumberl');
     } elseif ($mlimit == 'tagtype' && !preg_match("/^[a-z]+\\w*\$/i", $this->newvalue)) {
         $this->error = "{$cname} " . lang('limitinputtagtype');
     } elseif ($mlimit == 'email' && !isemail($this->newvalue)) {
         $this->error = "{$cname} " . lang('limitinputemail');
     }
     return $this->error ? false : true;
 }
开发者ID:polarlight1989,项目名称:08cms,代码行数:31,代码来源:fields.cls.php


示例11: threadsort_validator

function threadsort_validator($sortoption)
{
    global $checkoption, $var, $selectsortid, $fid, $tid, $pid;
    $postaction = $tid && $pid ? "edit&tid={$tid}&pid={$pid}" : 'newthread';
    $optiondata = array();
    foreach ($checkoption as $var => $option) {
        if ($checkoption[$var]['required'] && !$sortoption[$var]) {
            showmessage('threadtype_required_invalid', "post.php?action={$postaction}&fid={$fid}&sortid={$selectsortid}");
        } elseif ($sortoption[$var] && ($checkoption[$var]['type'] == 'number' && !is_numeric($sortoption[$var]) || $checkoption[$var]['type'] == 'email' && !isemail($sortoption[$var]))) {
            showmessage('threadtype_format_invalid', "post.php?action={$postaction}&fid={$fid}&sortid={$selectsortid}");
        } elseif ($sortoption[$var] && $checkoption[$var]['maxlength'] && strlen($typeoption[$var]) > $checkoption[$var]['maxlength']) {
            showmessage('threadtype_toolong_invalid', "post.php?action={$postaction}&fid={$fid}&sortid={$selectsortid}");
        } elseif ($sortoption[$var] && ($checkoption[$var]['maxnum'] && $sortoption[$var] >= $checkoption[$var]['maxnum'] || $checkoption[$var]['minnum'] && $sortoption[$var] < $checkoption[$var]['minnum'])) {
            showmessage('threadtype_num_invalid', "post.php?action={$postaction}&fid={$fid}&sortid={$selectsortid}");
        } elseif ($sortoption[$var] && $checkoption[$var]['unchangeable'] && !($tid && $pid)) {
            showmessage('threadtype_unchangeable_invalid', "post.php?action={$postaction}&fid={$fid}&sortid={$selectsortid}");
        }
        if ($checkoption[$var]['type'] == 'checkbox') {
            $sortoption[$var] = $sortoption[$var] ? implode("\t", $sortoption[$var]) : '';
        } elseif ($checkoption[$var]['type'] == 'url') {
            $sortoption[$var] = $sortoption[$var] ? substr(strtolower($sortoption[$var]), 0, 4) == 'www.' ? 'http://' . $sortoption[$var] : $sortoption[$var] : '';
        }
        $sortoption[$var] = dhtmlspecialchars(censor(trim($sortoption[$var])));
        $optiondata[$checkoption[$var]['optionid']] = $sortoption[$var];
    }
    return $optiondata;
}
开发者ID:lilhorse,项目名称:cocoa,代码行数:27,代码来源:post.func.php


示例12: checkclose

 checkclose();
 $realname = trim($_GET['realname']);
 $birthday = trim($_GET['birthday']);
 $password = $birthday;
 if (empty($realname)) {
     showmessage('对不起,请输入姓名!', '', 2);
 }
 if (empty($birthday)) {
     showmessage('对不起,请输入生日!', '', 2);
 }
 //已经注册用户
 if ($_SGLOBAL['supe_uid']) {
     showmessage('registered', 'space.php');
 }
 //检查邮箱
 $email = isemail(trim($_GET['email'])) ? trim($_GET['email']) : '';
 if (empty($email)) {
     showmessage('email_format_is_wrong');
 }
 if ($_SCONFIG['checkemail']) {
     if ($count = getcount('spacefield', array('email' => $email))) {
         showmessage('email_has_been_registered');
     }
 }
 $num = strpos($email, '@');
 $num = $num > 15 ? 15 : $num;
 $newusername = substr($email, 0, $num);
 /*******************这里应该判断要不要用户名是否被占********************
 		$username = $newusername;
 		
 		if(!@include_once S_ROOT.'./uc_client/client.php')
开发者ID:shiyake,项目名称:php-ihome,代码行数:31,代码来源:do_mobileregister.php


示例13: threadsort_validator

function threadsort_validator($sortoption, $pid)
{
    global $_G, $var;
    $postaction = $_G['tid'] && $pid ? "edit&tid={$_G['tid']}&pid={$pid}" : 'newthread';
    $_G['forum_optiondata'] = array();
    foreach ($_G['forum_checkoption'] as $var => $option) {
        if ($_G['forum_checkoption'][$var]['required'] && !$sortoption[$var]) {
            showmessage('threadtype_required_invalid', "forum.php?mod=post&action={$postaction}&fid={$_G['fid']}&sortid=" . $_G['forum_selectsortid'], array('typetitle' => $_G['forum_checkoption'][$var]['title']));
        } elseif ($sortoption[$var] && ($_G['forum_checkoption'][$var]['type'] == 'number' && !is_numeric($sortoption[$var]) || $_G['forum_checkoption'][$var]['type'] == 'email' && !isemail($sortoption[$var]))) {
            showmessage('threadtype_format_invalid', "forum.php?mod=post&action={$postaction}&fid={$_G['fid']}&sortid=" . $_G['forum_selectsortid'], array('typetitle' => $_G['forum_checkoption'][$var]['title']));
        } elseif ($sortoption[$var] && $_G['forum_checkoption'][$var]['maxlength'] && strlen($typeoption[$var]) > $_G['forum_checkoption'][$var]['maxlength']) {
            showmessage('threadtype_toolong_invalid', "forum.php?mod=post&action={$postaction}&fid={$_G['fid']}&sortid=" . $_G['forum_selectsortid'], array('typetitle' => $_G['forum_checkoption'][$var]['title']));
        } elseif ($sortoption[$var] && ($_G['forum_checkoption'][$var]['maxnum'] && $sortoption[$var] > $_G['forum_checkoption'][$var]['maxnum'] || $_G['forum_checkoption'][$var]['minnum'] && $sortoption[$var] < $_G['forum_checkoption'][$var]['minnum'])) {
            showmessage('threadtype_num_invalid', "forum.php?mod=post&action={$postaction}&fid={$_G['fid']}&sortid=" . $_G['forum_selectsortid'], array('typetitle' => $_G['forum_checkoption'][$var]['title']));
        } elseif ($sortoption[$var] && $_G['forum_checkoption'][$var]['unchangeable'] && !($_G['tid'] && $pid)) {
            showmessage('threadtype_unchangeable_invalid', "forum.php?mod=post&action={$postaction}&fid={$_G['fid']}&sortid=" . $_G['forum_selectsortid'], array('typetitle' => $_G['forum_checkoption'][$var]['title']));
        }
        if ($_G['forum_checkoption'][$var]['type'] == 'checkbox') {
            $sortoption[$var] = $sortoption[$var] ? implode("\t", $sortoption[$var]) : '';
        } elseif ($_G['forum_checkoption'][$var]['type'] == 'url') {
            $sortoption[$var] = $sortoption[$var] ? substr(strtolower($sortoption[$var]), 0, 4) == 'www.' ? 'http://' . $sortoption[$var] : $sortoption[$var] : '';
        }
        $sortoption[$var] = $_G['forum_checkoption'][$var]['type'] != 'image' ? dhtmlspecialchars(censor(trim($sortoption[$var]))) : addslashes(serialize($sortoption[$var]));
        $_G['forum_optiondata'][$_G['forum_checkoption'][$var]['optionid']] = $sortoption[$var];
    }
    return $_G['forum_optiondata'];
}
开发者ID:Kingson4Wu,项目名称:php_demo,代码行数:27,代码来源:function_threadsort.php


示例14: exit

/*
	[UCenter Home] (C) 2007-2008 Comsenz Inc.
	$Id: do_login.php 8543 2008-08-21 05:51:48Z liguode $
*/
if (!defined('IN_UCHOME')) {
    exit('Access Denied');
}
$uid = 0;
$email = '';
$_GET['hash'] = empty($_GET['hash']) ? '' : trim($_GET['hash']);
if ($_GET['hash']) {
    list($uid, $email) = explode("\t", authcode($_GET['hash'], 'DECODE'));
    $uid = intval($uid);
}
if ($uid && isemail($email)) {
    //检查邮箱唯一性
    if ($_SCONFIG['uniqueemail']) {
        if (getcount('spacefield', array('email' => $email, 'emailcheck' => 1))) {
            showmessage('uniqueemail_recheck');
        }
    }
    // Bonus Points
    getreward('realemail', 1, $uid);
    //修改资料
    updatetable('spacefield', array('email' => addslashes($email), 'emailcheck' => '1', 'newemail' => ''), array('uid' => $uid));
    //跳转页面
    showmessage('email_check_sucess', '', 1, array($email));
} else {
    showmessage('email_check_error');
}
开发者ID:v998,项目名称:discuzx-en,代码行数:30,代码来源:do_emailcheck.php


示例15: InitGP

<?php

include "../common.inc.php";
include "function_common.php";
InitGP(array("page", "action", "inbox", "uname", "email", "subject", "message", "did", "delids"));
//初始化变量全局返回
AjaxHead();
//禁止页面缓存
header("Content-type: text/html; charset=" . CHARSET);
if (empty($action)) {
    InitGP(array("uid", "isadmin", "email", "subject", "message"));
    //初始化变量全局返回
    if (!empty($_POST) and !empty($subject)) {
        //发送邮件
        if (isemail($email) && !empty($message)) {
            $emailstr = $message;
            include_once INC_PATH . "/sendmail.class.php";
            $sendmail = new SendEmail();
            $sendmail->sendmailto($subject, $emailstr, $email);
            if (!empty($inbox)) {
                exit("<script language='javascript'>alert('" . $sendmail->printmsg . "');parent.\$.fn.colorbox.close();</script>");
            } else {
                showmsg($sendmail->printmsg, PHP_SELF);
                //出错!
            }
        } else {
            if (!empty($inbox)) {
                exit("<script language='javascript'>alert('email格式错误');location.reload();</script>");
            } else {
                showmsg("email格式错误", PHP_SELF);
                //出错!
开发者ID:dalinhuang,项目名称:c2my,代码行数:31,代码来源:email_send.php


示例16: header

if ($cur_user && $cur_user['flag'] == 0) {
    header('location: /');
    exit;
}
//
$errors = array();
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    $name = addslashes(trim($_POST["name"]));
    $email = addslashes(trim($_POST["email"]));
    if ($name && $email) {
        if (strlen($name) < 21 && strlen($email) < 32) {
            if (preg_match('/^[a-zA-Z0-9\\x80-\\xff]{4,20}$/i', $name)) {
                if (preg_match('/^[0-9]{4,20}$/', $name)) {
                    $errors[] = '名字不能全为数字';
                } else {
                    if (isemail($email)) {
                        $db_user = $DBS->fetch_one_array("SELECT * FROM yunbbs_users WHERE name='" . $name . "' LIMIT 1");
                        if ($db_user) {
                            if ($email == $db_user['email']) {
                                header("content-Type: text/html; charset=UTF-8");
                                exit('请用该邮箱: ' . $db_user['email'] . ' 给管理员(管理员信箱' . $options['admin_email'] . ')发送一封密码重设请求,内容只需包含您的用户名“' . $name . '”');
                            } else {
                                $errors[] = '填写的邮箱 和 个人设置里的邮箱 不一致';
                            }
                        } else {
                            $errors[] = '用户名 错误';
                        }
                    } else {
                        $errors[] = '邮箱 格式错误';
                    }
                }
开发者ID:power12317,项目名称:Youbbs-Openshift2,代码行数:31,代码来源:forgot.php


示例17: exit

if (submitcheck('login')) {
    /*
    echo $_POST[username];
    echo $_POST[password];
    exit();
    */
    //exit('26');
    $password = $_POST['password'];
    $username = trim($_POST['username']);
    $cookietime = intval($_POST['cookietime']);
    $cookiecheck = $cookietime ? ' checked' : '';
    $membername = $username;
    if (empty($_POST['username'])) {
        showmessage('users_were_not_empty_please_re_login_1', './login.php', 0);
    } else {
        if (isemail($_POST['username'])) {
            $query = $_SGLOBAL['db']->query("SELECT uid FROM " . tname('spacefield') . " WHERE email='{$_POST['username']}'");
            $value = $_SGLOBAL['db']->fetch_array($query);
            if (empty($value)) {
                showmessage('users_were_not_empty_please_re_login_2', './login.php', 0);
            }
            $query = $_SGLOBAL['db']->query("SELECT username FROM " . tname('member') . " WHERE uid='{$value['uid']}'");
            $value = $_SGLOBAL['db']->fetch_array($query);
            //得到用户名
            $username = $value['username'];
        }
    }
    if ($_SCONFIG['seccode_login']) {
        include_once S_ROOT . './source/function_cp.php';
        if (!ckseccode($_POST['seccode'])) {
            $_SGLOBAL['input_seccode'] = 1;
开发者ID:shiyake,项目名称:php-ihome,代码行数:31,代码来源:login.php


示例18: threadsort_validator

function threadsort_validator($sortoption)
{
    global $_G;
    $_G['category_optiondata'] = array();
    foreach ($_G['category_checkoption'] as $var => $option) {
        $typetitle = $_G['category_checkoption'][$var]['title'];
        if ($_G['category_checkoption'][$var]['required'] && !$sortoption[$var]) {
            showmessage('threadtype_required_invalid', '', array('typetitle' => $typetitle));
        } elseif ($sortoption[$var] && ($_G['category_checkoption'][$var]['type'] == 'number' && !is_numeric($sortoption[$var]) || $_G['forum_checkoption'][$var]['type'] == 'email' && !isemail($sortoption[$var]))) {
            showmessage('threadtype_format_invalid', '', array('typetitle' => $typetitle));
        } elseif ($sortoption[$var] && $_G['category_checkoption'][$var]['maxlength'] && strlen($typeoption[$var]) > $_G['forum_checkoption'][$var]['maxlength']) {
            showmessage('threadtype_toolong_invalid', '', array('typetitle' => $typetitle));
        } elseif ($sortoption[$var] && ($_G['category_checkoption'][$var]['maxnum'] && $sortoption[$var] > $_G['category_checkoption'][$var]['maxnum'] || $_G['forum_checkoption'][$var]['minnum'] && $sortoption[$var] < $_G['category_checkoption'][$var]['minnum'])) {
            showmessage('threadtype_num_invalid', '', array('typetitle' => $typetitle));
        } elseif ($sortoption[$var] && $_G['category_checkoption'][$var]['unchangeable']) {
            showmessage('threadtype_unchangeable_invalid', '', array('typetitle' => $typetitle));
        }
        if ($_G['category_checkoption'][$var]['numbercheck']) {
            checkphonenum($sortoption[$var]);
        }
        if ($_G['category_checkoption'][$var]['type'] == 'checkbox') {
            $sortoption[$var] = $sortoption[$var] ? implode("\t", $sortoption[$var]) : '';
        } elseif ($_G['category_checkoption'][$var]['type'] == 'url') {
            $sortoption[$var] = $sortoption[$var] ? substr(strtolower($sortoption[$var]), 0, 4) == 'www.' ? 'http://' . $sortoption[$var] : $sortoption[$var] : '';
        }
        $sortoption[$var] = dhtmlspecialchars(censor(trim($sortoption[$var])));
        $_G['category_optiondata'][$_G['category_checkoption'][$var]['optionid']] = $sortoption[$var];
    }
    return $_G['category_optiondata'];
}
开发者ID:pan289091315,项目名称:Discuz,代码行数:30,代码来源:function_category.php


示例19: capi_showmessage_by_data

         capi_showmessage_by_data('incorrect_code');
     }
 }
 if (!@(include_once S_ROOT . './uc_client/client.php')) {
     capi_showmessage_by_data('system_error');
 }
 if ($_REQUEST['password'] != $_REQUEST['password2']) {
     capi_showmessage_by_data('password_inconsistency');
 }
 if (!$_REQUEST['password'] || $_REQUEST['password'] != addslashes($_REQUEST['password'])) {
     capi_showmessage_by_data('profile_passwd_illegal');
 }
 $username = trim($_REQUEST['username']);
 $password = $_REQUEST['password'];
 $_REQUEST['email'] = "{$username}@dawnlightning.com";
 $email = isemail($_REQUEST['email']) ? $_REQUEST['email'] : '';
 if (empty($email)) {
     capi_showmessage_by_data('email_format_is_wrong');
 }
 //检查邮件
 if ($_SCONFIG['checkemail']) {
     if ($count = getcount('spacefield', array('email' => $email))) {
         capi_showmessage_by_data('email_has_been_registered');
     }
 }
 //检查IP
 $onlineip = getonlineip();
 if ($_SCONFIG['regipdate']) {
     $query = $_SGLOBAL['db']->query("SELECT dateline FROM " . tname('space') . " WHERE regip='{$onlineip}' ORDER BY dateline DESC LIMIT 1");
     if ($value = $_SGLOBAL['db']->fetch_array($query)) {
         if ($_SGLOBAL['timestamp'] - $value['dateline'] < $_SCONFIG['regipdate'] * 3600) {
开发者ID:NaturalWill,项目名称:UCQA,代码行数:31,代码来源:do_register.php


示例20: exit

 *      [Discuz!] (C)2001-2099 Comsenz Inc.
 *      This is NOT a freeware, use is subject to license terms
 *
 *      $Id: misc_emailcheck.php 30383 2012-05-25 04:45:49Z liulanbo $
 */
if (!defined('IN_DISCUZ')) {
    exit('Access Denied');
}
$uid = 0;
$email = '';
$_GET['hash'] = empty($_GET['hash']) ? '' : $_GET['hash'];
if ($_GET['hash']) {
    list($uid, $email, $time) = explode("\t", authcode($_GET['hash'], 'DECODE', md5(substr(md5($_G['config']['security']['authkey']), 0, 16))));
    $uid = intval($uid);
}
if ($uid && isemail($email) && $time > TIMESTAMP - 86400) {
    $member = getuserbyuid($uid);
    $setarr = array('email' => $email, 'emailstatus' => '1');
    loaducenter();
    $ucresult = uc_user_edit(addslashes($member['username']), '', '', $email, 1);
    if ($ucresult == -8) {
        showmessage('email_check_account_invalid', '', array(), array('return' => true));
    } elseif ($ucresult == -4) {
        showmessage('profile_email_illegal', '', array(), array('return' => true));
    } elseif ($ucresult == -5) {
        showmessage('profile_email_domain_illegal', '', array(), array('return' => true));
    } elseif ($ucresult == -6) {
        showmessage('profile_email_duplicate', '', array(), array('return' => true));
    }
    if ($_G['setting']['regverify'] == 1 && $member['groupid'] == 8) {
        $membergroup = C::t('common_usergroup')->fetch_by_credits($member['credits']);
开发者ID:tianyunchong,项目名称:php,代码行数:31,代码来源:misc_emailcheck.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP isempty函数代码示例发布时间:2022-05-15
下一篇:
PHP isediting函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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