Advertisement
Guest User

Untitled

a guest
Jul 9th, 2017
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.73 KB | None | 0 0
  1.  
  2. <html>
  3. <head><title>RaidPlaner - TAP</title>
  4. </head>
  5. <body>
  6.  
  7. <form action='./raid_prihlaseni1.php' method='post' enctype='text/form-data'>
  8.  
  9.  
  10. <?php
  11.  
  12.  
  13. if (!empty($_POST['player']))
  14. {
  15. $user = $_POST["player"];
  16. $pass = $_POST["role"];
  17.  
  18. mysql_query("insert into raidplaner(player, role, druha_role, koment, password) values ('".$_POST["player"]."','".$_POST["role"]."','".$_POST["druha"]."', '".$_POST["koment"]."', '".md5($_POST["pass"])."')");
  19. $vypis_id = mysql_query("select id from raidplaner where player = '".$_POST["player"]."')");
  20. while($row=mysql_fetch_array($vypis_id)) {
  21. echo ("Prihlaseni bylo uspesne! Bylo ti prideleno ID - <b>'".$row["id"]."'</b>.");
  22. }
  23.  
  24. }
  25. ?>
  26.  
  27.  
  28. <fieldset>
  29.  
  30. <table>
  31. <tr>
  32. <td>Herni nick</td><td><input type='text' name='player' /></td>
  33. </tr>
  34. <tr>
  35. <td>Role</td><td><input type='text' name='role' /></td>
  36. </tr>
  37. <tr>
  38. <tr>
  39. <td>DualSpec role</td><td><input type='text' name='druha' /></td>
  40. </tr>
  41. <tr>
  42. <td>Komentar</td><td><input type='text' name='koment' /></td>
  43. </tr>
  44. <tr>
  45. <td>Heslo pro upravu</td><td><input type='password' name='pass' /></td>
  46. </tr>
  47. <td colspan='2'><input type='submit' name='submit' value='odeslat' /></td>
  48. </tr>
  49.  
  50. </table>
  51. </fieldset>
  52. </form>
  53. <h1>Vypis hracu, kteri se prihlasili na raid</h1>
  54.  
  55. <?php
  56. $vypis_prihlaseno = mysql_query ("select id, player, role, druha_role, koment from raidplaner");
  57. echo "<table border='1'>";
  58. echo "<tr>";
  59. echo "<td><b>ID</b></td><td><b>Ucet</b></td><td><b>Role</b></td><td><b>Druha Role</b></td><td><b>Komentar</b></td>";
  60. echo "</tr>";
  61. while($row2=mysql_fetch_array($vypis_prihlaseno)) {
  62. echo "<tr>";
  63. echo "<td>".$row2["id"]."</td><td>".$row2["player"]."</td><td>".$row2["role"]."</td><td>".$row2["druha_role"]."</td><td>".$row2["koment"]."</td>";
  64. echo "</tr>" ;
  65. }
  66. echo "</table>";
  67.  
  68. ?>
  69. <h2>Mazani</h2>
  70. <form action='./raid_prihlaseni1.php' method='post' enctype='multipart/form-data'>
  71. ID <input type='text' name='idd' /><br />
  72. Heslo pro ID <input type='password' name='passss' /><br />
  73. <input type='submit' value='Smazat' />
  74. </form>
  75.  
  76. <h3>Delete all</h3>
  77. <form action='./raid_prihlaseni1.php' method='post' enctype='multipart/form-data'>
  78. Master heslo <input type='text' name='mpassform' /><br />
  79. <input type='submit' value='Delete all' />
  80. </form>
  81.  
  82. <?php
  83.  
  84. if (!empty($_POST['mpassform']))
  85. {
  86. $mpass = $_POST["mpassform"];
  87.  
  88.  
  89. if($_POST["mpassform"]!=null) {
  90.  
  91. $passwordd = @mysql_result(mysql_query("select mpass from mpass"),0);
  92.  
  93. if($passwordd!=null and $passwordd==($_POST["mpassform"])){
  94. echo "shoda";
  95.  
  96. //$_SESSION["user"]="true";
  97.  
  98. $smazanii = mysql_query ("TRUNCATE TABLE raidplaner");
  99. header("Location:./raid_prihlaseni1.php");
  100.  
  101. }else{
  102. echo "Zadal jsi spatne heslo nebo id";
  103. }
  104.  
  105. }elseif($_POST["mpassform"]!=null){
  106. echo "nezadany hodnoty";
  107. }
  108. }
  109. ?>
  110.  
  111. <?php
  112.  
  113. if (!empty($_POST['idd']))
  114. {
  115. $userr = $_POST["idd"];
  116. $passs = $_POST["passss"];
  117.  
  118. if($_POST["idd"]!=null and $_POST["passss"]!=null) {
  119.  
  120. $password = @mysql_result(mysql_query("select password from raidplaner where id='".$_POST["idd"]."'"),0);
  121.  
  122. if($password!=null and $password==md5($_POST["passss"])){
  123. echo "shoda";
  124.  
  125. //$_SESSION["user"]="true";
  126.  
  127. $smazani = mysql_query ("delete from raidplaner where id = '".$_POST["idd"]."'") ;
  128. header("Location:./raid_prihlaseni1.php");
  129.  
  130. }else{
  131. echo "Zadal jsi spatne heslo nebo id";
  132. }
  133.  
  134. }elseif($_POST["passss"]!=null){
  135. echo "nezadany hodnoty";
  136. }
  137. }
  138. ?>
  139.  
  140. <?php
  141. $invite_macro = mysql_query ("select player from raidplaner");
  142. echo "Invite macro <p></p>";
  143. while($row3=mysql_fetch_array($invite_macro)) {
  144. echo "/invite ".$row3["player"]." ";
  145. }
  146.  
  147. ?>
  148.  
  149.  
  150.  
  151. </body>
  152. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement