/wp-content/plugins/wp-e-commerce/wpsc-admin/includes/settings-pages/admin.php

https://github.com/konscript/aquestionof · PHP · 174 lines · 155 code · 17 blank · 2 comment · 0 complexity · 550f1c9b3611194a04e48d953b58aa2a MD5 · raw file

  1. <?php
  2. function wpsc_options_admin(){
  3. global $wpdb;
  4. ?>
  5. <form name='cart_options' id='cart_options' method='post' action='' class='wpsc_form_track'>
  6. <div id="options_admin">
  7. <h3><?php _e('Admin Settings', 'wpsc'); ?></h3>
  8. <?php
  9. /* wpsc_setting_page_update_notification displays the wordpress styled notifications */
  10. wpsc_settings_page_update_notification(); ?>
  11. <table class='wpsc_options form-table'>
  12. <tr>
  13. <th scope="row"><?php _e('Max downloads per file', 'wpsc');?>: </th>
  14. <td>
  15. <input type='text' size='10' value='<?php esc_attr_e( get_option('max_downloads') ); ?>' name='wpsc_options[max_downloads]' />
  16. </td>
  17. </tr>
  18. <?php
  19. $wpsc_ip_lock_downloads1 = "";
  20. $wpsc_ip_lock_downloads2 = "";
  21. switch( esc_attr( get_option('wpsc_ip_lock_downloads') ) ) {
  22. case 1:
  23. $wpsc_ip_lock_downloads1 = "checked ='checked'";
  24. break;
  25. case 0:
  26. default:
  27. $wpsc_ip_lock_downloads2 = "checked ='checked'";
  28. break;
  29. }
  30. ?>
  31. <tr>
  32. <th scope="row">
  33. <?php _e('Lock downloads to IP address', 'wpsc');?>:
  34. </th>
  35. <td>
  36. <input type='radio' value='1' name='wpsc_options[wpsc_ip_lock_downloads]' id='wpsc_ip_lock_downloads2' <?php echo $wpsc_ip_lock_downloads1; ?> /> <label for='wpsc_ip_lock_downloads2'><?php _e('Yes', 'wpsc');?></label>&nbsp;
  37. <input type='radio' value='0' name='wpsc_options[wpsc_ip_lock_downloads]' id='wpsc_ip_lock_downloads1' <?php echo $wpsc_ip_lock_downloads2; ?> /> <label for='wpsc_ip_lock_downloads1'><?php _e('No', 'wpsc');?></label><br />
  38. </td>
  39. </tr>
  40. <?php
  41. $wpsc_check_mime_types1 = "";
  42. $wpsc_check_mime_types2 = "";
  43. switch( esc_attr( get_option('wpsc_check_mime_types') ) ) {
  44. case 1:
  45. $wpsc_check_mime_types2 = "checked ='checked'";
  46. break;
  47. case 0:
  48. default:
  49. $wpsc_check_mime_types1 = "checked ='checked'";
  50. break;
  51. }
  52. ?>
  53. <tr>
  54. <th scope="row">
  55. <?php _e('Check MIME types on file uploads', 'wpsc');?>:
  56. </th>
  57. <td>
  58. <input type='radio' value='0' name='wpsc_options[wpsc_check_mime_types]' id='wpsc_check_mime_types2' <?php echo $wpsc_check_mime_types1; ?> /> <label for='wpsc_check_mime_types2'><?php _e('Yes', 'wpsc');?></label>&nbsp;
  59. <input type='radio' value='1' name='wpsc_options[wpsc_check_mime_types]' id='wpsc_check_mime_types1' <?php echo $wpsc_check_mime_types2; ?> /> <label for='wpsc_check_mime_types1'><?php _e('No', 'wpsc');?></label><br />
  60. <span class="wpscsmall description">
  61. <?php _e('Warning: Disabling this exposes your site to greater possibility of malicious files being uploaded, we reccomend installing the Fileinfo extention for PHP rather than disabling this.', 'wpsc'); ?>
  62. </span>
  63. </td>
  64. </tr>
  65. <tr>
  66. <th scope="row">
  67. <?php _e('Purchase Log Email', 'wpsc');?>:
  68. </th>
  69. <td>
  70. <input class='text' name='wpsc_options[purch_log_email]' type='text' size='40' value='<?php esc_attr_e( get_option('purch_log_email') ); ?>' />
  71. </td>
  72. </tr>
  73. <tr>
  74. <th scope="row">
  75. <?php _e('Purchase Receipt - Reply Address', 'wpsc');?>:
  76. </th>
  77. <td>
  78. <input class='text' name='wpsc_options[return_email]' type='text' size='40' value='<?php esc_attr_e( get_option('return_email') ); ?>' />
  79. </td>
  80. </tr>
  81. <tr>
  82. <th scope="row">
  83. <?php _e('Purchase Receipt - Reply Name', 'wpsc');?>:
  84. </th>
  85. <td>
  86. <input class='text' name='wpsc_options[return_name]' type='text' size='40' value='<?php esc_attr_e( get_option('return_name') ); ?>' />
  87. </td>
  88. </tr>
  89. <tr>
  90. <th scope="row">
  91. <?php _e('Terms and Conditions', 'wpsc');?>:
  92. </th>
  93. <td>
  94. <textarea name='wpsc_options[terms_and_conditions]' cols='' rows='' style='width: 300px; height: 200px;'><?php esc_attr_e(stripslashes(get_option('terms_and_conditions') ) ); ?></textarea>
  95. </td>
  96. </tr>
  97. </table>
  98. <h3 class="form_group"><?php _e('Custom Messages', 'wpsc');?>:</h3>
  99. <table class='wpsc_options form-table'>
  100. <tr>
  101. <th colspan="2"><?php _e('Tags can be used', 'wpsc');?>: %purchase_id%, %shop_name%,<!-- %order_status%,--> %product_list%, %total_price%, %total_shipping%, %find_us%, %total_tax%</th>
  102. </tr>
  103. <tr>
  104. <td class='wpsc_td_note' colspan='2'>
  105. <span class="wpscsmall description">
  106. <?php _e('Note: The purchase receipt is the message e-mailed to users after purchasing products from your shop.' , 'wpsc'); ?>
  107. </span>
  108. </td>
  109. </tr>
  110. <tr>
  111. <th><strong><?php _e('Purchase Receipt', 'wpsc');?></strong></th>
  112. <td><textarea name="wpsc_options[wpsc_email_receipt]" cols='' rows='' style='width: 300px; height: 200px;'><?php esc_attr_e( stripslashes(get_option('wpsc_email_receipt') ) );?></textarea></td>
  113. </tr>
  114. <tr>
  115. <td class='wpsc_td_note' colspan='2'>
  116. <span class="wpscsmall description">
  117. <?php _e('Note: The Admin Report is the email sent to the e-mail address set above as soon as someone successfully buys a product.' , 'wpsc'); ?>
  118. </span>
  119. </td>
  120. </tr>
  121. <tr>
  122. <th><strong><?php _e('Admin Report', 'wpsc');?></strong></th>
  123. <td><textarea name="wpsc_options[wpsc_email_admin]" cols='' rows='' style='width: 300px; height: 200px;'><?php esc_attr_e( stripslashes(get_option('wpsc_email_admin') ) );?></textarea></td>
  124. </tr>
  125. </table>
  126. <h3 class="form_group"><?php _e("Track and Trace settings", 'wpsc');?>:</h3>
  127. <table class='wpsc_options form-table'>
  128. <tr>
  129. <td class='wpsc_td_note' colspan='2'>
  130. <span class="wpscsmall description">
  131. <?php _e('Note: The Tracking Subject, is the subject for The Tracking Message email. The Tracking Message is the message e-mailed to users when you click \'Email buyer\' on the sales log. This option is only available for purchases with the status of \'Job Dispatched\'. Tags you can use in the email message section are %trackid% and %shop_name%' , 'wpsc'); ?>
  132. </span>
  133. </td>
  134. </tr>
  135. <tr>
  136. <th><strong><?php _e('Tracking Email Subject', 'wpsc');?></strong></th>
  137. <td><input name="wpsc_options[wpsc_trackingid_subject]" type='text' value='<?php esc_attr_e( stripslashes(get_option('wpsc_trackingid_subject') ) );?>' /></td>
  138. </tr>
  139. <tr>
  140. <th><strong><?php _e('Tracking Email Message', 'wpsc');?></strong></th>
  141. <td><textarea name="wpsc_options[wpsc_trackingid_message]" cols='' rows='' style='width: 300px; height: 200px;'><?php esc_attr_e( stripslashes(get_option('wpsc_trackingid_message') ) );?></textarea></td>
  142. </tr>
  143. </table>
  144. <?php
  145. /* here end the admin options */
  146. ?>
  147. <?php do_action('wpsc_admin_settings_page'); ?>
  148. <div class="submit">
  149. <input type='hidden' name='wpsc_admin_action' value='submit_options' />
  150. <?php wp_nonce_field('update-options', 'wpsc-update-options'); ?>
  151. <input type="submit" value="<?php _e('Update &raquo;', 'wpsc');?>" name="updateoption"/>
  152. </div>
  153. </div>
  154. </form>
  155. <?php
  156. }
  157. ?>