本文整理汇总了PHP中emailer类的典型用法代码示例。如果您正苦于以下问题:PHP emailer类的具体用法?PHP emailer怎么用?PHP emailer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了emailer类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: home
function home()
{
global $user;
$sql = 'SELECT *
FROM _email
WHERE email_active = ??
LIMIT ??';
if (!($email = _fieldrow(sql_filter($sql, 1, 1)))) {
$this->e('No queue emails.');
}
set_time_limit(0);
if (!$email['email_start']) {
$sql = 'UPDATE _email SET email_start = ?
WHERE email_id = ?';
_sql(sql_filter($sql, time(), $email['email_id']));
}
$sql = 'SELECT user_id, user_username, user_email
FROM _members
WHERE user_type = ?
AND user_id <> ?
ORDER BY user_username
LIMIT ??, ??';
$members = _rowset(sql_filter($sql, 1, 1, $email['email_last'], 100));
$i = 0;
foreach ($members as $row) {
if (!preg_match('/^[a-z0-9\\.\\-_\\+]+@[a-z0-9\\-_]+\\.([a-z0-9\\-_]+\\.)*?[a-z]+$/is', $row['user_email'])) {
continue;
}
if (!$i) {
include XFS . 'core/emailer.php';
$emailer = new emailer();
}
$emailer->use_template('mass');
$emailer->format('plain');
$emailer->from('TWC Kaulitz <[email protected]>');
$emailer->set_subject(entity_decode($email['email_subject']));
$emailer->email_address($row['user_email']);
$emailer->assign_vars(array('USERNAME' => $row['user_username'], 'MESSAGE' => entity_decode($email['email_message'])));
$emailer->send();
$emailer->reset();
sleep(2);
$i++;
}
if ($i) {
$email['email_last'] += $i;
$sql = 'UPDATE _email SET email_last = ?
WHERE email_id = ?';
_sql(sql_filter($sql, $email['email_last'], $email['email_id']));
} else {
$sql = 'UPDATE _email SET email_active = ?, email_end = ?
WHERE email_id = ?';
_sql(sql_filter($sql, 0, time(), $email['email_id']));
$this->e('Finished processing [' . $email['email_id'] . '] emails.');
}
$this->e('Processed ' . $i . ' emails.');
return;
}
开发者ID:nopticon,项目名称:noptc,代码行数:57,代码来源:_email.php
示例2: _home
public function _home() {
global $config, $user, $cache;
if (!_button()) {
return false;
}
$username1 = request_var('username1', '');
$username2 = request_var('username2', '');
if (empty($username1) || empty($username2)) {
fatal_error();
}
$username_base1 = get_username_base($username1);
$username_base2 = get_username_base($username2);
$sql = 'SELECT *
FROM _members
WHERE username_base = ?';
if (!$userdata = sql_fieldrow(sql_filter($sql, $username_base1))) {
_pre('El usuario no existe.', true);
}
$sql = 'SELECT *
FROM _members
WHERE username_base = ?';
if ($void = sql_fieldrow(sql_filter($sql, $username_base2))) {
_pre('El usuario ya existe.', true);
}
//
$sql = 'UPDATE _members SET username = ?, username_base = ?
WHERE user_id = ?';
sql_query(sql_filter($sql, $username2, $username_base2, $userdata['user_id']));
$emailer = new emailer();
$emailer->from('info');
$emailer->use_template('username_change', $config['default_lang']);
$emailer->email_address($userdata['user_email']);
$emailer->assign_vars(array(
'USERNAME' => $userdata['username'],
'NEW_USERNAME' => $username2,
'U_USERNAME' => s_link('m', $username_base2))
);
$emailer->send();
$emailer->reset();
redirect(s_link('m', $username_base2));
return;
}
开发者ID:nopticon,项目名称:rockr,代码行数:53,代码来源:user_name_change.php
示例3: home
function home()
{
$sql = 'SELECT *
FROM _members
WHERE user_type = ?
AND user_birthday LIKE ?
AND user_birthday_last < ?
ORDER BY user_username
LIMIT ??';
$birthday = _rowset(sql_filter($sql, 1, '%' . date('md'), date('Y'), 10));
if (!$birthday) {
$this->e('None.');
}
$process = w();
foreach ($birthday as $i => $row) {
if (!$i) {
@set_time_limit(0);
require XFS . 'core/emailer.php';
$emailer = new emailer();
}
$emailer->format('plain');
$emailer->from('TWC Kaulitz <[email protected]>');
$emailer->use_template('user_birthday');
$emailer->email_address($row['user_email']);
$emailer->assign_vars(array('USERNAME' => $row['user_username']));
$emailer->send();
$emailer->reset();
$process[$row['user_id']] = $row['user_username'];
}
if (count($process)) {
$sql = 'UPDATE _members SET user_birthday_last = ?
WHERE user_id IN (??)';
_sql(sql_filter($sql, date('Y'), _implode(',', array_keys($process))));
}
return $this->e('Done @ ' . implode(',', array_values($process)));
}
开发者ID:nopticon,项目名称:noptc,代码行数:36,代码来源:_birthday.php
示例4: time
if ($mode != 'edit') {
//
// Add to the users new pm counter
//
$sql = "UPDATE " . USERS_TABLE . "\r\n\t\t\t\tSET user_new_privmsg = user_new_privmsg + 1, user_last_privmsg = " . time() . " \r\n\t\t\t\tWHERE user_id = " . $to_userdata['user_id'];
if (!($status = $db->sql_query($sql))) {
message_die(GENERAL_ERROR, 'Could not update private message new/read status for user', '', __LINE__, __FILE__, $sql);
}
if ($to_userdata['user_notify_pm'] && !empty($to_userdata['user_email']) && $to_userdata['user_active']) {
$script_name = preg_replace('/^\\/?(.*?)\\/?$/', "\\1", trim($board_config['script_path']));
$script_name = $script_name != '' ? $script_name . '/privmsg.' . $phpEx : 'privmsg.' . $phpEx;
$server_name = trim($board_config['server_name']);
$server_protocol = $board_config['cookie_secure'] ? 'https://' : 'http://';
$server_port = $board_config['server_port'] != 80 ? ':' . trim($board_config['server_port']) . '/' : '/';
include $phpbb_root_path . 'includes/emailer.' . $phpEx;
$emailer = new emailer($board_config['smtp_delivery']);
$emailer->from($board_config['board_email']);
$emailer->replyto($board_config['board_email']);
$emailer->use_template('privmsg_notify', $to_userdata['user_lang']);
$emailer->email_address($to_userdata['user_email']);
$emailer->set_subject($lang['Notification_subject']);
$emailer->assign_vars(array('USERNAME' => stripslashes($to_username), 'SENDER_USERNAME' => htmlspecialchars($userdata['username']), 'PM_SUBJECT' => $privmsg_subject, 'PM_MESSAGE' => $message_text, 'SITENAME' => $board_config['sitename'], 'EMAIL_SIG' => !empty($board_config['board_email_sig']) ? str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']) : '', 'U_INBOX' => $server_protocol . $server_name . $server_port . $script_name . '?folder=inbox'));
$emailer->send();
$emailer->reset();
}
}
/*
$template->assign_vars(array(
'META' => '<meta http-equiv="refresh" content="3;url=' . append_sid("privmsg.$phpEx?folder=inbox") . '">')
);
开发者ID:Nekrofage,项目名称:FJR,代码行数:30,代码来源:privmsg.php
示例5: emailer
$error_msg .= !empty($error_msg) ? '<br />' . $message : $message;
}
if (!$error) {
include "../includes/emailer.php";
//
// Let's do some checking to make sure that mass mail functions
// are working in win32 versions of php.
//
if (preg_match('/[c-z]:\\\\.*/i', getenv('PATH')) && !$board_config['smtp_delivery']) {
$ini_val = @phpversion() >= '4.0.0' ? 'ini_get' : 'get_cfg_var';
// We are running on windows, force delivery to use our smtp functions
// since php's are broken by default
$board_config['smtp_delivery'] = 1;
$board_config['smtp_host'] = @$ini_val('SMTP');
}
$emailer = new emailer($board_config['smtp_delivery']);
$emailer->from($board_config['board_email']);
$emailer->replyto($board_config['board_email']);
for ($i = 0; $i < count($bcc_list); $i++) {
$emailer->bcc($bcc_list[$i]);
}
$email_headers = 'X-AntiAbuse: Board servername - ' . $board_config['server_name'] . "\n";
$email_headers .= 'X-AntiAbuse: User_id - ' . $userdata['user_id'] . "\n";
$email_headers .= 'X-AntiAbuse: Username - ' . $userdata['username'] . "\n";
$email_headers .= 'X-AntiAbuse: User IP - ' . decode_ip($user_ip) . "\n";
$emailer->use_template('admin_send_email');
$emailer->email_address($board_config['board_email']);
$emailer->set_subject($subject);
$emailer->extra_headers($email_headers);
$emailer->assign_vars(array('SITENAME' => $board_config['sitename'], 'BOARD_EMAIL' => $board_config['board_email'], 'MESSAGE' => $message));
$emailer->send();
开发者ID:rotvulpix,项目名称:php-nuke,代码行数:31,代码来源:admin_mass_email.php
示例6: emailer
} else {
if ($board_config['require_activation'] == USER_ACTIVATION_SELF) {
$message = $lang['Account_inactive'];
$email_template = 'user_welcome_inactive';
} else {
if ($board_config['require_activation'] == USER_ACTIVATION_ADMIN) {
$message = $lang['Account_inactive_admin'];
$email_template = 'admin_welcome_inactive';
} else {
$message = $lang['Account_added'];
$email_template = 'user_welcome';
}
}
}
include "includes/emailer.php";
$emailer = new emailer($board_config['smtp_delivery']);
$emailer->from($board_config['board_email']);
$emailer->replyto($board_config['board_email']);
$emailer->use_template($email_template, stripslashes($user_lang));
$emailer->email_address($email);
$emailer->set_subject(sprintf($lang['Welcome_subject'], $board_config['sitename']));
if ($coppa) {
$emailer->assign_vars(array('SITENAME' => $board_config['sitename'], 'WELCOME_MSG' => sprintf($lang['Welcome_subject'], $board_config['sitename']), 'USERNAME' => preg_replace($unhtml_specialchars_match, $unhtml_specialchars_replace, substr(str_replace("\\'", "'", $username), 0, 25)), 'PASSWORD' => $password_confirm, 'EMAIL_SIG' => str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']), 'FAX_INFO' => $board_config['coppa_fax'], 'MAIL_INFO' => $board_config['coppa_mail'], 'EMAIL_ADDRESS' => $email, 'ICQ' => $icq, 'AIM' => $aim, 'YIM' => $yim, 'MSN' => $msn, 'WEB_SITE' => $website, 'FROM' => $location, 'OCC' => $occupation, 'INTERESTS' => $interests, 'SITENAME' => $board_config['sitename']));
} else {
$emailer->assign_vars(array('SITENAME' => $board_config['sitename'], 'WELCOME_MSG' => sprintf($lang['Welcome_subject'], $board_config['sitename']), 'USERNAME' => preg_replace($unhtml_specialchars_match, $unhtml_specialchars_replace, substr(str_replace("\\'", "'", $username), 0, 25)), 'PASSWORD' => $password_confirm, 'EMAIL_SIG' => str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']), 'U_ACTIVATE' => $server_url . '&mode=activate&' . POST_USERS_URL . '=' . $user_id . '&act_key=' . $user_actkey));
}
$emailer->send();
$emailer->reset();
if ($board_config['require_activation'] == USER_ACTIVATION_ADMIN) {
$sql = "SELECT user_email, user_lang\n FROM " . USERS_TABLE . "\n WHERE user_level = " . ADMIN;
if (!($result = $db->sql_query($sql))) {
开发者ID:BackupTheBerlios,项目名称:domsmod-svn,代码行数:31,代码来源:usercp_register.php
示例7: DB
} else {
if (!empty($_POST['deny']) || !empty($_POST['remove'])) {
DB()->query("\n\t\t\t\t\t\tDELETE FROM " . BB_USER_GROUP . "\n\t\t\t\t\t\tWHERE user_id IN({$sql_in})\n\t\t\t\t\t\t\tAND group_id = {$group_id}\n\t\t\t\t\t");
if (!empty($_POST['remove'])) {
update_user_level($sql_in);
}
}
}
// Email users when they are approved
if (!empty($_POST['approve']) && $bb_cfg['group_send_email']) {
$sql_select = "SELECT username, user_email, user_lang\n\t\t\t\t\t\tFROM " . BB_USERS . "\n\t\t\t\t\t\tWHERE user_id IN({$sql_in})";
if (!($result = DB()->sql_query($sql_select))) {
bb_die('Could not get user email information');
}
require CLASS_DIR . 'emailer.php';
$emailer = new emailer($bb_cfg['smtp_delivery']);
$emailer->from($bb_cfg['sitename'] . " <{$bb_cfg['board_email']}>");
foreach (DB()->fetch_rowset($sql_select) as $row) {
$emailer->use_template('group_approved', $row['user_lang']);
$emailer->email_address($row['username'] . " <{$row['user_email']}>");
}
$emailer->assign_vars(array('SITENAME' => $bb_cfg['sitename'], 'GROUP_NAME' => $group_info['group_name'], 'U_GROUP' => make_url(GROUP_URL . $group_id)));
$emailer->send();
$emailer->reset();
}
}
}
}
// END approve or deny
// Get moderator details for this group
$group_moderator = DB()->fetch_row("\n\t\tSELECT *\n\t\tFROM " . BB_USERS . "\n\t\tWHERE user_id = " . $group_info['group_moderator'] . "\n\t");
开发者ID:ErR163,项目名称:torrentpier,代码行数:31,代码来源:group.php
示例8: emailer
{
$msg .= '</table>' . $line_break;
}
if ($msg_count == 0)
{
$msg .= $parastart . $lang['digest_no_new_messages'] . $paraend;
}
// Send the email if there are messages or if user selected to send email anyhow
if (($msg_count > 0) || ($row['send_on_no_messages'] == 'YES'))
{
if (!is_object($emailer))
{
$emailer = new emailer();
}
$emailer->use_template('mail_digests', $row['user_lang']);
if ($html)
{
// Apply a style sheet if requested for HTML digest. If no style sheet is wanted then the
// link tag pointing to the style sheet is not displayed. A custom style sheet gets first priority.
/*
if ($link_tag_unset)
{
$stylesheet = '';
if (DIGEST_USE_CUSTOM_STYLESHEET)
{
$stylesheet = DIGEST_CUSTOM_STYLESHEET_PATH;
}
开发者ID:ALTUN69,项目名称:icy_phoenix,代码行数:31,代码来源:mail_digests.php
示例9: home
public function home()
{
global $core, $user;
$tree = $this->valid_tree();
$v = $this->__(_array_keys(w('is_comment is_form'), 0));
// Form posting enabled and form submitted
if ($v['is_form'] && _button()) {
if (!is_ghost()) {
_fatal(405);
}
if (!$tree['tree_form']) {
_fatal();
}
$sql_fields = 'SELECT form_alias, form_required, form_legend, form_regex,
FROM _form_fields
WHERE form_tree = ?
ORDER BY form_order';
if (!($form = _rowset(sql_filter($sql_fields, $tree['tree_id']), 'form_alias'))) {
$form = _rowset(sql_filter($sql_fields, 0), 'form_alias');
}
$form['secure'] = array('form_required' => 1, 'form_regex' => '^([a-zA-Z]+)$', 'form_alias' => 'secure', 'form_type' => 'text', 'form_legend' => _lang('XCF_LEGEND'));
foreach ($form as $row) {
$v = array_merge($v, $this->__(array($row['form_alias'])));
if (!f($v[$row['form_alias']])) {
if ($row['form_required']) {
$this->_error(sprintf(_lang('E_COMMENT_FIELD_EMPTY'), $row['form_legend']), false);
}
continue;
}
if (f($row['form_regex']) && !preg_match('#' . $row['form_regex'] . '#is', $v[$row['form_alias']])) {
$this->_error(sprintf(_lang('E_COMMENT_FIELD_BAD'), $row['form_legend']), false);
if ($row['form_alias'] == 'secure') {
$v[$row['form_alias']] = '';
}
}
}
require_once XFS . 'core/xcf.php';
$xcf = new captcha();
if ($xcf->check($v['secure']) === false) {
$v['secure'] = '';
$this->_error('#E_COMMENT_INVALID_CAPTCHA');
}
unset($xcf);
require_once XFS . 'core/emailer.php';
$emailer = new emailer();
$emailer->set_decode(true);
$emailer->format('plain');
$emailer->from($v['address']);
$emailer->set_subject(_rm_acute($v['subject']));
$emailer->use_template('contact_email');
if (f($core->v('default_email'))) {
$tree['tree_form_email'] .= (f($tree['tree_form_email']) ? ';' : '') . $core->v('default_email');
}
$form_addresses = array_map('trim', array_unique(explode(';', $tree['tree_form_email'])));
foreach ($form_addresses as $i => $address) {
$row_f = !$i ? 'email_address' : 'cc';
$emailer->{$row_f}($address);
}
unset($v['secure']);
$content = w();
foreach ($form as $row) {
if (!f($v[$row['form_alias']])) {
continue;
}
$content[] = $row['form_legend'] . ":\n" . $v[$row['form_alias']];
}
$emailer->assign_vars(array('CONTENT' => implode("\n\n", $content), 'FORM_ARTICLE' => $tree['tree_subject']));
$emailer->send();
$emailer->reset();
$response = array('lang' => _lang('FORM_SUCCESS'));
$this->e(json_encode($response));
}
// Comment posting enabled and form submitted.
if ($v['is_comment'] && _button()) {
if (!$tree['tree_allow_comments']) {
_fatal();
}
$cv = $this->__(w('comment_username comment_address comment_website comment_message comment_security'));
$comment_time = time();
if (!$user->v('is_member')) {
foreach ($cv as $cv_k => $cv_v) {
if (!f($cv_v)) {
$this->error('E_COMMENT_FILL_FIELDS');
break;
}
}
if (!$this->errors()) {
$sql = 'SELECT comment_time
FROM _comments
WHERE comment_ip = ?
AND comment_status = 0';
if ($row_flood = _fieldrow(sql_filter($sql, $user->ip))) {
if ($comment_time - $row_flood['comment_time'] < 30) {
$this->error('E_COMMENT_FLOOD_TIME');
}
}
}
// CAPTCHA verification
require_once XFS . 'core/xcf.php';
$xcf = new captcha();
//.........这里部分代码省略.........
开发者ID:nopticon,项目名称:noptc,代码行数:101,代码来源:_tree.php
示例10: unset
unset($user_id);
$i++;
}
$template->set_filenames(array('body' => ADM_TPL . 'userlist_group.tpl'));
$template->assign_vars(array('MESSAGE_TITLE' => $lang['Add_group'], 'MESSAGE_TEXT' => $lang['Add_group_explain'], 'L_GROUP' => $lang['Group'], 'S_GROUP_VARIABLE' => POST_GROUPS_URL, 'S_ACTION' => append_sid(IP_ROOT_PATH . ADM . '/admin_userlist.' . PHP_EXT . '?mode=group'), 'L_GO' => $lang['Go'], 'L_CANCEL' => $lang['Cancel'], 'L_SELECT' => $lang['Select_one'], 'S_HIDDEN_FIELDS' => $hidden_fields));
$sql = "SELECT group_id, group_name FROM " . GROUPS_TABLE . "\n\t\t\t\tWHERE group_single_user <> " . TRUE . "\n\t\t\t\tORDER BY group_name";
$result = $db->sql_query($sql);
// loop through groups
while ($row = $db->sql_fetchrow($result)) {
$template->assign_block_vars('grouprow', array('GROUP_NAME' => $row['group_name'], 'GROUP_ID' => $row['group_id']));
}
} else {
// add the users to the selected group
$group_id = intval($_POST[POST_GROUPS_URL]);
include IP_ROOT_PATH . 'includes/emailer.' . PHP_EXT;
$emailer = new emailer();
$i = 0;
while ($i < sizeof($user_ids)) {
$user_id = intval($user_ids[$i]);
// For security, get the ID of the group moderator.
$sql = "SELECT g.group_moderator, g.group_type, aa.auth_mod\n\t\t\t\t\tFROM (" . GROUPS_TABLE . " g\n\t\t\t\t\tLEFT JOIN " . AUTH_ACCESS_TABLE . " aa ON aa.group_id = g.group_id)\n\t\t\t\t\tWHERE g.group_id = {$group_id}";
$result = $db->sql_query($sql);
$group_info = $db->sql_fetchrow($result);
$sql = "SELECT user_id, user_email, user_lang, user_level\n\t\t\t\t\tFROM " . USERS_TABLE . "\n\t\t\t\t\tWHERE user_id = {$user_id}";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$sql = "SELECT ug.user_id, u.user_level\n\t\t\t\t\tFROM " . USER_GROUP_TABLE . " ug, " . USERS_TABLE . " u\n\t\t\t\t\tWHERE u.user_id = " . $row['user_id'] . "\n\t\t\t\t\t\tAND ug.user_id = u.user_id\n\t\t\t\t\t\tAND ug.group_id = {$group_id}";
$result = $db->sql_query($sql);
if (!$db->sql_fetchrow($result)) {
$sql = "INSERT INTO " . USER_GROUP_TABLE . " (user_id, group_id, user_pending)\n\t\t\t\t\t\tVALUES (" . $row['user_id'] . ", {$group_id}, 0)";
$db->sql_query($sql);
开发者ID:ALTUN69,项目名称:icy_phoenix,代码行数:31,代码来源:admin_userlist.php
示例11: notifyUser
function notifyUser($user_id, $notify_type, $offer_id, $offer_title)
{
global $db, $lang, $auction_config_data, $board_config;
if ($auction_config_data['auction_end_notify_email']) {
// BEGIN EMAIL-NOTIFY
$sql = "SELECT user_email,\r\n username\r\n FROM " . USERS_TABLE . "\r\n WHERE user_id=" . $user_id . "";
if (!($result = $db->sql_query($sql))) {
}
// if
$user = $db->sql_fetchrow($result);
$server_name = trim($board_config['server_name']);
$server_protocol = $board_config['cookie_secure'] ? 'https://' : 'http://';
$server_port = $board_config['server_port'] != 80 ? ':' . trim($board_config['server_port']) . '/' : '/';
$username = $user['username'];
$email = $user['user_email'];
$emailer = new emailer($board_config['smtp_delivery']);
$emailer->from($board_config['board_email']);
$emailer->replyto($board_config['board_email']);
if ($notify_type == 'WON') {
$emailer->use_template('auction_won', stripslashes($user_lang));
$emailer->set_subject($lang['auction_won']);
$emailer->assign_vars(array('AUCTION_WON' => $lang['auction_offer_won'], 'AUCTION_SITENAME' => $board_config['sitename'], 'AUCTION_OFFER' => prepare_message(addslashes(unprepare_message(htmlspecialchars(trim(stripslashes($offer_title))))), $board_config['allow_html'], $board_config['allow_bbcode'], $board_config['allow_smilies'], 0), 'U_AUCTION_OFFER' => $server_protocol . $server_name . $board_config['script_path'] . 'auction_offer_view.php?ao=' . $offer_id, 'AUCTION_EMAIL_SIG' => !empty($board_config['board_email_sig']) ? str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']) : ''));
}
if ($notify_type == 'SOLD') {
$emailer->use_template('auction_sold', stripslashes($user_lang));
$emailer->set_subject($lang['auction_sold']);
$emailer->assign_vars(array('AUCTION_SOLD' => $lang['auction_offer_sold'], 'AUCTION_SITENAME' => $board_config['sitename'], 'AUCTION_OFFER' => prepare_message(addslashes(unprepare_message(htmlspecialchars(trim(stripslashes($offer_title))))), $board_config['allow_html'], $board_config['allow_bbcode'], $board_config['allow_smilies'], 0), 'U_AUCTION_OFFER' => $server_protocol . $server_name . $board_config['script_path'] . 'auction_offer_view.php?ao=' . $offer_id, 'AUCTION_EMAIL_SIG' => !empty($board_config['board_email_sig']) ? str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']) : ''));
}
if ($notify_type == 'NOT_SOLD') {
$emailer->use_template('auction_not_sold', stripslashes($user_lang));
$emailer->set_subject($lang['auction_not_sold']);
$emailer->assign_vars(array('AUCTION_NOT_SOLD' => $lang['auction_offer_not_sold'], 'AUCTION_SITENAME' => $board_config['sitename'], 'AUCTION_OFFER' => prepare_message(addslashes(unprepare_message(htmlspecialchars(trim(stripslashes($offer_title))))), $board_config['allow_html'], $board_config['allow_bbcode'], $board_config['allow_smilies'], 0), 'U_AUCTION_OFFER' => $server_protocol . $server_name . $board_config['script_path'] . 'auction_offer_view.php?ao=' . $offer_id, 'AUCTION_EMAIL_SIG' => !empty($board_config['board_email_sig']) ? str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']) : ''));
}
$emailer->email_address($email);
// Try to send email...
$emailer->send();
// $emailer->reset();
}
// END EMAIL-NOTIFY
if ($auction_config_data['auction_end_notify_pm']) {
// BEGIN PM-NOTIFY ON OUTBID
if ($notify_type == 'WON') {
$pm_subject = $lang['auction_won'];
$pm_text = $lang['auction_won_text'];
}
if ($notify_type == 'SOLD') {
$pm_subject = $lang['auction_sold'];
$pm_text = $lang['auction_sold_text'];
}
if ($notify_type == 'NOT_SOLD') {
$pm_subject = $lang['auction_not_sold'];
$pm_text = $lang['auction_not_sold_text'];
}
$privmsgs_date = date("U");
$sql = "INSERT INTO " . PRIVMSGS_TABLE . "\r\n (privmsgs_type,\r\n privmsgs_subject,\r\n privmsgs_from_userid,\r\n privmsgs_to_userid,\r\n privmsgs_date,\r\n privmsgs_enable_html,\r\n privmsgs_enable_bbcode,\r\n privmsgs_enable_smilies,\r\n privmsgs_attach_sig)\r\n VALUES ('0',\r\n '" . str_replace("\\'", "''", addslashes(sprintf($pm_subject, $board_config['sitename']))) . "',\r\n '2',\r\n " . $user_id . ",\r\n " . $privmsgs_date . ",\r\n '0',\r\n '1',\r\n '1',\r\n '0')";
if (!$db->sql_query($sql)) {
}
// if
$outbid_sent_id = $db->sql_nextid();
$sql = "INSERT INTO " . PRIVMSGS_TEXT_TABLE . "\r\n (privmsgs_text_id,\r\n privmsgs_text)\r\n VALUES (" . $outbid_sent_id . ",\r\n '" . str_replace("\\'", "''", $pm_text . "</br></br><a href=\"auction_offer_view.php?ao=" . $offer_id . "\">" . prepare_message(addslashes(unprepare_message(htmlspecialchars(trim(stripslashes($offer_title))))), $board_config['allow_html'], $board_config['allow_bbcode'], $board_config['allow_smilies'], 0) . "</a></br>" . $board_config['board_email_sig']) . "')";
if (!$db->sql_query($sql)) {
}
// if
$sql = "UPDATE " . USERS_TABLE . "\r\n SET user_new_privmsg=user_new_privmsg+1\r\n WHERE user_id=" . $user_id;
if (!$db->sql_query($sql)) {
}
// if
}
// End pm-notification
}
开发者ID:wrtcoder,项目名称:mini_isp,代码行数:70,代码来源:auction_cron.php
示例12: myquery
$check = myquery("SELECT user_id FROM view_active_users WHERE user_id={$userid}");
if ($check != false and mysql_num_rows($check) > 0) {
$chat_mess = '<br><center>Для тебя пришло новое личное сообщение (тема: <font color=#0000FF>' . $theme . '</font>) от игрока <font size=2 color=#FF0000><b><u>' . $name . '</u></b></font> ! </center><br>';
$say = myquery("insert into game_log (town,fromm,too,message,date,pm_id,ptype) values ('0',0,'{$userid}','" . iconv("Windows-1251", "UTF-8//IGNORE", $chat_mess) . "','" . time() . "'," . $id_pm . ",1)");
}
echo 'Сообщение игроку <b><font color=red>' . $komu[$i] . '</font></b> отправлено<br>';
list($send_pm_email, $email_komu, $send_ICQ, $ICQnumber, $ICQ_pm) = mysql_fetch_array(myquery("SELECT send_pm,email,send_ICQ,ICQnumber,ICQ_pm FROM game_users_data WHERE user_id={$userid}"));
if ($send_pm_email == 1) {
include "{$dirclass}/class_email.php";
$otkogo = $char['name'];
$message = "[http://" . domain_name . "] Средиземье :: Эпоха сражений. Письмо от {$otkogo}\n\n";
$message .= "Тема: {$theme}\n";
$message .= "Дата: " . date("H-i d-m-Y") . "\n";
$message .= "Содержание: \n{$post}\n";
$subject = 'Средиземье :: Эпоха сражений. Письмо от ' . $otkogo . '.';
$e_mail = new emailer();
$e_mail->email_init();
$e_mail->to = $email_komu;
$e_mail->subject = $subject;
$e_mail->message = $message;
$e_mail->send_mail();
}
} else {
echo 'Игрока <b><font color=red>' . $komu[$i] . '</font></b> не существует!<br>';
}
}
}
echo '<meta http-equiv="refresh" content="3;url=act.php?func=pm&new">';
} else {
//Пишем письмо
if (!isset($_GET['komu'])) {
开发者ID:themiddleearth,项目名称:RPG.SU,代码行数:31,代码来源:pm.php
示例13: time
if ($mode != 'edit') {
//
// Add to the users new pm counter
//
$sql = "UPDATE " . USERS_TABLE . "\r\n\t\t\t\tSET user_new_privmsg = user_new_privmsg + 1, user_last_privmsg = " . time() . "\r\n\t\t\t\tWHERE user_id = " . $to_userdata['user_id'];
if (!($status = DB()->sql_query($sql))) {
message_die(GENERAL_ERROR, 'Could not update private message new/read status for user', '', __LINE__, __FILE__, $sql);
}
if ($to_userdata['user_notify_pm'] && !empty($to_userdata['user_email']) && $to_userdata['user_active']) {
$script_name = preg_replace('/^\\/?(.*?)\\/?$/', "\\1", trim($ft_cfg['script_path']));
$script_name = $script_name != '' ? $script_name . '/privmsg.php' : 'privmsg.php';
$server_name = trim($ft_cfg['server_name']);
$server_protocol = $ft_cfg['cookie_secure'] ? 'https://' : 'http://';
$server_port = $ft_cfg['server_port'] != 80 ? ':' . trim($ft_cfg['server_port']) . '/' : '/';
require FT_ROOT . 'includes/emailer.php';
$emailer = new emailer($ft_cfg['smtp_delivery']);
$emailer->from($ft_cfg['board_email']);
$emailer->replyto($ft_cfg['board_email']);
$emailer->use_template('privmsg_notify', $to_userdata['user_lang']);
$emailer->email_address($to_userdata['user_email']);
$emailer->set_subject($lang['Notification_subject']);
$emailer->assign_vars(array('USERNAME' => $to_username, 'SITENAME' => $ft_cfg['sitename'], 'EMAIL_SIG' => !empty($ft_cfg['board_email_sig']) ? str_replace('<br />', "\n", "-- \n" . $ft_cfg['board_email_sig']) : '', 'U_INBOX' => $server_protocol . $server_name . $server_port . $script_name . '?folder=inbox&mode=read&p=' . $privmsg_sent_id));
$emailer->send();
$emailer->reset();
}
}
$template->assign_vars(array('META' => '<meta http-equiv="refresh" content="10;url=' . append_sid("privmsg.php?folder=inbox") . '">'));
// orig $msg = $lang['Message_sent'] . '<br /><br />' . sprintf($lang['Click_return_inbox'], '<a href="' . append_sid("privmsg.$phpEx?folder=inbox") . '">', '</a> ') . '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="' . append_sid("index.$phpEx") . '">', '</a>');
$msg = $lang['Message_sent'] . '<br /><br />' . sprintf($lang['Click_return_inbox'], '<a href="' . append_sid("privmsg.php?folder=inbox") . '">', '</a> ') . sprintf($lang['Click_return_sentbox'], '<a href="' . append_sid("privmsg.{$phpEx}?folder=sentbox") . '">', '</a> ') . sprintf($lang['Click_return_outbox'], '<a href="' . append_sid("privmsg.php?folder=outbox") . '">', '</a> ') . sprintf($lang['Click_return_savebox'], '<a href="' . append_sid("privmsg.php?folder=savebox") . '">', '</a> ') . '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="' . append_sid("index.php") . '">', '</a>');
message_die(GENERAL_MESSAGE, $msg);
} else {
开发者ID:forummaks,项目名称:forum_maks,代码行数:31,代码来源:privmsg.php
示例14: redirect
if (!$userdata['session_logged_in']) {
redirect(append_sid('login.' . $phpEx . '?redirect=profile.' . $phpEx . '&mode=activate&' . POST_USERS_URL . '=' . $row['user_id'] . '&act_key=' . trim($HTTP_GET_VARS['act_key'])));
} else {
if ($userdata['user_level'] != ADMIN) {
message_die(GENERAL_MESSAGE, $lang['Not_Authorised']);
}
}
}
$sql_update_pass = $row['user_newpasswd'] != '' ? ", user_password = '" . str_replace("\\'", "''", $row['user_newpasswd']) . "', user_newpasswd = ''" : '';
$sql = "UPDATE " . USERS_TABLE . "\n\t\t\tSET user_active = 1, user_actkey = ''" . $sql_update_pass . " \n\t\t\tWHERE user_id = " . $row['user_id'];
if (!($result = $db->sql_query($sql))) {
message_die(GENERAL_ERROR, 'Could not update users table', '', __LINE__, __FILE__, $sql_update);
}
if (intval($board_config['require_activation']) == USER_ACTIVATION_ADMIN && $sql_update_pass == '') {
include $phpbb_root_path . 'includes/emailer.' . $phpEx;
$emailer = new emailer($board_config['smtp_delivery']);
$emailer->from($board_config['board_email']);
$emailer->replyto($board_config['board_email']);
$emailer->use_template('admin_welcome_activated', $row['user_lang']);
$emailer->email_address($row['user_email']);
$emailer->set_subject($lang['Account_activated_subject']);
$emailer->assign_vars(array('SITENAME' => $board_config['sitename'], 'USERNAME' => $row['username'], 'PASSWORD' => $password_confirm, 'EMAIL_SIG' => !empty($board_config['board_email_sig']) ? str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']) : ''));
$emailer->send();
$emailer->reset();
$template->assign_vars(array('META' => '<meta http-equiv="refresh" content="10;url=' . append_sid("index.{$phpEx}") . '">'));
message_die(GENERAL_MESSAGE, $lang['Account_active_admin']);
} else {
$template->assign_vars(array('META' => '<meta http-equiv="refresh" content="10;url=' . append_sid("index.{$phpEx}") . '">'));
$message = $sql_update_pass == '' ? $lang['Account_active'] : $lang['Password_activated'];
message_die(GENERAL_MESSAGE, $message);
}
开发者ID:bitweaver,项目名称:phpbb,代码行数:31,代码来源:usercp_activate.php
示例15: create_server_url
$e_temp = 'ban_warning';
// $e_subj = $lang['Ban_warning'];
}
} else {
$no_error = false;
}
if ($no_error) {
$sql = 'SELECT username, user_warnings, user_email, user_lang FROM ' . USERS_TABLE . ' WHERE user_id = "' . $poster_id . '"';
$result = $db->sql_query($sql);
$warning_data = $db->sql_fetchrow($result);
if (!empty($warning_data['user_email'])) {
$server_url = create_server_url();
$viewtopic_server_url = $server_url . CMS_PAGE_VIEWTOPIC;
$from_email = $user->data['user_email'] && $user->data['user_allow_viewemail'] ? $user->data['user_email'] : $config['board_email'];
include_once IP_ROOT_PATH . 'includes/emailer.' . PHP_EXT;
$emailer = new emailer();
$emailer->headers('X-AntiAbuse: Board servername - ' . trim($config['server_name']));
$emailer->headers('X-AntiAbuse: User_id - ' . $user->data['user_id']);
$emailer->headers('X-AntiAbuse: Username - ' . $user->data['username']);
$emailer->headers('X-AntiAbuse: User IP - ' . $user_ip);
$emailer->use_template($e_temp, $warning_data['user_lang']);
$emailer->to($warning_data['user_email']);
$emailer->from($from_email);
$emailer->replyto($from_email);
//$emailer->set_subject($e_subj);
$email_sig = create_signature($config['board_email_sig']);
$emailer->assign_vars(array('SITENAME' => $config['sitename'], 'WARNINGS' => $warning_data['user_warnings'], 'TOTAL_WARN' => $config['max_user_bancard'], 'POST_URL' => $viewtopic_server_url . '?' . $forum_id_append . $topic_id_append . POST_POST_URL . '=' . $post_id . '#p' . $post_id, 'EMAIL_SIG' => $email_sig, 'WARNER' => $user->data['username'], 'BLOCK_TIME' => $block_time, 'WARNED_POSTER' => $warning_data['username']));
$emailer->send();
$emailer->reset();
} else {
$message .= '<br /><br />' . $lang['user_no_email'];
开发者ID:ALTUN69,项目名称:icy_phoenix,代码行数:31,代码来源:card.php
示例16: send_notifications
/**
* Send user notifications on new topic or reply
*/
function send_notifications($mode, &$post_data, &$topic_title, &$forum_id, &$topic_id, &$post_id, &$notify_user)
{
global $config, $lang, $db, $user;
global $bbcode;
$current_time = time();
include_once IP_ROOT_PATH . 'includes/bbcode.' . PHP_EXT;
if ($mode != 'delete') {
if ($mode == 'reply') {
// Look for users with notification enabled
$sql = "SELECT u.user_id, u.user_email, u.user_lang, u.username, f.forum_name\n\t\t\t\t\tFROM " . USERS_TABLE . " u, " . TOPICS_WATCH_TABLE . " tw, " . FORUMS_TABLE . " f\n\t\t\t\t\tWHERE tw.topic_id = " . $topic_id . "\n\t\t\t\t\t\tAND " . $db->sql_in_set('tw.user_id', $this->exclude_users, true, true) . "\n\t\t\t\t\t\tAND tw.notify_status = " . TOPIC_WATCH_UN_NOTIFIED . "\n\t\t\t\t\t\tAND f.forum_id = " . $forum_id . "\n\t\t\t\t\t\tAND u.user_id = tw.user_id\n\t\t\t\t\t\tAND u.user_active = 1";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result)) {
if (!in_array($row['user_id'], $this->notify_userid)) {
if ($row['user_email'] != '') {
$this->notify_userdata[] = array('username' => $row['username'], 'user_email' => $row['user_email'], 'user_lang' => $row['user_lang']);
}
$this->notify_userid[] = $row['user_id'];
$this->notify_forum_name = $row['forum_name'];
}
}
$db->sql_freeresult($result);
}
if ($mode == 'newtopic' || $mode == 'reply') {
// Reply or New Topic forum notification
$sql = "SELECT u.user_id, u.user_email, u.user_lang, f.forum_name\n\t\t\t\t\tFROM " . USERS_TABLE . " u, " . FORUMS_WATCH_TABLE . " fw, " . FORUMS_TABLE . " f\n\t\t\t\t\tWHERE fw.forum_id = " . $forum_id . "\n\t\t\t\t\t\tAND " . $db->sql_in_set('fw.user_id', array_merge($this->exclude_users, $this->notify_userid), true, true) . "\n\t\t\t\t\t\tAND fw.notify_status = " . TOPIC_WATCH_UN_NOTIFIED . "\n\t\t\t\t\t\tAND f.forum_id = " . $forum_id . "\n\t\t\t\t\t\tAND f.forum_notify = '1'\n\t\t\t\t\t\tAND u.user_id = fw.user_id\n\t\t\t\t\t\tAND u.user_active = 1";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result)) {
if (!in_array($row['user_id'], $this->notify_userid)) {
if ($row['user_email'] != '') {
$this->notify_userdata[] = array('username' => $row['username'], 'user_email' => $row['user_email'], 'user_lang' => $row['user_lang']);
}
$this->notify_userid[] = $row['user_id'];
$this->notify_forum_name = $row['forum_name'];
}
}
$db->sql_freeresult($result);
}
// Users array built, so start sending notifications
if (sizeof($this->notify_userdata) > 0) {
include_once IP_ROOT_PATH . 'includes/emailer.' . PHP_EXT;
$emailer = new emailer();
$server_url
|
请发表评论