本文整理汇总了PHP中SendEmail函数的典型用法代码示例。如果您正苦于以下问题:PHP SendEmail函数的具体用法?PHP SendEmail怎么用?PHP SendEmail使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了SendEmail函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: SaveThread
public function SaveThread($dataForm, $thread_userId)
{
global $mySession;
$db = new Db();
$Datainsert['topic_id'] = $dataForm['topic_id'];
$Datainsert['thread_id'] = $dataForm['thread_id'];
$Datainsert['replyof'] = $dataForm['replyof'];
$Datainsert['user_id'] = $dataForm['user_id'];
$Datainsert['date_posted'] = $dataForm['date_added'];
$Datainsert['post_text'] = $dataForm['post_text'];
$db->save(FORUM_POSTS, $Datainsert);
$threadcommentuser = $db->runQuery("select * from " . FORUM_POSTS . " AS TP inner join " . USERS . " AS U \n\t\t\t\t\t\t\t\tON TP.user_id=U.user_id where TP.user_id=" . $dataForm['user_id'] . "");
$comment_user = $threadcommentuser[0]['first_name'] . $threadcommentuser[0]['last_name'];
$userData = $db->runQuery("select * from " . FORUM_THREADS . " AS T inner join " . USERS . " AS U \n\t\t\t\t\t\t\t\tON T.user_id=U.user_id where T.thread_id=" . $dataForm['thread_id'] . "");
$fullName = $userData[0]['first_name'] . $userData[0]['last_name'];
$commentuser = $comment_user;
$useremail = $userData[0]['email_address'];
$threadtitle = $userData[0]['thread_text'];
$templateData = $db->runQuery("select * from " . EMAIL_TEMPLATES . " where template_id='5'");
$messageText = $templateData[0]['email_body'];
$subject = $templateData[0]['email_subject'];
$messageText = str_replace("[USERNAME]", $fullName, $messageText);
$messageText = str_replace("[THREADTITLE]", $threadtitle, $messageText);
$messageText = str_replace("[COMMENTUSERNAME]", $commentuser, $messageText);
$messageText = str_replace("[SITENAME]", SITE_NAME, $messageText);
SendEmail($useremail, $subject, $messageText);
return 1;
}
示例2: CustomScheduler
function CustomScheduler()
{
global $sugar_config, $db;
$timeDate = new TimeDate();
$timeDateNow = $timeDate->getNow(true)->asDb();
$days_offset = 15;
$GLOBALS['log']->fatal("Checking Opportunities...");
$query = "select opportunities.id from opportunities\n\twhere opportunities.sales_stage != 'Closed Won'\n\tand DATEDIFF(opportunities.date_modified,'" . $timeDateNow . "') < " . $days_offset . "\n\tand !opportunities.deleted";
$GLOBALS['log']->fatal("Query: " . $query);
$res = $db->query($query, true, 'Error: ');
while ($row = $db->fetchByAssoc($res)) {
$opportunity = new Opportunity();
if (!is_null($opportunity->retrieve($row['id']))) {
$user = new User();
if (!is_null($user->retrieve($opportunity->assigned_user_id))) {
$emailsTo = array();
$emailSubject = "Opportunity Alert";
$emailBody = "The following Opportunity has " . $days_offset . " days without changes.<br /><br />\n\t\t\t\tName: " . $opportunity->name . "<br />\n\t\t\t\tAccount: " . $opportunity->account_name . "<br />\n\t\t\t\tAmount: " . $opportunity->amount . "<br />\n\t\t\t\tSales Stage: " . $opportunity->sales_stage . "<br />\n\t\t\t\tDate Close: " . $opportunity->date_closed . "<br /><br />\n\t\t\t\tYou can see the opportunity here:<br />\n\t\t\t\t<a href=\"" . $sugar_config['site_url'] . "/index.php?module=Opportunities&action=DetailView&record=" . $opportunity->id . "\">" . $opportunity->name . "</a>";
$emailsTo[] = $user->email1;
SendEmail($emailsTo, $emailSubject, $emailBody);
}
}
}
$GLOBALS['log']->fatal("Opportunities checked");
return true;
}
示例3: hireuserAction
public function hireuserAction()
{
global $mySession;
$db = new Db();
$this->_helper->layout->setLayout('friendprofile');
$id = $this->getRequest()->getParam('user_id');
$this->view->id = $id;
//echo ("select * from ".USERS." inner join ".COUNTRIES." on ".COUNTRIES.".country_id=".USERS.".country_id where user_id='".$id."' ");die;
//echo ("select * from ".USERS." inner join ".COUNTRIES." on ".COUNTRIES.".country_id=".USERS.".country_id where user_id='".$id."' ");die;
$sql = $db->runquery("select * from " . USERS . " where user_id='" . $id . "' ");
$this->view->pageTitle = "Hire:" . $sql[0]['public_name'];
$follow = $db->runquery("select *," . USERS . ".user_id as user_id from " . FOLLOW . " inner join " . USERS . " on (" . FOLLOW . ".following_id=" . USERS . ".user_id) where following_id='" . $id . "' ");
$follower = $db->runquery("select *," . USERS . ".user_id as user_id from " . FOLLOW . " inner join " . USERS . " on (" . FOLLOW . ".follower_id=" . USERS . ".user_id) where follower_id='" . $id . "' ");
$this->view->follower = $follower;
$this->view->follow = $follow;
$this->view->dataQry = $sql[0];
$myform = new Form_Hire();
$this->view->myform = $myform;
$loggeduser = $db->runquery("select * from " . USERS . " where user_id='" . $mySession->TeeLoggedID . "' ");
if ($this->getRequest()->isPost()) {
$request = $this->getRequest();
if ($myform->isValid($request->getPost())) {
$dataForm = $myform->getValues();
$templateData = $db->runQuery("select * from " . EMAIL_TEMPLATES . " where template_id='18'");
$emailidcreator = $sql[0]['emailid'];
$messageText = $templateData[0]['email_body'];
$subject = $templateData[0]['email_subject'];
$messageText = str_replace("[NAME]", $useremail[0]['public_name'], $messageText);
$messageText = str_replace("[MESSAGE]", $dataForm['Message'], $messageText);
$messageText = str_replace("[SENDEREMAIL]", $loggeduser[0]['emailid'], $messageText);
$messageText = str_replace("[SITENAME]", SITE_NAME, $messageText);
//$messageText=str_replace("[ORDERNO]",$orderno,$messageText);
$result = SendEmail($emailidcreator, $subject, $messageText);
if ($result) {
$mySession->errorMsg = "Mail Sent Successfully !!!";
$this->_redirect('user/view/user_id/' . $id);
} else {
$mySession->errorMsg = "Email Address is not correct!!!";
$this->_redirect('user/view/user_id/' . $id);
}
} else {
$mySession->errorMsg = "Please Fill All The Fields !!!";
$this->view->myform = $myform;
$this->view->id = $id;
$this->view->follower = $follower;
$this->view->follow = $follow;
$this->view->dataQry = $sql[0];
//echo "dfasdf";die;
$this->render('hireuser');
}
}
}
示例4: emailfriends
public function emailfriends($dataForm)
{
$db = new Db();
global $mySession;
//$friendsemailid=$dataForm['friendsemailid'];
$friendsemailid = explode(",", $dataForm['friendsemailid']);
//prd($friendsemailid);
//$emailid=$dataForm['signupemailid'];
for ($i = 0; $i < count($friendsemailid); $i++) {
//$TeeLink='<a href="'.APPLICATION_URL.'launchcampaign/showcampaign/name/'.$teeurl.'">'.APPLICATION_URL.'launchcampaign/showcampaign/name/'.$teeurl.'</a>';
//$templateData=$db->runQuery("select * from ".EMAIL_TEMPLATES." where template_id='9'");
$messageText = $dataForm['content'];
$subject = $dataForm['subject'];
SendEmail($friendsemailid[$i], $subject, $messageText);
}
return 1;
}
示例5: sendnewsletterAction
public function sendnewsletterAction()
{
global $mySession;
$db = new Db();
$r = $this->getRequest()->getParam('r');
$exp = explode("|", $r);
for ($i = 0; $i < count($exp) - 1; $i++) {
$emailData = $db->runQuery("select * from " . USERS . " where user_id='" . $exp[$i] . "'");
$templateData = $db->runQuery("select * from " . EMAIL_TEMPLATES . " where template_id='1'");
$messageText = $templateData[0]['email_body'];
$subject = $templateData[0]['email_subject'];
$messageText = str_replace("[LOGINNAME]", $emailData[0]['email_address'], $messageText);
$messageText = str_replace("[SITENAME]", SITE_NAME, $messageText);
SendEmail($emailData[0]['email_address'], $subject, $messageText);
}
$mySession->errorMsg = "Newsletter has been sent successfully.";
$this->_redirect('system/viewnewsletter');
}
示例6: SaveSub
public function SaveSub($dataForm)
{
global $mySession;
$db = new Db();
$value = $_POST['plan'];
$dataForm = SetupMagicQuotes($dataForm);
$chkQry = $db->runQuery("select * from " . SUBSCRIPTION . " where email_address='" . $dataForm['email_address'] . "'");
if ($chkQry != "" and count($chkQry) > 0) {
return 0;
} else {
$dataInsert['first_name'] = $dataForm['first_name'];
$dataInsert['last_name'] = $dataForm['last_name'];
$dataInsert['email_address'] = $dataForm['email_address'];
$dataInsert['username'] = $dataForm['username'];
$dataInsert['password'] = md5($dataForm['password_o']);
$dataInsert['address'] = $dataForm['address'];
$dataInsert['country_id'] = $dataForm['country_id'];
//$dataInsert['state_id']=$dataForm['state_id'];
//$dataInsert['city_id']=$dataForm['city_id'];
$dataInsert['zipcode'] = $dataForm['zipcode'];
$dataInsert['phone_number'] = $dataForm['phone_number'];
$dataInsert['mobile_number'] = $dataForm['mobile_number'];
$dataInsert['id'] = $value;
$dataInsert['date_joined'] = date('Y-m-d H:i:s');
$dataInsert['user_status'] = '1';
$dataInsert['user_type'] = $dataForm['signup_type'];
$db->save(USERS, $dataInsert);
$UserId = $db->lastInsertId();
//code to send registration email
$fullName = $dataForm['first_name'] . ' ' . $dataForm['last_name'];
$Url = '<a href="' . APPLICATION_URL . '">' . APPLICATION_URL . '</a>';
$templateData = $db->runQuery("select * from " . EMAIL_TEMPLATES . " where template_id='2'");
$messageText = $templateData[0]['email_body'];
$subject = $templateData[0]['email_subject'];
$messageText = str_replace("[NAME]", "<strong>" . $fullName . "</strong>", $messageText);
$messageText = str_replace("[SITENAME]", "<strong>" . SITE_NAME . "</strong>", $messageText);
$messageText = str_replace("[LOGINNAME]", "<strong>" . $dataForm['username'] . "</strong>", $messageText);
$messageText = str_replace("[PASSWORD]", "<strong>" . $dataForm['password_o'] . "</strong>", $messageText);
$messageText = str_replace("[SITEURL]", "<strong>" . $Url . "</strong>", $messageText);
SendEmail($dataForm['email_address'], $subject, $messageText);
//code to send registration email
return $UserId;
}
}
示例7: AddContacts
function AddContacts()
{
global $config, $txtName, $txtEmail, $txtType, $txtCompany, $txtTitle, $txtSubject, $txtMessage;
$c = new ContactsDetails();
$c->_contact_name = $txtName;
$c->_contact_email = $txtEmail;
$c->_contact_type = $txtType;
$c->_contact_company = $txtCompany;
$c->_contact_title = $txtTitle;
$c->_contact_subject = $txtSubject;
$c->_contact_message = nl2br($txtMessage);
//eregi_replace(chr(13),"<br>",$txtMessage);
$c->_contact_date_submited = date("Y-m-d");
if (ValidateContacts()) {
$td = ContactsDetails::Insert($c);
//send email
SendEmail();
return $td;
}
return false;
}
示例8: saveComment
public function saveComment($dataForm)
{
//echo 'hello'; exit();
global $mySession;
$db = new Db();
// prd($dataForm);
$db->save(BLOG_COMMENTS, $dataForm);
$commentuser = $db->runQuery("select * from " . BLOG_COMMENTS . " AS BC \n\t\t\t\t\t\t\t\tinner join " . USERS . " as U ON BC.post_by=U.user_id\n\t\t\t\t\t\t\t\twhere BC.post_by=" . $dataForm['post_by'] . "");
$comment_user = $commentuser[0]['first_name'] . $commentuser[0]['last_name'];
$userData = $db->runQuery("select * from " . BLOG_POST . " AS BP inner join " . BLOG_COMMENTS . " AS BC \n\t\t\t\t\t\t\t\tON BP.blog_post_id=BC.blog_post_id \n\t\t\t\t\t\t\t\tinner join " . USERS . " as U ON BP.user_id=U.user_id\n\t\t\t\t\t\t\t\twhere BP.status='1' and BP.activeBlog='1' and BP.blog_post_id=" . $dataForm['blog_post_id'] . "");
$fullName = $userData[0]['first_name'] . $userData[0]['last_name'];
$commentbyuser = $comment_user;
$useremail = $userData[0]['email_address'];
$threadtitle = $userData[0]['title'];
$templateData = $db->runQuery("select * from " . EMAIL_TEMPLATES . " where template_id='6'");
$messageText = $templateData[0]['email_body'];
$subject = $templateData[0]['email_subject'];
$messageText = str_replace("[USERNAME]", $fullName, $messageText);
$messageText = str_replace("[BLOGTITLE]", $threadtitle, $messageText);
$messageText = str_replace("[COMMENTUSERNAME]", $commentbyuser, $messageText);
$messageText = str_replace("[SITENAME]", SITE_NAME, $messageText);
SendEmail($useremail, $subject, $messageText);
return 1;
}
示例9: sendMessage
public function sendMessage($dataForm)
{
global $mySession;
$db = new Db();
foreach ($dataForm['box2View'] as $val) {
$dataMessage['receiver_id'] = $val;
$dataMessage['sender_id'] = 0;
$dataMessage['message_subject'] = $dataForm['message_subject'];
$dataMessage['message_text'] = $dataForm['message_text'];
$dataMessage['date_message_sent'] = date('Y-m-d H:i:s');
$db->save(MESSAGES, $dataMessage);
$user = $db->runQuery("select * from " . USERS . " where user_id=" . $dataMessage['receiver_id'] . "");
$receiveuser = $user[0]['first_name'] . ' ' . $user[0]['last_name'];
$useremail = $user[0]['email_address'];
$templateData = $db->runQuery("select * from " . EMAIL_TEMPLATES . " where template_id='8'");
$messageText = $templateData[0]['email_body'];
$subject = $dataForm['message_subject'];
$messageText = str_replace("[NAME]", $receiveuser, $messageText);
$messageText = str_replace("[SITENAME]", SITE_NAME, $messageText);
SendEmail($useremail, $subject, $messageText);
return 1;
}
return 0;
}
示例10: CheckForgotpass
public function CheckForgotpass($dataForm)
{
global $mySession;
$db = new Db();
$chkQry = $db->runQuery("select * from " . USERS . " where emailid='" . mysql_escape_string($dataForm['emailid']) . "'");
if ($chkQry != "" and count($chkQry) > 0) {
$dataUpdate['pass_reset'] = md5($chkQry[0]['user_id']);
$conditionUpdate = "user_id='" . $chkQry[0]['user_id'] . "'";
$db->modify(USERS, $dataUpdate, $conditionUpdate);
//code to send password reset email
$emailid = $chkQry[0]['emailid'];
$Urls = '<a href="' . APPLICATION_URL . 'login/reset/requestId/' . md5($chkQry[0]['user_id']) . '">' . APPLICATION_URL . 'login/reset/requestId/' . md5($chkQry[0]['user_id']) . '</a>';
$templateData = $db->runQuery("select * from " . EMAIL_TEMPLATES . " where template_id='3'");
$messageText = $templateData[0]['email_body'];
$messageText = str_replace("[NAME]", $emailid, $messageText);
$messageText = str_replace("[PASSWORDRESETURL]", $Urls, $messageText);
$messageText = str_replace("[SITENAME]", SITE_NAME, $messageText);
$subject = "forgotpassword mail";
//echo $messageText; exit;
SendEmail($dataForm['emailid'], $subject, $messageText);
//code to send password reset email
return $chkQry[0]['user_id'];
}
}
示例11: saveSqlError
function saveSqlError($conn, $error, $sql, $params)
{
// Guarda el error que generó un query en la tabla de errores web..
global $servidorContingenciaActivo;
try {
$sql = str_replace("\t", " ", $sql);
while (strpos($sql, " ")) {
$sql = str_replace(" ", " ", $sql);
}
$url = $_SERVER["SERVER_NAME"] . $_SERVER["SCRIPT_NAME"];
if (!$servidorContingenciaActivo) {
$params = adminXSS($params, false);
$sqlError = "INSERT INTO web.wew_erroreswebsql\n\t\t\t\t\t\t\t\t\t\t(ew_error, ew_fechaalta, ew_files, ew_get, ew_id, ew_parametros, ew_post, ew_remotehost, ew_session, ew_sql, ew_url)\n\t\t\t\t\t\t VALUES (:error, SYSDATE, :files, :get, -1, :parametros, :post, :remotehost, :sesion, :sql, :url)";
$stmtError = OCIParse($conn, $sqlError);
oci_bind_by_name($stmtError, ":error", substr($error, 0, 512));
oci_bind_by_name($stmtError, ":files", nullIsEmpty(substr(print_r($_FILES, true), 0, 1024)));
oci_bind_by_name($stmtError, ":get", nullIsEmpty(substr(print_r($_GET, true), 0, 1024)));
oci_bind_by_name($stmtError, ":parametros", nullIsEmpty(substr(print_r($params, true), 0, 4000)));
oci_bind_by_name($stmtError, ":post", nullIsEmpty(substr(print_r($_POST, true), 0, 1024)));
oci_bind_by_name($stmtError, ":remotehost", nullIsEmpty(substr(gethostbyaddr($_SERVER['REMOTE_ADDR']), 0, 128)));
oci_bind_by_name($stmtError, ":sesion", nullIsEmpty(substr(str_replace(" ", " ", isset($_SESSION) ? print_r($_SESSION, true) : ""), 0, 1024)));
oci_bind_by_name($stmtError, ":sql", substr($sql, 0, 4000));
oci_bind_by_name($stmtError, ":url", substr($url, 0, 512));
//oci_execute($stmtError);
EscribirLogTxt1("saveSqlError errors ", substr($error, 0, 512));
EscribirLogTxt1("saveSqlError params", implode(",", $params));
EscribirLogTxt1("saveSqlError sql", $sql);
EscribirLogTxt1("saveSqlError url", substr($url, 0, 512));
throw new Exception($error);
}
$dbError = oci_error($stmtError);
if (isset($dbError["offset"])) {
$body = "<html><body>";
$body .= "<div>El siguiente error hay ocurrido mientras se intentaba guardar un error de Oracle desde la web:<span style='color:red;'>" . $dbError["message"] . "</span></div>";
$body .= "<div>Los datos que se intentaban guardar son:";
$body .= "<p>URL: <b>" . $url . "</b></p>";
$body .= "<p>ERROR: <b>" . $error . "</b></p>";
$body .= "<p>SQL: <b>" . $sql . "</b></p>";
$body .= "<p>PARÁMETROS: <b>" . print_r($params, true) . "</b></p>";
$body .= "<p>REMOTE HOST: <b>" . substr(gethostbyaddr($_SERVER['REMOTE_ADDR']), 0, 128) . "</b></p>";
$body .= "<p>SESSION: <b>" . (isset($_SESSION) ? print_r($_SESSION, true) : "") . "</b></p>";
$body .= "<p>POST: <b>" . print_r($_POST, true) . "</b></p>";
$body .= "<p>GET: <b>" . print_r($_GET, true) . "</b></p>";
$body .= "<p>FILES: <b>" . print_r($_FILES, true) . "</b></p>";
$body .= "</div></body></html>";
SendEmail($body, "Provincia ART Web", "Error al intentar guardar un error sql web", array("jlovatto@artprov.com.ar"), array(), array(), "H");
}
} catch (Exception $e) {
//
}
}
示例12: csendmailAction
public function csendmailAction()
{
global $mySession;
$db = new Db();
$users = array();
if (!empty($_REQUEST['allusers'])) {
//process all users
$sql = $db->runQuery("select * from " . BUYERS . "");
for ($i = 0; $i < count($sql); $i++) {
$temp = array();
$user_id = $sql[$i]['user_id'];
$temp['email'] = $sql[$i]['email'];
$temp['name'] = $sql[$i]['name'];
$users[] = $temp;
}
} else {
$mailArray = $_REQUEST['rightValues'];
if (!empty($mailArray)) {
for ($i = 0; $i < count($mailArray); $i++) {
$str = explode("::", $mailArray[$i]);
$temp = array();
$temp['email'] = $str[0];
$temp['name'] = $str[2];
$users[] = $temp;
}
}
}
//send mails
if (!empty($users)) {
$templateData = $db->runQuery("select * from " . EMAIL_TEMPLATES . " where template_id='21'");
$messageText = $templateData[0]['email_body'];
$subject = $templateData[0]['email_subject'];
$messageText = str_replace("[SITENAME]", SITE_NAME, $messageText);
$messageText = str_replace("[SITEURL]", APPLICATION_URL, $messageText);
foreach ($users as $user) {
if (!empty($user['name'])) {
$message = str_replace("[NAME]", $user['name'], $messageText);
} else {
$message = str_replace("[NAME]", $user['email'], $messageText);
}
$to = $user['email'];
SendEmail($to, $subject, $message);
}
$mySession->errorMsg = "Mails has been sent successfully.";
}
$this->_redirect('users/buyers');
}
示例13: addslashes
$note = addslashes($_POST['note']);
if (!CheckName($name)) {
$fail_msg_name = "U dient een geldige voor- en achternaam op te geven. Let op: de apostrof (') wordt niet geaccepteerd.";
}
if (isset($fail_msg_name)) {
$fail = TRUE;
}
if (!isset($fail)) {
$query = "INSERT INTO `schades` (Datum, Naam, Boot_ID, Oms_lang) VALUES ('{$today_db}', '{$name}', '{$boat_id}', '{$note}');";
$result = mysql_query($query);
if (!$result) {
die("toevoegen klacht mislukt." . mysql_error());
} else {
// mail aan matcom
$message = $name . " heeft zojuist een schade gemeld betreffende '" . $boat . "'.<br>";
SendEmail("materiaal@hunze.nl", "Nieuwe schademelding", $message);
// feedback op scherm
echo "<p>Uw schademelding is doorgegeven aan de Materiaalcommissie.<br>";
echo "Mocht u de melding nog nader willen toelichten of willen wijzigen, neemt u dan contact op via <a href='mailto:materiaal@hunze.nl'>e-mail</a>.<br>";
echo "<br><br><a href='index_boten.php'>Terug naar het schadeoverzicht voor de boten</a></p>";
}
}
}
// Formulier
if (!isset($_POST['insert']) && !isset($_POST['delete']) && !isset($_POST['cancel']) || isset($fail) && $fail == true) {
echo "<form name='form' action=\"" . (isset($REQUEST_URI) ? $REQUEST_URI : "") . "\" method=\"post\">";
// naam
echo "<div class='form-group'><label for='name'>Uw naam</label>";
echo "<input type=\"text\" name=\"name\" id=\"name\" autofocus required value=\"" . (isset($name) ? $name : "") . "\" class=\"form-control\"></div>";
if (isset($fail_msg_name)) {
echo "<td><em>" . $fail_msg_name . "</em></td>";
示例14: DBExecSql
}
$sql.= " WHERE se_id = :id";
$params[":id"] = $_REQUEST["Id"];
DBExecSql($conn, $sql, $params);
?>
<script>
<?
if ($dbError["offset"]) {
?>
alert('<?= $dbError["message"]?>');
<?
}
else {
if ($imgFotoPath != "") {
SendEmail("Se ha cargado la foto del usuario ".$_REQUEST["UserName"].".", "Contacto Web", "Nueva foto cargada desde la intranet", array("aangiolillo@provart.com.ar"), array(), array());
echo "window.parent.document.getElementById('NombreFoto').value = '<?= $imgFotoPath?>';";
}
?>
function closeWindow() {
divWin.close();
}
setInterval("closeWindow()", 2000);
medioancho = (screen.width - 320) / 2;
medioalto = (screen.height - 200) / 2;
divWin = window.parent.dhtmlwindow.open('divBox', 'div', 'msgOk', 'Aviso', 'width=320px,height=40px,left=' + medioancho + 'px,top=' + medioalto + 'px,resize=0,scrolling=0');
// window.parent.document.getElementById('spanMensaje').style.display = 'block';
<?
}
示例15: SiteUser
include_once "inc/header.php";
if (!empty($_POST['username'])) {
$entryValue = $_POST['username'];
//check to make sure email address is valid
//PROBABLY SHOULD ADD A DNS CHECK HERE TOO. SEE http://www.soaptray.com/blog/2008/04/validate-email-addresses-using-php/
if (preg_match("/^.+@.+\\..+\$/", $entryValue)) {
//if email is valid:
include_once "inc/class.users.inc.php";
$user = new SiteUser();
$addNewUser_result = $user->addNewUser($entryValue);
if ($addNewUser_result[0] == 2 or $addNewUser_result[0] == 4) {
//Send Email to new user:
include_once 'inc/send_mail.php';
//include email file
$verification_instruction = "<h4>A verification link has been sent to your email address. Please click the link to verify your account</h4>";
SendEmail($entryValue, "Welcome to " . BRAND_NAME, "Thank you for signing up. \n Please click the following link to verify your account: " . $addNewUser_result[2] . "\n\n If clicking the link does not work, please copy and paste it into your browser.");
}
echo "<div id='signup_page_message_div' style='padding-left:20px;'>";
echo $addNewUser_result[1];
echo $verification_instruction;
echo "</div>";
if ($addNewUser_result[0] == 2) {
//if email was stored successfully, don't show the signup HTML
exit;
}
} else {
//if email is not valid:
echo "<p style='color:red'>Please enter a valid email address</p>";
}
}
//if page loads and form is blank: