Location: PHPKode > projects > JBB Board > jbb/verwarnungen.php
<html><head><title></title>
<link rel=stylesheet type="text/css" href="default.css">
</head>
<?php
   include("color.inc");
   $siteInfo = $si[500];
   include("head.php");
   include("mysqlvar.php");
   $db = @mysql_connect($dbservr,$dbuser,$dbpass);
   mysql_select_db($dbname,$db);
   if($action == "show") {
   $query = "SELECT warnstat FROM user WHERE pseudonym = '$puser'";
   $result = mysql_query($query,$db);
   $userinfo = mysql_fetch_array($result);
?>
<table border="0" width="80%">
<tr>
<td>
<?php
if($userinfo["warnstat"] == 1) {
?>
<center>
<?php echo $puser.$tt_Text[504];  ?>
<img src="bilder/warn.gif" alt=" <?php echo $user.$tt_Text[507]; ?> ">
</center>
<?php
}
if($userinfo["warnstat"] == 2) {
?>
<center>
<?php echo $puser.$tt_Text[505]."<br>"; ?>
<a href="verwarnungen.php?action=warn&puser=<?php echo $puser?>"><img src="bilder/warn.gif" alt="<?php echo $puser.$tt_Text[507]; ?> " border="0"></a>
</center>
<?php
}
if($userinfo["warnstat"] == 3) {
?>
<center>
<?php echo $puser.$tt_Text[508] ?><?php echo $puser.$tt_Text[509]; ?>
<a href="verwarnungen.php?action=warn&puser=<?php echo $puser?>"><img src="bilder/warn.gif" alt="<?php echo $puser.$tt_Text[507]; ?> " border="0"></a>
</center>
<?php
}
if($userinfo["warnstat"] > 3) {
?>
<center>
<?php echo $puser.$tt_Text[513]; ?>
</center>
<?php
}
}
if($action == "warn") {
?>
<center>
<?php echo $tt_Text[510]; ?>
<form method="post" action="verwarnungen.php">
<input type="hidden" name="action" value="vwarn">
<input type="hidden" name="puser" value="<?php echo $puser?>">
<table border="0">
<tr>
<td>Username:</td>
<td><input type="text" name="vuser" value="<?php echo $user?>"></td>
</tr>
<tr>
<td>Passwort:</td>
<td><input type="password" name="vpass"></td>
</tr>
</table>
<input type="submit" value="Identifizieren">
</form>
</center>
<?php
}
if($action == "vwarn") {
$query = "SELECT passwort, status FROM user WHERE pseudonym = '$vuser'";
$result = mysql_query($query,$db);
$modinfo = mysql_fetch_array($result);
if($vpass != $modinfo["passwort"]) {
?>
<b>Falsches Passwort</b></body></html>
<?php
exit();
}
if($modinfo["status"] <= 2 || $modinfo["status"] > 4) {
?>
<?php echo $tt_Text[511]; ?>
<?php
exit();
}
   $query = "SELECT warnstat FROM user WHERE pseudonym = '$puser'";
   $result = mysql_query($query,$db);
   $userinfo = mysql_fetch_array($result);
   $neuwarnstat = $userinfo["warnstat"] + 1;
   if($neuwarnstat == 4) {
         $query = "UPDATE user SET warnstat = '$neuwarnstat', status = '1' WHERE pseudonym = '$puser'";
   }
   if($neuwarnstat == 3) {
         $query = "UPDATE user SET warnstat = '$neuwarnstat', status = '2' WHERE pseudonym = '$puser'";
   }
   if($neuwarnstat == 2) {
         $query = "UPDATE user SET warnstat = '$neuwarnstat' WHERE pseudonym = '$puser'";
   }
   mysql_query($query,$db);
?>
<?php echo $puser.$tt_Text[512]; ?>
<?php
}
mysql_close($db);
?>
</body></html>
Return current item: JBB Board