[ Index ]

PHP Cross Reference of phpwcms V1.4.3 _r380 (23.11.09)

title

Body

[close]

/include/inc_tmpl/ -> newsletter.send.tmpl.php (source)

   1  <?php
   2  /*************************************************************************************
   3     Copyright notice
   4     
   5     (c) 2002-2009 Oliver Georgi (oliver@phpwcms.de) // All rights reserved.
   6   
   7     This script is part of PHPWCMS. The PHPWCMS web content management system is
   8     free software; you can redistribute it and/or modify it under the terms of
   9     the GNU General Public License as published by the Free Software Foundation;
  10     either version 2 of the License, or (at your option) any later version.
  11    
  12     The GNU General Public License can be found at http://www.gnu.org/copyleft/gpl.html
  13     A copy is found in the textfile GPL.txt and important notices to the license 
  14     from the author is found in LICENSE.txt distributed with these scripts.
  15    
  16     This script is distributed in the hope that it will be useful, but WITHOUT ANY 
  17     WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
  18     PARTICULAR PURPOSE.  See the GNU General Public License for more details.
  19   
  20     This copyright notice MUST APPEAR in all copies of the script!
  21  *************************************************************************************/
  22  
  23  // ----------------------------------------------------------------
  24  // obligate check for phpwcms constants
  25  if (!defined('PHPWCMS_ROOT')) {
  26     die("You Cannot Access This Script Directly, Have a Nice Day.");
  27  }
  28  // ----------------------------------------------------------------
  29  
  30  
  31  $count_sent  = _dbQuery('SELECT COUNT(*) FROM '.DB_PREPEND.'phpwcms_newsletterqueue WHERE queue_status=1 AND queue_pid='.$newsletter['newsletter_id'], 'COUNT');
  32  $count_queue = _dbQuery('SELECT COUNT(*) FROM '.DB_PREPEND.'phpwcms_newsletterqueue WHERE queue_status=0 AND queue_pid='.$newsletter['newsletter_id'], 'COUNT');
  33  
  34  ?>
  35  <div id="messagesend" style="display:block;">
  36  <form action="include/inc_act/act_sendnewsletter.php" method="get" name="sendnewsletter" target="sendframe" id="sendnewsletter" onsubmit="hideLayer('messagesend');showLayer('sendjobnow');">
  37    <input type="hidden" name="newsletter_id" value="<?php echo intval($newsletter['newsletter_id']) ?>" />
  38  <table border="0" cellpadding="0" cellspacing="0" summary="">
  39      <tr><td colspan="2" class="title" style="padding-bottom:5px"><?php echo $BL['be_newsletter_sendnow'] ?></td></tr>
  40      <tr><td colspan="2"><img src="img/lines/l538_70.gif" alt="" width="538" height="1" /></td></tr>
  41      <tr bgcolor="#DEF9AC"><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="5" /></td></tr>
  42      
  43      <tr bgcolor="#DEF9AC">
  44          <td align="right" class="chatlist" style="padding-top: 1px;"><?php echo $BL['be_msg_subject'] ?>:&nbsp;</td>
  45          <td class="title"><?php echo html_specialchars($newsletter['newsletter_subject']); ?></td>
  46      </tr>
  47  
  48      <tr bgcolor="#DEF9AC"><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="5" /></td></tr>
  49      <tr><td colspan="2"><img src="img/lines/l538_70.gif" alt="" width="538" height="1" /></td></tr>
  50      <tr><td bgcolor="#E6EAED" colspan="2" style="padding:8px"><?php echo $BL['be_newsletter_attention'] ?><br />
  51                    <img src="img/leer.gif" alt="" width="1" height="4" /><br />
  52                      <?php echo $BL['be_newsletter_attention1'] ?></td></tr>
  53      <tr><td colspan="2"><img src="img/lines/l538_70.gif" alt="" width="538" height="1" /></td></tr>
  54      <tr bgcolor="#DEF9AC"><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="5" /></td></tr>
  55      <tr bgcolor="#DEF9AC">
  56          <td align="right" class="chatlist">&nbsp;<?php echo $BL['be_newsletter_testemail'] ?>:&nbsp;</td>
  57          <td><input name="send_testemail" type="text" class="f11b" id="send_testemail" style="width:350px" size="50" maxlength="250" /></td>
  58      </tr>
  59      <tr bgcolor="#DEF9AC"><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="5" /></td></tr>
  60      <tr><td colspan="2"><img src="img/lines/l538_70.gif" alt="" width="538" height="1" /></td></tr>
  61      <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="5" /></td></tr>
  62      
  63      <?php
  64      //ini_get('max_execution_time');
  65      
  66      // check against safe_mode -> when safe_mode = On
  67      // set_time_limit while sending newsletters is not possible
  68      // and it's recommend to send mails in looped mode
  69      $max_safe_mode = intval(@ini_get('safe_mode'));
  70      $max_per_loop  = $max_safe_mode && @ini_get('max_execution_time') ? intval(@ini_get('max_execution_time')) : 0;
  71      $max_start_at  = 0;
  72      $max_step      = 25;
  73      
  74      echo '<tr>
  75          <td align="right" class="chatlist">'.$BL['be_cnt_recipient'].':&nbsp;</td>
  76          <td><table cellpadding="0" cellspacing="0" border="0" summary="">
  77                  <tr>
  78                      <td><select name="loop" id="loop" class="v11">';
  79      
  80      if($max_safe_mode) {
  81          $max_start_at    = 5;
  82          $max_step        = 5;
  83          if(!$max_per_loop) {
  84              $max_per_loop = 25;
  85          }
  86      } elseif(!$max_per_loop) {
  87          $max_per_loop = 500;
  88      }
  89      
  90      for($i = $max_start_at; $i <= $max_per_loop; $i+=$max_step) {
  91          echo '<option value="'.$i.'">';
  92          echo $i == 0 ? $BL['be_ftptakeover_all'] : $i;
  93          echo '</option>'.LF; 
  94      }
  95                      
  96      echo '                </select></td>
  97                      <td class="chatlist">&nbsp;/loop&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;loop pause:&nbsp;</td>
  98                      <td><select name="pause" id="pause" class="v11">';
  99      
 100      for($i = 1; $i < 10; $i++) {
 101      
 102          echo '            <option value="'.$i.'">'.$i.' '.$BL['be_cnt_guestbook_seconds'].'</option>'.LF; 
 103      
 104      }
 105      echo '            <option value="0">0 '.$BL['be_cnt_guestbook_seconds'].'</option>'.LF; 
 106                      
 107      echo '                </select></td>
 108                  </tr>
 109      </table></td></tr>';
 110      
 111      
 112      ?>
 113      
 114      <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="5" /></td></tr>
 115      <tr><td colspan="2"><img src="img/lines/l538_70.gif" alt="" width="538" height="1" /></td></tr>
 116      <tr bgcolor="#FCD1CD"><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="5" /></td>
 117      </tr>
 118      <tr bgcolor="#FCD1CD">
 119          <td align="right" class="chatlist"><?php echo $BL['be_confirm_sending'] ?>:&nbsp;</td>
 120          <td><table cellpadding="0" cellspacing="0" border="0" summary="">
 121                  <tr>
 122                      <td><input type="checkbox" name="send_confirm" id="send_confirm" value="confirmed" /></td>
 123                      <td><label for="send_confirm">&nbsp;<strong><?php echo $BL['be_confirm_text'] ?></strong></label></td>
 124                  </tr>
 125      </table></td>
 126      </tr>
 127      
 128      <tr bgcolor="#FCD1CD"><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="5" /></td></tr>
 129      <tr><td colspan="2"><img src="img/lines/l538_70.gif" alt="" width="538" height="1" /></td></tr>
 130      <tr><td colspan="2" bgcolor="#E6EAED"><img src="img/leer.gif" alt="" width="1" height="8" /></td></tr>
 131      <tr bgcolor="#E6EAED">
 132          <td>&nbsp;</td>
 133          <td><input name="sendit" type="submit" class="button10" style="color:#CC3300;font-weight:bold;" value="<?php echo $BL['be_newsletter_sendnlbutton'] ?>" />
 134              &nbsp;&nbsp;
 135              <input type="button" class="button10" value="<?php echo $BL['be_newsletter_button_cancel'] ?>" onclick="location.href='phpwcms.php?do=messages&amp;p=3';" />
 136          </td>
 137      </tr>
 138      <tr><td colspan="2" bgcolor="#E6EAED"><img src="img/leer.gif" alt="" width="1" height="5" /></td></tr>
 139      <tr><td colspan="2"><img src="img/lines/l538_70.gif" alt="" width="538" height="1" /></td></tr>
 140      <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="5" /></td></tr>
 141  </table>
 142  </form>
 143  </div>
 144  <div id="sendjobnow" style="display:none;">
 145  <table border="0" cellpadding="0" cellspacing="0" summary="">
 146      <tr><td class="title" style="padding-bottom:5px" colspan="2"><?php echo $BL['be_newsletter_sendprocess'] ?></td></tr>
 147      <tr><td colspan="2"><img src="img/lines/l538_70.gif" alt="" width="538" height="1" /></td></tr>
 148      <tr bgcolor="#DEF9AC"><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="5" /></td></tr>
 149  
 150      <tr bgcolor="#DEF9AC">
 151          <td align="right" class="chatlist" style="padding-top: 1px;width:100px;"><?php echo $BL['be_msg_subject'] ?>:&nbsp;</td>
 152          <td class="title"><?php echo html_specialchars($newsletter['newsletter_subject']); ?></td>
 153      </tr>
 154  
 155      <tr bgcolor="#DEF9AC"><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="5" /></td></tr>
 156      <tr><td colspan="2"><img src="img/lines/l538_70.gif" alt="" width="538" height="1" /></td></tr>
 157      <tr><td bgcolor="#E6EAED" colspan="2" style="padding:8px"><?php echo $BL['be_newsletter_attention2'] ?></td></tr>
 158      <tr><td colspan="2"><img src="img/lines/l538_70.gif" alt="" width="538" height="1" /></td></tr>
 159      <tr>
 160          <td colspan="2"><iframe name="sendframe" width="100%" height="300" scrolling="auto" frameborder="0" id="sendframe"></iframe></td>
 161      </tr>
 162      <tr><td colspan="2"><img src="img/lines/l538_70.gif" alt="" width="538" height="1" /></td></tr>
 163      <tr><td bgcolor="#E6EAED" colspan="2"><img src="img/leer.gif" alt="" width="1" height="8" /></td></tr>
 164      <tr bgcolor="#E6EAED">
 165          <td align="center" colspan="2">
 166              <input type="button" class="button10" value="<?php echo $BL['be_newsletter_button_cancel'] ?>" onclick="location.href='phpwcms.php?do=messages&amp;p=3';" />
 167          </td>
 168      </tr>
 169      <tr><td bgcolor="#E6EAED" colspan="2"><img src="img/leer.gif" alt="" width="1" height="8" /></td></tr>
 170      <tr><td colspan="2"><img src="img/lines/l538_70.gif" alt="" width="538" height="1" /></td></tr>
 171  </table>
 172  </div>


Generated: Wed Dec 30 05:55:15 2009 Cross-referenced by PHPXref 0.7