[ Index ]

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

title

Body

[close]

/include/inc_module/mod_shop/inc/ -> edit.preferences.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  <form action="<?php echo shop_url('controller=pref'); ?>" method="post" class="editform1">
  33  
  34  <table border="0" cellpadding="0" cellspacing="0" width="100%" summary="">
  35  
  36      <tr> 
  37          <td align="right" class="chatlist"><?php echo $BLM['shopprod_currency'] ?>:&nbsp;</td>
  38          <td><table cellpadding="0" cellspacing="0" border="0" summary="">
  39          
  40              <tr>
  41                  <td><input name="pref_currency" type="text" id="pref_currency" class="v12 width125" value="<?php echo html_entities($plugin['data']['shop_pref_currency']) ?>" size="10" maxlength="10" onchange="enableSubmit();" /></td>
  42                  <td class="chatlist">&nbsp;&nbsp;EUR, USD, &#8364;, $, &pound;, &yen;</td>
  43              </tr>
  44                  
  45              </table></td>
  46      </tr>
  47  
  48      <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="10" /></td></tr>    
  49      
  50      <tr> 
  51          <td align="right" class="chatlist"><?php echo $BLM['shopprod_unit'] . ' - ' . $BLM['shopprod_weight'] ?>:&nbsp;</td>
  52          <td><table cellpadding="0" cellspacing="0" border="0" summary="">
  53          
  54              <tr>
  55                  <td><input name="pref_unit_weight" type="text" id="pref_unit_weight" class="v12 width125" value="<?php echo html_specialchars($plugin['data']['shop_pref_unit_weight']) ?>" size="10" maxlength="10" onchange="enableSubmit();" /></td>
  56                  <td class="chatlist">&nbsp;&nbsp;<?php echo $BLM['shopprod_units_weight'] ?></td>
  57              </tr>
  58                  
  59              </table></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 tdtop4"><?php echo $BLM['shopprod_vat_rates'] ?>:&nbsp;</td>
  66          <td><table cellpadding="0" cellspacing="0" border="0" summary="">
  67          
  68              <tr>
  69                  <td><textarea name="pref_vat" id="pref_vat" class="v12 width125 right" onchange="enableSubmit();" rows="3"><?php 
  70  
  71      foreach( $plugin['data']['shop_pref_vat'] as $value ) {
  72          echo number_format($value, 2, $BLM['dec_point'], $BLM['thousands_sep']) . LF;
  73      }
  74                  ?></textarea></td>
  75                  <td class="chatlist tdtop4">&nbsp;%</td>
  76              </tr>
  77                  
  78              </table></td>
  79      </tr>
  80      
  81      
  82  
  83      <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="10" /></td></tr>    
  84      
  85      <tr> 
  86          <td align="right" class="chatlist"><?php echo $BLM['shopprod_email_to'] ?>:&nbsp;</td>
  87          <td><input name="pref_email_to" type="text" id="pref_email_to" class="v12 width375" value="<?php echo html_specialchars(str_replace(';', '; ', $plugin['data']['shop_pref_email_to'])) ?>" size="30" maxlength="200" onchange="enableSubmit();" /></td>
  88      </tr>
  89      
  90      <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="10" /></td></tr>    
  91      
  92      <tr> 
  93          <td align="right" class="chatlist"><?php echo $BLM['shopprod_email_from'] ?>:&nbsp;</td>
  94          <td><input name="pref_email_from" type="text" id="pref_email_from" class="v12 width375" value="<?php echo html_specialchars($plugin['data']['shop_pref_email_from']) ?>" size="30" maxlength="200" onchange="enableSubmit();" /></td>
  95      </tr>
  96      
  97      <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="10" /></td></tr>    
  98      
  99      <tr> 
 100          <td align="right" class="chatlist"><?php echo $BLM['shopprod_id_shop'] ?>:&nbsp;</td>
 101          <td><input name="pref_shop_id" type="text" id="pref_shop_id" class="v12 width375" value="<?php echo html_specialchars($plugin['data']['shop_pref_id_shop']) ?>" size="30" maxlength="200" onchange="enableSubmit();" /></td>
 102      </tr>
 103      
 104      <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="10" /></td></tr>    
 105      
 106      <tr> 
 107          <td align="right" class="chatlist"><?php echo $BLM['shopprod_id_cart'] ?>:&nbsp;</td>
 108          <td><input name="pref_cart_id" type="text" id="pref_cart_id" class="v12 width375" value="<?php echo html_specialchars($plugin['data']['shop_pref_id_cart']) ?>" size="30" maxlength="200" onchange="enableSubmit();" /></td>
 109      </tr>
 110      
 111      
 112      <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="10" /></td></tr>
 113  
 114      <tr> 
 115          <td align="right" class="chatlist" valign="top"><?php echo $BLM['shopprod_shipping'] ?>:&nbsp;</td>
 116          <td><table cellpadding="0" cellspacing="0" border="0" summary="">
 117          
 118              <tr>
 119                  <td class="chatlist"><?php echo $BLM['shopprod_weight'].', '.$BLM['shopprod_weight_max'] ?>&nbsp;</td>
 120                  <td class="chatlist"><?php echo $BLM['shopprod_net'] ?>&nbsp;</td>
 121                  <td class="chatlist"><?php echo $BLM['shopprod_vat'] ?> %</td>
 122              </tr>
 123      <?php
 124      for( $x = 0; $x <= 4; $x++ ) {
 125      
 126          echo '
 127              <tr>
 128                  <td class="tdtop3"><input name="pref_shipping_weight['.$x.']" type="text" class="v12 width100" value="' . html_specialchars(number_format($plugin['data']['shop_pref_shipping'][$x]['weight'], 3, $BLM['dec_point'], $BLM['thousands_sep'] ) ) . '" size="10" maxlength="10" onchange="enableSubmit();" />&nbsp;</td>
 129                  <td class="tdtop3"><input name="pref_shipping_net['.$x.']" type="text" class="v12 width100" value="' . html_specialchars( number_format($plugin['data']['shop_pref_shipping'][$x]['net'], 3, $BLM['dec_point'], $BLM['thousands_sep'] ) ) . '" size="10" maxlength="10" onchange="enableSubmit();" />&nbsp;</td>
 130                  <td class="tdtop3"><input name="pref_shipping_vat['.$x.']" type="text" class="v12 width100" value="' . html_specialchars( number_format($plugin['data']['shop_pref_shipping'][$x]['vat'], 2, $BLM['dec_point'], $BLM['thousands_sep'] ) ) . '" size="10" maxlength="10" onchange="enableSubmit();" /></td>
 131              </tr>
 132              ';
 133  
 134      }
 135      ?>
 136          
 137              </table></td>
 138      </tr>
 139  
 140  
 141      <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="10" /></td></tr>    
 142  
 143      <tr> 
 144          <td align="right" class="chatlist tdtop4"><?php echo $BLM['shopprod_payment_method'] ?>:&nbsp;</td>
 145          <td><table cellpadding="0" cellspacing="0" border="0" summary="">
 146          
 147              <tr>
 148                  <td><input type="checkbox" name="pref_payment_paypal" id="pref_payment_paypal" value="1"<?php is_checked(1, $plugin['data']['shop_pref_payment']['paypal']) ?> onchange="enableSubmit();" /></td>
 149                  <td><label for="pref_payment_paypal">&nbsp;<?php echo $BLM['shopprod_payby_paypal'] ?>&nbsp;&nbsp;&nbsp;</label></td>
 150                  <td align="right" class="chatlist"><?php echo $BLM['shopprod_email_paypal'] ?>:&nbsp;</td>
 151                  <td><input name="pref_email_paypal" type="text" id="pref_email_paypal" class="v12 width175" value="<?php echo html_specialchars($plugin['data']['shop_pref_email_paypal']) ?>" size="30" maxlength="200" onchange="enableSubmit();" /></td>
 152              </tr>
 153              
 154              <tr><td colspan="4"><img src="img/leer.gif" alt="" width="1" height="3" /></td></tr>
 155              
 156              <tr>
 157                  <td valign="top"><input type="checkbox" name="pref_payment_ccard" id="pref_payment_ccard" value="1"<?php is_checked(1, $plugin['data']['shop_pref_payment']['ccard']) ?> onchange="enableSubmit();" /></td>
 158                  <td class="tdtop4"><label for="pref_payment_ccard">&nbsp;<?php echo $BLM['shopprod_payby_ccard'] ?>&nbsp;&nbsp;&nbsp;</label></td>
 159                  <td align="right" class="chatlist tdtop4"><?php echo $BLM['shopprod_supported_ccard'] ?>:&nbsp;</td>
 160                  <td><select name="pref_supported_ccard[]" id="pref_supported_ccard" size="4" multiple="multiple" onchange="enableSubmit();" class="v12 width175">
 161                  
 162                      <option value="americanexpress"<?php if(in_array('americanexpress', $plugin['data']['shop_pref_payment']['accepted_ccard'])) echo ' selected="selected"'; ?> style="margin-bottom:1px">American Express</option>
 163                      <option value="mastercard"<?php if(in_array('mastercard', $plugin['data']['shop_pref_payment']['accepted_ccard'])) echo ' selected="selected"'; ?> style="margin-bottom:1px">MasterCard/EuroCard</option>
 164                      <option value="visa"<?php if(in_array('visa', $plugin['data']['shop_pref_payment']['accepted_ccard'])) echo ' selected="selected"'; ?> style="margin-bottom:1px">Visa</option>            
 165                  
 166                  </select></td>
 167              </tr>
 168              
 169              <tr><td colspan="4"><img src="img/leer.gif" alt="" width="1" height="3" /></td></tr>
 170              
 171              <tr>
 172                  <td><input type="checkbox" name="pref_payment_prepay" id="pref_payment_prepay" value="1"<?php is_checked(1, $plugin['data']['shop_pref_payment']['prepay']) ?> onchange="enableSubmit();" /></td>
 173                  <td><label for="pref_payment_prepay">&nbsp;<?php echo $BLM['shopprod_payby_prepay'] ?>&nbsp;&nbsp;&nbsp;</label></td>
 174                  <td>&nbsp;</td>
 175                  <td>&nbsp;</td>
 176              </tr>
 177              
 178              <tr><td colspan="4"><img src="img/leer.gif" alt="" width="1" height="3" /></td></tr>
 179              
 180              <tr>
 181                  <td><input type="checkbox" name="pref_payment_pod" id="pref_payment_pod" value="1"<?php is_checked(1, $plugin['data']['shop_pref_payment']['pod']) ?> onchange="enableSubmit();" /></td>
 182                  <td><label for="pref_payment_pod">&nbsp;<?php echo $BLM['shopprod_payby_pod'] ?>&nbsp;&nbsp;&nbsp;</label></td>
 183                  <td>&nbsp;</td>
 184                  <td>&nbsp;</td>
 185              </tr>
 186              
 187              <tr><td colspan="4"><img src="img/leer.gif" alt="" width="1" height="3" /></td></tr>
 188              
 189              <tr>
 190                  <td><input type="checkbox" name="pref_payment_onbill" id="pref_payment_onbill" value="1"<?php is_checked(1, $plugin['data']['shop_pref_payment']['onbill']) ?> onchange="enableSubmit();" /></td>
 191                  <td><label for="pref_payment_onbill">&nbsp;<?php echo $BLM['shopprod_payby_onbill'] ?>&nbsp;&nbsp;&nbsp;</label></td>
 192                  <td>&nbsp;</td>
 193                  <td>&nbsp;</td>
 194              </tr>
 195          
 196              </table></td>
 197      </tr>
 198      
 199      
 200      <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="10" /></td></tr>
 201      
 202      <tr>
 203          <td>&nbsp;</td>
 204          <td><table summary="" cellpadding="1" cellspacing="0" border="0" bgcolor="#E7E8EB">
 205              <tr>
 206                  <td><input type="radio" name="pref_terms_format" id="pref_terms_text" value="0"<?php is_checked('0', $plugin['data']['shop_pref_terms_format']) ?> onchange="enableSubmit();" /></td>
 207                  <td class="f10"><label for="pref_terms_text">TEXT</label>&nbsp;&nbsp;</td>
 208                  <td><input type="radio" name="pref_terms_format" id="pref_terms_html" value="1"<?php is_checked('1', $plugin['data']['shop_pref_terms_format']) ?> onchange="enableSubmit();" /></td>
 209                  <td class="f10"><label for="pref_terms_html">HTML</label>&nbsp;</td>
 210              </tr>
 211          </table></td>
 212      
 213      </tr>
 214      
 215      <tr> 
 216          <td align="right" class="chatlist tdtop4"><?php echo $BLM['shopprod_terms'] ?>:&nbsp;</td>
 217          <td><textarea name="pref_terms" id="pref_terms" class="v12 width375" onchange="enableSubmit();" rows="10"><?php 
 218  
 219          echo $plugin['data']['shop_pref_terms_format'] ? html_entities($plugin['data']['shop_pref_terms']) : html_specialchars($plugin['data']['shop_pref_terms']);
 220      
 221          ?></textarea></td>
 222      </tr>
 223      
 224      
 225      <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="18" /></td></tr>
 226  
 227      <tr> 
 228          <td>&nbsp;</td>
 229          <td>
 230              <input name="save" type="submit" class="button10" id="save_button" value="<?php echo $BL['be_article_cnt_button3'] ?>" disabled="disabled" />
 231              &nbsp;
 232              <input name="reset" type="reset" class="button10" value="<?php echo $BL['be_cnt_field']['reset'] ?>" onclick="disableSubmit();" />
 233          </td>
 234      </tr>
 235      
 236  
 237  </table>
 238  
 239  </form>
 240  <script type="text/javascript" language="javascript">
 241  <!--
 242      function enableSubmit() {
 243          var submit_prefs = getObjectById('save_button');
 244          submit_prefs.disabled=false;
 245      }
 246      function disableSubmit() {
 247          var submit_prefs = getObjectById('save_button');
 248          submit_prefs.disabled=true;
 249      }
 250  //-->
 251  </script>


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