category_link.tpl.php 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <?php
  2. defined('IN_ADMIN') or exit('No permission resources.');
  3. include $this->admin_tpl('header');?>
  4. <script type="text/javascript">
  5. <!--
  6. $(function(){
  7. $.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();})}});
  8. $("#catname").formValidator({onshow:"<?php echo L('input_catname');?>",onfocus:"<?php echo L('input_catname');?>",oncorrect:"<?php echo L('input_right');?>"}).inputValidator({min:1,onerror:"<?php echo L('input_catname');?>"})<?php if(ROUTE_A=='edit') echo '.defaultPassed()';?>;
  9. $("#url").formValidator({onshow:"<?php echo L('input_linkurl');?>",onfocus:"<?php echo L('input_linkurl');?>",oncorrect:"<?php echo L('input_right');?>"}).inputValidator({min:1,onerror:"<?php echo L('input_linkurl');?>"})<?php if(ROUTE_A=='edit') echo '.defaultPassed()';?>;
  10. })
  11. //-->
  12. </script>
  13. <form name="myform" id="myform" action="?m=admin&c=category&a=<?php echo ROUTE_A;?>" method="post">
  14. <div class="pad-10">
  15. <div class="col-tab">
  16. <ul class="tabBut cu-li">
  17. <li id="tab_setting_1" class="on" onclick="SwapTab('setting','on','',1,1);"><?php echo L('catgory_basic');?></li>
  18. </ul>
  19. <div id="div_setting_1" class="contentList pad-10">
  20. <table width="100%" class="table_form ">
  21. <tr>
  22. <th width="200"><?php echo L('parent_category')?>:</th>
  23. <td>
  24. <?php echo form::select_category('category_content_'.$this->siteid,$parentid,'name="info[parentid]"',L('please_select_parent_category'),0,-1);?>
  25. </td>
  26. </tr>
  27. <tr>
  28. <th><?php echo L('catname')?>:</th>
  29. <td><input type="text" name="info[catname]" id="catname" class="input-text" value="<?php echo $catname;?>"></td>
  30. </tr>
  31. <tr>
  32. <th><?php echo L('catgory_img')?>:</th>
  33. <td><?php echo form::images('info[image]', 'image', $image, 'content');?></td>
  34. </tr>
  35. <tr>
  36. <th><?php echo L('link_url')?>:</th>
  37. <td><input type="text" name="info[url]" id="url" size="50" class="input-text" value="<?php echo $url;?>"></td>
  38. </tr>
  39. </table>
  40. </div>
  41. <div class="bk15"></div>
  42. <input name="catid" type="hidden" value="<?php echo $catid;?>">
  43. <input name="type" type="hidden" value="<?php echo $type;?>">
  44. <input name="dosubmit" type="submit" value="<?php echo L('submit')?>" class="button">
  45. </form>
  46. </div>
  47. </div>
  48. <!--table_form_off-->
  49. </div>
  50. <script language="JavaScript">
  51. <!--
  52. window.top.$('#display_center_id').css('display','none');
  53. function SwapTab(name,cls_show,cls_hide,cnt,cur){
  54. for(i=1;i<=cnt;i++){
  55. if(i==cur){
  56. $('#div_'+name+'_'+i).show();
  57. $('#tab_'+name+'_'+i).attr('class',cls_show);
  58. }else{
  59. $('#div_'+name+'_'+i).hide();
  60. $('#tab_'+name+'_'+i).attr('class',cls_hide);
  61. }
  62. }
  63. }
  64. //-->
  65. </script>