link_add.tpl.php 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <?php
  2. defined('IN_ADMIN') or exit('No permission resources.');
  3. include $this->admin_tpl('header','admin');
  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. $("#link_name").formValidator({onshow:"<?php echo L("input").L('link_name')?>",onfocus:"<?php echo L("input").L('link_name')?>"}).inputValidator({min:1,onerror:"<?php echo L("input").L('link_name')?>"});
  10. $("#link_url").formValidator({onshow:"<?php echo L("input").L('url')?>",onfocus:"<?php echo L("input").L('url')?>"}).inputValidator({min:1,onerror:"<?php echo L("input").L('url')?>"}).regexValidator({regexp:"^http:\/\/[A-Za-z0-9]+\.[A-Za-z0-9]+[\/=\?%\-&]*([^<>])*$",onerror:"<?php echo L('link_onerror')?>"})
  11. })
  12. //-->
  13. </script>
  14. <div class="pad_10">
  15. <form action="?m=link&c=link&a=add" method="post" name="myform" id="myform">
  16. <table cellpadding="2" cellspacing="1" class="table_form" width="100%">
  17. <tr>
  18. <th width="20%"><?php echo L('typeid')?>:</th>
  19. <td><select name="link[typeid]" id="">
  20. <option value="0">默认分类</option>
  21. <?php
  22. $i=0;
  23. foreach($types as $typeid=>$type){
  24. $i++;
  25. ?>
  26. <option value="<?php echo $type['typeid'];?>"><?php echo $type['name'];?></option>
  27. <?php }?>
  28. </select></td>
  29. </tr>
  30. <tr>
  31. <th width="100"><?php echo L('link_type')?>:</th>
  32. <td>
  33. <input name="link[linktype]" type="radio" value="1" checked="checked" style="border:0" onclick="$('#logolink').show()" class="radio_style">
  34. <?php echo L('logo_link')?>&nbsp;&nbsp;&nbsp;&nbsp;
  35. <input type="radio" name="link[linktype]" value="0" style="border:0" onclick="$('#logolink').hide()" class="radio_style">
  36. <?php echo L('word_link')?>
  37. </td>
  38. </tr>
  39. <tr>
  40. <th width="100"><?php echo L('link_name')?>:</th>
  41. <td><input type="text" name="link[name]" id="link_name"
  42. size="30" class="input-text"></td>
  43. </tr>
  44. <tr>
  45. <th width="100"><?php echo L('url')?>:</th>
  46. <td><input type="text" name="link[url]" id="link_url"
  47. size="30" class="input-text"></td>
  48. </tr>
  49. <tr id="logolink">
  50. <th width="100"><?php echo L('logo')?>:</th>
  51. <td><?php echo form::images('link[logo]', 'logo', '', 'link')?></td>
  52. </tr>
  53. <tr>
  54. <th width="100"><?php echo L('username')?>:</th>
  55. <td><input type="text" name="link[username]" id="link_username"
  56. size="30" class="input-text"></td>
  57. </tr>
  58. <tr>
  59. <th><?php echo L('web_description')?>:</th>
  60. <td><textarea name="link[introduce]" id="introduce" cols="50"
  61. rows="6"></textarea></td>
  62. </tr>
  63. <tr>
  64. <th><?php echo L('elite')?>:</th>
  65. <td><input name="link[elite]" type="radio" value="1" >&nbsp;<?php echo L('yes')?>&nbsp;&nbsp;<input
  66. name="link[elite]" type="radio" value="0" checked>&nbsp;<?php echo L('no')?></td>
  67. </tr>
  68. <tr>
  69. <th><?php echo L('passed')?>:</th>
  70. <td><input name="link[passed]" type="radio" value="1" checked>&nbsp;<?php echo L('yes')?>&nbsp;&nbsp;<input
  71. name="link[passed]" type="radio" value="0">&nbsp;<?php echo L('no')?></td>
  72. </tr>
  73. <tr>
  74. <th></th>
  75. <td><input type="hidden" name="forward" value="?m=link&c=link&a=add"> <input
  76. type="submit" name="dosubmit" id="dosubmit" class="dialog"
  77. value=" <?php echo L('submit')?> "></td>
  78. </tr>
  79. </table>
  80. </form>
  81. </div>
  82. </body>
  83. </html>