Hilfe Ingame Control

    Diese Seite verwendet Cookies. Durch die Nutzung unserer Seite erklären Sie sich damit einverstanden, dass wir Cookies setzen. Weitere Informationen

    • Hilfe Ingame Control

      Hallo Godlikerz,

      Ich habe ein kleines probemchen mit meinem IC Login,

      Ich wollte ein check einbauen (was eig auch stimmen müsste) aber es funktioniert nicht so wirklich.

      Es soll beim login eine Spalte aus der Characktes table lesen, die spalte heist "Knast" ... in der spalte ist 0 oder 1 festgelegt !

      Beim ogin soller er prüfen Knast prüfen;

      If Knast 0 ganz normales login
      else mysql die

      habe ne weile rumgetüftel aber es hat nicht funktioniert, hier der code:

      PHP-Quellcode

      1. <html><?php include "config.php"; ?>
      2. <title><?php echo ($titel); ?></title>
      3. <head>
      4. <style type="text/css">
      5. <!--
      6. body {
      7. margin-left: 0px;
      8. margin-top: 0px;
      9. margin-right: 0px;
      10. margin-bottom: 0px;
      11. background-image: url(layout/bg_texto.jpg);
      12. }
      13. body,td,th {
      14. font-family: Geneva, Arial, Helvetica, sans-serif;
      15. font-size: 20px;
      16. color: #000000;
      17. }
      18. a {
      19. font-family: Geneva, Arial, Helvetica, sans-serif;
      20. font-size: 16px;
      21. color: #FFFFFF;
      22. }
      23. a:link {
      24. text-decoration: none;
      25. }
      26. a:visited {
      27. text-decoration: none;
      28. color: #000000;
      29. }
      30. a:hover {
      31. text-decoration: none;
      32. color: #FFFFFF;
      33. }
      34. a:active {
      35. text-decoration: none;
      36. color: #999999;
      37. }
      38. #Layer1 {
      39. position:absolute;
      40. left:75px;
      41. top:161px;
      42. width:58px;
      43. height:20px;
      44. z-index:1;
      45. }
      46. .style1 {
      47. color: #000000;
      48. font-weight: bold;
      49. }
      50. .style2 {color: #FF0000; font-size: 30px;}
      51. -->
      52. </style>
      53. </head>
      54. <body>
      55. <table width = "550">
      56. <tr >
      57. </tr>
      58. <?php
      59. $error = 0;
      60. include "config.php";
      61. $username = $_POST['user'];
      62. $password = $_POST['pass'];
      63. $compass = md5("kikugalanet$password");
      64. $con = mysql_connect($sqlserv, $sqluser, $sqlpass);
      65. mysql_select_db($flyffdb);
      66. $query = mysql_query("SELECT * FROM accounts WHERE username='$username' and password='$compass'");
      67. $query2 = mysql_query("SELECT * FROM characters WHERE accountname='$username'");
      68. $row = mysql_fetch_array($query);
      69. $row2 = mysql_fetch_array($query2);
      70. $count = mysql_num_rows($query);
      71. $count2 = mysql_num_rows($query2);
      72. $gm=$row['accesslevel'];
      73. mysql_close($con);
      74. if($count != 1){
      75. echo"einloggen fehlgeschlagen<br/>";
      76. echo"Benutzername oder Kennwort falsch ";
      77. exit;
      78. }
      79. if($count2 == "0"){
      80. $error2 = "Du hast überhaupt keinen Charakter!";
      81. exit;
      82. }
      83. if($row['logged_in'] == "1") {
      84. $error2 = "Bitte Log dich vorher aus.";
      85. exit;
      86. }
      87. if ($error == 1 )
      88. {
      89. echo"aösldfk";
      90. exit;
      91. }
      92. ?>
      93. <table border=0 width= 200 align ="center">
      94. <tr height="39">
      95. </tr >
      96. <tr >
      97. <td width=120 <img src="../layout/buffer.jpg" height="39" width="143" align ="center"/></td>
      98. <td>
      99. <form action="buffer/char.php" method="post" >
      100. <input type="hidden" name="user" value="<?php echo $username; ?>"
      101. <input type="hidden" name="pass" value="<?php echo $password; ?>"
      102. </select>
      103. <input width="50" type="submit" value="Buffer"/>
      104. </form>
      105. </td>
      106. </tr>
      107. <tr>
      108. <td width=120 <img src="../layout/debugger.jpg" height="39" width="143" align ="center"/></td>
      109. <td>
      110. <form action="" method="post" >
      111. <input type="hidden" name="user" value="<?php echo $username; ?>"
      112. <input type="hidden" name="pass" value="<?php echo $password; ?>"
      113. </select>
      114. <input type="submit" value="Debugger"/>
      115. </form>
      116. </td>
      117. </tr>
      118. <tr>
      119. <td width=120 <img src="../layout/upgrader.jpg" height="39" width="143" align ="center"/></td>
      120. <td>
      121. <form action="upgrade/charauswahl.php" method="post" >
      122. <input type="hidden" name="user" value="<?php echo $username; ?>"
      123. <input type="hidden" name="pass" value="<?php echo $password; ?>"
      124. </select>
      125. <input type="submit" value="Upgrader"/>
      126. </form>
      127. </td>
      128. </tr>
      129. <td width=120 <img src="../layout/teleporter.jpg" height="39" width="143" align ="center"/></td>
      130. <td>
      131. <form action="teleporter/auswahl.php" method="post" >
      132. <input type="hidden" name="user" value="<?php echo $username; ?>"
      133. <input type="hidden" name="pass" value="<?php echo $password; ?>"
      134. </select>
      135. <input type="submit" value="Teleporter"/>
      136. </form>
      137. </td>
      138. </tr>
      139. <td width=120 <img src="../layout/skiller.jpg" height="39" width="143" align ="center"/></td>
      140. <td>
      141. <form action="skiller/auswahl.php" method="post" >
      142. <input type="hidden" name="user" value="<?php echo $username; ?>"
      143. <input type="hidden" name="pass" value="<?php echo $password; ?>"
      144. </select>
      145. <input type="submit" value="Hero Skiller"/>
      146. </form>
      147. </td>
      148. </tr>
      149. <?php
      150. if ($gm==1000)
      151. {
      152. $string1 = ' <input type="hidden" name="user" value="' . $username . '">';
      153. $string2 = ' <input type="hidden" name="pass" value="' . $password . '">';
      154. echo'
      155. <tr>
      156. <td width=120 <img src="../layout/gm.jpg" height="39" width="143" align ="center"/></td>
      157. <td>
      158. <form action="gmcontrol/gmauswahl.php" method="post" >';
      159. echo $string1;
      160. echo $string2;
      161. echo '</select>
      162. <input type="submit" value="GM control"/>
      163. </form>
      164. </td>
      165. </tr>';
      166. }
      167. ?>
      168. <?php
      169. if ($username==$admin)
      170. {
      171. $string1 = ' <input type="hidden" name="user" value="' . $username . '">';
      172. $string2 = ' <input type="hidden" name="pass" value="' . $password . '">';
      173. echo'
      174. <tr>
      175. <td width=120 <img src="../layout/admin.jpg" height="39" width="143" align ="center"/></td>
      176. <td>
      177. <form action="admincontrol/adminauswahl.php" method="post" >';
      178. echo $string1;
      179. echo $string2;
      180. echo '</select>
      181. <input type="submit" value="Admin control"/>
      182. </form>
      183. </td>
      184. </tr>';
      185. }
      186. ?>
      187. <tr>
      188. <td width=120 <img src="../layout/resetter.jpg" height="39" width="143" align ="center"/></td>
      189. <td>
      190. <form action="heroresetter/auswahl.php" method="post" >
      191. <input type="hidden" name="user" value="<?php echo $username; ?>"
      192. <input type="hidden" name="pass" value="<?php echo $password; ?>"
      193. </select>
      194. <input type="submit" value="Hero Resetter"/>
      195. </form>
      196. </td>
      197. </tr>
      198. </table>
      199. <br>
      200. <br>
      201. </td>
      202. </tr>
      203. </body>
      204. </html>
      205. AbbrechenAbbrechen
      Alles anzeigen



      Hat jemand nen Plan wie ich das einbauen muss ?

      MFG Synaptic
    • Werbung zur Unterstützung des Forums ( Bitte AddBlocker deaktivieren )

    • Ich hab das jetzt so eingefügt, denoch kein erfolg:

      PHP-Quellcode

      1. <?php
      2. $error = 0;
      3. include "config.php";
      4. $username = $_POST['user'];
      5. $password = $_POST['pass'];
      6. $compass = md5("kikugalanet$password");
      7. $con = mysql_connect($sqlserv, $sqluser, $sqlpass);
      8. mysql_select_db($flyffdb);
      9. $query = mysql_query("SELECT * FROM accounts WHERE username='$username' and password='$compass'");
      10. $query2 = mysql_query("SELECT * FROM characters WHERE accountname='$username'");
      11. $query3 = mysql_query("SELECT * FROM accounts");
      12. $row = mysql_fetch_array($query);
      13. $row2 = mysql_fetch_array($query2);
      14. $row3 = mysql_fetch_array($query3)
      15. $count = mysql_num_rows($query);
      16. $count2 = mysql_num_rows($query2);
      17. $gm=$row['accesslevel'];
      18. mysql_close($con);
      19. if($count != 1){
      20. echo"einloggen fehlgeschlagen<br/>";
      21. echo"Benutzername oder Kennwort falsch ";
      22. exit;
      23. }
      24. $knast_value = $row3['Knast'];
      25. if ($knast_value != '0') {
      26. die('Knast Value ist nicht null');
      27. }
      28. if($count2 == "0"){
      29. $error2 = "Du hast �berhaupt keinen Charakter!";
      30. exit;
      31. }
      32. if($row['logged_in'] == "1") {
      33. $error2 = "Bitte Log dich vorher aus.";
      34. exit;
      35. }
      36. if ($error == 1 )
      37. {
      38. echo"a�sldfk";
      39. exit;
      40. }
      Alles anzeigen