本文整理汇总了PHP中isemail函数的典型用法代码示例。如果您正苦于以下问题:PHP isemail函数的具体用法?PHP isemail怎么用?PHP isemail使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了isemail函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
示例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');
}
}
示例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);
}
}
示例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;
}
示例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;
}
示例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;
}
示例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');
}
示例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'];
}
示例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'] . '&hash=' . urlencode($hash);
示例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;
}
示例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;
}
示例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')
示例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'];
}
示例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');
}
示例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);
//出错!