upload.param.php 4.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <?php defined('InShopNC') or exit('Access Invalid!');?>
  2. <div class="page">
  3. <div class="fixed-bar">
  4. <div class="item-title">
  5. <h3><?php echo $lang['upload_set'];?></h3>
  6. <?php echo $output['top_link'];?>
  7. </div>
  8. </div>
  9. <div class="fixed-empty"></div>
  10. <form id="form" method="post" enctype="multipart/form-data" name="settingForm">
  11. <input type="hidden" name="form_submit" value="ok" />
  12. <table class="table tb-type2">
  13. <tbody>
  14. <tr class="noborder">
  15. <td colspan="2" class="required"><label for="site_name"><?php echo $lang['image_dir_type'];?>:</label></td>
  16. </tr>
  17. <tr class="noborder">
  18. <td class="vatop rowform"><ul class="nofloat">
  19. <li>
  20. <input id="image_dir_type_0" name="image_dir_type" type="radio" style="margin-bottom:6px;" value="1"<?php echo $output['list_setting']['image_dir_type'] == '1' ? ' checked="checked"' : '' ;?>/>
  21. <label for="image_dir_type_0"><?php echo $lang['image_dir_type_0'];?></label>
  22. </li>
  23. <li>
  24. <input id="image_dir_type_1" name="image_dir_type" type="radio" style="margin-bottom:6px;" value="2"<?php echo $output['list_setting']['image_dir_type'] == '2' ? ' checked="checked"' : '' ;?>/>
  25. <label for="image_dir_type_1"><?php echo $lang['image_dir_type_1'];?></label>
  26. </li>
  27. <li>
  28. <input id="image_dir_type_2" name="image_dir_type" type="radio" style="margin-bottom:6px;" value="3"<?php echo $output['list_setting']['image_dir_type'] == '3' ? ' checked="checked"' : '' ;?>/>
  29. <label for="image_dir_type_2"><?php echo $lang['image_dir_type_2'];?></label>
  30. </li>
  31. <li>
  32. <input id="image_dir_type_3" name="image_dir_type" type="radio" style="margin-bottom:6px;" value="4"<?php echo $output['list_setting']['image_dir_type'] == '4' ? ' checked="checked"' : '' ;?>/>
  33. <label for="image_dir_type_3"><?php echo $lang['image_dir_type_3'];?></label>
  34. </li>
  35. </ul></td>
  36. <td class="vatop tips"></td>
  37. </tr>
  38. <tr>
  39. <td colspan="2" class="required"><label for="image_max_filesize"><?php echo $lang['upload_image_filesize'];?>:</label></td>
  40. </tr>
  41. <tr class="noborder">
  42. <td class="vatop rowform"><?php echo $lang['upload_image_file_size'];?>:
  43. <input id="image_max_filesize" name="image_max_filesize" type="text" class="txt" style="width:30px;" value="<?php echo $output['list_setting']['image_max_filesize'] ? $output['list_setting']['image_max_filesize'] : '1024' ;?>"/>
  44. KB&nbsp;(1024 KB = 1MB)</td>
  45. <td class="vatop tips"><?php echo $lang['image_max_size_tips'];?></td>
  46. </tr>
  47. <tr>
  48. <td colspan="2" class="required"><label for="image_allow_ext"><?php echo $lang['image_allow_ext'];?>:</label></td>
  49. </tr>
  50. <tr class="noborder">
  51. <td class="vatop rowform"><input id="image_allow_ext" name="image_allow_ext" value="<?php echo $output['list_setting']['image_allow_ext'] ? $output['list_setting']['image_allow_ext'] : 'gif,jpeg,jpg,bmp,png,swf,tbi';?>" class="txt" type="text" /></td>
  52. <td class="vatop tips"><span class="vatop rowform"><?php echo $lang['image_allow_ext_notice'];?></span></td>
  53. </tr>
  54. </tbody>
  55. <tfoot>
  56. <tr class="tfoot">
  57. <td colspan="2" ><a href="JavaScript:void(0);" class="btn" onclick="document.settingForm.submit()"><span><?php echo $lang['nc_submit'];?></span></a></td>
  58. </tr>
  59. </tfoot>
  60. </table>
  61. </form>
  62. </div>
  63. <script type="text/javascript">
  64. //<!CDATA[
  65. $(function(){
  66. $('#form').validate({
  67. rules : {
  68. image_max_size : {
  69. number : true,
  70. maxlength : 4
  71. },
  72. image_allow_ext : {
  73. required : true
  74. }
  75. },
  76. messages : {
  77. image_max_size : {
  78. number : '<?php echo $lang['image_max_size_only_num'];?>',
  79. maxlength : '<?php echo $lang['image_max_size_c_num'];?>'
  80. },
  81. image_allow_ext : {
  82. required : '<?php echo $lang['image_allow_ext_not_null'];?>'
  83. }
  84. }
  85. });
  86. });
  87. //]]>
  88. </script>