예제 #1
0
.text-label {
    color: #cdcdcd;
    font-weight: bold;
}
</style>

<?php 
if ($_POST["subscriber"] == $language['post']) {
    $email = $_POST['email'];
    $city = $_POST['city_name'];
    if (!eregi("^[_a-z0-9-]+(\\.[_a-z0-9-]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*(\\.[a-z]{2,3})\$", $email)) {
        set_response_mes(-1, $language['invalid_email']);
        url_redirect($_SERVER['REQUEST_URI']);
    }
    if (!empty($email)) {
        $val = add_subscriber($email, $city);
        if ($val) {
            set_response_mes(1, $language['subscribe_success']);
            url_redirect($_SERVER['REQUEST_URI']);
        } else {
            set_response_mes(-1, $language['email_exist']);
            url_redirect($_SERVER['REQUEST_URI']);
        }
    } else {
        set_response_mes(-1, $language['try_again']);
        url_redirect($_SERVER['REQUEST_URI']);
    }
}
//get the categpry list
$category_list = mysql_query("select * from coupons_cities where status='A' order by cityname");
?>
예제 #2
0
 /**
  * Activate user account.
  * User is verified by user_id and authentication code in the URL.
  * Can be called by clicking on link in mail.
  *
  * @return void
  */
 function activate()
 {
     $user_id = $this->uri->segment(3);
     $new_email_key = $this->uri->segment(4);
     // Activate user
     if ($this->tank_auth->activate_user($user_id, $new_email_key)) {
         // success
         //Add it into newletter
         $user = $this->database->GetUserById($user_id);
         add_subscriber($user['email'], $user['username']);
         $this->tank_auth->logout();
         $this->_show_message($this->lang->line('auth_message_activation_completed') . ' ' . anchor('/auth/login/', 'Login'));
     } else {
         // fail
         $this->_show_message($this->lang->line('auth_message_activation_failed'));
     }
 }
예제 #3
0
     }
 } else {
     $liste = fopen($import_file['tmp_name'], 'r');
 }
 if ($tmp_subdir_writable) {
     $tx_import = 0;
     while (!feof($liste)) {
         $mail_importe = fgets($liste, 4096);
         if (strlen($mail_importe) == 2) {
             // dummy and pretty function ;-) yeah !
         } else {
             $mail_importe = str_replace("'", "", $mail_importe);
             $mail_importe = str_replace('"', "", $mail_importe);
             $mail_importe = strtolower(trim($mail_importe));
             if (!empty($mail_importe) && validEmailAddress($mail_importe)) {
                 $added = add_subscriber($cnx, $row_config_globale['table_email'], $list_id, $mail_importe);
                 if ($added == -1) {
                     $subscriber_op_msg .= "<h4 class='alert_error'>" . translate("ERROR_ALREADY_SUBSCRIBER", "<b>{$mail_importe}</b>") . ".</h4>";
                 } elseif ($added == 2) {
                     $subscriber_op_msg .= "<h4 class='alert_success'>" . translate("SUBSCRIBER_ADDED", "<b>{$mail_importe}</b>") . ".</h4>";
                     $tx_import++;
                 } elseif ($added == 0) {
                     $subscriber_op_msg .= "<h4 class='alert_error'>" . translate("ERROR_SQL", DbError()) . "</h4>";
                 }
             } else {
                 $subscriber_op_msg .= "<h4 class='alert_error'>Adresse mail invalide : " . $mail_importe . "</h4>";
             }
         }
     }
     $subscriber_op_msg .= "<h4 class='alert_success'><b>{$tx_import} mails importés</b></h4>";
 } else {
예제 #4
0
<?php

require '../../../wp-blog-header.php';
//include 'functions.php';
$p_id = $_POST['p_id'];
$email = $_POST['email'];
echo add_subscriber($email, $p_id);
예제 #5
0
 function mails()
 {
     $this->_validate_user();
     $data['site_name'] = "Psycho Store";
     $data['username'] = '******';
     $data['order_id'] = '5XTGH567';
     $type = $this->input->post('mail_type');
     $data['num_subscribers'] = $this->database->GetNumOfSubscribers();
     //Show some latest registered emails
     $data['latest_subscribers'] = $this->database->GetSubscribers(10);
     if ($this->input->post('subscriber_email') != false) {
         add_subscriber($this->input->post('subscriber_email'));
     }
     if ($type != false) {
         $params = mg_create_mail_params($type, $data);
         mg_send_mail($this->input->post('email'), $params);
     }
     display('admin_mail', $data);
 }