本文整理汇总了PHP中email_handler::assign_vars方法的典型用法代码示例。如果您正苦于以下问题:PHP email_handler::assign_vars方法的具体用法?PHP email_handler::assign_vars怎么用?PHP email_handler::assign_vars使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类email_handler
的用法示例。
在下文中一共展示了email_handler::assign_vars方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: sendWatchEmails
function sendWatchEmails($id)
{
global $DBPrefix, $system;
$query = "SELECT name, email, item_watch, id FROM " . $DBPrefix . "users WHERE item_watch LIKE '% " . $id . " %'";
$res = mysql_query($query);
$system->check_mysql($res, $query, __LINE__, __FILE__);
while ($watchusers = mysql_fetch_array($res)) {
$keys = explode(' ', $watchusers['item_watch']);
// If keyword matches with opened auction title or/and desc send user a mail
if (in_array($id, $keys)) {
$emailer = new email_handler();
$emailer->assign_vars(array('URL' => $system->SETTINGS['siteurl'] . 'item.php?mode=1&id=' . $id, 'TITLE' => $Auction['title'], 'NAME' => $watchusers['name']));
$emailer->email_uid = $watchusers['id'];
$emailer->email_sender($watchusers['email'], 'auctionend_watchmail.inc.php', $system->SETTINGS['sitename'] . ' - ' . $MSG['471']);
}
}
}
示例2: sendWatchEmails
function sendWatchEmails($id)
{
global $DBPrefix, $system, $db;
$query = "SELECT name, email, item_watch, id FROM " . $DBPrefix . "users WHERE item_watch LIKE :item_watch";
$params = array();
$params[] = array(':item_watch', '% ' . $id . ' %', 'str');
$db->query($query, $params);
while ($watchusers = $db->fetch()) {
$keys = explode(' ', $watchusers['item_watch']);
// If keyword matches with opened auction title or/and desc send user a mail
if (in_array($id, $keys)) {
$emailer = new email_handler();
$emailer->assign_vars(array('URL' => $system->SETTINGS['siteurl'] . 'item.php?mode=1&id=' . $id, 'TITLE' => htmlspecialchars($Auction['title']), 'NAME' => $watchusers['name']));
$emailer->email_uid = $watchusers['id'];
$emailer->email_sender($watchusers['email'], 'auctionend_watchmail.inc.php', $system->SETTINGS['sitename'] . ' - ' . $MSG['471']);
}
}
}
示例3: array
if (isset($_POST['TPL_username']) && isset($_POST['TPL_email'])) {
$query = "SELECT email, id, name FROM " . $DBPrefix . "users WHERE nick = :username AND email = :email LIMIT 1";
$params = array();
$params[] = array(':username', $system->cleanvars($_POST['TPL_username']), 'str');
$params[] = array(':email', $system->cleanvars($_POST['TPL_email']), 'str');
$db->query($query, $params);
if ($db->numrows() > 0) {
// Generate a new random password and mail it to the user
$user_data = $db->result();
$email = $user_data['email'];
$id = $user_data['id'];
$name = $user_data['name'];
$newpass = generatePassword();
// send message
$emailer = new email_handler();
$emailer->assign_vars(array('REALNAME' => $name, 'NEWPASS' => $newpass, 'SITENAME' => $system->SETTINGS['sitename']));
$emailer->email_uid = $id;
$emailer->email_sender($email, 'newpasswd.inc.php', $MSG['024']);
// Update database
$query = "UPDATE " . $DBPrefix . "users SET password = :password WHERE id = :user_id";
// hash password
include $include_path . 'PasswordHash.php';
$phpass = new PasswordHash(8, false);
$params = array();
$params[] = array(':password', $phpass->HashPassword($newpass), 'str');
$params[] = array(':user_id', $id, 'int');
$db->query($query, $params);
} else {
$ERR = $ERR_076;
}
} else {
示例4: htmlspecialchars
$report .= "</table>";
include INCLUDE_PATH . 'email/endauction_cumulative.php';
}
}
// send buyer fee emails
if ($buyer_fee > 0) {
for ($i = 0; $i < count($buyer_emails); $i++) {
$emailer = new email_handler();
$emailer->assign_vars(array('ID' => $buyer_emails[$i]['id'], 'TITLE' => htmlspecialchars($buyer_emails[$i]['title']), 'NAME' => $buyer_emails[$i]['name'], 'LINK' => $system->SETTINGS['siteurl'] . 'pay.php?a=6&auction_id=' . $Auction['id']));
$emailer->email_uid = $buyer_emails[$i]['uid'];
$emailer->email_sender($buyer_emails[$i]['email'], 'buyer_fee.inc.php', $system->SETTINGS['sitename'] . ' - ' . $MSG['522']);
}
}
for ($i = 0; $i < count($seller_emails); $i++) {
$emailer = new email_handler();
$emailer->assign_vars(array('ID' => $seller_emails[$i]['id'], 'TITLE' => htmlspecialchars($seller_emails[$i]['title']), 'NAME' => $seller_emails[$i]['name'], 'LINK' => $system->SETTINGS['siteurl'] . 'pay.php?a=7&auction_id=' . $Auction['id']));
$emailer->email_uid = $seller_emails[$i]['uid'];
$emailer->email_sender($seller_emails[$i]['email'], 'final_value_fee.inc.php', $system->SETTINGS['sitename'] . ' - ' . $MSG['523']);
}
// Purging thumbnails cache
if (!file_exists(UPLOAD_PATH . 'cache')) {
mkdir(UPLOAD_PATH . 'cache', 0777);
}
if (!file_exists(UPLOAD_PATH . 'cache/purge')) {
touch(UPLOAD_PATH . 'cache/purge');
}
$purgecachetime = filectime(UPLOAD_PATH . 'cache/purge');
if (time() - $purgecachetime > 86400) {
$dir = UPLOAD_PATH . 'cache';
if ($dh = opendir($dir)) {
while (($file = readdir($dh)) !== false) {
示例5: array
$db->query($query, $params);
$sent_to = array();
while ($row = $db->fetch()) {
if (isset($match)) {
unset($match);
}
$w_title = explode(' ', strtolower($_SESSION['SELL_title']));
$w_descr = explode(' ', strtolower(str_replace(array('<br>', "\n"), '', strip_tags($_SESSION['SELL_description']))));
$w_nick = strtolower($user->user_data['nick']);
$key = explode(' ', $row['auc_watch']);
if (is_array($key) && count($key) > 0) {
foreach ($key as $k => $v) {
$v = trim(strtolower($v));
if ((in_array($v, $w_title) || in_array($v, $w_descr) || $v == $w_nick) && !in_array($row['id'], $sent_to)) {
$emailer = new email_handler();
$emailer->assign_vars(array('URL' => $system->SETTINGS['siteurl'] . 'item.php?id=' . $_SESSION['SELL_auction_id'], 'SITENAME' => $system->SETTINGS['sitename'], 'TITLE' => $_SESSION['SELL_title'], 'REALNAME' => $row['name'], 'KWORD' => $row['auc_watch']));
$emailer->email_uid = $row['id'];
$emailer->email_sender($row['email'], 'auction_watchmail.inc.php', $system->SETTINGS['sitename'] . ' ' . $MSG['471']);
$sent_to[] = $row['id'];
}
}
}
}
if ($user->user_data['startemailmode'] == 'yes') {
include $include_path . 'email_auction_confirmation.php';
}
if ($system->SETTINGS['bn_only'] == 'y' && $system->SETTINGS['bn_only_disable'] == 'y' && $system->SETTINGS['bn_only_percent'] < 100) {
$query = "SELECT COUNT(*) as count FROM " . $DBPrefix . "auctions\n\t\t\t\t\t\t\tWHERE closed = 0 AND suspended = 0 AND user = :user_id";
$params = array();
$params[] = array(':user_id', $user->user_data['id'], 'int');
$db->query($query, $params);
示例6: COUNT
$idcheck[] = $row['id'];
}
}
$data[] = $auctions_count;
// get auctions sold item
$query = "SELECT COUNT(DISTINCT a.id) AS total FROM " . $DBPrefix . "winners a\n\t\tLEFT JOIN " . $DBPrefix . "auctions b ON (a.auction = b.id)\n\t\tWHERE b.closed = 1 AND a.seller = :sellers AND a.is_read = 0";
$params = array();
$params[] = array(':sellers', $secid, 'int');
$db->query($query, $params);
$data[] = $db->result('total');
return $data;
}
// Send buyer's request to the administrator
if (isset($_POST['requesttoadmin'])) {
$emailer = new email_handler();
$emailer->assign_vars(array('NAME' => $user->user_data['name'], 'NICK' => $user->user_data['nick'], 'EMAIL' => $user->user_data['email'], 'ID' => $user->user_data['id']));
$emailer->email_sender($system->SETTINGS['adminmail'], 'buyer_request.inc.php', $MSG['820']);
$_SESSION['TMP_MSG'] = $MSG['25_0142'];
}
$cptab = isset($_GET['cptab']) ? $_GET['cptab'] : '';
switch ($cptab) {
default:
case 'summary':
$_SESSION['cptab'] = 'summary';
break;
case 'account':
$_SESSION['cptab'] = 'account';
break;
case 'selling':
$_SESSION['cptab'] = 'selling';
break;
示例7:
<?php
/***************************************************************************
* copyright : (C) 2008 - 2014 WeBid
* site : http://www.webidsupport.com/
***************************************************************************/
/***************************************************************************
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. Although none of the code may be
* sold. If you have been sold this script, get a refund.
***************************************************************************/
if (!defined('InWeBid')) {
exit;
}
$emailer = new email_handler();
$emailer->assign_vars(array('SITE_URL' => $system->SETTINGS['siteurl'], 'SITENAME' => $system->SETTINGS['sitename'], 'C_NAME' => $USER['name']));
$emailer->userlang = $language;
$emailer->email_sender(array($USER['email'], $system->SETTINGS['adminmail']), 'user_approved.inc.php', $system->SETTINGS['sitename'] . ' ' . $MSG['095']);
示例8:
<?php
/***************************************************************************
* copyright : (C) 2008 - 2015 WeBid
* site : http://www.webidsupport.com/
***************************************************************************/
/***************************************************************************
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. Although none of the code may be
* sold. If you have been sold this script, get a refund.
***************************************************************************/
if (!defined('InWeBid')) {
exit;
}
$item_title = $system->uncleanvars($item_title);
$emailer = new email_handler();
$emailer->assign_vars(array('SITE_URL' => $system->SETTINGS['siteurl'], 'SITENAME' => $system->SETTINGS['sitename'], 'C_NAME' => $OldWinner_name, 'C_BID' => $OldWinner_bid, 'N_BID' => $new_bid, 'A_TITLE' => $item_title, 'A_ENDS' => $ends_string, 'A_PICURL' => $pict_url_plain != '' ? $uploaded_path . $item_id . '/' . $pict_url_plain : 'images/email_alerts/default_item_img.jpg', 'A_URL' => $system->SETTINGS['siteurl'] . 'item.php?id=' . $item_id));
$emailer->email_uid = $OldWinner_id;
$emailer->email_sender($OldWinner_email, 'no_longer_winner.inc.php', $system->SETTINGS['sitename'] . ' ' . $MSG['906'] . ': ' . $item_title);
示例9: array
$db->query($query, $params);
$query = "INSERT INTO " . $DBPrefix . "useraccounts (user_id, auc_id, date, finalval, total, paid) VALUES\n\t\t\t\t\t\t\t(:user_id, :auc_id, :time, :finalval, :total, 1)";
$params = array();
$params[] = array(':user_id', $Auction['user'], 'int');
$params[] = array(':auc_id', $id, 'int');
$params[] = array(':time', $NOW, 'int');
$params[] = array(':finalval', $fee_value, 'int');
$params[] = array(':total', $fee_value, 'int');
$db->query($query, $params);
} else {
$query = "UPDATE " . $DBPrefix . "users SET suspended = 5 WHERE id = :user_id";
$params = array();
$params[] = array(':user_id', $Auction['user'], 'int');
$db->query($query, $params);
$emailer = new email_handler();
$emailer->assign_vars(array('ID' => $Auction['id'], 'TITLE' => $system->uncleanvars($Auction['title']), 'NAME' => $Seller['name'], 'LINK' => $system->SETTINGS['siteurl'] . 'pay.php?a=7&auction_id=' . $Auction['id']));
$emailer->email_uid = $Auction['user'];
$emailer->email_sender($Seller['email'], 'final_value_fee.inc.php', $system->SETTINGS['sitename'] . ' - ' . $MSG['523']);
$ff_paid = 0;
}
}
$query = "INSERT INTO " . $DBPrefix . "winners\n\t\t\t\t\t(auction, seller, winner, bid, closingdate, feedback_win, feedback_sel, qty, paid, bf_paid, ff_paid, shipped) VALUES\n\t\t\t\t\t(:auc_id, :seller_id, :winner_id, :buy_now, :time, 0, 0, :quantity, 0, :bf_paid, :ff_paid, 0)";
$params = array();
$params[] = array(':auc_id', $id, 'int');
$params[] = array(':seller_id', $Auction['user'], 'int');
$params[] = array(':winner_id', $Winner['id'], 'int');
$params[] = array(':buy_now', $Auction['buy_now'], 'float');
$params[] = array(':time', $NOW, 'int');
$params[] = array(':quantity', $qty, 'int');
$params[] = array(':bf_paid', $bf_paid, 'float');
$params[] = array(':ff_paid', $ff_paid, 'float');
示例10: isset
<?php
/***************************************************************************
* copyright : (C) 2008 - 2016 WeBid
* site : http://www.webidsupport.com/
***************************************************************************/
/***************************************************************************
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. Although none of the code may be
* sold. If you have been sold this script, get a refund.
***************************************************************************/
if (!defined('InWeBid')) {
exit;
}
$emailer = new email_handler();
$emailer->assign_vars(array('SITE_URL' => $system->SETTINGS['siteurl'], 'SITENAME' => $system->SETTINGS['sitename'], 'ADMINMAIL' => $system->SETTINGS['adminmail'], 'REPORT' => $report, 'REPORT_WINNER' => isset($report_winner) ? $MSG['communative_report_winner_yes'] : $MSG['communative_report_winner_no'], 'S_NAME' => $row['name']));
$emailer->email_uid = $row['id'];
$emailer->email_sender($row['email'], 'endauction_cumulative.inc.php', $MSG['25_0199']);
示例11:
<?php
/***************************************************************************
* copyright : (C) 2008 - 2015 WeBid
* site : http://www.webidsupport.com/
***************************************************************************/
/***************************************************************************
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. Although none of the code may be
* sold. If you have been sold this script, get a refund.
***************************************************************************/
if (!defined('InWeBid')) {
exit;
}
//echo "got here ". $Winner['name'];
$item_title = $system->uncleanvars($Auction['title']);
$emailer = new email_handler();
$emailer->assign_vars(array('W_NAME' => $Winner['name'], 'A_PICURL' => $Auction['pict_url'] != '' ? $uploaded_path . $Auction['id'] . '/' . $Auction['pict_url'] : 'images/email_alerts/default_item_img.jpg', 'A_URL' => $system->SETTINGS['siteurl'] . 'item.php?id=' . $Auction['id'], 'A_TITLE' => $Auction['title'], 'A_CURRENTBID' => $system->print_money($Auction['buy_now']), 'A_QUANTITY' => $qty, 'A_ENDS' => $ends_string, 'S_NICK' => $Seller['nick'], 'S_EMAIL' => $Seller['email'], 'SITE_URL' => $system->SETTINGS['siteurl'], 'SITENAME' => $system->SETTINGS['sitename']));
$emailer->email_uid = $Winner['id'];
$emailer->email_sender($Winner['email'], 'endauction_multi_item_win.inc.php', $system->SETTINGS['sitename'] . 'You Won ' . $item_title);
示例12:
<?php
/***************************************************************************
* copyright : (C) 2008 - 2016 WeBid
* site : http://www.webidsupport.com/
***************************************************************************/
/***************************************************************************
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. Although none of the code may be
* sold. If you have been sold this script, get a refund.
***************************************************************************/
if (!defined('InWeBid')) {
exit;
}
$emailer = new email_handler();
$emailer->assign_vars(array('SITE_URL' => $system->SETTINGS['siteurl'], 'SITENAME' => $system->SETTINGS['sitename'], 'A_ID' => $auction_id, 'A_TITLE' => $title, 'A_TYPE' => $atype == 1 ? $MSG['642'] : $MSG['641'], 'A_PICURL' => $pict_url != '' ? UPLOAD_FOLDER . $auction_id . '/' . $pict_url : 'images/email_alerts/default_item_img.jpg', 'A_MINBID' => $system->print_money($minimum_bid, false), 'A_RESERVE' => $system->print_money($reserve_price, false), 'A_BNPRICE' => $system->print_money($buy_now_price, false), 'A_ENDS' => $dt->printDateTz($a_ends), 'C_NAME' => $user->user_data['name']));
$emailer->email_uid = $user->user_data['id'];
$subject = $system->SETTINGS['sitename'] . ' ' . $MSG['099'] . ': ' . $title . ' (' . $auction_id . ')';
$emailer->email_sender($user->user_data['email'], 'auctionmail.inc.php', $subject);
示例13: addslashes
<?php
/***************************************************************************
* copyright : (C) 2008 - 2016 WeBid
* site : http://www.webidsupport.com/
***************************************************************************/
/***************************************************************************
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. Although none of the code may be
* sold. If you have been sold this script, get a refund.
***************************************************************************/
if (!defined('InWeBid')) {
exit;
}
$emailer = new email_handler();
$emailer->assign_vars(array('C_ID' => addslashes($TPL_id_hidden), 'C_NAME' => addslashes($TPL_name_hidden), 'C_NICK' => addslashes($TPL_nick_hidden), 'C_ADDRESS' => addslashes($_POST['TPL_address']), 'C_CITY' => addslashes($_POST['TPL_city']), 'C_PROV' => addslashes($_POST['TPL_prov']), 'C_ZIP' => addslashes($_POST['TPL_zip']), 'C_COUNTRY' => addslashes($_POST['TPL_country']), 'C_PHONE' => addslashes($_POST['TPL_phone']), 'C_EMAIL' => addslashes($_POST['TPL_email']), 'C_PASSWORD' => addslashes($TPL_password_hidden), 'SITENAME' => $system->SETTINGS['sitename'], 'SITEURL' => $system->SETTINGS['siteurl'], 'ADMINEMAIL' => $system->SETTINGS['adminmail'], 'CONFIRMATION_PAGE' => $system->SETTINGS['siteurl'] . 'confirm.php?id=' . $TPL_id_hidden . '&hash=' . md5($MD5_PREFIX . $TPL_nick_hidden), 'LOGO' => $system->SETTINGS['siteurl'] . 'uploaded/logo/' . $system->SETTINGS['logo']));
$emailer->email_uid = $TPL_id_hidden;
$emailer->email_sender(array($TPL_email_hidden, $system->SETTINGS['adminmail']), 'user_needapproval.inc.php', $system->SETTINGS['sitename'] . ' ' . $MSG['098']);
示例14: array
<?php
/***************************************************************************
* copyright : (C) 2008 - 2016 WeBid
* site : http://www.webidsupport.com/
***************************************************************************/
/***************************************************************************
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. Although none of the code may be
* sold. If you have been sold this script, get a refund.
***************************************************************************/
if (!defined('InWeBid')) {
exit;
}
// Check if the e-mail has to be sent or not
$query = "SELECT endemailmode FROM " . $DBPrefix . "users WHERE id = :seller_id";
$params = array();
$params[] = array(':seller_id', $Seller['id'], 'int');
$db->query($query, $params);
$emailmode = $db->result('endemailmode');
if ($emailmode == 'one') {
$emailer = new email_handler();
$emailer->assign_vars(array('S_NAME' => $Seller['name'], 'A_URL' => $system->SETTINGS['siteurl'] . 'item.php?id=' . $Auction['id'], 'A_PICURL' => $Auction['pict_url'] != '' ? UPLOAD_FOLDER . $Auction['id'] . '/' . $Auction['pict_url'] : 'images/email_alerts/default_item_img.jpg', 'A_TITLE' => $Auction['title'], 'A_CURRENTBID' => $system->print_money($Auction['current_bid']), 'A_QTY' => $Auction['quantity'], 'A_ENDS' => $ends_string, 'B_REPORT' => $report_text, 'SITE_URL' => $system->SETTINGS['siteurl'], 'SITENAME' => $system->SETTINGS['sitename']));
$emailer->email_uid = $Seller['id'];
$subject = $system->SETTINGS['sitename'] . ' ' . $MSG['079'] . ' ' . $MSG['907'] . ' ' . htmlspecialchars($Auction['title']);
$emailer->email_sender($Seller['email'], 'endauction_winner.inc.php', $subject);
}
示例15: htmlspecialchars
<?php
/***************************************************************************
* copyright : (C) 2008 - 2016 WeBid
* site : http://www.webidsupport.com/
***************************************************************************/
/***************************************************************************
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. Although none of the code may be
* sold. If you have been sold this script, get a refund.
***************************************************************************/
if (!defined('InWeBid')) {
exit;
}
$item_title = htmlspecialchars($Auction['title']);
$emailer = new email_handler();
$emailer->assign_vars(array('W_NAME' => $Winner['name'], 'A_PICURL' => $Auction['pict_url'] != '' ? UPLOAD_FOLDER . $Auction['id'] . '/' . $Auction['pict_url'] : 'images/email_alerts/default_item_img.jpg', 'A_URL' => $system->SETTINGS['siteurl'] . 'item.php?id=' . $Auction['id'], 'A_TITLE' => $item_title, 'A_CURRENTBID' => $system->print_money($Auction['current_bid']), 'A_ENDS' => $ends_string, 'S_NICK' => $Seller['nick'], 'S_EMAIL' => $Seller['email'], 'SITE_URL' => $system->SETTINGS['siteurl'], 'SITENAME' => $system->SETTINGS['sitename']));
$emailer->email_uid = $Winner['id'];
$emailer->email_sender($Winner['email'], 'endauction_youwin_nodutch.inc.php', $system->SETTINGS['sitename'] . $MSG['909'] . ': ' . $item_title);