modify_deposit.tpl.php 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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({autotip:true,formid:"myform",onerror:function(msg){}});
  9. $("#unit").formValidator({onshow:"<?php echo L('input_price_to_change')?>",onfocus:"<?php echo L('number').L('empty')?>"}).inputValidator({min:1,max:999,onerror:"<?php echo L('number').L('empty')?>"}).regexValidator({regexp:"^(([1-9]{1}\\d*)|([0]{1}))(\\.(\\d){1,2})?$",onerror:"<?php echo L('must_be_price')?>"});
  10. $("#username").formValidator({onshow:"<?php echo L('input').L('username')?>",onfocus:"<?php echo L('username').L('empty')?>"}).inputValidator({min:1,max:999,onerror:"<?php echo L('username').L('empty')?>"}).ajaxValidator({
  11. type : "get",
  12. url : "",
  13. data :"m=pay&c=payment&a=public_checkname_ajax",
  14. datatype : "html",
  15. async:'false',
  16. success : function(data){
  17. if(data!= 'FALSE')
  18. {
  19. $("#balance").html(data);
  20. return true;
  21. }
  22. else
  23. {
  24. $("#balance").html('');
  25. return false;
  26. }
  27. },
  28. buttons: $("#dosubmit"),
  29. onerror : "<?php echo L('user_not_exist')?>",
  30. onwait : "<?php echo L('checking')?>"
  31. });
  32. $("#usernote").formValidator({onshow:"<?php echo L('input').L('reason_of_modify')?>",onfocus:"<?php echo L('usernote').L('empty')?>"}).inputValidator({min:1,max:999,onerror:"<?php echo L('usernote').L('empty')?>"});
  33. })
  34. //-->
  35. </script>
  36. <div class="pad-10">
  37. <div class="common-form">
  38. <form name="myform" action="?m=pay&c=payment&a=<?php echo $_GET['a']?>" method="post" id="myform">
  39. <table width="100%" class="table_form">
  40. <tr>
  41. <td width="120"><?php echo L('recharge_type')?></td>
  42. <td><input name="pay_type" value="1" type="radio" id="pay_type" checked> <?php echo L('money')?>
  43. <input name="pay_type" value="2" type="radio" id="pay_type"> <?php echo L('point')?></td>
  44. </tr>
  45. <tr>
  46. <td width="120"><?php echo L('username')?></td>
  47. <td><input type="text" name="username" size="15" value="<?php echo $username?>" id="username"><span id="balance"><span></td>
  48. </tr>
  49. <tr>
  50. <td width="120"><?php echo L('recharge_quota')?></td>
  51. <td><input name="pay_unit" value="1" type="radio" checked> <?php echo L('increase')?> <input name="pay_unit" value="0" type="radio"> <?php echo L('reduce')?> <input type="text" name="unit" size="10" value="<?php echo $unit?>" id="unit"></td>
  52. </tr>
  53. <tr>
  54. <td width="120"><?php echo L('trading').L('usernote')?></td>
  55. <td><textarea name="usernote" id="usernote" rows="5" cols="50"></textarea></td>
  56. </tr>
  57. <tr>
  58. <td width="120"><?php echo L('op_notice')?></td>
  59. <td><label><input type="checkbox" id="sendemail" name="sendemail" value="1" checked> <?php echo L('op_sendemail')?></label></td>
  60. </tr>
  61. </table>
  62. <div class="bk15"></div>
  63. <input name="dosubmit" type="submit" value="<?php echo L('submit')?>" class="button" id="dosubmit">
  64. </form>
  65. </div>
  66. </body>
  67. </html>
  68. <script type="text/javascript">
  69. $(document).ready(function() {
  70. $("#paymethod input[type='radio']").click( function () {
  71. if($(this).val()== 0){
  72. $("#rate").removeClass('hidden');
  73. $("#fix").addClass('hidden');
  74. $("#rate input").val('0');
  75. } else {
  76. $("#fix").removeClass('hidden');
  77. $("#rate").addClass('hidden');
  78. $("#fix input").val('0');
  79. }
  80. });
  81. });
  82. function category_load(obj)
  83. {
  84. var modelid = $(obj).attr('value');
  85. $.get('?m=admin&c=position&a=public_category_load&modelid='+modelid,function(data){
  86. $('#load_catid').html(data);
  87. });
  88. }
  89. </script>