コード例 #1
0
 function send($newsletter_id)
 {
     global $db;
     $audience_select = get_audience_sql_query($this->query_name, 'newsletters');
     $audience = $db->Execute($audience_select['query_string']);
     $records = $audience->RecordCount();
     if ($records == 0) {
         return 0;
     }
     $i = 0;
     while (!$audience->EOF) {
         $i++;
         $html_msg['EMAIL_FIRST_NAME'] = $audience->fields['customers_firstname'];
         $html_msg['EMAIL_LAST_NAME'] = $audience->fields['customers_lastname'];
         $html_msg['EMAIL_GREET'] = EMAIL_GREET;
         $html_msg['EMAIL_MESSAGE_HTML'] = $this->content_html;
         zen_mail($audience->fields['customers_firstname'] . ' ' . $audience->fields['customers_lastname'], $audience->fields['customers_email_address'], $this->title, $this->content, STORE_NAME, EMAIL_FROM, $html_msg, 'newsletters');
         echo zen_image(DIR_WS_ICONS . 'tick.gif', $audience->fields['customers_email_address']);
         //force output to the screen to show status indicator each time a message is sent...
         if (function_exists('ob_flush')) {
             @ob_flush();
         }
         @flush();
         $audience->MoveNext();
     }
     $newsletter_id = zen_db_prepare_input($newsletter_id);
     $db->Execute("update " . TABLE_NEWSLETTERS . "\r\n                    set date_sent = now(), status = '1'\r\n                    where newsletters_id = '" . zen_db_input($newsletter_id) . "'");
     return $records;
     //return number of records processed whether successful or not
 }
コード例 #2
0
ファイル: coupon_admin.php プロジェクト: dalinhuang/kakayaga
        $contents[] = array('text' => '<b>' . TEXT_REDEMPTIONS . '</b>');
        //      $contents[] = array('text' => TEXT_REDEMPTIONS_TOTAL . '=' . $cc_list->RecordCount());
        $contents[] = array('text' => TEXT_REDEMPTIONS_TOTAL . '=' . $cc_query_numrows);
        $contents[] = array('text' => TEXT_REDEMPTIONS_CUSTOMER . '=' . $count_customers->RecordCount());
        $contents[] = array('text' => '');
        ?>
    <td width="25%" valign="top">
<?php 
        $box = new box();
        echo $box->infoBox($heading, $contents);
        echo '            </td>' . "\n";
        break;
    case 'preview_email':
        $coupon_result = $db->Execute("select coupon_code\r\n                                   from " . TABLE_COUPONS . "\r\n                                   where coupon_id = '" . $_GET['cid'] . "'");
        $coupon_name = $db->Execute("select coupon_name\r\n                                 from " . TABLE_COUPONS_DESCRIPTION . "\r\n                                 where coupon_id = '" . $_GET['cid'] . "'\r\n                                 and language_id = '" . $_SESSION['languages_id'] . "'");
        $audience_select = get_audience_sql_query($_POST['customers_email_address']);
        $mail_sent_to = $audience_select['query_name'];
        ?>
      <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
      <tr>
        <td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
          <tr>
            <td class="pageHeading"><?php 
        echo HEADING_TITLE;
        ?>
</td>
            <td class="pageHeading" align="right"><?php 
        echo zen_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT);
        ?>
</td>
          </tr>
コード例 #3
0
ファイル: mail.php プロジェクト: R-Future/zencart
?>
</td>
        <td class="main">
<?php 
// toggle switch for editor
echo TEXT_EDITOR_INFO . zen_draw_form('set_editor_form', FILENAME_MAIL, '', 'get') . '&nbsp;&nbsp;' . zen_draw_pull_down_menu('reset_editor', $editors_pulldown, $current_editor_key, 'onChange="this.form.submit();"') . zen_hide_session_id() . zen_draw_hidden_field('action', 'set_editor') . '</form>';
?>
        </td>
      </tr>
      </table></td>
    </tr>
    <tr>
      <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
<?php 
if ($action == 'preview' && isset($_POST['customers_email_address'])) {
    $audience_select = get_audience_sql_query(zen_db_input($_POST['customers_email_address']));
    $mail_sent_to = $audience_select['query_name'];
    ?>
        <tr>
          <td><table border="0" width="100%" cellpadding="0" cellspacing="2">
            <tr>
              <td class="smallText"><b><?php 
    echo TEXT_CUSTOMER;
    ?>
</b>&nbsp;&nbsp;&nbsp;<?php 
    echo $mail_sent_to;
    ?>
</td>
            </tr>
            <tr>
              <td class="smallText"><b><?php