site_add.tpl.php 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. <?php
  2. defined('IN_ADMIN') or exit('No permission resources.');
  3. include $this->admin_tpl('header');
  4. ?>
  5. <script type="text/javascript">
  6. <!--
  7. $(function(){
  8. $.formValidator.initConfig({formid:"myform",autotip:true,onerror:function(msg,obj){window.top.art.dialog({content:msg,lock:true,width:'200',height:'50'}, function(){this.close();$(obj).focus();})}});
  9. $("#name").formValidator({onshow:"<?php echo L("input").L('site_name')?>",onfocus:"<?php echo L("input").L('site_name')?>"}).inputValidator({min:1,onerror:"<?php echo L("input").L('site_name')?>"}).ajaxValidator({type : "get",url : "",data :"m=admin&c=site&a=public_name",datatype : "html",async:'false',success : function(data){ if( data == "1" ){return true;}else{return false;}},buttons: $("#dosubmit"),onerror : "<?php echo L('site_name').L('exists')?>",onwait : "<?php echo L('connecting')?>"});
  10. $("#dirname").formValidator({onshow:"<?php echo L("input").L('site_dirname')?>",onfocus:"<?php echo L("input").L('site_dirname')?>"}).inputValidator({min:1,onerror:"<?php echo L("input").L('site_dirname')?>"}).regexValidator({regexp:"username",datatype:"enum",param:'i',onerror:"<?php echo L('site_dirname_err_msg')?>"}).ajaxValidator({type : "get",url : "",data :"m=admin&c=site&a=public_dirname",datatype : "html",async:'false',success : function(data){ if( data == "1" ){return true;}else{return false;}},buttons: $("#dosubmit"),onerror : "<?php echo L('site_dirname').L('exists')?>",onwait : "<?php echo L('connecting')?>"});
  11. $("#domain").formValidator({onshow:"<?php echo L('site_domain_ex')?>",onfocus:"<?php echo L('site_domain_ex')?>",tipcss:{width:'300px'},empty:false}).inputValidator({onerror:"<?php echo L('site_domain_ex')?>"}).regexValidator({regexp:"http:\/\/(.+)\/$",onerror:"<?php echo L('site_domain_ex2')?>"});
  12. $("#template").formValidator({onshow:"<?php echo L('style_name_point')?>",onfocus:"<?php echo L('select_at_least_1')?>"}).inputValidator({min:1,onerror:"<?php echo L('select_at_least_1')?>"});
  13. $('#release_point').formValidator({onshow:"<?php echo L('publishing_sites_to_other_servers')?>",onfocus:"<?php echo L('choose_release_point')?>",empty:true}).inputValidator({max:4,onerror:"<?php echo L('most_choose_four')?>"});
  14. $('#default_style_input').formValidator({tipid:"default_style_msg",onshow:"<?php echo L('please_select_a_style_and_select_the_template')?>",onfocus:"<?php echo L('please_select_a_style_and_select_the_template')?>"}).inputValidator({min:1,onerror:"<?php echo L('please_choose_the_default_style')?>"});
  15. })
  16. //-->
  17. </script>
  18. <style type="text/css">
  19. .radio-label{ border-top:1px solid #e4e2e2; border-left:1px solid #e4e2e2;}
  20. .radio-label td{ border-right:1px solid #e4e2e2; border-bottom:1px solid #e4e2e2;}
  21. </style>
  22. <div class="pad-10">
  23. <form action="?m=admin&c=site&a=add" method="post" id="myform">
  24. <div>
  25. <fieldset>
  26. <legend><?php echo L('basic_configuration')?></legend>
  27. <table width="100%" class="table_form">
  28. <tr>
  29. <th width="80"><?php echo L('site_name')?>:</th>
  30. <td class="y-bg"><input type="text" class="input-text" name="name" id="name" size="30" /></td>
  31. </tr>
  32. <tr>
  33. <th><?php echo L('site_dirname')?>:</th>
  34. <td class="y-bg"><input type="text" class="input-text" name="dirname" id="dirname" size="30" /></td>
  35. </tr>
  36. <tr>
  37. <th><?php echo L('site_domain')?>:</th>
  38. <td class="y-bg"><input type="text" class="input-text" name="domain" id="domain" size="30"/></td>
  39. </tr>
  40. </table>
  41. </fieldset>
  42. <div class="bk15"></div>
  43. <fieldset>
  44. <legend><?php echo L('seo_configuration')?></legend>
  45. <table width="100%" class="table_form">
  46. <tr>
  47. <th width="80"><?php echo L('site_title')?>:</th>
  48. <td class="y-bg"><input type="text" class="input-text" name="site_title" id="site_title" size="30" /></td>
  49. </tr>
  50. <tr>
  51. <th><?php echo L('keyword_name')?>:</th>
  52. <td class="y-bg"><input type="text" class="input-text" name="keywords" id="keywords" size="30" /></td>
  53. </tr>
  54. <tr>
  55. <th><?php echo L('description')?>:</th>
  56. <td class="y-bg"><input type="text" class="input-text" name="description" id="description" size="30" /></td>
  57. </tr>
  58. </table>
  59. </fieldset>
  60. <div class="bk15"></div>
  61. <fieldset>
  62. <legend><?php echo L('release_point_configuration')?></legend>
  63. <table width="100%" class="table_form">
  64. <tr>
  65. <th width="80" valign="top"><?php echo L('release_point')?>:</th>
  66. <td> <select name="release_point[]" size="3" id="release_point" multiple title="<?php echo L('ctrl_more_selected')?>">
  67. <option value='' selected><?php echo L('not_use_the_publishers_some')?></option>
  68. <?php if(is_array($release_point_list) && !empty($release_point_list)): foreach($release_point_list as $v):?>
  69. <option value="<?php echo $v['id']?>"><?php echo $v['name']?></option>
  70. <?php endforeach;endif;?>
  71. </select> </td>
  72. </tr>
  73. </table>
  74. </fieldset>
  75. <div class="bk15"></div>
  76. <fieldset>
  77. <legend><?php echo L('template_style_configuration')?></legend>
  78. <table width="100%" class="table_form">
  79. <tr>
  80. <th width="80" valign="top"><?php echo L('style_name')?>:</th>
  81. <td class="y-bg"> <select name="template[]" size="3" id="template" multiple title="<?php echo L('ctrl_more_selected')?>" onchange="default_list()">
  82. <?php if(is_array($template_list)):
  83. foreach ($template_list as $key=>$val):
  84. ?>
  85. <option value="<?php echo $val['dirname']?>"><?php echo $val['name']?></option>
  86. <?php endforeach;endif;?>
  87. </select></td>
  88. </tr>
  89. </tr>
  90. <tr>
  91. <th width="80" valign="top"><?php echo L('default_style')?>:<input type="hidden" name="default_style" id="default_style_input" value="0"></th>
  92. <td class="y-bg"><span id="default_style"><input type="radio" name="default_style_radio" disabled></span><span id="default_style_msg"></span></td>
  93. </tr>
  94. </table>
  95. <script type="text/javascript">
  96. function default_list() {
  97. var html = '';
  98. var old = $('#default_style_input').val();
  99. var checked = '';
  100. $('#template option:selected').each(function(i,n){
  101. if (old == $(n).val()) {
  102. checked = 'checked';
  103. }
  104. html += '<label><input type="radio" name="default_style_radio" value="'+$(n).val()+'" onclick="$(\'#default_style_input\').val(this.value);" '+checked+'> '+$(n).text()+'</label>';
  105. });
  106. if(!checked) $('#default_style_input').val('0');
  107. $('#default_style').html(html);
  108. }
  109. </script>
  110. </fieldset>
  111. <div class="bk15"></div>
  112. <fieldset>
  113. <legend><?php echo L('site_att_config')?></legend>
  114. <table width="100%" class="table_form">
  115. <tr>
  116. <th width="130" valign="top"><?php echo L('site_att_upload_maxsize')?></th>
  117. <td class="y-bg"><input type="text" class="input-text" name="setting[upload_maxsize]" id="upload_maxsize" size="10" value="2000"/> KB </td>
  118. </tr>
  119. <tr>
  120. <th width="130" valign="top"><?php echo L('site_att_allow_ext')?></th>
  121. <td class="y-bg"><input type="text" class="input-text" name="setting[upload_allowext]" id="upload_allowext" size="50" value="jpg|jpeg|gif|bmp|png|doc|docx|xls|xlsx|ppt|pptx|pdf|txt|rar|zip|swf"/></td>
  122. </tr>
  123. <tr>
  124. <th><?php echo L('site_att_upload_maxsize')?> </th>
  125. <td class="y-bg"><?php echo $this->check_gd()?></td>
  126. <tr>
  127. <th><?php echo L('site_att_watermark_enable')?></th>
  128. <td class="y-bg">
  129. <input class="radio_style" name="setting[watermark_enable]" value="1" type="radio"> <?php echo L('site_att_watermark_open')?>&nbsp;&nbsp;&nbsp;&nbsp;
  130. <input class="radio_style" name="setting[watermark_enable]" value="0" checked="checked" type="radio"><?php echo L('site_att_watermark_close')?>
  131. </td>
  132. </tr>
  133. <tr>
  134. <th><?php echo L('site_att_watermark_condition')?></th>
  135. <td class="y-bg"><?php echo L('site_att_watermark_minwidth')?>
  136. <input type="text" class="input-text" name="setting[watermark_minwidth]" id="watermark_minwidth" size="10" value="300" /> X <?php echo L('site_att_watermark_minheight')?><input type="text" class="input-text" name="setting[watermark_minheight]" id="watermark_minheight" size="10" value="300" /> PX
  137. </td>
  138. </tr>
  139. <tr>
  140. <th width="130" valign="top"><?php echo L('site_att_watermark_img')?></th>
  141. <td class="y-bg"><input type="text" class="input-text" name="setting[watermark_img]" id="watermark_img" size="30" value="mark.gif" /> <?php echo L('site_att_watermark_img_desc')?></td>
  142. </tr>
  143. <tr>
  144. <th width="130" valign="top"><?php echo L('site_att_watermark_pct')?></th>
  145. <td class="y-bg"><input type="text" class="input-text" name="setting[watermark_pct]" id="watermark_pct" size="10" value="100" /> <?php echo L('site_att_watermark_pct_desc')?></td>
  146. </tr>
  147. <tr>
  148. <th width="130" valign="top"><?php echo L('site_att_watermark_quality')?></th>
  149. <td class="y-bg"><input type="text" class="input-text" name="setting[watermark_quality]" id="watermark_quality" size="10" value="80" /> <?php echo L('site_att_watermark_quality_desc')?></td>
  150. </tr>
  151. <tr>
  152. <th width="130" valign="top"><?php echo L('site_att_watermark_pos')?></th>
  153. <td class="y-bg">
  154. <table width="100%" class="radio-label">
  155. <tr>
  156. <td rowspan="3"><input class="radio_style" name="setting[watermark_pos]" value="10" type="radio" > <?php echo L('site_att_watermark_pos_10')?></td>
  157. <td><input class="radio_style" name="setting[watermark_pos]" value="1" type="radio" > <?php echo L('site_att_watermark_pos_1')?></td>
  158. <td><input class="radio_style" name="setting[watermark_pos]" value="2" type="radio"> <?php echo L('site_att_watermark_pos_2')?></td>
  159. <td><input class="radio_style" name="setting[watermark_pos]" value="3" type="radio"> <?php echo L('site_att_watermark_pos_3')?></td>
  160. </tr>
  161. <tr>
  162. <td><input class="radio_style" name="setting[watermark_pos]" value="4" type="radio"> <?php echo L('site_att_watermark_pos_4')?></td>
  163. <td><input class="radio_style" name="setting[watermark_pos]" value="5" type="radio"> <?php echo L('site_att_watermark_pos_5')?></td>
  164. <td><input class="radio_style" name="setting[watermark_pos]" value="6" type="radio" > <?php echo L('site_att_watermark_pos_6')?></td>
  165. </tr>
  166. <tr>
  167. <td><input class="radio_style" name="setting[watermark_pos]" value="7" type="radio"> <?php echo L('site_att_watermark_pos_7')?></td>
  168. <td><input class="radio_style" name="setting[watermark_pos]" value="8" type="radio"> <?php echo L('site_att_watermark_pos_8')?></td>
  169. <td><input class="radio_style" name="setting[watermark_pos]" value="9" type="radio" checked> <?php echo L('site_att_watermark_pos_9')?></td>
  170. </tr>
  171. </table>
  172. </td></tr>
  173. </table>
  174. </fieldset>
  175. </div>
  176. <div class="bk15"></div>
  177. <input type="submit" class="dialog" id="dosubmit" name="dosubmit" value="<?php echo L('submit')?>" />
  178. </div>
  179. </div>
  180. </form>
  181. </body>
  182. </html>