file_add_file.tpl.php 1.6 KB

123456789101112131415161718192021222324252627282930
  1. <?php
  2. defined('IN_ADMIN') or exit('No permission resources.');
  3. include $this->admin_tpl('header', 'admin');
  4. ?>
  5. <div class="pad-10">
  6. <form action="?m=template&c=file&a=add_file&style=<?php echo $this->style?>&dir=<?php echo $dir?>" method="post" id="myform">
  7. <div>
  8. <table width="100%" class="table_form">
  9. <tr>
  10. <th width="80"><?php echo L('name')?>:</th>
  11. <td class="y-bg"><input type="text" name="name" id="name" /></td>
  12. </tr>
  13. </table>
  14. <div class="bk15"></div>
  15. <input type="submit" class="dialog" id="dosubmit" name="dosubmit" value="<?php echo L('submit')?>" />
  16. </div>
  17. </form>
  18. </div>
  19. <script type="text/javascript">
  20. <!--
  21. $(function(){
  22. $.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();})}});
  23. $("#name").formValidator({onshow:"<?php echo L("input").L('name').L('without_the_input_name_extension')?>",onfocus:"<?php echo L("input").L('name').L('without_the_input_name_extension')?>"}).inputValidator({min:1,onerror:"<?php echo L("input").L('name')?>"}).regexValidator({regexp:"username",datatype:'enum',param:'i',onerror:"<?php echo L('name_datatype_error')?>"}).ajaxValidator({type : "get",url : "",data :"m=template&c=file&a=public_name&style=<?php echo $this->style?>&dir=<?php echo $dir?>",datatype : "html",async:'false',success : function(data){ if( data == "1" ){return true;}else{return false;}},buttons: $("#dosubmit"),onerror : "<?php echo L('exists')?>",onwait : "<?php echo L('connecting')?>"});
  24. })
  25. //-->
  26. </script>
  27. </body>
  28. </html>