[ Index ]

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

title

Body

[close]

/include/inc_module/mod_shop/inc/ -> edit.categories.inc.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  
  32  ?>
  33  <h1 class="title" style="margin-bottom:10px"><?php 
  34      
  35      echo $BLM['cat_edit'];
  36      if($plugin['data']['cat_id'] && empty($plugin['data']['cat_pid']) ) {
  37          echo ' <span style="font-weight:normal">[ID: ' . $plugin['data']['cat_id'] . ']</span>';
  38      }
  39  
  40  ?></h1>
  41  
  42  <form action="<?php echo shop_url( array('controller=cat', 'edit='.$plugin['data']['cat_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">
  43  <input type="hidden" name="cat_id" value="<?php echo $plugin['data']['cat_id'] ?>" />
  44  <table border="0" cellpadding="0" cellspacing="0" width="100%" summary="">
  45  
  46      <tr> 
  47          <td align="right" class="chatlist"><?php echo $BL['be_cnt_last_edited']  ?>:&nbsp;</td>
  48          <td class="v10" width="410"><?php 
  49          
  50          echo html_specialchars(date($BL['be_fprivedit_dateformat'], $plugin['data']['cat_changedate'])) ;
  51          
  52          if(!empty($plugin['data']['cat_createdate'])) {
  53          ?>        
  54          &nbsp;&nbsp;&nbsp;<span class="chatlist"><?php echo $BL['be_fprivedit_created']  ?>:</span> 
  55          <?php 
  56                  echo html_specialchars(date($BL['be_fprivedit_dateformat'], strtotime($plugin['data']['cat_createdate'])));
  57          }
  58          
  59          ?></td>
  60      </tr>
  61      
  62      <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="10" /></td></tr>
  63  
  64      <tr> 
  65          <td align="right" class="chatlist"><?php echo $BL['be_admin_page_category'] ?>:&nbsp;</td>
  66          <td><input name="cat_name" type="text" id="cat_name" class="v12<?php 
  67          
  68          //error class
  69          if(!empty($plugin['error']['cat_name'])) echo ' errorInputText';
  70          
  71          ?>" style="width:400px;" value="<?php echo html_specialchars($plugin['data']['cat_name']) ?>" size="30" maxlength="200" /></td>
  72      </tr>
  73      
  74      <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="10" /></td></tr>
  75      
  76      <tr> 
  77          <td align="right" class="chatlist"><?php echo $BLM['shopprod_subcategory'] ?>:&nbsp;</td>
  78          <td><select name="cat_pid" id="cat_pid" class="v12">
  79          <?php
  80          //if($plugin['data']['cat_pid'] == 0) {
  81              echo '<option value="0" selected="selected">&nbsp;</option>' . LF;
  82          //}
  83          $sql  = 'SELECT * FROM '.DB_PREPEND."phpwcms_categories WHERE ";
  84          $sql .= "cat_type='module_shop' AND cat_pid=0 AND cat_status != 9 AND ";
  85          $sql .= "cat_id != " . $plugin['data']['cat_id'];
  86          $plugin['data']['subcat'] = _dbQuery($sql);
  87          foreach($plugin['data']['subcat'] as $value) {
  88          
  89              echo '<option value="' . $value['cat_id'] . '"';
  90              is_selected($plugin['data']['cat_pid'], $value['cat_id']);
  91              if($value['cat_status'] = 0) {
  92                  echo ' style="font-style:italic;"';
  93              }
  94              echo '>' . html_specialchars($value['cat_name']) . '</option>' . LF;
  95          
  96          }
  97          
  98          ?>
  99          </select></td>
 100      </tr>    
 101      
 102      <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="10" /></td></tr>
 103  
 104      <tr> 
 105          <td align="right" class="chatlist" style="padding-top:4px;vertical-align:top;"><?php echo $BL['be_cnt_infotext'] ?>:&nbsp;</td>
 106          <td colspan="2"><textarea name="cat_info" id="cat_info" rows="10" class="v12 width400"><?php echo html_specialchars($plugin['data']['cat_info']) ?></textarea></td>
 107      </tr>
 108      
 109      <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="18" /></td></tr>
 110      
 111      <tr>
 112          <td align="right" class="chatlist"><?php echo $BL['be_ftptakeover_status'] ?>:&nbsp;</td>
 113          <td><table border="0" cellpadding="0" cellspacing="0" summary="">        
 114              <tr>
 115                  <td><input type="checkbox" name="cat_status" id="cat_status" value="1"<?php is_checked($plugin['data']['cat_status'], 1) ?> /></td>
 116                  <td><label for="cat_status"><?php echo $BL['be_cnt_activated'] ?></label></td>
 117              </tr>
 118          </table></td>
 119      </tr>
 120      
 121      <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="10" /></td>
 122      </tr>
 123      <tr> 
 124          <td>&nbsp;</td>
 125          <td>
 126              <input name="submit" type="submit" class="button10" value="<?php echo empty($plugin['data']['cat_id']) ? $BL['be_admin_fcat_button2'] : $BL['be_article_cnt_button1'] ?>" />
 127              <input name="save" type="submit" class="button10" value="<?php echo $BL['be_article_cnt_button3'] ?>" />
 128              &nbsp;&nbsp;&nbsp;&nbsp;
 129              <input name="close" type="submit" class="button10" value="<?php echo $BL['be_admin_struct_close'] ?>" />
 130          </td>
 131      </tr>
 132  </table>
 133  
 134  </form>


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