本文整理汇总了PHP中es_cls_common类的典型用法代码示例。如果您正苦于以下问题:PHP es_cls_common类的具体用法?PHP es_cls_common怎么用?PHP es_cls_common使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了es_cls_common类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: es_synctables
public static function es_synctables()
{
$es_c_email_subscribers_ver = get_option('email-subscribers');
if ($es_c_email_subscribers_ver != "2.9") {
global $wpdb;
// loading the sql file, load it and separate the queries
$sql_file = ES_DIR . 'sql' . DS . 'es-createdb.sql';
$prefix = $wpdb->prefix;
$handle = fopen($sql_file, 'r');
$query = fread($handle, filesize($sql_file));
fclose($handle);
$query = str_replace('CREATE TABLE IF NOT EXISTS ', 'CREATE TABLE ' . $prefix, $query);
$query = str_replace('ENGINE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci*/', '', $query);
$queries = explode('-- SQLQUERY ---', $query);
// includes db upgrade file
require_once ABSPATH . 'wp-admin/includes/upgrade.php';
// run the queries one by one
foreach ($queries as $sSql) {
dbDelta($sSql);
}
$guid = es_cls_common::es_generate_guid(60);
$home_url = home_url('/');
$cronurl = $home_url . "?es=cron&guid=" . $guid;
add_option('es_c_cronurl', $cronurl);
add_option('es_cron_mailcount', "50");
add_option('es_cron_adminmail', "Hi Admin, \r\n\r\nCron URL has been triggered successfully on ###DATE### for the mail ###SUBJECT###. And it sent mail to ###COUNT### recipient. \r\n\r\nThank You");
update_option('email-subscribers', "2.9");
}
}
开发者ID:tccyp001,项目名称:onemore-wordpress,代码行数:29,代码来源:es-register.php
示例2: es_group_ins
public static function es_group_ins($data = array(), $action = "insert")
{
global $wpdb;
$prefix = $wpdb->prefix;
$guid = es_cls_common::es_generate_guid(60);
if ($action == "insert") {
$sSql = $wpdb->prepare("INSERT INTO `" . $prefix . "es_group` (`es_group_name`,\r\r\n\t\t\t`es_group_status`, `es_group_type`, `es_group_guid`) VALUES(%s, %s, %s, %s)", array($data["es_group_name"], $data["es_group_status"], $data["es_group_type"], $guid));
} elseif ($action == "update") {
$sSql = $wpdb->prepare("UPDATE `" . $prefix . "es_group` SET `es_group_name` = %s, `es_group_status` = %s, `es_group_type` = %s \r\r\n\t\t\t WHERE es_group_id = %d\tLIMIT 1", array($data["es_group_name"], $data["es_group_status"], $data["es_group_type"], $data["es_group_id"]));
}
echo $sSql;
$wpdb->query($sSql);
return true;
}
开发者ID:MaheshSamrat,项目名称:cpapstorelasvegas.com,代码行数:14,代码来源:_db_group.php
示例3: es_view_subscriber_ins
public static function es_view_subscriber_ins($data = array(), $action = "insert")
{
global $wpdb;
$prefix = $wpdb->prefix;
$result = 0;
if (!filter_var($data["es_email_mail"], FILTER_VALIDATE_EMAIL)) {
return "invalid";
}
$CurrentDate = date('Y-m-d G:i:s');
if ($action == "insert") {
$sSql = "SELECT * FROM `" . $prefix . "es_emaillist` where es_email_mail='" . $data["es_email_mail"] . "' and es_email_group='" . trim($data["es_email_group"]) . "'";
$result = $wpdb->get_var($sSql);
if ($result > 0) {
return "ext";
} else {
$guid = es_cls_common::es_generate_guid(60);
$sql = $wpdb->prepare("INSERT INTO `" . $prefix . "es_emaillist` \n\t\t\t\t\t\t(`es_email_name`,`es_email_mail`, `es_email_status`, `es_email_created`, `es_email_viewcount`, `es_email_group`, `es_email_guid`)\n\t\t\t\t\t\tVALUES(%s, %s, %s, %s, %d, %s, %s)", array(trim($data["es_email_name"]), trim($data["es_email_mail"]), trim($data["es_email_status"]), $CurrentDate, 0, trim($data["es_email_group"]), $guid));
$wpdb->query($sql);
return "sus";
}
} elseif ($action == "update") {
$sSql = "SELECT * FROM `" . $prefix . "es_emaillist` where es_email_mail='" . $data["es_email_mail"] . "'";
$sSql = $sSql . " and es_email_group='" . trim($data["es_email_group"]) . "' and es_email_id <> " . $data["es_email_id"];
$result = $wpdb->get_var($sSql);
if ($result > 0) {
return "ext";
} else {
//$sSql = $wpdb->prepare("UPDATE `".$prefix."es_emaillist` SET `es_email_name` = %s, `es_email_mail` = %s,
// `es_email_status` = %s, `es_email_group` = %s WHERE es_email_mail = %s LIMIT 10", array($data["es_email_name"], $data["es_email_mail"],
// $data["es_email_status"], $data["es_email_group"], $data["es_email_mail"]));
//$wpdb->query($sSql);
//return "sus";
$sSql = $wpdb->prepare("UPDATE `" . $prefix . "es_emaillist` SET `es_email_name` = %s, `es_email_mail` = %s,\n\t\t\t\t\t\t`es_email_status` = %s, `es_email_group` = %s WHERE es_email_id = %d LIMIT 1", array($data["es_email_name"], $data["es_email_mail"], $data["es_email_status"], $data["es_email_group"], $data["es_email_id"]));
$wpdb->query($sSql);
return "sus";
}
}
}
开发者ID:tccyp001,项目名称:onemore-wordpress,代码行数:38,代码来源:db_subscriber.php
示例4: stripslashes
?>
" /></td>
<td><?php
echo $i;
?>
</td>
<td><?php
echo $data['es_email_mail'];
?>
</td>
<td><?php
echo stripslashes($data['es_email_name']);
?>
</td>
<td><?php
echo es_cls_common::es_disp_status($data['es_email_status']);
?>
</td>
<td><?php
echo stripslashes($data['es_email_group']);
?>
</td>
<td><?php
echo $data['es_email_id'];
?>
</td>
<td><div>
<span class="edit">
<a target="_blank" title="Edit" href="<?php
echo ES_ADMINURL;
?>
开发者ID:GDG-JSS-NOIDA,项目名称:gdg_events_theme,代码行数:31,代码来源:view-subscriber-show.php
示例5: array
$es_errors = array();
$es_success = '';
$es_error_found = FALSE;
$data = array();
$data = es_cls_settings::es_setting_select(1);
$es_c_sentreport_subject = '';
$es_c_sentreport = '';
$es_c_sentreport_subject = get_option('es_c_sentreport_subject', 'nosubjectexists');
$es_c_sentreport = get_option('es_c_sentreport', 'nooptionexists');
if ($es_c_sentreport_subject == "nosubjectexists") {
$es_sent_report_subject = es_cls_common::es_sent_report_subject();
add_option('es_c_sentreport_subject', $es_sent_report_subject);
$es_c_sentreport_subject = $es_sent_report_subject;
}
if ($es_c_sentreport == "nooptionexists") {
$es_sent_report_plain = es_cls_common::es_sent_report_plain();
add_option('es_c_sentreport', $es_sent_report_plain);
$es_c_sentreport = $es_sent_report_plain;
}
// Preset the form fields
$form = array('es_c_id' => $data['es_c_id'], 'es_c_fromname' => $data['es_c_fromname'], 'es_c_fromemail' => $data['es_c_fromemail'], 'es_c_mailtype' => $data['es_c_mailtype'], 'es_c_adminmailoption' => $data['es_c_adminmailoption'], 'es_c_adminemail' => $data['es_c_adminemail'], 'es_c_adminmailsubject' => $data['es_c_adminmailsubject'], 'es_c_adminmailcontant' => $data['es_c_adminmailcontant'], 'es_c_usermailoption' => $data['es_c_usermailoption'], 'es_c_usermailsubject' => $data['es_c_usermailsubject'], 'es_c_usermailcontant' => $data['es_c_usermailcontant'], 'es_c_optinoption' => $data['es_c_optinoption'], 'es_c_optinsubject' => $data['es_c_optinsubject'], 'es_c_optincontent' => $data['es_c_optincontent'], 'es_c_optinlink' => $data['es_c_optinlink'], 'es_c_unsublink' => $data['es_c_unsublink'], 'es_c_unsubtext' => $data['es_c_unsubtext'], 'es_c_unsubhtml' => $data['es_c_unsubhtml'], 'es_c_subhtml' => $data['es_c_subhtml'], 'es_c_message1' => $data['es_c_message1'], 'es_c_message2' => $data['es_c_message2'], 'es_c_sentreport' => $es_c_sentreport, 'es_c_sentreport_subject' => $es_c_sentreport_subject);
}
// 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_c_fromname'] = isset($_POST['es_c_fromname']) ? $_POST['es_c_fromname'] : '';
if ($form['es_c_fromname'] == '') {
$es_errors[] = __('Please enter sender of notifications from name.', 'email-subscribers');
$es_error_found = TRUE;
}
开发者ID:estrategasdigitales,项目名称:landitec,代码行数:31,代码来源:settings-edit.php
示例6: isset
//$path_parts = pathinfo($fullPath);
//$extension = strtolower($path_parts["extension"]);
$tmpname = $_FILES['es_csv_name']['tmp_name'];
$es_email_status = isset($_POST['es_email_status']) ? $_POST['es_email_status'] : '';
$es_email_group = isset($_POST['es_email_group']) ? $_POST['es_email_group'] : '';
if ($es_email_group == '') {
$es_email_group = isset($_POST['es_email_group_txt']) ? $_POST['es_email_group_txt'] : '';
}
if ($es_email_status == '') {
$es_email_status = "Confirmed";
}
if ($es_email_group == '') {
$es_email_group = "Public";
}
if ($extension === 'csv') {
$csv = es_cls_common::es_readcsv($tmpname);
}
if (count($csv) > 0) {
$inserted = 0;
$duplicate = 0;
$invalid = 0;
for ($i = 1; $i < count($csv) - 1; $i++) {
$form["es_email_mail"] = trim($csv[$i][0]);
$form["es_email_name"] = trim($csv[$i][1]);
$form["es_email_group"] = $es_email_group;
$form["es_email_status"] = $es_email_status;
$action = es_cls_dbquery::es_view_subscriber_ins($form, "insert");
if ($action == "sus") {
$inserted = $inserted + 1;
} elseif ($action == "ext") {
$duplicate = $duplicate + 1;
开发者ID:venturepact,项目名称:blog,代码行数:31,代码来源:view-subscriber-import.php
示例7: __
$es_errors[] = __('Please enter subscriber email address.', 'email-subscribers');
$es_error_found = TRUE;
}
$es_email_group = isset($_POST['es_email_group']) ? $_POST['es_email_group'] : '';
if ($es_email_group == '') {
$es_email_group = isset($_POST['es_email_group_txt']) ? $_POST['es_email_group_txt'] : '';
$form['es_email_group'] = $es_email_group;
} else {
$form['es_email_group'] = $es_email_group;
}
if ($form['es_email_group'] == '') {
$es_errors[] = __('Please select or create your group for this email.', 'email-subscribers');
$es_error_found = TRUE;
}
if ($form['es_email_group'] != "") {
$special_letters = es_cls_common::es_special_letters();
if (preg_match($special_letters, $form['es_email_group'])) {
$es_errors[] = __('Error: Special characters ([\'^$%&*()}{@#~?><>,|=_+\\"]) are not allowed in the group name.', 'email-subscribers');
$es_error_found = TRUE;
}
}
// No errors found, we can add this Group to the table
if ($es_error_found == FALSE) {
$action = "";
$action = es_cls_dbquery::es_view_subscriber_ins($form, "insert");
if ($action == "sus") {
$es_success = __('Email was successfully inserted.', 'email-subscribers');
} elseif ($action == "ext") {
$es_errors[] = __('Email already exist in our list.', 'email-subscribers');
$es_error_found = TRUE;
} elseif ($action == "invalid") {
开发者ID:estrategasdigitales,项目名称:venone,代码行数:31,代码来源:view-subscriber-add.php
示例8: es_sendmail
public static function es_sendmail($type = "", $template = 0, $subscribers = array(), $action = "", $post_id = 0)
{
$data = array();
$htmlmail = true;
$wpmail = true;
$unsublink = "";
$unsubtext = "";
$sendguid = "";
$viewstatus = "";
$viewstslink = "";
$adminmail = "";
$adminmailsubject = "";
$adminmailcontant = "";
$reportmail = "";
$currentdate = date('Y-m-d G:i:s');
$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>");
$settings = es_cls_settings::es_setting_select(1);
$adminmail = $settings['es_c_adminemail'];
$es_c_adminmailoption = $settings['es_c_adminmailoption'];
$es_c_usermailoption = $settings['es_c_usermailoption'];
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;
} else {
$htmlmail = false;
}
if ($settings['es_c_mailtype'] == "WP HTML MAIL" || $settings['es_c_mailtype'] == "WP PLAINTEXT MAIL") {
$wpmail = true;
} else {
$wpmail = false;
}
$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";
}
switch ($type) {
case 'optin':
$subject = stripslashes($settings['es_c_optinsubject']);
$content = stripslashes($settings['es_c_optincontent']);
break;
case 'welcome':
$subject = stripslashes($settings['es_c_usermailsubject']);
$content = stripslashes($settings['es_c_usermailcontant']);
break;
case 'newsletter':
$template = es_cls_compose::es_template_select($template);
$subject = stripslashes($template['es_templ_heading']);
$content = stripslashes($template['es_templ_body']);
break;
case 'notification':
$template = es_cls_compose::es_template_select($template);
$subject = stripslashes($template['es_templ_heading']);
$content = stripslashes($template['es_templ_body']);
$post_title = "";
$post_excerpt = "";
$post_link = "";
$post_thumbnail = "";
$post_thumbnail_link = "";
$post = get_post($post_id);
$excerpt_length = 50;
// Change this value to increase the content length in newsletter.
$post_title = $post->post_title;
$subject = str_replace('###POSTTITLE###', $post_title, $subject);
$post_link = get_permalink($post_id);
$subject = str_replace('###POSTLINK###', $post_link, $subject);
$post_date = $post->post_modified;
// Get full post
$post_full = $post->post_content;
$post_full = wpautop($post_full);
// Get post excerpt
$the_excerpt = $post->post_content;
$the_excerpt = strip_tags(strip_shortcodes($the_excerpt));
$words = explode(' ', $the_excerpt, $excerpt_length + 1);
if (count($words) > $excerpt_length) {
array_pop($words);
array_push($words, '...');
$the_excerpt = implode(' ', $words);
}
if (function_exists('has_post_thumbnail') && has_post_thumbnail($post_id)) {
$post_thumbnail = get_the_post_thumbnail($post_id, 'thumbnail');
}
if ($post_thumbnail != "") {
$post_thumbnail_link = "<a href='" . $post_link . "' target='_blank'>" . $post_thumbnail . "</a>";
//.........这里部分代码省略.........
开发者ID:venturepact,项目名称:blog,代码行数:101,代码来源:es-sendmail.php
示例9: isset
$es_cron_mailcount = isset($_POST['es_cron_mailcount']) ? $_POST['es_cron_mailcount'] : '';
if ($es_cron_mailcount == "0" && strlen($es_cron_mailcount) > 0) {
$es_errors[] = __('Please enter valid mail count.', 'email-subscribers');
$es_error_found = TRUE;
}
$es_cron_adminmail = isset($_POST['es_cron_adminmail']) ? $_POST['es_cron_adminmail'] : '';
// No errors found, we can add this Group to the table
if ($es_error_found == FALSE) {
update_option('es_cron_mailcount', $es_cron_mailcount);
update_option('es_cron_adminmail', $es_cron_adminmail);
$es_success = __('Cron details successfully updated.', 'email-subscribers');
}
}
$es_cron_url = get_option('es_c_cronurl', 'nocronurl');
if ($es_cron_url == "nocronurl") {
$guid = es_cls_common::es_generate_guid(60);
$home_url = home_url('/');
$cronurl = $home_url . "?es=cron&guid=" . $guid;
add_option('es_c_cronurl', $cronurl);
$es_cron_url = get_option('es_c_cronurl');
}
$es_cron_mailcount = get_option('es_cron_mailcount', '0');
if ($es_cron_mailcount == "0") {
add_option('es_cron_mailcount', "50");
$es_cron_mailcount = get_option('es_cron_mailcount');
}
$es_cron_adminmail = get_option('es_cron_adminmail', '');
if ($es_cron_adminmail == "") {
add_option('es_cron_adminmail', "Hi Admin, \r\n\r\nCron URL has been triggered successfully on ###DATE### for the mail ###SUBJECT###. And it sent mail to ###COUNT### recipient. \r\n\r\nThank You");
$es_cron_adminmail = get_option('es_cron_adminmail');
}
开发者ID:tccyp001,项目名称:onemore-wordpress,代码行数:31,代码来源:cron-add.php
示例10:
?>
</td>
<td><?php
echo $data['es_deliver_sentdate'];
?>
</td>
<td><?php
echo es_cls_common::es_disp_status($data['es_deliver_sentstatus']);
?>
</td>
<td><?php
echo es_cls_common::es_disp_status($data['es_deliver_senttype']);
?>
</td>
<td><?php
echo es_cls_common::es_disp_status($data['es_deliver_status']);
?>
</td>
<td><?php
echo $data['es_deliver_viewdate'];
?>
</td>
<td><?php
echo $data['es_deliver_emailid'];
?>
</td>
</tr>
<?php
$i = $i + 1;
}
} else {
开发者ID:phuocdungit,项目名称:fundy,代码行数:31,代码来源:deliverreport-show.php
示例11: elseif
echo $caegorydisplay[$j] . ", ";
if ($j > 0 && $j % 3 == 0) {
echo "<br>";
}
}
}
?>
</td>
<td>
<?php
if ($data['es_note_status'] == "Enable") {
echo "Send mail immediately<br> when new post is published.";
} elseif ($data['es_note_status'] == "Cron") {
echo "Add to cron and send mail via cron job.";
} else {
echo es_cls_common::es_disp_status($data['es_note_status']);
}
?>
</td>
</tr>
<?php
$i = $i + 1;
}
} else {
?>
<tr><td colspan="4" align="center"><?php
_e('No records available.', 'email-subscribers');
?>
</td></tr><?php
}
?>
开发者ID:phuocdungit,项目名称:fundy,代码行数:31,代码来源:notification-show.php
示例12:
<img alt="Delete" src="<?php
echo ES_URL;
?>
images/preview.gif" />
</a>
</td>
<td><?php
echo $data['es_sent_source'];
?>
</td>
<td><?php
echo es_cls_common::es_disp_status($data['es_sent_status']);
?>
</td>
<td><?php
echo es_cls_common::es_disp_status($data['es_sent_type']);
?>
</td>
<td><?php
echo $data['es_sent_starttime'];
?>
</td>
<td><?php
echo $data['es_sent_endtime'];
?>
</td>
<td><?php
echo $data['es_sent_count'];
?>
</td>
<td><a title="Delete Record" onClick="javascript:_es_delete('<?php
开发者ID:projectestac,项目名称:wordpress-email-subscribers,代码行数:31,代码来源:sentmail-show.php
示例13: switch
switch ($option) {
case "view_subscriber":
$sSql = "select es_email_mail as Email, es_email_name as Name, es_email_status as Status, es_email_created as Created,";
$sSql = $sSql . " es_email_group as Emailgroup from " . $wpdb->prefix . "es_emaillist ORDER BY es_email_mail";
$data = $wpdb->get_results($sSql);
es_cls_common::download($data, 's', '');
break;
case "registered_user":
$data = $wpdb->get_results("select user_email as 'Email', user_nicename as 'Name' from " . $wpdb->prefix . "users ORDER BY user_nicename");
es_cls_common::download($data, 'r', '');
break;
case "commentposed_user":
$sSql = "SELECT DISTINCT(comment_author_email) as Email, comment_author as 'Name'";
$sSql = $sSql . "from " . $wpdb->prefix . "comments WHERE comment_author_email <> '' ORDER BY comment_author_email";
$data = $wpdb->get_results($sSql);
es_cls_common::download($data, 'c', '');
break;
default:
_e('Unexpected url submit has been detected', ELP_TDOMAIN);
break;
}
} else {
_e('Unexpected url submit has been detected', ELP_TDOMAIN);
}
} else {
_e('Unexpected url submit has been detected', ELP_TDOMAIN);
}
//}
//else
//{
// _e('Unexpected url submit has been detected', ELP_TDOMAIN);
开发者ID:MaheshSamrat,项目名称:cpapstorelasvegas.com,代码行数:31,代码来源:export-email-address.php
注:本文中的es_cls_common类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论