本文整理汇总了PHP中es_cls_dbquery::es_view_subscriber_search方法的典型用法代码示例。如果您正苦于以下问题:PHP es_cls_dbquery::es_view_subscriber_search方法的具体用法?PHP es_cls_dbquery::es_view_subscriber_search怎么用?PHP es_cls_dbquery::es_view_subscriber_search使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类es_cls_dbquery
的用法示例。
在下文中一共展示了es_cls_dbquery::es_view_subscriber_search方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: isset
$did = isset($_GET['did']) ? $_GET['did'] : '0';
es_cls_security::es_check_number($did);
// First check if ID exist with requested ID
$result = es_cls_dbquery::es_view_subscriber_count($did);
if ($result != '1') {
?>
<div class="error fade"><p><strong><?php
_e('Oops, selected details doesnt exist.', 'email-subscribers');
?>
</strong></p></div><?php
} else {
$es_errors = array();
$es_success = '';
$es_error_found = FALSE;
$data = array();
$data = es_cls_dbquery::es_view_subscriber_search("", $did);
// Preset the form fields
$form = array('es_email_name' => stripslashes($data[0]['es_email_name']), 'es_email_mail' => $data[0]['es_email_mail'], 'es_email_status' => $data[0]['es_email_status'], 'es_email_group' => $data[0]['es_email_group'], 'es_email_id' => $data[0]['es_email_id']);
}
// Form submitted, check the data
if (isset($_POST['es_form_submit']) && $_POST['es_form_submit'] == 'yes') {
// Just security thingy that wordpress offers us
check_admin_referer('es_form_edit');
$form['es_email_status'] = isset($_POST['es_email_status']) ? $_POST['es_email_status'] : '';
$form['es_email_name'] = isset($_POST['es_email_name']) ? $_POST['es_email_name'] : '';
$form['es_email_mail'] = isset($_POST['es_email_mail']) ? $_POST['es_email_mail'] : '';
if ($form['es_email_mail'] == '') {
$es_errors[] = __('Please enter subscriber email address.', 'email-subscribers');
$es_error_found = TRUE;
}
$form['es_email_group'] = isset($_POST['es_email_group']) ? $_POST['es_email_group'] : '';
示例2: es_prepare_welcome
public static function es_prepare_welcome($id = 0)
{
$subscribers = array();
$subscribers = es_cls_dbquery::es_view_subscriber_search("", $id);
es_cls_sendmail::es_sendmail("welcome", $template = 0, $subscribers, $action = "welcome", 0);
}
示例3: es_prepare_send_cronmail
public static function es_prepare_send_cronmail($cronmailqueue = array(), $crondeliveryqueue = array())
{
$subscriber = array();
$htmlmail = false;
$wpmail = false;
$type = $cronmailqueue[0]['es_sent_source'];
$content = $cronmailqueue[0]['es_sent_preview'];
$subject = $cronmailqueue[0]['es_sent_subject'];
$cacheid = es_cls_common::es_generate_guid(100);
$replacefrom = array("<ul><br />", "</ul><br />", "<li><br />", "</li><br />", "<ol><br />", "</ol><br />", "</h2><br />", "</h1><br />");
$replaceto = array("<ul>", "</ul>", "<li>", "</li>", "<ol>", "</ol>", "</h2>", "</h1>");
$count = 1;
$settings = es_cls_settings::es_setting_select(1);
if (trim($settings['es_c_fromname']) == "" || trim($settings['es_c_fromemail']) == '') {
get_currentuserinfo();
$sender_name = $user_login;
$sender_email = $user_email;
} else {
$sender_name = $settings['es_c_fromname'];
$sender_email = $settings['es_c_fromemail'];
}
if ($settings['es_c_mailtype'] == "WP HTML MAIL" || $settings['es_c_mailtype'] == "PHP HTML MAIL") {
$htmlmail = true;
}
if ($settings['es_c_mailtype'] == "WP HTML MAIL" || $settings['es_c_mailtype'] == "WP PLAINTEXT MAIL") {
$wpmail = true;
}
$headers = "From: \"{$sender_name}\" <{$sender_email}>\n";
$headers .= "Return-Path: <" . $sender_email . ">\n";
$headers .= "Reply-To: \"" . $sender_name . "\" <" . $sender_email . ">\n";
$headers .= "X-Mailer: PHP" . phpversion() . "\n";
if ($htmlmail) {
$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-Type: " . get_bloginfo('html_type') . "; charset=\"" . get_bloginfo('charset') . "\"\n";
$headers .= "Content-type: text/html\r\n";
} else {
$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-Type: text/plain; charset=\"" . get_bloginfo('charset') . "\"\n";
}
$url = home_url('/');
$viewstatus = '<img src="' . $url . '?es=viewstatus&delvid=###DELVIID###" width="1" height="1" />';
foreach ($crondeliveryqueue as $crondelivery) {
$es_email_id = $crondelivery['es_deliver_emailid'];
$es_deliver_id = $crondelivery['es_deliver_id'];
$subscriber = es_cls_dbquery::es_view_subscriber_search("", $es_email_id);
if (count($subscriber) > 0) {
$unsublink = $settings['es_c_unsublink'];
$unsublink = str_replace("###DBID###", $subscriber[0]["es_email_id"], $unsublink);
$unsublink = str_replace("###EMAIL###", $subscriber[0]["es_email_mail"], $unsublink);
$unsublink = str_replace("###GUID###", $subscriber[0]["es_email_guid"], $unsublink);
$unsublink = $unsublink . "&cache=" . $cacheid;
$unsubtext = stripslashes($settings['es_c_unsubtext']);
$unsubtext = str_replace("###LINK###", $unsublink, $unsubtext);
if ($settings['es_c_mailtype'] == "WP HTML MAIL" || $settings['es_c_mailtype'] == "PHP HTML MAIL") {
$unsubtext = '<br><br>' . $unsubtext;
} else {
$unsubtext = '\\n\\n' . $unsubtext;
}
$viewstslink = str_replace("###DELVIID###", $es_deliver_id, $viewstatus);
$content_send = str_replace("###EMAIL###", $subscriber[0]["es_email_mail"], $content);
$content_send = str_replace("###NAME###", $subscriber[0]["es_email_name"], $content_send);
if ($settings['es_c_mailtype'] == "WP HTML MAIL" || $settings['es_c_mailtype'] == "PHP HTML MAIL") {
$content_send = nl2br($content_send);
$content_send = str_replace($replacefrom, $replaceto, $content_send);
} else {
$content_send = str_replace("<br />", "\r\n", $content_send);
$content_send = str_replace("<br>", "\r\n", $content_send);
}
if ($wpmail) {
wp_mail($subscriber[0]["es_email_mail"], $subject, $content_send . $unsubtext . $viewstslink, $headers);
} else {
mail($subscriber[0]["es_email_mail"], $subject, $content_send . $unsubtext . $viewstslink, $headers);
}
es_cls_delivery::es_delivery_ups_cron($es_deliver_id);
$count = $count + 1;
}
if ($count % 25 == 0) {
sleep(60);
//sleep 60 seconds for every 25 emails.
}
}
$es_cron_adminmail = get_option('es_cron_adminmail');
if ($es_cron_adminmail != "") {
$adminmail = $settings['es_c_adminemail'];
$crondate = date('Y-m-d G:i:s');
$count = $count - 1;
$es_cron_adminmail = str_replace("###COUNT###", $count, $es_cron_adminmail);
$es_cron_adminmail = str_replace("###DATE###", $crondate, $es_cron_adminmail);
$es_cron_adminmail = str_replace("###SUBJECT###", $subject, $es_cron_adminmail);
if ($htmlmail) {
$es_cron_adminmail = nl2br($es_cron_adminmail);
} else {
$es_cron_adminmail = str_replace("<br />", "\r\n", $es_cron_adminmail);
$es_cron_adminmail = str_replace("<br>", "\r\n", $es_cron_adminmail);
}
if ($wpmail) {
wp_mail($adminmail, "Cron URL has been triggered successfully", $es_cron_adminmail, $headers);
} else {
mail($adminmail, "Cron URL has been triggered successfully", $es_cron_adminmail, $headers);
}
//.........这里部分代码省略.........