member_menu.tpl.php 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. <?php
  2. defined('IN_ADMIN') or exit('No permission resources.');
  3. include $this->admin_tpl('header', 'admin');?>
  4. <?php if(ROUTE_A=='manage') {?>
  5. <form name="myform" action="?m=member&c=member_menu&a=listorder" method="post">
  6. <div class="pad-lr-10">
  7. <div class="table-list">
  8. <table width="100%" cellspacing="0">
  9. <thead>
  10. <tr>
  11. <th width="80"><?php echo L('listorder');?></th>
  12. <th width="100">id</th>
  13. <th><?php echo L('menu_name');?></th>
  14. <th><?php echo L('operations_manage');?></th>
  15. </tr>
  16. </thead>
  17. <tbody>
  18. <?php echo $categorys;?>
  19. </tbody>
  20. </table>
  21. <div class="btn"><input type="submit" class="button" name="dosubmit" value="<?php echo L('listorder')?>" /></div> </div>
  22. </div>
  23. </div>
  24. </form>
  25. </body>
  26. </html>
  27. <?php } elseif(ROUTE_A=='add') {?>
  28. <script type="text/javascript">
  29. <!--
  30. $(function(){
  31. $.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();})}});
  32. $("#language").formValidator({onshow:"<?php echo L("input", '', 'admin').L('chinese_name')?>",onfocus:"<?php echo L("input").L('chinese_name')?>",oncorrect:"<?php echo L('input_right');?>"}).inputValidator({min:1,onerror:"<?php echo L("input").L('chinese_name')?>"});
  33. $("#name").formValidator({onshow:"<?php echo L("input").L('menu_name')?>",onfocus:"<?php echo L("input").L('menu_name')?>",oncorrect:"<?php echo L('input_right');?>"}).inputValidator({min:1,onerror:"<?php echo L("input").L('menu_name')?>"});
  34. $("#m").formValidator({onshow:"<?php echo L("input").L('module_name')?>",onfocus:"<?php echo L("input").L('module_name')?>",oncorrect:"<?php echo L('input_right');?>"}).inputValidator({min:1,onerror:"<?php echo L("input").L('module_name')?>"});
  35. $("#c").formValidator({onshow:"<?php echo L("input").L('file_name')?>",onfocus:"<?php echo L("input").L('file_name')?>",oncorrect:"<?php echo L('input_right');?>"}).inputValidator({min:1,onerror:"<?php echo L("input").L('file_name')?>"});
  36. $("#a").formValidator({tipid:'a_tip',onshow:"<?php echo L("input").L('action_name')?>",onfocus:"<?php echo L("input").L('action_name')?>",oncorrect:"<?php echo L('input_right');?>"}).inputValidator({min:1,onerror:"<?php echo L("input").L('action_name')?>"});
  37. })
  38. //-->
  39. </script>
  40. <div class="common-form">
  41. <form name="myform" id="myform" action="?m=member&c=member_menu&a=add" method="post">
  42. <table width="100%" class="table_form contentWrap">
  43. <tr>
  44. <th width="200"><?php echo L('menu_parentid')?>:</th>
  45. <td><select name="info[parentid]" >
  46. <option value="0"><?php echo L('no_parent_menu')?></option>
  47. </select></td>
  48. </tr>
  49. <tr>
  50. <th> <?php echo L('chinese_name')?>:</th>
  51. <td><input type="text" name="language" id="language" class="input-text" ></td>
  52. </tr>
  53. <tr>
  54. <th><?php echo L('menu_name')?>:</th>
  55. <td><input type="text" name="info[name]" id="name" class="input-text" ></td>
  56. </tr>
  57. <?php if(!isset($_GET['isurl']) || (isset($_GET['isurl']) && $_GET['isurl']==0)) {?>
  58. <tr>
  59. <th><?php echo L('module_name')?>:</th>
  60. <td><input type="text" name="info[m]" id="m" class="input-text" ></td>
  61. </tr>
  62. <tr>
  63. <th><?php echo L('file_name')?>:</th>
  64. <td><input type="text" name="info[c]" id="c" class="input-text" ></td>
  65. </tr>
  66. <tr>
  67. <th><?php echo L('action_name')?>:</th>
  68. <td><input type="text" name="info[a]" id="a" class="input-text" > <span id="a_tip"></span><?php echo L('ajax_tip')?></td>
  69. </tr>
  70. <tr>
  71. <th><?php echo L('att_data')?>:</th>
  72. <td><input type="text" name="info[data]" class="input-text" ></td>
  73. </tr>
  74. <?php }?>
  75. <tr>
  76. <th><?php echo L('menu_display')?>:</th>
  77. <td><input type="radio" name="info[display]" value="1" checked> <?php echo L('yes')?><input type="radio" name="info[display]" value="0"> <?php echo L('no')?></td>
  78. </tr>
  79. <tr>
  80. <th><?php echo L('isurl')?>:</th>
  81. <td><input type="radio" name="info[isurl]" value="1" onclick="redirect('<?php echo get_url().'&isurl=1';?>')" <?php if(isset($_GET['isurl']) && $_GET['isurl']==1) echo 'checked';?>> <?php echo L('yes')?><input type="radio" name="info[isurl]" value="0" <?php if(!isset($_GET['isurl']) || (isset($_GET['isurl']) && $_GET['isurl']==0)) echo 'checked';?> onclick="redirect('<?php echo get_url().'&isurl=0';?>')"> <?php echo L('no')?></td>
  82. </tr>
  83. <?php if(isset($_GET['isurl']) && $_GET['isurl']==1) {?>
  84. <tr>
  85. <th><?php echo L('url')?>:</th>
  86. <td><input type="text" name="info[url]" class="input-text" size=80></td>
  87. </tr>
  88. <?php }?>
  89. </table>
  90. <!--table_form_off-->
  91. </div>
  92. <div class="bk15"></div>
  93. <div class="btn"><input type="submit" id="dosubmit" class="button" name="dosubmit" value="<?php echo L('submit')?>"/></div>
  94. </div>
  95. </form>
  96. <?php } elseif(ROUTE_A=='edit') {?>
  97. <script type="text/javascript">
  98. <!--
  99. $(function(){
  100. $.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();})}});
  101. $("#language").formValidator({onshow:"<?php echo L("input", '', 'admin').L('chinese_name')?>",onfocus:"<?php echo L("input").L('chinese_name')?>",oncorrect:"<?php echo L('input_right');?>"}).inputValidator({min:1,onerror:"<?php echo L("input").L('chinese_name')?>"});
  102. $("#name").formValidator({onshow:"<?php echo L("input").L('menu_name')?>",onfocus:"<?php echo L("input").L('menu_name')?>",oncorrect:"<?php echo L('input_right');?>"}).inputValidator({min:1,onerror:"<?php echo L("input").L('menu_name')?>"});
  103. $("#m").formValidator({onshow:"<?php echo L("input").L('module_name')?>",onfocus:"<?php echo L("input").L('module_name')?>",oncorrect:"<?php echo L('input_right');?>"}).inputValidator({min:1,onerror:"<?php echo L("input").L('module_name')?>"});
  104. $("#c").formValidator({onshow:"<?php echo L("input").L('file_name')?>",onfocus:"<?php echo L("input").L('file_name')?>",oncorrect:"<?php echo L('input_right');?>"}).inputValidator({min:1,onerror:"<?php echo L("input").L('file_name')?>"});
  105. $("#a").formValidator({tipid:'a_tip',onshow:"<?php echo L("input").L('action_name')?>",onfocus:"<?php echo L("input").L('action_name')?>",oncorrect:"<?php echo L('input_right');?>"}).inputValidator({min:1,onerror:"<?php echo L("input").L('action_name')?>"});
  106. })
  107. //-->
  108. </script>
  109. <div class="common-form">
  110. <form name="myform" id="myform" action="?m=member&c=member_menu&a=edit" method="post">
  111. <table width="100%" class="table_form contentWrap">
  112. <tr>
  113. <th width="200"><?php echo L('menu_parentid')?>:</th>
  114. <td><select name="info[parentid]" style="width:200px;">
  115. <option value="0"><?php echo L('no_parent_menu')?></option>
  116. </select></td>
  117. </tr>
  118. <tr>
  119. <th> <?php echo L('for_chinese_lan')?>:</th>
  120. <td><input type="text" name="language" id="language" class="input-text" value="<?php echo L($name,'','',1)?>"></td>
  121. </tr>
  122. <tr>
  123. <th><?php echo L('menu_name')?>:</th>
  124. <td><input type="text" name="info[name]" id="name" class="input-text" value="<?php echo $name?>"></td>
  125. </tr>
  126. <?php if(empty($isurl)) {?>
  127. <tr>
  128. <th><?php echo L('module_name')?>:</th>
  129. <td><input type="text" name="info[m]" id="m" class="input-text" value="<?php echo $m?>"></td>
  130. </tr>
  131. <tr>
  132. <th><?php echo L('file_name')?>:</th>
  133. <td><input type="text" name="info[c]" id="c" class="input-text" value="<?php echo $c?>"></td>
  134. </tr>
  135. <tr>
  136. <th><?php echo L('action_name')?>:</th>
  137. <td><input type="text" name="info[a]" id="a" class="input-text" value="<?php echo $a?>"> <span id="a_tip"></span><?php echo L('ajax_tip')?></td>
  138. </tr>
  139. <tr>
  140. <th><?php echo L('att_data')?>:</th>
  141. <td><input type="text" name="info[data]" class="input-text" value="<?php echo $data?>"></td>
  142. </tr>
  143. <?php }?>
  144. <tr>
  145. <th><?php echo L('menu_display')?>:</th>
  146. <td><input type="radio" name="info[display]" value="1" <?php if($display) echo 'checked';?>> <?php echo L('yes')?><input type="radio" name="info[display]" value="0" <?php if(!$display) echo 'checked';?>> <?php echo L('no')?></td>
  147. </tr>
  148. <tr>
  149. <th><?php echo L('isurl')?>:</th>
  150. <td>
  151. <?php if($isurl) {?>
  152. <input type="radio" name="info[isurl]" value="1" checked> <?php echo L('yes')?>
  153. <?php } else {?>
  154. <input type="radio" name="info[isurl]" value="0" checked> <?php echo L('no')?>
  155. <?php }?>
  156. </td>
  157. </tr>
  158. <?php if((isset($_GET['isurl']) && $_GET['isurl']==1) || $isurl) {?>
  159. <tr>
  160. <th><?php echo L('url')?>:</th>
  161. <td><input type="text" name="info[url]" class="input-text" size=80 value="<?php echo $url?>"></td>
  162. </tr>
  163. <?php }?>
  164. </table>
  165. <!--table_form_off-->
  166. </div>
  167. <div class="bk15"></div>
  168. <input name="id" type="hidden" value="<?php echo $id?>">
  169. <div class="btn"><input type="submit" id="dosubmit" class="button" name="dosubmit" value="<?php echo L('submit')?>"/></div>
  170. </div>
  171. </form>
  172. <?php }?>
  173. </body>
  174. </html>