badword_add.tpl.php 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. defined('IN_ADMIN') or exit('No permission resources.');
  3. include $this->admin_tpl('header');?>
  4. <script type="text/javascript">
  5. $(function(){
  6. $.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();})}});
  7. $("#badword").formValidator({onshow:"<?php echo L("input").L('badword_name')?>",onfocus:"<?php echo L("input").L('badword_name')?>"}).inputValidator({min:1,onerror:"<?php echo L("input").L('badword_name')?>"}).regexValidator({regexp:"notempty",datatype:"enum",param:'i',onerror:"<?php echo L('site_dirname_err_msg')?>"}).ajaxValidator({type : "get",url : "",data :"m=admin&c=badword&a=public_name",datatype : "html",async:'false',success : function(data){ if( data == "1" ){return true;}else{return false;}},buttons: $("#dosubmit"),onerror : "<?php echo L('badword_name').L('exists')?>",onwait : "<?php echo L('connecting')?>"});
  8. $("#replaceword").formValidator({empty:true,onshow:"<?php echo L('badword_noreplace')?>",onfocus:"<?php echo L("input").L('badword_replacename')?>",oncorrect:"<?php echo L('format_right')?>",onempty:"<?php echo L('badword_notreplace')?>"}).inputValidator({min:1,onerror:"<?php echo L("input").L('badword_replacename')?>"});
  9. })
  10. </script>
  11. <div class="pad_10">
  12. <table cellpadding="2" cellspacing="1" class="table_form" width="100%">
  13. <form action="?m=admin&c=badword&a=add" method="post" name="myform" id="myform">
  14. <tr>
  15. <th width="20%"> <?php echo L('badword_name')?> :</th>
  16. <td>
  17. <input type="text" name="badword" id="badword" size="20">
  18. </td>
  19. </tr>
  20. <tr>
  21. <th width="20%"> <?php echo L('badword_replacename')?> :</th>
  22. <td><input type="text" name="replaceword" id="replaceword" size="20"></td>
  23. </tr>
  24. <tr>
  25. <th width="20%"> <?php echo L('badword_level')?> :</th>
  26. <td>
  27. <select size="1" id="workflowid" name="info[level]">
  28. <option selected="" value="1"><?php echo L('badword_common')?></option>
  29. <option value="2"><?php echo L('badword_dangerous')?></option>
  30. </select><?php echo L('badword_level_info')?>
  31. </td>
  32. </tr>
  33. <input type="hidden" name="forward" value="?m=admin&c=badword&a=add">
  34. <input type="submit" name="dosubmit" id="dosubmit" class="dialog" value=" <?php echo L('submit')?> ">
  35. </form>
  36. </table>
  37. </div>
  38. </body>
  39. </html>