Advertisement
pexebezq

Untitled

Jun 22nd, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.03 KB | None | 0 0
  1. <?php
  2. /**
  3. * WARNING!
  4. * This EXAMPLE code contains severe SECURITY ISSUES
  5. * which should be addressed before real-life usage!!
  6. *
  7. * These issues have been ignored intentionally to
  8. * simplify the code so we can focus on the topic
  9. * in discussion.
  10. */
  11.  
  12. // Lets test if the form has been submitted
  13. if(isset($_POST['SubmitCheck'])) {
  14. // The form has been submited
  15. // Check the values!
  16. if($_POST['Nome'] != "" and $_POST['Telefone'] != "") {
  17.  
  18.  
  19.  
  20. $client = new SoapClient('http://177.8.126.123:80/WebService1.asmx?WSDL');
  21. $function = 'InserirTeste';
  22. $arguments= array('InserirTeste' => array(
  23. 'Nome' => $_POST['Nome'],
  24. 'Telefone' => $_POST['Telefone'],
  25. 'Email' => $_POST['Email']
  26. ));
  27. $options = array('location' => 'http://177.8.126.123:80/WebService1.asmx');
  28. $result = $client->__soapCall($function, $arguments, $options);
  29. echo 'Response: ';
  30. print_r($result);
  31.  
  32.  
  33. // Check if the checkbox was checked
  34. if(isset($_POST['Remember'])) {
  35. echo "<br>You will be remembered!";
  36. }
  37. else {
  38. echo "<br>John who?!";
  39. }
  40. }
  41. else {
  42. // User info invalid!
  43. echo "Sorry mate, try again!";
  44. }
  45. }
  46. else {
  47. // The form has not been posted
  48. // Show the form
  49. ?>
  50.  
  51.  
  52.  
  53.  
  54. <form class="login-form" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" id="form-teste">
  55.  
  56. <h3 class="form-title">Teste gratuito 2 hora(s) </h3>
  57. <div class="form-group">
  58. <!--ie8, ie9 does not support html5 placeholder, so we just show field title for that-->
  59. <label class="control-label visible-ie8 visible-ie9">Seu nome</label>
  60. <div class="input-icon">
  61. <i class="fa fa-user"></i>
  62. <input class="form-control placeholder-no-fix" type="text" autocomplete="off" placeholder="Seu nome" name="Nome" /> </div>
  63. </div>
  64. <div class="form-group">
  65. <!--ie8, ie9 does not support html5 placeholder, so we just show field title for that-->
  66. <label class="control-label visible-ie8 visible-ie9">Seu e-mail</label>
  67. <div class="input-icon">
  68. <i class="fa fa-envelope"></i>
  69. <input class="form-control placeholder-no-fix" type="text" placeholder="Seu e-mail" name="Email" /> </div>
  70.  
  71. <div class="form-group">
  72. <!--ie8, ie9 does not support html5 placeholder, so we just show field title for that-->
  73. <label class="control-label visible-ie8 visible-ie9">Seu whatsapp</label>
  74. <div class="input-icon">
  75. <i class="fa fa-envelope"></i>
  76. <input class="form-control placeholder-no-fix" type="text" placeholder="Seu whatsapp" name="Telefone" /> </div>
  77. </div>
  78. <div class="form-group">
  79. <label class="control-label visible-ie8 visible-ie9">Plano</label>
  80. <select name="plano" id="planos" class="select2 form-control">
  81. <option value=""></option>
  82.  
  83. <option value="4551">Canais SD + HD / ADULTOS</option>
  84.  
  85. <option value="5312">Canais SD + HD / ADULTOS / VOD / SERIADOS</option>
  86.  
  87. <option value="5313">Canais SD</option>
  88.  
  89. </select>
  90. </div>
  91.  
  92. Remember me: <input type="checkbox" name="Remember" checked="chekced">
  93. <input type="hidden" name="SubmitCheck" value="sent">
  94. <button type="submit" name="Form1_Submit" class="btn green pull-right"> Gerar teste </button>
  95.  
  96. </form>
  97.  
  98.  
  99.  
  100. <?php
  101. }
  102. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement