menu.tpl.php 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. <?php
  2. defined('IN_ADMIN') or exit('No permission resources.');
  3. include $this->admin_tpl('header');?>
  4. <?php if(ROUTE_A=='init') {?>
  5. <form name="myform" action="?m=admin&c=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").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=admin&c=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. <?php echo $select_categorys;?>
  48. </select></td>
  49. </tr>
  50. <tr>
  51. <th > <?php echo L('chinese_name')?>:</th>
  52. <td><input type="text" name="language" id="language" class="input-text" ></td>
  53. </tr>
  54. <tr>
  55. <th><?php echo L('menu_name')?>:</th>
  56. <td><input type="text" name="info[name]" id="name" class="input-text" ></td>
  57. </tr>
  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. <tr>
  75. <th><?php echo L('menu_display')?>:</th>
  76. <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>
  77. </tr>
  78. <tr>
  79. <th><?php echo L('show_in_model')?>:</th>
  80. <td><?php foreach($models as $_k => $_m) {?><input type="checkbox" name="info[<?php echo $_k?>]" value="1"> <?php echo $_m?><?php }?></td>
  81. </tr>
  82. </table>
  83. <!--table_form_off-->
  84. </div>
  85. <div class="bk15"></div>
  86. <div class="btn"><input type="submit" id="dosubmit" class="button" name="dosubmit" value="<?php echo L('submit')?>"/></div>
  87. </div>
  88. </form>
  89. <?php } elseif(ROUTE_A=='edit') {?>
  90. <script type="text/javascript">
  91. <!--
  92. $(function(){
  93. $.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();})}});
  94. $("#language").formValidator({onshow:"<?php echo L("input").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')?>"});
  95. $("#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')?>"});
  96. $("#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')?>"});
  97. $("#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')?>"});
  98. $("#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')?>"});
  99. })
  100. //-->
  101. </script>
  102. <div class="common-form">
  103. <form name="myform" id="myform" action="?m=admin&c=menu&a=edit" method="post">
  104. <table width="100%" class="table_form contentWrap">
  105. <tr>
  106. <th width="200"><?php echo L('menu_parentid')?>:</th>
  107. <td><select name="info[parentid]" style="width:200px;">
  108. <option value="0"><?php echo L('no_parent_menu')?></option>
  109. <?php echo $select_categorys;?>
  110. </select></td>
  111. </tr>
  112. <tr>
  113. <th> <?php echo L('for_chinese_lan')?>:</th>
  114. <td><input type="text" name="language" id="language" class="input-text" value="<?php echo L($name,'','',1)?>"></td>
  115. </tr>
  116. <tr>
  117. <th><?php echo L('menu_name')?>:</th>
  118. <td><input type="text" name="info[name]" id="name" class="input-text" value="<?php echo $name?>"></td>
  119. </tr>
  120. <tr>
  121. <th><?php echo L('module_name')?>:</th>
  122. <td><input type="text" name="info[m]" id="m" class="input-text" value="<?php echo $m?>"></td>
  123. </tr>
  124. <tr>
  125. <th><?php echo L('file_name')?>:</th>
  126. <td><input type="text" name="info[c]" id="c" class="input-text" value="<?php echo $c?>"></td>
  127. </tr>
  128. <tr>
  129. <th><?php echo L('action_name')?>:</th>
  130. <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>
  131. </tr>
  132. <tr>
  133. <th><?php echo L('att_data')?>:</th>
  134. <td><input type="text" name="info[data]" class="input-text" value="<?php echo $data?>"></td>
  135. </tr>
  136. <tr>
  137. <th><?php echo L('menu_display')?>:</th>
  138. <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>
  139. </tr>
  140. <tr>
  141. <th><?php echo L('show_in_model')?>:</th>
  142. <td><?php foreach($models as $_k => $_m) {?><input type="checkbox" name="info[<?php echo $_k?>]" value="1"<?php if (${$_k}) {?> checked<?php }?>> <?php echo $_m?><?php }?></td>
  143. </tr>
  144. </table>
  145. <!--table_form_off-->
  146. </div>
  147. <div class="bk15"></div>
  148. <input name="id" type="hidden" value="<?php echo $id?>">
  149. <div class="btn"><input type="submit" id="dosubmit" class="button" name="dosubmit" value="<?php echo L('submit')?>"/></div>
  150. </div>
  151. </form>
  152. <?php }?>
  153. </body>
  154. </html>