site_edit.tpl.php 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  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&siteid=<?php echo $data['siteid']?>",datatype : "html",async:'true',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')?>"}).defaultPassed();
  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&siteid=<?php echo $data['siteid']?>",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')?>"}).defaultPassed();
  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')?>"}).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;background:#f6f9fd}
  21. </style>
  22. <div class="pad-10">
  23. <form action="?m=admin&c=site&a=edit&siteid=<?php echo $siteid?>" method="post" id="myform">
  24. <fieldset>
  25. <legend><?php echo L('basic_configuration')?></legend>
  26. <table width="100%" class="table_form">
  27. <tr>
  28. <th width="80"><?php echo L('site_name')?>:</th>
  29. <td class="y-bg"><input type="text" class="input-text" name="name" id="name" size="30" value="<?php echo $data['name']?>" /></td>
  30. </tr>
  31. <tr>
  32. <th><?php echo L('site_dirname')?>:</th>
  33. <td class="y-bg"><?php if ($siteid == 1) { echo $data['dirname'];} else {?><input type="text" class="input-text" name="dirname" id="dirname" size="30" value="<?php echo $data['dirname']?>" /><?php }?></td>
  34. </tr>
  35. <tr>
  36. <th><?php echo L('site_domain')?>:</th>
  37. <td class="y-bg"><input type="text" class="input-text" name="domain" id="domain" size="30" value="<?php echo $data['domain']?>" /></td>
  38. </tr>
  39. </table>
  40. </fieldset>
  41. <div class="bk10"></div>
  42. <fieldset>
  43. <legend><?php echo L('seo_configuration')?></legend>
  44. <table width="100%" class="table_form">
  45. <tr>
  46. <th width="80"><?php echo L('site_title')?>:</th>
  47. <td class="y-bg"><input type="text" class="input-text" name="site_title" id="site_title" size="30" value="<?php echo $data['site_title']?>" /></td>
  48. </tr>
  49. <tr>
  50. <th><?php echo L('keyword_name')?>:</th>
  51. <td class="y-bg"><input type="text" class="input-text" name="keywords" id="keywords" size="30" value="<?php echo $data['keywords']?>" /></td>
  52. </tr>
  53. <tr>
  54. <th><?php echo L('description')?>:</th>
  55. <td class="y-bg"><input type="text" class="input-text" name="description" id="description" size="30" value="<?php echo $data['description']?>" /></td>
  56. </tr>
  57. </table>
  58. </fieldset>
  59. <div class="bk10"></div>
  60. <fieldset>
  61. <legend><?php echo L('release_point_configuration')?></legend>
  62. <table width="100%" class="table_form">
  63. <tr>
  64. <th width="80" valign="top"><?php echo L('release_point')?>:</th>
  65. <td> <select name="release_point[]" size="3" id="release_point" multiple title="<?php echo L('ctrl_more_selected')?>">
  66. <option value='' <?php if(!$data['release_point']) echo 'selected';?>><?php echo L('not_use_the_publishers_some')?></option>
  67. <?php if(is_array($release_point_list) && !empty($release_point_list)): foreach($release_point_list as $v):?>
  68. <option value="<?php echo $v['id']?>"<?php if(in_array($v['id'], explode(',',$data['release_point']))){echo ' selected';}?>><?php echo $v['name']?></option>
  69. <?php endforeach;endif;?>
  70. </select></td>
  71. </tr>
  72. </table>
  73. </fieldset>
  74. <div class="bk10"></div>
  75. <fieldset>
  76. <legend><?php echo L('template_style_configuration')?></legend>
  77. <table width="100%" class="table_form">
  78. <tr>
  79. <th width="80" valign="top"><?php echo L('style_name')?>:</th>
  80. <td class="y-bg"> <select name="template[]" size="3" id="template" multiple title="<?php echo L('ctrl_more_selected')?>" onchange="default_list()">
  81. <?php
  82. $default_template_list = array();
  83. if (isset($data['template'])) {
  84. $dirname = explode(',',$data['template']);
  85. } else {
  86. $dirname = array();
  87. }
  88. if(is_array($template_list)):
  89. foreach ($template_list as $key=>$val):
  90. $default_template_list[$val['dirname']] = $val['name'];
  91. ?>
  92. <option value="<?php echo $val['dirname']?>" <?php if(in_array($val['dirname'], $dirname)){echo 'selected';}?>><?php echo $val['name']?></option>
  93. <?php endforeach;endif;?>
  94. </select></td>
  95. </tr>
  96. <tr>
  97. <th width="80" valign="top"><?php echo L('default_style')?>:<input type="hidden" name="default_style" id="default_style_input" value="<?php echo $data['default_style']?>"></th>
  98. <td class="y-bg"><span id="default_style">
  99. <?php
  100. if(is_array($dirname) && !empty($dirname)) foreach ($dirname as $v) {
  101. echo '<label><input type="radio" name="default_style_radio" value="'.$v.'" onclick="$(\'#default_style_input\').val(this.value);" '.($data['default_style']==$v ? 'checked' : '').'>'.$default_template_list[$v].'</label>';
  102. }
  103. ?>
  104. </span><span id="default_style_msg"></span></td>
  105. </tr>
  106. </table>
  107. <script type="text/javascript">
  108. function default_list() {
  109. var html = '';
  110. var old = $('#default_style_input').val();
  111. var checked = '';
  112. $('#template option:selected').each(function(i,n){
  113. if (old == $(n).val()) {
  114. checked = 'checked';
  115. }
  116. html += '<label><input type="radio" name="default_style_radio" value="'+$(n).val()+'" onclick="$(\'#default_style_input\').val(this.value);" '+checked+'> '+$(n).text()+'</label>';
  117. });
  118. if(!checked) $('#default_style_input').val('0');
  119. $('#default_style').html(html);
  120. }
  121. </script>
  122. </fieldset>
  123. <div class="bk10"></div>
  124. <fieldset>
  125. <legend><?php echo L('site_att_config')?></legend>
  126. <table width="100%" class="table_form">
  127. <tr>
  128. <th width="130" valign="top"><?php echo L('site_att_upload_maxsize')?></th>
  129. <td class="y-bg"><input type="text" class="input-text" name="setting[upload_maxsize]" id="upload_maxsize" size="10" value="<?php echo $setting['upload_maxsize'] ? $setting['upload_maxsize'] : '2000' ?>"/> KB </td>
  130. </tr>
  131. <tr>
  132. <th width="130" valign="top"><?php echo L('site_att_allow_ext')?></th>
  133. <td class="y-bg"><input type="text" class="input-text" name="setting[upload_allowext]" id="upload_allowext" size="50" value="<?php echo $setting['upload_allowext']?>"/></td>
  134. </tr>
  135. <tr>
  136. <th><?php echo L('site_att_gb_check')?></th>
  137. <td class="y-bg"><?php echo $this->check_gd()?></td>
  138. <tr>
  139. <th><?php echo L('site_att_watermark_enable')?></th>
  140. <td class="y-bg">
  141. <input class="radio_style" name="setting[watermark_enable]" value="1" <?php echo $setting['watermark_enable']==1 ? 'checked="checked"' : ''?> type="radio"> <?php echo L('site_att_watermark_open')?>&nbsp;&nbsp;&nbsp;&nbsp;
  142. <input class="radio_style" name="setting[watermark_enable]" value="0" <?php echo $setting['watermark_enable']==0 ? 'checked="checked"' : ''?> type="radio"> <?php echo L('site_att_watermark_close')?>
  143. </td>
  144. </tr>
  145. <tr>
  146. <th><?php echo L('site_att_watermark_condition')?></th>
  147. <td class="y-bg"><?php echo L('site_att_watermark_minwidth')?>
  148. <input type="text" class="input-text" name="setting[watermark_minwidth]" id="watermark_minwidth" size="10" value="<?php echo $setting['watermark_minwidth'] ? $setting['watermark_minwidth'] : '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="<?php echo $setting['watermark_minheight'] ? $setting['watermark_minheight'] : '300' ?>" /> PX
  149. </td>
  150. </tr>
  151. <tr>
  152. <th width="130" valign="top"><?php echo L('site_att_watermark_img')?></th>
  153. <td class="y-bg"><input type="text" name="setting[watermark_img]" id="watermark_img" size="30" value="<?php echo $setting['watermark_img'] ? $setting['watermark_img'] : 'mark.gif' ?>"/><?php echo L('site_att_watermark_img_desc')?></td>
  154. </tr>
  155. <tr>
  156. <th width="130" valign="top"><?php echo L('site_att_watermark_pct')?></th>
  157. <td class="y-bg"><input type="text" class="input-text" name="setting[watermark_pct]" id="watermark_pct" size="10" value="<?php echo $setting['watermark_pct'] ? $setting['watermark_pct'] : '100' ?>" /> <?php echo L('site_att_watermark_pct_desc')?></td>
  158. </tr>
  159. <tr>
  160. <th width="130" valign="top"><?php echo L('site_att_watermark_quality')?></th>
  161. <td class="y-bg"><input type="text" class="input-text" name="setting[watermark_quality]" id="watermark_quality" size="10" value="<?php echo $setting['watermark_quality'] ? $setting['watermark_quality'] : '80' ?>" /> <?php echo L('site_att_watermark_quality_desc')?></td>
  162. </tr>
  163. <tr>
  164. <th width="130" valign="top"><?php echo L('site_att_watermark_pos')?></th>
  165. <td>
  166. <table width="100%" class="radio-label">
  167. <tr>
  168. <td rowspan="3"><input class="radio_style" name="setting[watermark_pos]" value="10" type="radio" <?php echo ($setting['watermark_pos']==10) ? 'checked':''?>> <?php echo L('site_att_watermark_pos_10')?></td>
  169. <td><input class="radio_style" name="setting[watermark_pos]" value="1" type="radio" <?php echo ($setting['watermark_pos']==1) ? 'checked':''?>> <?php echo L('site_att_watermark_pos_1')?></td>
  170. <td><input class="radio_style" name="setting[watermark_pos]" value="2" type="radio" <?php echo ($setting['watermark_pos']==2) ? 'checked':'' ?>> <?php echo L('site_att_watermark_pos_2')?></td>
  171. <td><input class="radio_style" name="setting[watermark_pos]" value="3" type="radio" <?php echo ($setting['watermark_pos']==3) ? 'checked':''?>> <?php echo L('site_att_watermark_pos_3')?></td>
  172. </tr>
  173. <tr>
  174. <td><input class="radio_style" name="setting[watermark_pos]" value="4" type="radio" <?php echo ($setting['watermark_pos']==4) ? 'checked':''?>> <?php echo L('site_att_watermark_pos_4')?></td>
  175. <td><input class="radio_style" name="setting[watermark_pos]" value="5" type="radio" <?php echo ($setting['watermark_pos']==5) ? 'checked':''?>> <?php echo L('site_att_watermark_pos_5')?></td>
  176. <td><input class="radio_style" name="setting[watermark_pos]" value="6" type="radio" <?php echo ($setting['watermark_pos']==6) ? 'checked':''?>> <?php echo L('site_att_watermark_pos_6')?></td>
  177. </tr>
  178. <tr>
  179. <td><input class="radio_style" name="setting[watermark_pos]" value="7" type="radio" <?php echo ($setting['watermark_pos']==7) ? 'checked':''?>> <?php echo L('site_att_watermark_pos_7')?></td>
  180. <td><input class="radio_style" name="setting[watermark_pos]" value="8" type="radio" <?php echo ($setting['watermark_pos']==8) ? 'checked':''?>> <?php echo L('site_att_watermark_pos_8')?></td>
  181. <td><input class="radio_style" name="setting[watermark_pos]" value="9" type="radio" <?php echo ($setting['watermark_pos']==9) ? 'checked':''?>> <?php echo L('site_att_watermark_pos_9')?></td>
  182. </tr>
  183. </table>
  184. </td></tr>
  185. </table>
  186. </fieldset>
  187. <div class="bk15"></div>
  188. <input type="submit" class="dialog" id="dosubmit" name="dosubmit" value="<?php echo L('submit')?>" />
  189. </div>
  190. </form>
  191. </div>
  192. </body>
  193. </html>