本文整理汇总了PHP中es_cls_dbquery::es_view_subscriber_ins方法的典型用法代码示例。如果您正苦于以下问题:PHP es_cls_dbquery::es_view_subscriber_ins方法的具体用法?PHP es_cls_dbquery::es_view_subscriber_ins怎么用?PHP es_cls_dbquery::es_view_subscriber_ins使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类es_cls_dbquery
的用法示例。
在下文中一共展示了es_cls_dbquery::es_view_subscriber_ins方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: es_subscriber_default
public static function es_subscriber_default()
{
$result = es_cls_dbquery::es_view_subscriber_count(0);
if ($result == 0) {
$form["es_email_mail"] = get_option('admin_email');
$form["es_email_name"] = "Admin";
$form["es_email_group"] = "Public";
$form["es_email_status"] = "Confirmed";
es_cls_dbquery::es_view_subscriber_ins($form, "insert");
$form["es_email_mail"] = "a.example@example.com";
$form["es_email_name"] = "Example";
$form["es_email_group"] = "Public";
$form["es_email_status"] = "Confirmed";
es_cls_dbquery::es_view_subscriber_ins($form, "insert");
}
return true;
}
示例2: es_view_subscriber_widget
public static function es_view_subscriber_widget($data = array())
{
global $wpdb;
$prefix = $wpdb->prefix;
$arrRes = array();
$currentdate = date('Y-m-d G:i:s');
//$sSql = "SELECT * FROM `".$prefix."es_emaillist` WHERE";
//$sSql = $sSql . " es_email_mail = %s";
//$sSql = $sSql . " es_email_group = %s";
//$sSql = $sSql . " Limit 1";
//$sSql = $wpdb->prepare($sSql, array($data["es_email_mail"], $data["es_email_group"]));
//$arrRes = $wpdb->get_results($sSql, ARRAY_A);
$sSql = "SELECT * FROM `" . $prefix . "es_emaillist` where es_email_mail='" . $data["es_email_mail"] . "' and es_email_group='" . trim($data["es_email_group"]) . "'";
$arrRes = $wpdb->get_results($sSql, ARRAY_A);
if (count($arrRes) > 0) {
if ($arrRes[0]['es_email_status'] == "Confirmed") {
return "ext";
} else {
$action = "";
$form['es_email_name'] = $data["es_email_name"];
$form['es_email_mail'] = $data["es_email_mail"];
$form['es_email_group'] = $data["es_email_group"];
$form['es_email_status'] = $data["es_email_status"];
$form['es_email_id'] = $arrRes[0]["es_email_id"];
$action = es_cls_dbquery::es_view_subscriber_ins($form, $action = "update");
return $action;
}
} else {
$action = es_cls_dbquery::es_view_subscriber_ins($data, $action = "insert");
return $action;
}
}
示例3: es_sync_registereduser
function es_sync_registereduser($user_id)
{
$es_c_emailsubscribers = get_option('es_c_emailsubscribers', 'norecord');
if ($es_c_emailsubscribers == 'norecord' || $es_c_emailsubscribers == "") {
// No action is required
} else {
if ($es_c_emailsubscribers['es_registered'] == "YES" && $user_id != "") {
$es_registered = $es_c_emailsubscribers['es_registered'];
$es_registered_group = $es_c_emailsubscribers['es_registered_group'];
$user_info = get_userdata($user_id);
$user_firstname = $user_info->user_firstname;
if ($user_firstname == "") {
$user_firstname = $user_info->user_login;
}
$user_mail = $user_info->user_email;
$form['es_email_name'] = $user_firstname;
$form['es_email_mail'] = $user_mail;
$form['es_email_group'] = $es_c_emailsubscribers['es_registered_group'];
$form['es_email_status'] = "Confirmed";
$action = es_cls_dbquery::es_view_subscriber_ins($form, "insert");
if ($action == "sus") {
//Inserted successfully. Below 3 line of code will send WELCOME email to subscribers.
$subscribers = array();
$subscribers = es_cls_dbquery::es_view_subscriber_one($user_mail);
es_cls_sendmail::es_sendmail("welcome", $template = 0, $subscribers, "welcome", 0);
}
}
}
}
示例4: trim
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;
} elseif ($action == "invalid") {
$invalid = $invalid + 1;
}
// Reset the form fields
$form = array('es_email_name' => '', 'es_email_status' => '', 'es_email_group' => '', 'es_email_mail' => '');
}
?>
<div class="updated fade">
<p><strong><?php
echo $inserted;
?>
示例5: __
$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'] : '';
$form['es_email_id'] = isset($_POST['es_email_id']) ? $_POST['es_email_id'] : '0';
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, "update");
if ($action == "sus") {
$es_success = __('Email was successfully updated.', 'email-subscribers');
} elseif ($action == "ext") {
$es_errors[] = __('Email already exist for this group.', 'email-subscribers');
$es_error_found = TRUE;
}
}
}
if ($es_error_found == TRUE && isset($es_errors[0]) == TRUE) {
?>
<div class="error fade"><p><strong><?php
echo $es_errors[0];
?>
</strong></p></div><?php
}
示例6: es_subscriber_default
public static function es_subscriber_default()
{
$result = es_cls_dbquery::es_view_subscriber_count(0);
if ($result == 0) {
$form["es_email_mail"] = get_option('admin_email');
$form["es_email_name"] = "Admin";
//XTEC ************ MODIFICAT - Changed default group from Public to Portada
//2016.03.29 @sarjona
$form["es_email_group"] = 'Portada';
//************ ORIGINAL
/*
$form["es_email_group"] = "Public";
*/
//************ FI
$form["es_email_status"] = "Confirmed";
es_cls_dbquery::es_view_subscriber_ins($form, "insert");
$form["es_email_mail"] = "a.example@example.com";
$form["es_email_name"] = "Example";
//XTEC ************ MODIFICAT - Changed default group from Public to Portada
//2016.03.29 @sarjona
$form["es_email_group"] = 'Portada';
//************ ORIGINAL
/*
$form["es_email_group"] = "Public";
*/
//************ FI
$form["es_email_status"] = "Confirmed";
es_cls_dbquery::es_view_subscriber_ins($form, "insert");
}
return true;
}