keylink_add.tpl.php 1.8 KB

123456789101112131415161718192021222324252627282930
  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. $("#word").formValidator({onshow:"<?php echo L('input').L('keylink');?>",onfocus:"<?php echo L('input').L('keylink');?>"}).inputValidator({min:1,onerror:"<?php echo L('input').L('keylink');?>"}).regexValidator({regexp:"notempty",datatype:"enum",param:'i',onerror:"<?php echo L('en_tips_type');?>"}).ajaxValidator({type : "get",url : "",data :"m=admin&c=keylink&a=public_name",datatype : "html",async:'false',success : function(data){ if( data == "1" ){return true;}else{return false;}},buttons: $("#dosubmit"),onerror : "<?php echo L('keylink').L('exists');?>",onwait : "<?php echo L('connecting');?>"});
  10. $("#url").formValidator({onshow:"<?php echo L('input_siteurl');?>",onfocus:"<?php echo L('input_siteurl');?>"}).inputValidator({min:1,onerror:"<?php echo L('input_siteurl');?>"}).regexValidator({regexp:"^http:",onerror:"<?php echo L('copyfrom_url_tips');?>"});
  11. })
  12. //-->
  13. </script>
  14. <div class="pad_10">
  15. <table width="100%" cellpadding="2" cellspacing="1" class="table_form">
  16. <form action="?m=admin&c=keylink&a=add" method="post" name="myform" id="myform">
  17. <tr>
  18. <th width="25%"><?php echo L('keylink_name');?> :</th>
  19. <td><input type="text" name="info[word]" id="word" size="20"></td>
  20. </tr>
  21. <tr>
  22. <th><?php echo L('keylink_url');?> :</th>
  23. <td><input type="text" name="info[url]" value="http://www." size="30" id="url"></td>
  24. </tr>
  25. <input type="submit" name="dosubmit" id="dosubmit" class="dialog" value=" <?php echo L('submit')?> ">
  26. </form>
  27. </table>
  28. </div>
  29. </body>
  30. </html>