[ Index ]

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

title

Body

[close]

/include/inc_module/mod_ads/ -> backend.editform.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  // Module/Plug-in Ads/Banner Management
  31  
  32  
  33  $BE['HEADER']['date.js']            = getJavaScriptSourceLink('include/inc_js/date.js');
  34  $BE['HEADER']['dynCalendar.js']        = getJavaScriptSourceLink('include/inc_js/dynCalendar.js');
  35  
  36  ?>
  37  <h1 class="title" style="margin-bottom:10px"><?php echo $BLM['form_title'] ?></h1>
  38  
  39  <form action="<?php echo MODULE_HREF ?>&amp;campaign=1&amp;edit=<?php echo $plugin['data']['adcampaign_id'] ?>" method="post" style="background:#F3F5F8;border-top:1px solid #92A1AF;border-bottom:1px solid #92A1AF;margin:0 0 5px 0;padding:10px 8px 15px 8px">
  40  <input type="hidden" name="adcampaign_id" value="<?php echo $plugin['data']['adcampaign_id'] ?>" />
  41  <table border="0" cellpadding="0" cellspacing="0" width="100%" summary="">
  42  
  43      <tr> 
  44          <td align="right" class="chatlist"><?php echo $BL['be_cnt_last_edited']  ?>:&nbsp;</td>
  45          <td class="v10"><?php echo html_specialchars(date($BL['be_fprivedit_dateformat'], strtotime($plugin['data']['adcampaign_changed']))) ?></td>
  46      </tr>
  47      
  48      <?php if(!empty($plugin['data']['adcampaign_created'])) { ?>
  49      
  50      <tr> 
  51          <td align="right" class="chatlist"><?php echo $BL['be_fprivedit_created']  ?>:&nbsp;</td>
  52          <td class="v10"><?php echo html_specialchars(date($BL['be_fprivedit_dateformat'], strtotime($plugin['data']['adcampaign_created']))) ?></td>
  53      </tr>
  54      
  55      <?php } ?>
  56      
  57      <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="10" /></td></tr>
  58  
  59      <tr> 
  60          <td align="right" class="chatlist"><?php echo $BLM['campaign_entry'] ?>:&nbsp;</td>
  61          <td><input name="adcampaign_title" type="text" id="adcampaign_title" class="v12<?php 
  62          
  63          //error class
  64          if(!empty($plugin['error']['adcampaign_title'])) echo ' errorInputText';
  65          
  66          ?>" style="width:400px;" value="<?php echo html_specialchars($plugin['data']['adcampaign_title']) ?>" size="30" maxlength="200" /></td>
  67      </tr>
  68      
  69      <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="5" /></td></tr>
  70      
  71      <tr> 
  72          <td align="right" class="chatlist" valign="top" style="padding-top:18px"><?php echo $BLM['calendar_start'] ?>:&nbsp;</td>
  73          <td><table border="0" cellpadding="0" cellspacing="0" summary="">
  74          
  75              <tr>
  76                  <td class="chatlist" style="padding-bottom:2px"><?php echo $BLM['date_format'] ?></td>
  77                  <td class="chatlist">&nbsp;</td>
  78                  <td class="chatlist" style="padding-bottom:2px"><?php echo $BLM['time_format'] ?></td>
  79                  <td colspan="2">&nbsp;</td>
  80              </tr>
  81          
  82              <tr>
  83                  <td><input name="adcampaign_date_start" type="text" id="adcampaign_date_start" class="v12<?php 
  84          
  85          //error class
  86          if(!empty($plugin['error']['adcampaign_date_start'])) echo ' errorInputText';
  87          
  88          ?>" style="width:100px;" value="<?php echo html_specialchars($plugin['data']['adcampaign_date_start']) ?>" size="30" /></td>
  89          <td>&nbsp;</td>
  90          <td><input name="adcampaign_time_start" type="text" id="adcampaign_time_start" class="v12" style="width:80px;" value="<?php echo html_specialchars($plugin['data']['adcampaign_time_start']) ?>" size="30" /></td>
  91          <td>&nbsp;<script language="javascript" type="text/javascript">
  92          <!--
  93  		function aStart(date, month, year) {
  94              getFieldById('adcampaign_date_start').value = subrstr('00' + date, 2) + '<?php echo $BLM['date_delimiter'] ?>' + subrstr('00' + month, 2) + '<?php echo $BLM['date_delimiter'] ?>' + year;
  95              
  96              var timestart = getFieldById('adcampaign_time_start');
  97              if(Trim(timestart.value) == '') {
  98                  timestart.value = '00:00';
  99              }
 100          }
 101          calStart = new dynCalendar('calStart', 'aStart', 'img/dynCal/');
 102          calStart.setMonthCombo(false);
 103          calStart.setYearCombo(false);
 104          //-->
 105          </script></td>
 106      
 107              </tr>
 108          </table></td>
 109          
 110      </tr>    
 111      
 112      <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="3" /></td></tr>
 113      
 114      <tr> 
 115          <td align="right" class="chatlist" valign="top" style="padding-top:18px"><?php echo $BLM['calendar_end'] ?>:&nbsp;</td>
 116          <td><table border="0" cellpadding="0" cellspacing="0" summary="">
 117          
 118              <tr>
 119                  <td class="chatlist" style="padding-bottom:2px"><?php echo $BLM['date_format'] ?></td>
 120                  <td class="chatlist">&nbsp;</td>
 121                  <td class="chatlist" style="padding-bottom:2px"><?php echo $BLM['time_format'] ?></td>
 122              </tr>
 123          
 124              <tr>
 125                  <td><input name="adcampaign_date_end" type="text" id="adcampaign_date_end" class="v12<?php 
 126          
 127          //error class
 128          if(!empty($plugin['error']['adcampaign_date_end'])) echo ' errorInputText';
 129          
 130          ?>" style="width:100px;" value="<?php echo html_specialchars($plugin['data']['adcampaign_date_end']) ?>" size="30" /></td>
 131          <td>&nbsp;</td>
 132          <td><input name="adcampaign_time_end" type="text" id="adcampaign_time_end" class="v12" style="width:80px;" value="<?php echo html_specialchars($plugin['data']['adcampaign_time_end']) ?>" size="30" /></td>
 133          <td>&nbsp;<script language="javascript" type="text/javascript">
 134          <!--
 135  		function aEnd(date, month, year) {
 136              getFieldById('adcampaign_date_end').value = subrstr('00' + date, 2) + '<?php echo $BLM['date_delimiter'] ?>' + subrstr('00' + month, 2) + '<?php echo $BLM['date_delimiter'] ?>' + year;
 137              var timeend = getFieldById('adcampaign_time_end');
 138              if(Trim(timeend.value) == '') {
 139                  timeend.value = '23:59';
 140              }
 141          }
 142          calEnd = new dynCalendar('calEnd', 'aEnd', 'img/dynCal/');
 143          calEnd.setMonthCombo(false);
 144          calEnd.setYearCombo(false);
 145          //-->
 146          </script></td>
 147          
 148              </tr>
 149          </table></td>
 150          
 151      </tr>        
 152      
 153      <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="8" /></td></tr>    
 154  
 155      <tr> 
 156          <td align="right" class="chatlist"><?php echo $BLM['ad_format'] ?>:&nbsp;</td>
 157          <td><select name="adcampaign_format" id="adcampaign_format" class="v12" onchange="setFormat(this.options[this.selectedIndex].value);">
 158                  
 159  <?php
 160  
 161      $sql = 'SELECT * FROM '.DB_PREPEND.'phpwcms_ads_formats WHERE adformat_status=1';
 162      $plugin['ad_formats']        = _dbQuery($sql);
 163      $plugin['ad_formats_js']    = array();
 164      foreach($plugin['ad_formats'] as $_entry['value']) {
 165  
 166          echo '    <option value="'.$_entry['value']['adformat_id'].'"';
 167          if($_entry['value']['adformat_id'] == $plugin['data']['adcampaign_format']) {
 168          
 169              $plugin['data']['adcampaign_data']['width']        = $_entry['value']['adformat_width'];
 170              $plugin['data']['adcampaign_data']['height']    = $_entry['value']['adformat_height'];
 171              
 172              echo ' selected="selected"';
 173          
 174          }
 175          echo '>';
 176          echo html_specialchars($_entry['value']['adformat_title'].' ('.$_entry['value']['adformat_width'].'x'.$_entry['value']['adformat_height'].')');
 177          echo '</option>'.LF;
 178          
 179          $plugin['ad_formats_js'][ $_entry['value']['adformat_id'] ]  = '        ad_formats['.$_entry['value']['adformat_id'].'] = ';
 180          $plugin['ad_formats_js'][ $_entry['value']['adformat_id'] ] .= '["'.$_entry['value']['adformat_width'].'", "';
 181          $plugin['ad_formats_js'][ $_entry['value']['adformat_id'] ] .= $_entry['value']['adformat_height'].'"];';
 182  
 183      }
 184                  
 185  ?>
 186                  
 187                  </select></td>                
 188      </tr>
 189      <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="5" /></td></tr>
 190      <tr>
 191      
 192          <td>&nbsp;</td>
 193          <td><table summary="" cellpadding="0" cellspacing="0" border="0">
 194              <tr>
 195                  <td class="chatlist"><?php echo $BL['be_admin_page_width'] ?>:&nbsp;</td>
 196                  <td><input type="text" name="adcampaign_width" id="adcampaign_width" value="<?php echo $plugin['data']['adcampaign_data']['width'] ?>" class="v11 disabled width45" onfocus="this.blur()" /></td>
 197                  <td class="chatlist">&nbsp;<?php echo $BLM['pixel'] ?>&nbsp;/&nbsp;<?php echo $BL['be_admin_page_height'] ?>:&nbsp;</td>
 198                  <td><input type="text" name="adcampaign_height" id="adcampaign_height" value="<?php echo $plugin['data']['adcampaign_data']['height'] ?>" class="v11 disabled width45" onfocus="this.blur()" /></td>
 199                  <td class="chatlist">&nbsp;<?php echo $BLM['pixel'] ?></td>
 200              </tr>
 201          </table><script language="javascript" type="text/javascript">
 202          <!--
 203          var ad_formats = new Array();
 204  <?php echo implode(LF, $plugin['ad_formats_js']) ?>
 205  
 206  		function setFormat(value) {
 207          
 208              if(ad_formats[value]) {
 209                  getFieldById('adcampaign_width').value = ad_formats[value][0];
 210                  getFieldById('adcampaign_height').value = ad_formats[value][1];
 211              }
 212          
 213          }
 214  
 215          //-->
 216          </script></td>
 217      
 218      </tr>
 219  
 220      <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="10" /></td></tr>
 221      
 222      <tr>
 223      
 224          <td align="right" class="chatlist"><?php echo $BLM['tracking_base'] ?>:&nbsp;</td>
 225          <td><table summary="" cellpadding="0" cellspacing="0" border="0">
 226              <tr>
 227                  <td><input type="text" name="adcampaign_max_views" id="adcampaign_max_views" value="<?php echo empty($plugin['data']['adcampaign_data']['max_views']) ? '' : $plugin['data']['adcampaign_data']['max_views'] ?>" class="v12 width60" /></td>
 228                  <td class="chatlist">&nbsp;<?php echo $BLM['max_view'] ?>&nbsp;&nbsp;&nbsp;</td>
 229                  <td><input type="text" name="adcampaign_max_click" id="adcampaign_max_click" value="<?php echo empty($plugin['data']['adcampaign_data']['max_click']) ? '' : $plugin['data']['adcampaign_data']['max_click'] ?>" class="v12 width60" /></td>
 230                  <td class="chatlist">&nbsp;<?php echo $BLM['max_click'] ?></td>
 231              </tr>
 232          </table></td>
 233      
 234      </tr>    
 235  
 236      <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="10" /></td></tr>
 237  
 238      
 239      <tr>
 240      
 241          <td align="right" class="chatlist"><?php echo $BLM['target_url'] ?>:&nbsp;</td>
 242          <td><input type="text" name="adcampaign_url" id="adcampaign_url" value="<?php echo empty($plugin['data']['adcampaign_data']['max_views']) ? '' : $plugin['data']['adcampaign_data']['url'] ?>" class="v12 width400" /></td>
 243      
 244      </tr>    
 245      
 246      <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="3" /></td></tr>
 247      
 248      <tr>
 249      
 250          <td align="right" class="chatlist"><?php echo $BLM['open_in'] ?>:&nbsp;</td>
 251          <td><select name="adcampaign_target" id="adcampaign_target" class="v12">
 252          <option value=""<?php is_selected('', $plugin['data']['adcampaign_data']['target']) ?>>&nbsp;</option>
 253          <option value="_blank"<?php is_selected('_blank', $plugin['data']['adcampaign_data']['target']) ?>>_blank</option>
 254          <option value="_top"<?php is_selected('_top', $plugin['data']['adcampaign_data']['target']) ?>>_top</option>
 255          <option value="_self"<?php is_selected('_self', $plugin['data']['adcampaign_data']['target']) ?>>_self</option>
 256          <option value="_parent"<?php is_selected('_parent', $plugin['data']['adcampaign_data']['target']) ?>>_parent</option>        
 257          </select></td>
 258      
 259      </tr>    
 260      
 261      
 262      
 263      <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="10" /></td></tr>
 264      
 265      <tr> 
 266          <td align="right" class="chatlist" style="padding-top:4px;vertical-align:top;"><?php echo $BLM['comment'] ?>:&nbsp;</td>
 267          <td colspan="2"><textarea name="adcampaign_comment" id="adcampaign_comment" style="width:400px" rows="5" class="v12"><?php echo html_specialchars($plugin['data']['adcampaign_comment']) ?></textarea></td>
 268      </tr>
 269      
 270      <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="15" /></td></tr>    
 271      
 272      <tr>
 273          <td align="right" class="chatlist"><?php echo $BL['be_ftptakeover_status'] ?>:&nbsp;</td>
 274          <td><table border="0" cellpadding="0" cellspacing="0" summary="">        
 275              <tr>
 276                  <td><input type="checkbox" name="adcampaign_status" id="adcampaign_status" value="1"<?php is_checked($plugin['data']['adcampaign_status'], 1) ?> /></td>
 277                  <td><label for="adcampaign_status"><?php echo $BL['be_cnt_activated'] ?></label></td>
 278              </tr>
 279          </table></td>
 280      </tr>
 281      
 282      <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="10" /></td>
 283      </tr>
 284      <tr> 
 285          <td>&nbsp;</td>
 286          <td>
 287              <input name="submit" type="submit" class="button10" value="<?php echo empty($plugin['data']['adcampaign_id']) ? $BL['be_admin_fcat_button2'] : $BL['be_article_cnt_button1'] ?>" />
 288              <input name="save" type="submit" class="button10" value="<?php echo $BL['be_article_cnt_button3'] ?>" />
 289              &nbsp;&nbsp;&nbsp;&nbsp;
 290              <input name="new" type="button" class="button10" value="<?php echo ucfirst($BL['be_msg_new']) ?>" onclick="location.href='<?php echo decode_entities(MODULE_HREF) ?>&campaign=1&edit=0';return false;" />
 291              <input name="close" type="button" class="button10" value="<?php echo $BL['be_admin_struct_close'] ?>" onclick="location.href='<?php echo decode_entities(MODULE_HREF) ?>';return false;" />
 292          </td>
 293      </tr>
 294  
 295  </table>
 296  
 297  </form>


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