[ Index ]

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

title

Body

[close]

/include/inc_module/mod_ads/ -> backend.form.adplace.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  <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 language="javascript" type="text/javascript">
 116          <!--
 117          var ad_formats = new Array();
 118  
 119  <?php 
 120  
 121  echo implode(LF, $plugin['ad_formats_js']);
 122  if(empty($plugin['data']['adplace_format']) && count($plugin['ad_formats_js'])) {
 123      echo LF.LF.'         setFormat('.key($plugin['ad_formats_js']).');';
 124  }
 125  
 126  ?>
 127  
 128  		function setFormat(value) {
 129          
 130              if(ad_formats[value]) {
 131                  getFieldById('adplace_width').value = ad_formats[value][0];
 132                  getFieldById('adplace_height').value = ad_formats[value][1];
 133              }
 134          
 135          }
 136          
 137  
 138          //-->
 139          </script></td>
 140      </tr>
 141  
 142      <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="10" /></td></tr>
 143      
 144      <tr> 
 145          <td align="right" class="chatlist" style="padding-top:4px;vertical-align:top;"><?php echo $BLM['adplace_prefix'] ?>:&nbsp;</td>
 146          <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>
 147      </tr>
 148      
 149      <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="5" /></td></tr>
 150      
 151      <tr> 
 152          <td align="right" class="chatlist" style="padding-top:4px;vertical-align:top;"><?php echo $BLM['adplace_suffix'] ?>:&nbsp;</td>
 153          <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>
 154      </tr>
 155      
 156  <?php 
 157  
 158  if(!empty($plugin['data']['adplace_id'])) {
 159  
 160  ?>    
 161      <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="10" /></td></tr>
 162      
 163      <tr>
 164          <td align="right" class="chatlist tdtop5"><?php echo $BLM['ad_template_code'] ?>:&nbsp;</td>
 165          <td class="v12 tdtop3">
 166              <?php echo $BLM['ad_template_code_info'] ?>
 167              <br />
 168              <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>
 169      </tr>
 170  
 171  
 172  <?php
 173  
 174  }
 175  
 176  ?>
 177      
 178      <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="18" /></td></tr>
 179      
 180      <tr>
 181          <td align="right" class="chatlist"><?php echo $BL['be_ftptakeover_status'] ?>:&nbsp;</td>
 182          <td><table border="0" cellpadding="0" cellspacing="0" summary="">        
 183              <tr>
 184                  <td><input type="checkbox" name="adplace_status" id="adplace_status" value="1"<?php is_checked($plugin['data']['adplace_status'], 1) ?> /></td>
 185                  <td><label for="adplace_status"><?php echo $BL['be_cnt_activated'] ?></label></td>
 186              </tr>
 187          </table></td>
 188      </tr>
 189      
 190      <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="10" /></td>
 191      </tr>
 192      <tr> 
 193          <td>&nbsp;</td>
 194          <td>
 195              <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'] ?>" />
 196              <input name="save" type="submit" class="button10" value="<?php echo $BL['be_article_cnt_button3'] ?>" />
 197              &nbsp;&nbsp;&nbsp;&nbsp;
 198              <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;" />
 199              <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>
 200      </tr>
 201  </table>
 202  
 203  </form>


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