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:
Alles anzeigen
Hat jemand nen Plan wie ich das einbauen muss ?
MFG Synaptic
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
- <html><?php include "config.php"; ?>
- <title><?php echo ($titel); ?></title>
- <head>
- <style type="text/css">
- <!--
- body {
- margin-left: 0px;
- margin-top: 0px;
- margin-right: 0px;
- margin-bottom: 0px;
- background-image: url(layout/bg_texto.jpg);
- }
- body,td,th {
- font-family: Geneva, Arial, Helvetica, sans-serif;
- font-size: 20px;
- color: #000000;
- }
- a {
- font-family: Geneva, Arial, Helvetica, sans-serif;
- font-size: 16px;
- color: #FFFFFF;
- }
- a:link {
- text-decoration: none;
- }
- a:visited {
- text-decoration: none;
- color: #000000;
- }
- a:hover {
- text-decoration: none;
- color: #FFFFFF;
- }
- a:active {
- text-decoration: none;
- color: #999999;
- }
- #Layer1 {
- position:absolute;
- left:75px;
- top:161px;
- width:58px;
- height:20px;
- z-index:1;
- }
- .style1 {
- color: #000000;
- font-weight: bold;
- }
- .style2 {color: #FF0000; font-size: 30px;}
- -->
- </style>
- </head>
- <body>
- <table width = "550">
- <tr >
- </tr>
- <?php
- $error = 0;
- include "config.php";
- $username = $_POST['user'];
- $password = $_POST['pass'];
- $compass = md5("kikugalanet$password");
- $con = mysql_connect($sqlserv, $sqluser, $sqlpass);
- mysql_select_db($flyffdb);
- $query = mysql_query("SELECT * FROM accounts WHERE username='$username' and password='$compass'");
- $query2 = mysql_query("SELECT * FROM characters WHERE accountname='$username'");
- $row = mysql_fetch_array($query);
- $row2 = mysql_fetch_array($query2);
- $count = mysql_num_rows($query);
- $count2 = mysql_num_rows($query2);
- $gm=$row['accesslevel'];
- mysql_close($con);
- if($count != 1){
- echo"einloggen fehlgeschlagen<br/>";
- echo"Benutzername oder Kennwort falsch ";
- exit;
- }
- if($count2 == "0"){
- $error2 = "Du hast überhaupt keinen Charakter!";
- exit;
- }
- if($row['logged_in'] == "1") {
- $error2 = "Bitte Log dich vorher aus.";
- exit;
- }
- if ($error == 1 )
- {
- echo"aösldfk";
- exit;
- }
- ?>
- <table border=0 width= 200 align ="center">
- <tr height="39">
- </tr >
- <tr >
- <td width=120 <img src="../layout/buffer.jpg" height="39" width="143" align ="center"/></td>
- <td>
- <form action="buffer/char.php" method="post" >
- <input type="hidden" name="user" value="<?php echo $username; ?>"
- <input type="hidden" name="pass" value="<?php echo $password; ?>"
- </select>
- <input width="50" type="submit" value="Buffer"/>
- </form>
- </td>
- </tr>
- <tr>
- <td width=120 <img src="../layout/debugger.jpg" height="39" width="143" align ="center"/></td>
- <td>
- <form action="" method="post" >
- <input type="hidden" name="user" value="<?php echo $username; ?>"
- <input type="hidden" name="pass" value="<?php echo $password; ?>"
- </select>
- <input type="submit" value="Debugger"/>
- </form>
- </td>
- </tr>
- <tr>
- <td width=120 <img src="../layout/upgrader.jpg" height="39" width="143" align ="center"/></td>
- <td>
- <form action="upgrade/charauswahl.php" method="post" >
- <input type="hidden" name="user" value="<?php echo $username; ?>"
- <input type="hidden" name="pass" value="<?php echo $password; ?>"
- </select>
- <input type="submit" value="Upgrader"/>
- </form>
- </td>
- </tr>
- <td width=120 <img src="../layout/teleporter.jpg" height="39" width="143" align ="center"/></td>
- <td>
- <form action="teleporter/auswahl.php" method="post" >
- <input type="hidden" name="user" value="<?php echo $username; ?>"
- <input type="hidden" name="pass" value="<?php echo $password; ?>"
- </select>
- <input type="submit" value="Teleporter"/>
- </form>
- </td>
- </tr>
- <td width=120 <img src="../layout/skiller.jpg" height="39" width="143" align ="center"/></td>
- <td>
- <form action="skiller/auswahl.php" method="post" >
- <input type="hidden" name="user" value="<?php echo $username; ?>"
- <input type="hidden" name="pass" value="<?php echo $password; ?>"
- </select>
- <input type="submit" value="Hero Skiller"/>
- </form>
- </td>
- </tr>
- <?php
- if ($gm==1000)
- {
- $string1 = ' <input type="hidden" name="user" value="' . $username . '">';
- $string2 = ' <input type="hidden" name="pass" value="' . $password . '">';
- echo'
- <tr>
- <td width=120 <img src="../layout/gm.jpg" height="39" width="143" align ="center"/></td>
- <td>
- <form action="gmcontrol/gmauswahl.php" method="post" >';
- echo $string1;
- echo $string2;
- echo '</select>
- <input type="submit" value="GM control"/>
- </form>
- </td>
- </tr>';
- }
- ?>
- <?php
- if ($username==$admin)
- {
- $string1 = ' <input type="hidden" name="user" value="' . $username . '">';
- $string2 = ' <input type="hidden" name="pass" value="' . $password . '">';
- echo'
- <tr>
- <td width=120 <img src="../layout/admin.jpg" height="39" width="143" align ="center"/></td>
- <td>
- <form action="admincontrol/adminauswahl.php" method="post" >';
- echo $string1;
- echo $string2;
- echo '</select>
- <input type="submit" value="Admin control"/>
- </form>
- </td>
- </tr>';
- }
- ?>
- <tr>
- <td width=120 <img src="../layout/resetter.jpg" height="39" width="143" align ="center"/></td>
- <td>
- <form action="heroresetter/auswahl.php" method="post" >
- <input type="hidden" name="user" value="<?php echo $username; ?>"
- <input type="hidden" name="pass" value="<?php echo $password; ?>"
- </select>
- <input type="submit" value="Hero Resetter"/>
- </form>
- </td>
- </tr>
- </table>
- <br>
- <br>
- </td>
- </tr>
- </body>
- </html>
- AbbrechenAbbrechen
Hat jemand nen Plan wie ich das einbauen muss ?
MFG Synaptic