[ Index ]

PHP Cross Reference of phpwcms V1.4.7 _r403 (01.11.10)

title

Body

[close]

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

   1  <?php
   2  /*************************************************************************************
   3     Copyright notice
   4     
   5     (c) 2002-2010 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  <h1 class="title" style="margin-bottom:10px"><?php echo $BLM['form_adplace_title'] ?></h1>
  34  
  35  <form action="<?php echo MODULE_HREF ?>&amp;adplace=1&amp;edit=<?php echo $plugin['data']['adplace_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">
  36  <input type="hidden" name="adplace_id" value="<?php echo $plugin['data']['adplace_id'] ?>" />
  37  <table border="0" cellpadding="0" cellspacing="0" width="100%" summary="">
  38  
  39      <tr> 
  40          <td align="right" class="chatlist"><?php echo $BL['be_cnt_last_edited']  ?>:&nbsp;</td>
  41          <td class="v10" width="410"><?php 
  42          
  43          echo html_specialchars(date($BL['be_fprivedit_dateformat'], strtotime($plugin['data']['adplace_changed']))) ;
  44          
  45          if(!empty($plugin['data']['adplace_created'])) {
  46          ?>        
  47          &nbsp;&nbsp;&nbsp;<span class="chatlist"><?php echo $BL['be_fprivedit_created']  ?>:</span> 
  48          <?php 
  49                  echo html_specialchars(date($BL['be_fprivedit_dateformat'], strtotime($plugin['data']['adplace_created'])));
  50          }
  51          
  52          ?></td>
  53      </tr>
  54      
  55      <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="10" /></td></tr>
  56  
  57      <tr> 
  58          <td align="right" class="chatlist"><?php echo $BLM['adplace_title'] ?>:&nbsp;</td>
  59          <td><input name="adplace_title" type="text" id="adplace_title" class="v12<?php 
  60          
  61          //error class
  62          if(!empty($plugin['error']['adplace_title'])) echo ' errorInputText';
  63          
  64          ?>" style="width:400px;" value="<?php echo html_specialchars($plugin['data']['adplace_title']) ?>" size="30" maxlength="200" /></td>
  65      </tr>
  66      
  67      <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="10" /></td></tr>    
  68  
  69      <tr> 
  70          <td align="right" class="chatlist"><?php echo $BLM['ad_format'] ?>:&nbsp;</td>
  71          <td><select name="adplace_format" id="adplace_format" class="v12" onchange="setFormat(this.options[this.selectedIndex].value);">
  72                  
  73  <?php
  74  
  75      $sql = 'SELECT * FROM '.DB_PREPEND.'phpwcms_ads_formats WHERE adformat_status=1';
  76      $plugin['ad_formats']        = _dbQuery($sql);
  77      $plugin['ad_formats_js']    = array();
  78      foreach($plugin['ad_formats'] as $_entry['value']) {
  79  
  80          echo '    <option value="'.$_entry['value']['adformat_id'].'"';
  81          if($_entry['value']['adformat_id'] == $plugin['data']['adplace_format']) {
  82          
  83              $plugin['data']['adplace_width']    = $_entry['value']['adformat_width'];
  84              $plugin['data']['adplace_height']    = $_entry['value']['adformat_height'];
  85              
  86              echo ' selected="selected"';
  87          
  88          }
  89          echo '>';
  90          echo html_specialchars($_entry['value']['adformat_title'].' ('.$_entry['value']['adformat_width'].'x'.$_entry['value']['adformat_height'].')');
  91          echo '</option>'.LF;
  92          
  93          $plugin['ad_formats_js'][ $_entry['value']['adformat_id'] ]  = '        ad_formats['.$_entry['value']['adformat_id'].'] = ';
  94          $plugin['ad_formats_js'][ $_entry['value']['adformat_id'] ] .= '["'.$_entry['value']['adformat_width'].'", "';
  95          $plugin['ad_formats_js'][ $_entry['value']['adformat_id'] ] .= $_entry['value']['adformat_height'].'"];';
  96  
  97      }
  98                  
  99  ?>
 100                  
 101                  </select></td>                
 102      </tr>
 103      <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="5" /></td></tr>
 104      <tr>
 105      
 106          <td>&nbsp;</td>
 107          <td><table summary="" cellpadding="0" cellspacing="0" border="0">
 108              <tr>
 109                  <td class="chatlist"><?php echo $BL['be_admin_page_width'] ?>:&nbsp;</td>
 110                  <td><input type="text" name="adplace_width" id="adplace_width" value="<?php echo $plugin['data']['adplace_width'] ?>" class="v11 disabled width45" onfocus="this.blur()" /></td>
 111                  <td class="chatlist">&nbsp;<?php echo $BLM['pixel'] ?>&nbsp;/&nbsp;<?php echo $BL['be_admin_page_height'] ?>:&nbsp;</td>
 112                  <td><input type="text" name="adplace_height" id="adplace_height" value="<?php echo $plugin['data']['adplace_height'] ?>" class="v11 disabled width45" onfocus="this.blur()" /></td>
 113                  <td class="chatlist">&nbsp;<?php echo $BLM['pixel'] ?></td>
 114              </tr>
 115          </table><script type="text/javascript">
 116          var ad_formats = new Array();
 117  
 118  <?php 
 119  
 120  echo implode(LF, $plugin['ad_formats_js']);
 121  if(empty($plugin['data']['adplace_format']) && count($plugin['ad_formats_js'])) {
 122      echo LF.LF.'         setFormat('.key($plugin['ad_formats_js']).');';
 123  }
 124  
 125  ?>
 126  		function setFormat(value) {
 127          
 128              if(ad_formats[value]) {
 129                  getFieldById('adplace_width').value = ad_formats[value][0];
 130                  getFieldById('adplace_height').value = ad_formats[value][1];
 131              }
 132          
 133          }
 134          </script></td>
 135      </tr>
 136  
 137      <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="10" /></td></tr>
 138      
 139      <tr> 
 140          <td align="right" class="chatlist" style="padding-top:4px;vertical-align:top;"><?php echo $BLM['adplace_prefix'] ?>:&nbsp;</td>
 141          <td colspan="2"><textarea name="adplace_prefix" id="adplace_prefix" rows="3" class="code width400"><?php echo html_entities($plugin['data']['adplace_prefix']) ?></textarea></td>
 142      </tr>
 143      
 144      <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="5" /></td></tr>
 145      
 146      <tr> 
 147          <td align="right" class="chatlist" style="padding-top:4px;vertical-align:top;"><?php echo $BLM['adplace_suffix'] ?>:&nbsp;</td>
 148          <td colspan="2"><textarea name="adplace_suffix" id="adplace_suffix" rows="3" class="code width400"><?php echo html_entities($plugin['data']['adplace_suffix']) ?></textarea></td>
 149      </tr>
 150      
 151  <?php 
 152  
 153  if(!empty($plugin['data']['adplace_id'])) {
 154  
 155  ?>    
 156      <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="10" /></td></tr>
 157      
 158      <tr>
 159          <td align="right" class="chatlist tdtop5"><?php echo $BLM['ad_template_code'] ?>:&nbsp;</td>
 160          <td class="v12 tdtop3">
 161              <?php echo $BLM['ad_template_code_info'] ?>
 162              <br />
 163              <input type="text" name="banner_rt" value="{ADS_<?php echo $plugin['data']['adplace_id'] ?>}" class="v12 rt width100" onfocus="this.select();" onclick="this.select();" /></td>
 164      </tr>
 165  
 166  
 167  <?php
 168  
 169  }
 170  
 171  ?>
 172      
 173      <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="18" /></td></tr>
 174      
 175      <tr>
 176          <td align="right" class="chatlist"><?php echo $BL['be_ftptakeover_status'] ?>:&nbsp;</td>
 177          <td><table border="0" cellpadding="0" cellspacing="0" summary="">        
 178              <tr>
 179                  <td><input type="checkbox" name="adplace_status" id="adplace_status" value="1"<?php is_checked($plugin['data']['adplace_status'], 1) ?> /></td>
 180                  <td><label for="adplace_status"><?php echo $BL['be_cnt_activated'] ?></label></td>
 181              </tr>
 182          </table></td>
 183      </tr>
 184      
 185      <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="10" /></td>
 186      </tr>
 187      <tr> 
 188          <td>&nbsp;</td>
 189          <td>
 190              <input name="submit" type="submit" class="button10" value="<?php echo empty($plugin['data']['adplace_id']) ? $BL['be_admin_fcat_button2'] : $BL['be_article_cnt_button1'] ?>" />
 191              <input name="save" type="submit" class="button10" value="<?php echo $BL['be_article_cnt_button3'] ?>" />
 192              &nbsp;&nbsp;&nbsp;&nbsp;
 193              <input name="new" type="button" class="button10" value="<?php echo ucfirst($BL['be_msg_new']) ?>" onclick="location.href='<?php echo decode_entities(MODULE_HREF) ?>&adplace=1&edit=0';return false;" />
 194              <input name="close" type="button" class="button10" value="<?php echo $BL['be_admin_struct_close'] ?>" onclick="location.href='<?php echo decode_entities(MODULE_HREF) ?>&listadplace=1';return false;" />        </td>
 195      </tr>
 196  </table>
 197  
 198  </form>


Generated: Tue Nov 16 22:51:00 2010 Cross-referenced by PHPXref 0.7