[ Index ]

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

title

Body

[close]

/include/inc_module/mod_shop/inc/ -> edit.products.inc.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  
  31  $BE['HEADER']['optionselect.js']        = getJavaScriptSourceLink('include/inc_js/optionselect.js');
  32  
  33  if(!isset($plugin['data']['shopprod_duplicate'])) {
  34      $plugin['data']['shopprod_duplicate'] = 0;
  35  }
  36  
  37  
  38  ?>
  39  <h1 class="title" style="margin-bottom:10px"><?php echo $BLM['prod_edit'] ?></h1>
  40  
  41  <form action="<?php 
  42  
  43      echo shop_url( array('controller=prod', 'edit='.$plugin['data']['shopprod_id']) ) 
  44  
  45  ?>" method="post" class="editform" onsubmit="selectAllOptions(this.shopprod_images);selectAllOptions(this.shopprod_files);">
  46  
  47  <input type="hidden" name="shopprod_id" value="<?php echo $plugin['data']['shopprod_id'] ?>" /><?php if(SHOP_FELANG_SUPPORT === false): ?><input type="hidden" name="shopprod_lang" value="<?php echo $plugin['data']['shopprod_lang'] ?>" /><?php endif; ?>
  48  <table border="0" cellpadding="0" cellspacing="0" width="100%" summary="">
  49  
  50      <tr> 
  51          <td align="right" class="chatlist"><?php echo $BL['be_cnt_last_edited']  ?>:&nbsp;</td>
  52          <td class="v10" width="410"><?php 
  53          
  54          echo html_specialchars(date($BL['be_fprivedit_dateformat'], $plugin['data']['shopprod_changedate'])) ;
  55          
  56          if(!empty($plugin['data']['shopprod_createdate'])) {
  57          ?>        
  58          &nbsp;&nbsp;&nbsp;<span class="chatlist"><?php echo $BL['be_fprivedit_created']  ?>:</span> 
  59          <?php 
  60              
  61              echo html_specialchars(date($BL['be_fprivedit_dateformat'], strtotime($plugin['data']['shopprod_createdate'])));
  62          }
  63          
  64          ?></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['shopprod_ordernumber'] ?>:&nbsp;</td>
  71          <td><table cellpadding="0" cellspacing="0" border="0" summary="">
  72          
  73              <tr>
  74                  <td><input name="shopprod_ordernumber" type="text" id="shopprod_ordernumber" class="v12 width125 bold<?php 
  75          
  76          //error class
  77          if(!empty($plugin['error']['shopprod_ordernumber'])) echo ' errorInputText';
  78          
  79          ?>" value="<?php echo html_specialchars($plugin['data']['shopprod_ordernumber']) ?>" size="30" maxlength="20" /></td>
  80          
  81                  <td align="right" class="chatlist width100"><?php echo $BLM['shopprod_model'] ?>:&nbsp;</td>
  82                  <td><input name="shopprod_model" type="text" id="shopprod_model" class="v12 width170" value="<?php echo html_specialchars($plugin['data']['shopprod_model']) ?>" size="30" maxlength="200" /></td>
  83              </tr>
  84                  
  85              </table></td>
  86      </tr>
  87  
  88      <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="10" /></td></tr>    
  89  
  90  <?php if(SHOP_FELANG_SUPPORT): ?>
  91  
  92      <tr> 
  93          <td align="right" class="chatlist"><?php echo $BL['be_profile_label_lang']  ?>:&nbsp;</td>
  94          <td class="v10" width="410"><table cellpadding="0" cellspacing="0" border="0" summary="">
  95              <tr>
  96                  <td><input type="radio" name="shopprod_lang" id="shopprod_lang_0" value=""<?php is_checked($plugin['data']['shopprod_lang'], '') ?> /></td>
  97                  <td><label for="shopprod_lang_0"><?php echo $BL['be_ftptakeover_all'] ?></label>&nbsp;&nbsp;</td>
  98  <?php    foreach($phpwcms['allowed_lang'] as $lang):
  99  
 100              $lang = strtolower($lang);
 101  ?>
 102          <td><input type="radio" name="shopprod_lang" id="shopprod_lang_<?php echo $lang ?>" value="<?php echo $lang ?>"<?php is_checked(strtolower($plugin['data']['shopprod_lang']), $lang) ?> /></td>
 103          <td><label for="shopprod_lang_<?php echo $lang ?>"><img src="img/famfamfam/lang/<?php echo $lang; $lang = strtoupper($lang); ?>.png" alt="<?php echo $lang ?>" title="<?php echo $lang ?>" /></label>&nbsp;&nbsp;</td>
 104  
 105  <?php    endforeach;    ?>
 106              </tr>
 107          </table></td>
 108      </tr>
 109      
 110      <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="10" /></td></tr>
 111  
 112  <?php endif; ?>
 113      
 114      
 115      <tr> 
 116          <td align="right" class="chatlist"><?php echo $BLM['shopprod_name1'] ?>:&nbsp;</td>
 117          <td><input name="shopprod_name1" type="text" id="shopprod_name1" class="v12 width400 bold<?php 
 118          
 119          //error class
 120          if(!empty($plugin['error']['shopprod_name1'])) echo ' errorInputText';
 121          
 122          ?>" value="<?php echo html_specialchars($plugin['data']['shopprod_name1']) ?>" size="30" maxlength="200" /></td>
 123      </tr>
 124      
 125      <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="3" /></td></tr>
 126      
 127      <tr> 
 128          <td align="right" class="chatlist"><?php echo $BLM['shopprod_name2'] ?>:&nbsp;</td>
 129          <td><input name="shopprod_name2" type="text" id="shopprod_name2" class="v12 width400" value="<?php echo html_specialchars($plugin['data']['shopprod_name2']) ?>" size="30" maxlength="200" /></td>
 130      </tr>
 131      
 132      <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="3" /></td></tr>
 133      
 134      <tr> 
 135          <td align="right" class="chatlist"><?php echo $BLM['shopprod_weight'] ?>:&nbsp;</td>
 136          <td><table cellpadding="0" cellspacing="0" border="0" summary="">
 137          
 138              <tr>
 139              
 140                  <td><input name="shopprod_weight" type="text" id="shopprod_weight" class="v12 width125 right" value="<?php
 141  
 142              echo number_format($plugin['data']['shopprod_weight'], 3, $BLM['dec_point'], $BLM['thousands_sep']);
 143  
 144          ?>" size="30" maxlength="200" /></td>
 145          
 146              <td class="chatlist">&nbsp;<?php
 147              
 148              if( ! $plugin['data']['shop_pref_unit_weight'] = _getConfig('shop_pref_unit_weight') ) {
 149                  $plugin['data']['shop_pref_unit_weight'] = 'kg';
 150                  _setConfig('shop_pref_unit_weight',     $plugin['data']['shop_pref_unit_weight'],     'module_shop');
 151              }
 152              echo html_specialchars($plugin['data']['shop_pref_unit_weight']);
 153              
 154              ?></td>
 155          
 156              </tr>
 157              </table></td>
 158  
 159      </tr>
 160  
 161      <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="10" /></td></tr>    
 162      
 163      
 164      <tr> 
 165          <td align="right" class="chatlist"><?php echo $BLM['shopprod_price'] ?>:&nbsp;</td>
 166          <td><table cellpadding="0" cellspacing="0" border="0" summary="">
 167          
 168              <tr>
 169              
 170                  <td><input name="shopprod_price" type="text" id="shopprod_price" class="v12 width125 bold right<?php
 171          
 172              if(!empty($plugin['error']['shopprod_price'])) echo ' errorInputText';
 173          
 174              ?>" value="<?php
 175          
 176              $dec_lenght = strlen(strrchr($plugin['data']['shopprod_price'],'.')) - 1;
 177              if($dec_lenght < 2) $dec_lenght = 2;
 178              echo number_format($plugin['data']['shopprod_price'], $dec_lenght, $BLM['dec_point'], $BLM['thousands_sep']);
 179  
 180          ?>" size="30" maxlength="200" /></td>
 181              
 182              <td>&nbsp;</td>
 183              <td width="25" align="right"><input type="checkbox" name="shopprod_netgross" id="shopprod_netgross" value="1"<?php is_checked(1, $plugin['data']['shopprod_netgross']) ?>  title="<?php echo $BLM['shopprod_netgross_info'] ?>" /></td>
 184              <td width="75"><label for="shopprod_netgross" title="<?php echo $BLM['shopprod_netgross_info'] ?>"><?php echo $BLM['shopprod_netgross'] ?></label>&nbsp;&nbsp;&nbsp;</td>
 185          
 186              <td class="chatlist"><?php echo $BLM['shopprod_vat'] ?>:&nbsp;</td>
 187              <td><select name="shopprod_vat" id="shopprod_id" class="v12">
 188  
 189      <?php
 190      
 191      if( ! $plugin['data']['shop_pref_vat'] = _getConfig('shop_pref_vat') ) {
 192          $plugin['data']['shop_pref_vat'] = array('0.00');
 193          _setConfig('shop_pref_vat',     $plugin['data']['shop_pref_vat'],     'module_shop');
 194      }
 195      
 196      $add_option = '';
 197      $add_vat    = array();
 198      
 199      foreach( $plugin['data']['shop_pref_vat'] as $value ) {
 200          echo '<option value="'.$value.'"';
 201          if($plugin['data']['shopprod_vat'] == $value) {
 202              echo ' selected="selected"';
 203          } elseif( ! empty($plugin['data']['shopprod_vat']) && ! in_array($plugin['data']['shopprod_vat'], $plugin['data']['shop_pref_vat']) ) {
 204              $plugin['data']['shop_pref_vat'][] = $plugin['data']['shopprod_vat'];
 205              natsort($plugin['data']['shop_pref_vat']);
 206              _setConfig('shop_pref_vat',     $plugin['data']['shop_pref_vat'],     'module_shop');
 207              
 208              $add_option .= LF . '<option value="'.$plugin['data']['shopprod_vat'].'" selected="selected">';
 209              $add_option .= number_format($plugin['data']['shopprod_vat'], 2, $BLM['dec_point'], $BLM['thousands_sep']);
 210              $add_option .= '</option>';
 211          }
 212          echo '>';
 213          echo number_format($value, 2, $BLM['dec_point'], $BLM['thousands_sep']);
 214          echo '</option>' . LF;
 215      }
 216      echo $add_option;
 217      
 218      ?>
 219  
 220              </select></td>
 221              
 222              <td>&nbsp;%</td>
 223              
 224          
 225          </tr>
 226                  
 227              </table></td>
 228      
 229      </tr>
 230      
 231      
 232      <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="10" /></td></tr>
 233      
 234      <tr> 
 235          <td align="right" class="chatlist tdtop4"><?php echo $BLM['shopprod_size'] ?>:&nbsp;</td>
 236          <td><table cellpadding="0" cellspacing="0" border="0" summary="">
 237          
 238              <tr>
 239                  <td><textarea name="shopprod_size" id="shopprod_size" class="v12 width125" rows="5" cols="15"><?php echo html_specialchars($plugin['data']['shopprod_size']) ?></textarea></td>
 240          
 241                  <td align="right" class="chatlist width100 tdtop4"><?php echo $BLM['shopprod_color'] ?>:&nbsp;</td>
 242                  <td><textarea name="shopprod_color" id="shopprod_color" class="v12 width170" rows="5" cols="15"><?php echo html_specialchars($plugin['data']['shopprod_color']) ?></textarea></td>
 243          
 244                  </tr>
 245                  
 246              </table></td>
 247      </tr>
 248      
 249      
 250      
 251  
 252  <tr><td colspan="2" class="rowspacer7x7"><img src="img/leer.gif" alt="" width="1" height="1" /></td></tr>
 253  
 254  
 255      <tr> 
 256          <td align="right" class="chatlist tdbottom3"><?php echo $BLM['shopprod_description0'] ?>:&nbsp;</td>
 257          <td>&nbsp;</td>
 258      </tr>
 259      <tr>
 260          <td colspan="2" class="tdbottom4"><?php
 261  
 262          $wysiwyg_editor = array(
 263              'value'        => $plugin['data']['shopprod_description0'],
 264              'field'        => 'shopprod_description0',
 265              'height'    => '150px',
 266              'width'        => '536px',
 267              'rows'        => '10',
 268              'editor'    => $_SESSION["WYSIWYG_EDITOR"],
 269              'lang'        => 'en'
 270          );
 271          
 272          include (PHPWCMS_ROOT.'/include/inc_lib/wysiwyg.editor.inc.php');
 273          
 274          ?></td>
 275      </tr>
 276  
 277      <tr> 
 278          <td align="right" class="chatlist tdbottom3"><?php echo $BL['be_cnt_description'] ?>:&nbsp;</td>
 279          <td>&nbsp;</td>
 280      </tr>
 281      <tr>
 282          <td colspan="2" class="tdbottom4"><?php
 283  
 284          $wysiwyg_editor = array(
 285              'value'        => $plugin['data']['shopprod_description1'],
 286              'field'        => 'shopprod_description1',
 287              'height'    => '250px',
 288              'width'        => '536px',
 289              'rows'        => '10',
 290              'editor'    => $_SESSION["WYSIWYG_EDITOR"],
 291              'lang'        => 'en'
 292          );
 293          
 294          include (PHPWCMS_ROOT.'/include/inc_lib/wysiwyg.editor.inc.php');
 295          
 296          ?></td>
 297      </tr>
 298      
 299      <tr> 
 300          <td align="right" class="chatlist tdtop4"><?php echo $BLM['shopprod_description1'] ?>:&nbsp;</td>
 301          <td colspan="2" class="tdbottom3"><textarea name="shopprod_description2" id="shopprod_description2" rows="5" class="v12 width400"><?php echo html_specialchars($plugin['data']['shopprod_description2']) ?></textarea></td>
 302      </tr>
 303      
 304      <tr> 
 305          <td align="right" class="chatlist tdtop4"><?php echo $BLM['shopprod_description2'] ?>:&nbsp;</td>
 306          <td colspan="2"><textarea name="shopprod_description3" id="shopprod_description3" rows="5" class="v12 width400"><?php echo html_specialchars($plugin['data']['shopprod_description3']) ?></textarea></td>
 307      </tr>
 308      
 309  
 310  <tr><td colspan="2" class="rowspacer7x7"><img src="img/leer.gif" alt="" width="1" height="1" /></td></tr>
 311  
 312  <tr>
 313      <td align="right" valign="top" class="chatlist tdtop4"><?php echo $BL['be_cnt_image'] ?>:&nbsp;</td>
 314      <td valign="top" class="tdbottom3"><table border="0" cellpadding="0" cellspacing="0" summary="">
 315      <tr>
 316          <td valign="top"><select name="shopprod_images[]" size="<?php 
 317          
 318      $img_count = isset($plugin['data']['shopprod_images']) && is_array($plugin['data']['shopprod_images']) ? count($plugin['data']['shopprod_images']) : 0;        
 319          
 320      echo $img_count+5 
 321          
 322          ?>" multiple="multiple" class="f11 width360" id="shopprod_images">
 323  <?php
 324  
 325  $img_thumbs = '';
 326  $imgx = 0;
 327  
 328  if($img_count) {
 329  
 330      // browse images and list available
 331      // will be visible only when aceessible
 332      foreach($plugin['data']['shopprod_images'] as $key => $value) {
 333      
 334          // 0   :1       :2   :3        :4    :5     :6      :7       :8
 335          // dbid:filename:hash:extension:width:height:caption:position:zoom
 336          $thumb_image = get_cached_image(
 337                          array(    "target_ext"    =>    $plugin['data']['shopprod_images'][$key]['f_ext'],
 338                                  "image_name"    =>    $plugin['data']['shopprod_images'][$key]['f_hash'] . '.' . $plugin['data']['shopprod_images'][$key]['f_ext'],
 339                                  "thumb_name"    =>    md5(    $plugin['data']['shopprod_images'][$key]['f_hash'].
 340                                                              $phpwcms["img_list_width"].
 341                                                              $phpwcms["img_list_height"].
 342                                                              $phpwcms["sharpen_level"]
 343                                                          )
 344                                )
 345                              );
 346  
 347          if($thumb_image != false) {
 348          
 349              // image found
 350              echo '<option value="' . $plugin['data']['shopprod_images'][$key]['f_id'] . '">';
 351              $img_name = html_specialchars($plugin['data']['shopprod_images'][$key]['f_name']);
 352              echo $img_name . '</option>'.LF;
 353  
 354              if($imgx == 4) {
 355                  $img_thumbs .= '<br /><img src="img/leer.gif" alt="" border="0" width="1" height="2" /><br />';
 356                  $imgx = 0;
 357              }
 358              if($imgx) {
 359                  $img_thumbs .= '<img src="img/leer.gif" alt="" border="0" width="2" height="1" />';
 360              }
 361              $img_thumbs .= '<img src="'.PHPWCMS_IMAGES . $thumb_image[0] .'" border="0" '.$thumb_image[3].' alt="'.$img_name.'" title="'.$img_name.'" />';
 362  
 363              $plugin['data']['shopprod_caption'][] = html_specialchars($plugin['data']['shopprod_images'][$key]['caption']);
 364  
 365              $imgx++;
 366          }
 367  
 368      }
 369  
 370  }
 371  
 372  ?>
 373            </select></td>
 374                    <td valign="top"><img src="img/leer.gif" alt="" width="5" height="1" /></td>
 375                    <td valign="top">
 376                    <a href="#" title="<?php echo $BL['be_cnt_openimagebrowser'] ?>" onclick="tmt_winOpen('filebrowser.php?opt=5&amp;target=nolist','imageBrowser','width=380,height=300,left=8,top=8,scrollbars=yes,resizable=yes',1);return false;"><img src="img/button/open_image_button.gif" alt="" width="20" height="15" border="0" /></a>
 377                    <br /><img src="img/leer.gif" alt="" width="1" height="4" /><br /><a href="#" title="<?php echo $BL['be_cnt_sortup'] ?>" onclick="moveOptionUp(img_field);return false;"><img src="img/button/image_pos_up.gif" alt="" width="10" height="9" border="0" /></a><a href="#" title="<?php echo $BL['be_cnt_sortdown'] ?>" onclick="moveOptionDown(img_field);return false;"><img src="img/button/image_pos_down.gif" alt="" width="10" height="9" border="0" /></a>
 378                    <br /><img src="img/leer.gif" alt="" width="1" height="4" /><br /><a href="#" onclick="removeSelectedOptions(img_field);return false;" title="<?php echo $BL['be_cnt_delimage'] ?>"><img src="img/button/del_image_button1.gif" alt="" width="20" height="15" border="0" /></a></td>
 379        </tr>
 380                </table>
 381  <?php
 382  
 383      if($img_thumbs) { 
 384          echo '
 385          <table border="0" cellspacing="0" cellpadding="0" summary="">
 386          <tr>
 387                  <td style="padding:5px 0 5px 0;">'.$img_thumbs.'</td>
 388              </tr>
 389          </table>';
 390      }
 391  
 392  ?></td>
 393      </tr>
 394                
 395      <tr>
 396          <td align="right" valign="top" class="chatlist tdtop4"><?php echo $BL['be_cnt_caption'] ?>:&nbsp;</td>
 397          <td valign="top"><textarea name="shopprod_caption" cols="40" rows="<?php echo $img_count+5 ?>" wrap="off" class="f11 width400" id="shopprod_caption"><?php echo implode(' '.LF, $plugin['data']['shopprod_caption']) ?></textarea></td>
 398      </tr>
 399      
 400      <tr><td colspan="2" class="rowspacer7x7"><img src="img/leer.gif" alt="" width="1" height="1" /></td></tr>
 401  
 402  
 403      <!-- Attachments -->
 404      <tr>
 405      <td align="right" valign="top" class="chatlist tdtop4"><?php echo $BL['be_cnt_files'] ?>:&nbsp;</td>
 406      <td valign="top" class="tdbottom3"><table border="0" cellpadding="0" cellspacing="0" summary="">
 407      <tr>
 408          <td valign="top"><select name="shopprod_files[]" size="<?php 
 409          
 410      $files_count = isset($plugin['data']['shopprod_files']) && is_array($plugin['data']['shopprod_files']) ? count($plugin['data']['shopprod_files']) : 0;        
 411          
 412      echo $files_count+4 
 413          
 414          ?>" multiple="multiple" class="f11 width360" id="shopprod_files">
 415  <?php
 416  
 417  if(count($plugin['data']['shopprod_files'])) {
 418  
 419      // browse images and list available
 420      // will be visible only when aceessible
 421      foreach($plugin['data']['shopprod_files'] as $key => $value) {
 422  
 423          echo '<option value="' . $plugin['data']['shopprod_files'][$key]['f_id'] . '">';
 424          echo html_specialchars($plugin['data']['shopprod_files'][$key]['f_name']);
 425          echo '</option>'.LF;
 426  
 427          $plugin['data']['shopprod_filecaption'][] = html_specialchars($plugin['data']['shopprod_files'][$key]['caption']);
 428  
 429      }
 430  
 431  }
 432  
 433  ?>
 434          </select></td>
 435      
 436          <td valign="top"><img src="img/leer.gif" alt="" width="5" height="1" /></td>
 437          <td valign="top">
 438            <a href="#" title="<?php echo $BL['be_cnt_openfilebrowser'] ?>" onclick="tmt_winOpen('filebrowser.php?opt=9&amp;target=nolist','imageBrowser','width=380,height=300,left=8,top=8,scrollbars=yes,resizable=yes,status=yes',1);return false;"><img src="img/button/open_image_button.gif" alt="" width="20" height="15" border="0" /></a>
 439            <br /><img src="img/leer.gif" alt="" width="1" height="4" /><br /><a href="#" title="<?php echo $BL['be_cnt_sortup'] ?>" onclick="moveOptionUp(files_field);return false;"><img src="img/button/image_pos_up.gif" alt="" width="10" height="9" border="0" /></a><a href="#" title="<?php echo $BL['be_cnt_sortdown'] ?>" onclick="moveOptionDown(files_field);return false;"><img src="img/button/image_pos_down.gif" alt="" width="10" height="9" border="0" /></a>
 440            <br /><img src="img/leer.gif" alt="" width="1" height="4" /><br /><a href="#" onclick="removeSelectedOptions(files_field);return false;" title="<?php echo $BL['be_cnt_delfile'] ?>"><img src="img/button/del_image_button1.gif" alt="" width="20" height="15" border="0" /></a></td> 
 441        </tr>
 442      </table>
 443          </td>
 444      </tr>
 445                
 446      <tr>
 447          <td align="right" valign="top" class="chatlist tdtop4"><?php echo $BL['be_cnt_description'] ?>:&nbsp;</td>
 448          <td valign="top"><textarea name="shopprod_filecaption" cols="40" rows="<?php echo $img_count+5 ?>" wrap="off" class="f11 width400" id="shopprod_filecaption"><?php echo implode(' '.LF, $plugin['data']['shopprod_filecaption']) ?></textarea></td>
 449      </tr>
 450      <!-- End Attachments -->
 451      
 452      <tr><td colspan="2" class="rowspacer7x7"><img src="img/leer.gif" alt="" width="1" height="1" /></td></tr>
 453  
 454      <tr> 
 455          <td align="right" class="chatlist"><?php echo $BLM['shopprod_url'] ?>:&nbsp;</td>
 456          <td><input name="shopprod_url" type="text" id="shopprod_url" class="v12 width400" value="<?php echo html_specialchars($plugin['data']['shopprod_url']) ?>" size="30" maxlength="250" /></td>
 457      </tr>
 458  
 459      <tr><td colspan="2" class="rowspacer7x7"><img src="img/leer.gif" alt="" width="1" height="1" /></td></tr>
 460      
 461      
 462      <tr>
 463          <td align="right" class="chatlist tdtop3"><?php echo $BLM['prod_cat'] ?>:&nbsp;</td>
 464          <td><table cellpadding="0" cellspacing="0" border="0" summary="">
 465          
 466              <tr>
 467                  <td><select name="shopprod_category[]" size="7" multiple="multiple" class="v12 width400" id="shopprod_category">
 468          <?php 
 469          $t = array();
 470          foreach($plugin['data']['categories'] as $value) {
 471          
 472              echo '<option value="'.$value['cat_id'].'"';
 473              if(in_array($value['cat_id'], $plugin['data']['shopprod_category'])) {
 474                  echo ' selected="selected"';
 475                  $t[] = $value['category'];
 476              }
 477              if($value['cat_status'] == 0) {
 478                  echo ' style="font-style:italic;"';
 479              }
 480              echo '>';
 481              if($value['cat_pid']) {
 482                  echo '&nbsp;&nbsp;&nbsp;';
 483              }
 484              echo html_specialchars($value['cat_name']).'</option>'.LF;
 485          
 486          }
 487          
 488          ?>
 489              </select></td>
 490              </tr>
 491          <?php    if(count($t)) {        ?>
 492              <tr>
 493                  <td class="tdtop3 v10"><?php echo nl2br(html_specialchars(implode(', ', $t))) ?></td>
 494              </tr>
 495          <?php    }    ?>
 496  
 497          </table></td>        
 498          
 499      </tr>
 500      
 501      <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="10" /></td></tr>
 502      
 503      
 504      <tr> 
 505          <td align="right" class="chatlist"><?php echo $BLM['shopprod_tag'] ?>:&nbsp;</td>
 506          <td><input name="shopprod_tag" type="text" id="shopprod_tag" class="v12 width400" value="<?php echo html_specialchars( trim($plugin['data']['shopprod_tag'], ',') ) ?>" size="30" maxlength="250" /></td>
 507      </tr>
 508      
 509      
 510      <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="18" /></td></tr>
 511      
 512      <tr>
 513          <td align="right" class="chatlist tdtop4"><?php echo $BL['be_ftptakeover_status'] ?>:&nbsp;</td>
 514          <td><table border="0" cellpadding="0" cellspacing="0" summary="">        
 515              <tr>
 516                  <td><input type="checkbox" name="shopprod_status" id="shopprod_status" value="1"<?php is_checked($plugin['data']['shopprod_status'], 1) ?> /></td>
 517                  <td><label for="shopprod_status"><?php echo $BL['be_cnt_activated'] ?></label>&nbsp;&nbsp;</td>
 518                  <td><input type="checkbox" name="shopprod_listall" id="shopprod_listall" value="1"<?php is_checked($plugin['data']['shopprod_listall'], 1) ?> /></td>
 519                  <td><label for="shopprod_listall"><?php echo $BLM['shopprod_listall'] ?></label></td>
 520              </tr>
 521  <!-- save as duplicate -->
 522  <?php    if($plugin['data']['shopprod_id']):    ?>
 523              <tr>
 524                  <td><input type="checkbox" name="shopprod_duplicate" id="shopprod_duplicate" value="1"<?php is_checked($plugin['data']['shopprod_duplicate'], 1) ?> /></td>
 525                  <td colspan="3"><label for="shopprod_duplicate"><?php echo $BL['be_save_copy'] ?></label></td>
 526              </tr>
 527  <?php    endif;    ?>
 528  
 529          </table></td>
 530      </tr>
 531      
 532      <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="10" /></td>
 533      </tr>
 534      <tr> 
 535          <td>&nbsp;</td>
 536          <td>
 537              <input name="submit" type="submit" class="button10" value="<?php echo empty($plugin['data']['shopprod_id']) ? $BL['be_admin_fcat_button2'] : $BL['be_article_cnt_button1'] ?>" />
 538              <input name="save" type="submit" class="button10" value="<?php echo $BL['be_article_cnt_button3'] ?>" />
 539              &nbsp;&nbsp;&nbsp;&nbsp;
 540              <input name="close" type="submit" class="button10" value="<?php echo $BL['be_admin_struct_close'] ?>" />
 541          </td>
 542      </tr>
 543  </table>
 544  </form>
 545  <script language="javascript" type="text/javascript">
 546  <!--
 547  var img_field = getObjectById('shopprod_images');
 548  var files_field = getObjectById('shopprod_files');
 549  function addFile(value,text) {
 550      if(files_field!=null && files_field.options!=null) {
 551          newOpt = new Option(text, value);
 552          files_field.options.length++;
 553          files_field.options[files_field.length-1].text  = newOpt.text;
 554          files_field.options[files_field.length-1].value = newOpt.value;
 555          files_field.options[files_field.length-1].selected = false;
 556      }
 557  }
 558  //-->
 559  </script>


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