本文整理汇总了PHP中check_mail函数的典型用法代码示例。如果您正苦于以下问题:PHP check_mail函数的具体用法?PHP check_mail怎么用?PHP check_mail使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了check_mail函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: load
function load()
{
global $db, $scache, $config, $bbcode;
if ($this->exists() == true) {
$this->import();
} else {
$categories_obj = $scache->load('categories');
$cat_cache = $categories_obj->get();
$result = $db->query("\n\t\t\tSELECT id, name, parent, position, description, topics, replies, opt, optvalue, forumzahl, topiczahl, prefix, invisible, readonly, auto_status, active_topic, count_posts, reply_notification, topic_notification, message_active, message_title, message_text\n\t\t\tFROM {$db->pre}forums\n\t\t\t", __LINE__, __FILE__);
$this->data = array();
while ($row = $db->fetch_assoc($result)) {
$row['bid'] = $cat_cache[$row['parent']]['parent'];
$emails = preg_split('/[\\r\\n]+/', $row['topic_notification'], -1, PREG_SPLIT_NO_EMPTY);
$row['topic_notification'] = array();
foreach ($emails as $email) {
if (check_mail($email)) {
$row['topic_notification'][] = $email;
}
}
$emails = preg_split('/[\\r\\n]+/', $row['reply_notification'], -1, PREG_SPLIT_NO_EMPTY);
$row['reply_notification'] = array();
foreach ($emails as $email) {
if (check_mail($email)) {
$row['reply_notification'][] = $email;
}
}
BBProfile($bbcode);
$bbcode->setReplace($config['wordstatus']);
$row['message_text'] = $bbcode->parse($row['message_text']);
$this->data[$row['id']] = $row;
}
$this->export();
}
}
示例2: print_mail
function print_mail($content)
{
$new_messages = check_mail();
print "\n\t\n<table border=\"0\" class=\"mail\">\n\t<tr><td><a href=\"messages.php?compose\" title=\"compose a message\">compose</a>\n\t<br /><a href=\"messages.php?read\" title=\"read messages\">inbox</a>({$new_messages})\n\t<br /><a href=\"messages.php?outbox\" title=\"read sent messages\">outbox</a>\n\t<br /><a href=\"messages.php?trash\" title=\"read deleted messages\">trash</a></td>\n\t<td rowspan=\"2\" colspan=\"4\" class=\"mail_content_holder\">";
print $content;
print "</td></tr></table>";
}
示例3: Execute
public function Execute(Template $template, Session $session, $request)
{
$this->dba = DBA::Open();
/* Create the ancestors bar (if we run into any trouble */
$template = CreateAncestors($template, $template['L_INFORMATION']);
if ($session['user'] instanceof Guest) {
$email = htmlspecialchars($request['email']);
if ($email == check_mail($email)) {
if ($this->dba->Query("SELECT * FROM " . USERS . " WHERE email = '{$email}'")->NumRows() > 0) {
$new_pw = $this->GetRandom();
$forum = $this->dba->GetValue("SELECT name FROM " . FORUMS . " WHERE row_left = 1");
$username = $this->dba->GetValue("SELECT name FROM " . USERS . " WHERE email = '{$email}'");
if (mail($email, sprintf($template['L_PWSENTSUBJECT'], $forum), sprintf($template['L_PWSENTMESSAGE'], $forum, $username, $new_pw, $forum), "From: \"Password Reset - k4 Bulletin Board Mailer\" <noreply@" . $_SERVER['HTTP_HOST'] . ">")) {
$this->dba->Query("UPDATE " . USERS . " SET pass = '" . md5($new_pw) . "' WHERE email = '{$email}'");
return new Error($template['L_PASSWORDSENT'] . '<meta http-equiv="refresh" content="2; url=index.php">', $template);
} else {
return new Error($template['L_ERRORRESETPW'], $template);
}
} else {
return new Error($template['L_INVALIDEMAIL'], $template);
}
} else {
return new Error($template['L_INVALIDEMAIL'], $template);
}
} else {
return new Error($template['L_CANTBELOGGEDIN'], $template);
}
}
示例4: checkMail
static function checkMail($mail, $userid = 0)
{
if (!check_mail($mail)) {
return '¬ведите правильный e-mail';
} elseif ($userid !== null) {
$rs = DB::select("SELECT * FROM sc_users WHERE (mail=:mail OR login=:mail) AND u_id!=:u_id LIMIT 1", array('mail' => $mail, 'login' => $mail, 'u_id' => $userid));
if ($rs->next()) {
return 'e-mail уже зарегистрирован';
}
}
return '';
}
示例5: checkMail
function checkMail($mail)
{
global $ST;
if (!check_mail($mail)) {
return 'Введите правильный e-mail';
} else {
$rs = $ST->select("SELECT * FROM sc_users WHERE mail='" . SQL::slashes($mail) . "' AND u_id!=" . $this->getUserId() . " LIMIT 1");
if ($rs->next()) {
return 'e-mail уже зарегистрирован';
}
}
}
示例6: valid_data
/**
* Form data need to be valid
* @return $monit
*/
function valid_data()
{
global $i18n;
if (strlen($this->coreuser) < 4) {
$this->monit[] = $i18n['main_content'][0];
}
if (!check_mail($this->coremail)) {
$this->monit[] = $i18n['main_content'][1];
}
if (strlen($this->corepass_1) < 6) {
$this->monit[] = $i18n['main_content'][2];
}
if ($this->corepass_1 != $this->corepass_2) {
$this->monit[] = $i18n['main_content'][3];
}
if (empty($this->monit)) {
$this->do_install();
} else {
$this->failed_install();
}
}
示例7: Execute
public function Execute(Template $template, Session $session, $request)
{
$this->dba = DBA::Open();
$template = CreateAncestors($template, $template['L_ADMINPANEL']);
if ($session['user'] instanceof Member && $session['user']['perms'] & ADMIN) {
foreach ($request as $key => $val) {
$request[$key] = $this->dba->Quote($val);
}
/* Check if that is a valid email */
if (!check_mail($request['email'])) {
return new Error($template['L_INVALIDEMAIL'], $template);
}
$id = intval($request['id']);
if ($this->dba->Query("SELECT * FROM " . USERS . " WHERE id = {$id}")->NumRows() == 1) {
if ($this->dba->Query("UPDATE " . USERS . " SET name = '" . $request['name'] . "', email = '" . $request['email'] . "', posts = " . intval($request['posts']) . ", rank = '" . $request['rank'] . "' WHERE id = " . $id)) {
echo '<meta http-equiv="refresh" content="2; url=member.php?id=' . $id . '">';
return new Error($template['L_USERUPDATED'], $template);
}
} else {
return new Error($template['L_USERDOESNTEXIST'], $template);
}
}
return TRUE;
}
示例8: VeriWord
$human = null;
if (!$my->vlogin) {
if ($config['botgfxtest_posts'] == 1) {
include "classes/graphic/class.veriword.php";
$vword = new VeriWord();
if ($_POST['letter']) {
if ($vword->check_session($_POST['captcha'], $_POST['letter']) == FALSE) {
$error[] = $lang->phrase('veriword_mistake');
} else {
$human = array('captcha' => $_POST['captcha'], 'letter' => $_POST['letter']);
}
} else {
$error[] = $lang->phrase('veriword_failed');
}
}
if (!check_mail($_POST['email']) && ($config['guest_email_optional'] == 0 || !empty($_POST['email']))) {
$error[] = $lang->phrase('illegal_mail');
}
if (double_udata('name', $_POST['name']) == false) {
$error[] = $lang->phrase('username_registered');
}
if (is_id($_POST['name'])) {
$error[] = $lang->phrase('username_registered');
}
if (strxlen($_POST['name']) > $config['maxnamelength']) {
$error[] = $lang->phrase('name_too_long');
}
if (strxlen($_POST['name']) < $config['minnamelength']) {
$error[] = $lang->phrase('name_too_short');
}
if (strxlen($_POST['email']) > 200) {
示例9: reconnaissant
for ($loop = 0; $loop < count($tab_group['moy_manquante']); $loop++) {
if ($loop > 0) {
$message .= ", ";
}
//$message.=$tab_group['moy_manquante'][$loop];
$message .= $tab_alerte_prof[$login_prof]['groupe'][$group_id]['moy_manquante'][$loop];
}
$message .= ".\n";
}
}
$message .= "\nLorsqu'un élève n'a pas de note, veuillez saisir un tiret '-' pour signaler qu'il n'y a pas d'oubli de saisie de votre part.\nEn revanche, s'il s'agit d'une erreur d'affectation, vous disposez, en mode Visualisation d'un carnet de notes, d'un lien 'Signaler des erreurs d affectation' pour alerter l'administrateur Gepi sur un problème d'affectation d'élèves.\n";
$message .= "\nJe vous serais reconnaissant(e) de bien vouloir les remplir rapidement.\n\nD'avance merci.\n-- \n" . civ_nom_prenom($_SESSION['login']);
echo "<tr class='lig{$alt}'>\n";
echo "<td>\n";
if ($tab_alerte_prof[$login_prof]['email'] != "") {
if (check_mail($tab_alerte_prof[$login_prof]['email'])) {
$tab_num_mail[] = $num;
$sujet_mail = "[Gepi]: Appreciations et/ou moyennes manquantes";
echo "<a href='mailto:" . $tab_alerte_prof[$login_prof]['email'] . "?subject={$sujet_mail}&body=" . rawurlencode($message) . "'>" . $info_prof . "</a>";
echo "<input type='hidden' name='sujet_{$num}' id='sujet_{$num}' value=\"{$sujet_mail}\" />\n";
echo "<input type='hidden' name='mail_{$num}' id='mail_{$num}' value=\"" . $tab_alerte_prof[$login_prof]['email'] . "\" />\n";
}
} else {
echo $info_prof;
}
//echo "<br />";
echo "</td>\n";
echo "<td rowspan='2'>\n";
//echo "<textarea id='message_$num' cols='50' rows='5'>$message</textarea>\n";
echo "<textarea name='message_{$num}' id='message_{$num}' cols='50' rows='5'>{$message}</textarea>\n";
//echo "<input type='hidden' name='message_$num' id='message_$num' value=\"".rawurlencode($message)."\" />\n";
示例10: trim
<?php
require_once 'functions.php';
require_once 'functions.mail.php';
require_once 'openid.php';
$expiration = (int) $_GET['expiration'];
$get_hash = $_GET['hash'];
if ($_POST) {
$_POST['email'] = trim($_POST['email']);
if (check_mail($_POST['email'])) {
$tomorrow = date("M d, Y", strtotime(date("Y-m-d") . " +1day"));
$expiration = strtotime($tomorrow);
$hash = encrypt($expiration);
$link = URL . "register.php?expiration={$expiration}&hash={$hash}";
$text = _('You have been invited to access the following site: ' . SITENAME . '. ');
$text .= _('In order to access this website, you need to register your account. ');
$text .= _('This can be done by clicking the link below and following the instructions. ');
$text .= _('This link will be valid until ' . $tomorrow . ". ");
$html = $text;
$text .= "\n" . _('Link: ') . $link;
$html .= "<br /><br />" . _('Link: <a href=' . $link . '>' . _('Register your account'));
pearMail($_POST['email'], _('Register your account for ') . SITENAME, $html, $text);
$print = _("Email was sent");
} else {
$print = _("Mail address not valid");
}
}
?>
<!doctype html>
<html>
<head>
示例11: check_mail
?>
</td>
<td><span class="label label-info"><?php
echo $item['alarm_value'];
?>
</span></td>
<td><?php
echo $item['create_time'];
?>
</td>
<td><?php
echo check_mail($item['send_mail']);
?>
</td>
<td><?php
echo check_mail($item['send_mail_status']);
?>
</td>
</tr>
<?php
}
} else {
?>
<tr>
<td colspan="12">
<font color="red"><?php
echo $this->lang->line('no_record');
?>
</font>
</td>
示例12: foot
<td class="ubox" colspan="2" align="center"><input type="submit" name="Submit" value="<?php
echo $lang->phrase('admin_form_submit');
?>
"></td>
</tr>
</table>
</form>
<?php
echo foot();
} elseif ($job == 'register2') {
echo head();
$register_notification = $gpc->get('register_notification', none);
$emails = preg_split('/[\\r\\n]+/', $register_notification, -1, PREG_SPLIT_NO_EMPTY);
$register_notification = array();
foreach ($emails as $email) {
if (check_mail($email, true)) {
$register_notification[] = $email;
}
}
$register_notification = implode("\n", $register_notification);
$c->getdata();
$c->updateconfig('confirm_registration', str);
$c->updateconfig('register_notification', str, $register_notification);
$c->updateconfig('disableregistration', int);
$c->updateconfig('acceptrules', int);
$c->savedata();
ok('admin.php?action=settings&job=settings');
} elseif ($job == 'db') {
$config = $gpc->prepare($config);
echo head();
?>
示例13: xmail
function xmail($to, $from = array(), $topic, $comment, $type = 'plain', $attachment = array())
{
global $config, $my, $lang, $bbcode;
require_once "classes/mail/class.phpmailer.php";
require_once 'classes/mail/extended.phpmailer.php';
$mail = new PHPMailer();
$mail->CharSet = $lang->phrase('charset');
// Added Check_mail for better security
// Now it is not possible to add various headers to the mail
if (!isset($from['mail']) || !check_mail($from['mail'])) {
$mail->From = $config['forenmail'];
} else {
$mail->From = $from['mail'];
}
if (!isset($from['name'])) {
$mail->FromName = $config['fname'];
} else {
$mail->FromName = $from['name'];
}
if ($config['smtp'] == 1) {
$mail->Mailer = "smtp";
$mail->IsSMTP();
$mail->Host = $config['smtp_host'];
if ($config['smtp_auth'] == 1) {
$mail->SMTPAuth = TRUE;
$mail->Username = $config['smtp_username'];
$mail->Password = $config['smtp_password'];
}
} elseif ($config['sendmail'] == 1) {
$mail->IsSendmail();
$mail->Mailer = "sendmail";
$mail->Sendmail = $config['sendmail_host'];
} else {
$mail->IsMail();
}
$mail->Subject = $topic;
if (!is_array($to)) {
$to = array('0' => array('mail' => $to));
}
$i = 0;
foreach ($to as $email) {
if ($type == 'bb') {
BBProfile($bbcode);
$bbcode->setSmileys(0);
$bbcode->setReplace($config['wordstatus']);
$row->comment = $row->comment;
$mail->IsHTML(TRUE);
$mail->Body = $bbcode->parse($comment);
$mail->AltBody = $bbcode->parse($comment, 'plain');
} elseif ($type == 'html') {
$mail->IsHTML(TRUE);
$mail->Body = $comment;
$mail->AltBody = html_entity_decode(strip_tags($comment));
} else {
$mail->Body = html_entity_decode($comment);
}
if (isset($email['name'])) {
$mail->AddAddress($email['mail'], $email['name']);
} else {
$mail->AddAddress($email['mail']);
}
foreach ($attachment as $file) {
if ($file['type'] == 'string') {
$mail->AddStringAttachment($file['file'], $file['name']);
} else {
$mail->AddAttachment($file['file'], $file['name']);
}
}
if ($mail->Send()) {
$i++;
}
$mail->ClearAddresses();
$mail->ClearAttachments();
}
return $i;
}
示例14: trim
}
else {
$query['name'] = $name;
}
$query['pw'] = $gpc->get('pw_'.$random, str);
$query['hp'] = trim($query['hp']);
if (strtolower(substr($query['hp'], 0, 4)) == 'www.') {
$query['hp'] = "http://{$query['hp']}";
}
$error = array();
if (strxlen($query['comment']) > $config['maxaboutlength']) {
$error[] = $lang->phrase('admin_member_about_too_many_chars');
}
if (check_mail($query['email']) == false) {
$error[] = $lang->phrase('admin_member_no_valid_mail');
}
if (strxlen($query['name']) > $config['maxnamelength']) {
$error[] = $lang->phrase('admin_member_name_too_many_chars');
}
if (strxlen($query['name']) < $config['minnamelength']) {
$error[] = $lang->phrase('admin_member_too_less_chars');
}
if (strlen($query['email']) > 200) {
$error[] = $lang->phrase('admin_member_email_too_many_chars');
}
if ($user['mail'] != $_POST['email'] && double_udata('mail', $_POST['email']) == false) {
$error[] = $lang->phrase('email_already_used');
}
if (strxlen($query['signature']) > $config['maxsiglength']) {
示例15: array
$monit = array();
// tablica przechowuj±ca b³êdy
$dbname = $_POST['dbname'];
$dbhost = $_POST['dbhost'];
$dbuser = $_POST['dbuser'];
$dbpass = $_POST['dbpass'];
$lang = $_POST['lang'];
$dbprefix = $_POST['dbprefix'];
$coreuser = $_POST['coreuser'];
$coremail = $_POST['coremail'];
$corepass_1 = $_POST['corepass_1'];
$corepass_2 = $_POST['corepass_2'];
if (strlen($coreuser) < 4) {
$monit[] = $i18n['main_content'][0];
}
if (!check_mail($coremail)) {
$monit[] = $i18n['main_content'][1];
}
if (strlen($corepass_1) < 6) {
$monit[] = $i18n['main_content'][2];
}
if ($corepass_1 != $corepass_2) {
$monit[] = $i18n['main_content'][3];
}
$rdbms = empty($_POST['rdbms']) ? '' : $_POST['rdbms'];
switch ($rdbms) {
case 'mysql4':
$db_schema = SQL_SCHEMA . '/core-mysql40_install.sql';
break;
case 'mysql41':
$db_schema = SQL_SCHEMA . '/core-mysql41_install.sql';