[ Index ]

PHP Cross Reference of phpwcms V1.5.0 _r431 (28.01.12)

title

Body

[close]

/include/inc_module/mod_ads/ -> backend.editform.php (source)

   1  <?php
   2  /*************************************************************************************
   3     Copyright notice
   4     
   5     (c) 2002-2012 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(phpwcms_strtotime($plugin['data']['adcampaign_changed'], $BL['be_fprivedit_dateformat'], '')) ?></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(phpwcms_strtotime($plugin['data']['adcampaign_created'], $BL['be_fprivedit_dateformat'], '')) ?></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 type="text/javascript">
  92  		function aStart(date, month, year) {
  93              getFieldById('adcampaign_date_start').value = subrstr('00' + date, 2) + '<?php echo $BLM['date_delimiter'] ?>' + subrstr('00' + month, 2) + '<?php echo $BLM['date_delimiter'] ?>' + year;
  94              
  95              var timestart = getFieldById('adcampaign_time_start');
  96              if(Trim(timestart.value) == '') {
  97                  timestart.value = '00:00';
  98              }
  99          }
 100          calStart = new dynCalendar('calStart', 'aStart', 'img/dynCal/');
 101          calStart.setMonthCombo(false);
 102          calStart.setYearCombo(false);
 103          </script></td>
 104      
 105              </tr>
 106          </table></td>
 107          
 108      </tr>    
 109      
 110      <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="3" /></td></tr>
 111      
 112      <tr> 
 113          <td align="right" class="chatlist" valign="top" style="padding-top:18px"><?php echo $BLM['calendar_end'] ?>:&nbsp;</td>
 114          <td><table border="0" cellpadding="0" cellspacing="0" summary="">
 115          
 116              <tr>
 117                  <td class="chatlist" style="padding-bottom:2px"><?php echo $BLM['date_format'] ?></td>
 118                  <td class="chatlist">&nbsp;</td>
 119                  <td class="chatlist" style="padding-bottom:2px"><?php echo $BLM['time_format'] ?></td>
 120              </tr>
 121          
 122              <tr>
 123                  <td><input name="adcampaign_date_end" type="text" id="adcampaign_date_end" class="v12<?php 
 124          
 125          //error class
 126          if(!empty($plugin['error']['adcampaign_date_end'])) echo ' errorInputText';
 127          
 128          ?>" style="width:100px;" value="<?php echo html_specialchars($plugin['data']['adcampaign_date_end']) ?>" size="30" /></td>
 129          <td>&nbsp;</td>
 130          <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>
 131          <td>&nbsp;<script type="text/javascript">
 132  		function aEnd(date, month, year) {
 133              getFieldById('adcampaign_date_end').value = subrstr('00' + date, 2) + '<?php echo $BLM['date_delimiter'] ?>' + subrstr('00' + month, 2) + '<?php echo $BLM['date_delimiter'] ?>' + year;
 134              var timeend = getFieldById('adcampaign_time_end');
 135              if(Trim(timeend.value) == '') {
 136                  timeend.value = '23:59';
 137              }
 138          }
 139          calEnd = new dynCalendar('calEnd', 'aEnd', 'img/dynCal/');
 140          calEnd.setMonthCombo(false);
 141          calEnd.setYearCombo(false);
 142          </script></td>
 143          
 144              </tr>
 145          </table></td>
 146          
 147      </tr>        
 148      
 149      <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="8" /></td></tr>    
 150  
 151      <tr> 
 152          <td align="right" class="chatlist"><?php echo $BLM['ad_format'] ?>:&nbsp;</td>
 153          <td><select name="adcampaign_format" id="adcampaign_format" class="v12" onchange="setFormat(this.options[this.selectedIndex].value);">
 154                  
 155  <?php
 156  
 157      $sql = 'SELECT * FROM '.DB_PREPEND.'phpwcms_ads_formats WHERE adformat_status=1';
 158      $plugin['ad_formats']        = _dbQuery($sql);
 159      $plugin['ad_formats_js']    = array();
 160      foreach($plugin['ad_formats'] as $_entry['value']) {
 161  
 162          echo '    <option value="'.$_entry['value']['adformat_id'].'"';
 163          if($_entry['value']['adformat_id'] == $plugin['data']['adcampaign_format']) {
 164          
 165              $plugin['data']['adcampaign_data']['width']        = $_entry['value']['adformat_width'];
 166              $plugin['data']['adcampaign_data']['height']    = $_entry['value']['adformat_height'];
 167              
 168              echo ' selected="selected"';
 169          
 170          }
 171          echo '>';
 172          echo html_specialchars($_entry['value']['adformat_title'].' ('.$_entry['value']['adformat_width'].'x'.$_entry['value']['adformat_height'].')');
 173          echo '</option>'.LF;
 174          
 175          $plugin['ad_formats_js'][ $_entry['value']['adformat_id'] ]  = '        ad_formats['.$_entry['value']['adformat_id'].'] = ';
 176          $plugin['ad_formats_js'][ $_entry['value']['adformat_id'] ] .= '["'.$_entry['value']['adformat_width'].'", "';
 177          $plugin['ad_formats_js'][ $_entry['value']['adformat_id'] ] .= $_entry['value']['adformat_height'].'"];';
 178  
 179      }
 180                  
 181  ?>
 182                  
 183                  </select></td>                
 184      </tr>
 185      <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="5" /></td></tr>
 186      <tr>
 187      
 188          <td>&nbsp;</td>
 189          <td><table summary="" cellpadding="0" cellspacing="0" border="0">
 190              <tr>
 191                  <td class="chatlist"><?php echo $BL['be_admin_page_width'] ?>:&nbsp;</td>
 192                  <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>
 193                  <td class="chatlist">&nbsp;<?php echo $BLM['pixel'] ?>&nbsp;/&nbsp;<?php echo $BL['be_admin_page_height'] ?>:&nbsp;</td>
 194                  <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>
 195                  <td class="chatlist">&nbsp;<?php echo $BLM['pixel'] ?></td>
 196              </tr>
 197          </table><script type="text/javascript">
 198          var ad_formats = new Array();
 199  <?php echo implode(LF, $plugin['ad_formats_js']) ?>
 200  
 201  		function setFormat(value) {
 202          
 203              if(ad_formats[value]) {
 204                  getFieldById('adcampaign_width').value = ad_formats[value][0];
 205                  getFieldById('adcampaign_height').value = ad_formats[value][1];
 206              }
 207          
 208          }
 209          </script></td>
 210      
 211      </tr>
 212  
 213      <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="10" /></td></tr>
 214      
 215      <tr>
 216      
 217          <td align="right" class="chatlist"><?php echo $BLM['tracking_base'] ?>:&nbsp;</td>
 218          <td><table summary="" cellpadding="0" cellspacing="0" border="0">
 219              <tr>
 220                  <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>
 221                  <td class="chatlist">&nbsp;<?php echo $BLM['max_view'] ?>&nbsp;&nbsp;&nbsp;</td>
 222                  <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>
 223                  <td class="chatlist">&nbsp;<?php echo $BLM['max_click'] ?></td>
 224              </tr>
 225          </table></td>
 226      
 227      </tr>    
 228  
 229      <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="10" /></td></tr>
 230  
 231      
 232      <tr>
 233      
 234          <td align="right" class="chatlist"><?php echo $BLM['target_url'] ?>:&nbsp;</td>
 235          <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>
 236      
 237      </tr>    
 238      
 239      <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="3" /></td></tr>
 240      
 241      <tr>
 242      
 243          <td align="right" class="chatlist"><?php echo $BLM['open_in'] ?>:&nbsp;</td>
 244          <td><select name="adcampaign_target" id="adcampaign_target" class="v12">
 245          <option value=""<?php is_selected('', $plugin['data']['adcampaign_data']['target']) ?>>&nbsp;</option>
 246          <option value="_blank"<?php is_selected('_blank', $plugin['data']['adcampaign_data']['target']) ?>>_blank</option>
 247          <option value="_top"<?php is_selected('_top', $plugin['data']['adcampaign_data']['target']) ?>>_top</option>
 248          <option value="_self"<?php is_selected('_self', $plugin['data']['adcampaign_data']['target']) ?>>_self</option>
 249          <option value="_parent"<?php is_selected('_parent', $plugin['data']['adcampaign_data']['target']) ?>>_parent</option>        
 250          </select></td>
 251      
 252      </tr>    
 253      
 254      
 255      
 256      <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="10" /></td></tr>
 257      
 258      <tr> 
 259          <td align="right" class="chatlist" style="padding-top:4px;vertical-align:top;"><?php echo $BLM['comment'] ?>:&nbsp;</td>
 260          <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>
 261      </tr>
 262      
 263      <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="15" /></td></tr>    
 264      
 265      <tr>
 266          <td align="right" class="chatlist"><?php echo $BL['be_ftptakeover_status'] ?>:&nbsp;</td>
 267          <td><table border="0" cellpadding="0" cellspacing="0" summary="">        
 268              <tr>
 269                  <td><input type="checkbox" name="adcampaign_status" id="adcampaign_status" value="1"<?php is_checked($plugin['data']['adcampaign_status'], 1) ?> /></td>
 270                  <td><label for="adcampaign_status"><?php echo $BL['be_cnt_activated'] ?></label></td>
 271              </tr>
 272          </table></td>
 273      </tr>
 274      
 275      <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="10" /></td>
 276      </tr>
 277      <tr> 
 278          <td>&nbsp;</td>
 279          <td>
 280              <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'] ?>" />
 281              <input name="save" type="submit" class="button10" value="<?php echo $BL['be_article_cnt_button3'] ?>" />
 282              &nbsp;&nbsp;&nbsp;&nbsp;
 283              <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;" />
 284              <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;" />
 285          </td>
 286      </tr>
 287  
 288  </table>
 289  
 290  </form>


Generated: Sun Jan 29 16:31:14 2012 Cross-referenced by PHPXref 0.7.1