Jump to content
MakeWebGames

Way of the Mafia script error


LimitedStreak

Recommended Posts

my pleasure mate.

<?php

if (file_exists('install.php')) { die("Please delete <a href=install.php>install.php</a> from your game directory before continuing."); }

session_start();

include_once"includes/db_connect.php";

if (strip_tags($_GET['logout']) == "true"){

session_destroy();

}elseif (isset($_SESSION['username'])){

header("Location: logged_in.php");

exit();

}

if ($_POST['Submit'] && strip_tags($_POST['username']) && strip_tags($_POST['password'])){

$username = addslashes(strip_tags($_POST['username']));

$password = addslashes(strip_tags($_POST['password']));

$ip = $REMOTE_ADDR;

 

///check INFO

$sql = mysql_query("SELECT * FROM users WHERE username='$username' AND password='$password' LIMIT 1");

 

$login_check = mysql_num_rows($sql);

$inf = mysql_fetch_object($sql);

if ($login_check == "0"){

$message="Your Username & Password Do Not Match Or You Do Not Have An Account";

}elseif ($login_check != "0"){

 

if ($login_check > "0"){

if ($inf->status == "Dead"){

$lottodesc = mysql_fetch_object(mysql_query("SELECT * FROM dead WHERE username='$username' ORDER by `id` DESC LIMIT 1"));

echo "<title>Dead</title><link href=includes/in.css rel=stylesheet type=text/css><center>$username is dead!

Death Message: $lottodesc->dmess</center>";

exit();

 

}

 

if ($inf->status == "Banned"){

$encoded=md5(strtolower($username));

echo "<title>Banned</title><link href=includes/in.css rel=stylesheet type=text/css><center>$username is banned!</center>";

exit();

}

 

 

session_register('username');

$_SESSION['username'] = $inf->username;

 

 

$timestamp = time()+120;

mysql_query("UPDATE users SET online='$timestamp' WHERE username='$username'");

mysql_query("UPDATE users SET l_ip='$ip' WHERE username='$username'");

 

header("Location: logged_in.php");

} else {

$message= "You could not be logged in.

";

}}}

?>

<head>

<title>Login | CrazyThugz</title>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<link href="includes/in.css" rel="stylesheet" type="text/css">

 

<style type="text/css">

<!--

body {

background-attachment: fixed;

background-image: url(images/index/loginbg.jpg);

background-position: bottom right;

 

-->

}

.auto-style1 {

font-size: xx-small;

font-family: Arial, Helvetica, sans-serif;

}

</style>

</head>

</head>

 

</p>

 

</p>

<?php require_once "index_header.php"; ?>

<body bgcolor="#555555" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" style="background-image: url('images/index/loginbg.jpg')">

<div align="center">

<form name="form1" method="post" action="">

<table width="400" border="1" cellpadding="0" cellspacing="0" class=thinline rules=none>

<tr>

<td height="30" colspan="3" background="grad.png"><div align="center">

<font size="1">Login</font></div></td>

</tr>

</tr>

 

<table width="400" height="132" border="1" align="center" bordercolor="#000000">

<tr>

<th background="" scope="col"><p align="justify">

<font size="1">

Username

<input name="username" type="text" id="username" value="<?php if (strip_tags($_GET['l'])){ echo "$l"; } ?>" size="" maxlength="40" />

</font>

</p>

<p align="justify">

<font size="1"> Password

<input name="password" type="password" id="password2" value="<?php if (strip_tags($_GET['pw'])){ echo "$pw"; } ?>" size="" maxlength="40" />

</font>

</p>

 

 

<font size="1">

<input type="submit" name="Submit" value="Login" />

</font>

</p>

<p class="auto-style1">

Forgot Password ? | Terms of Service</p>

<p class="auto-style1">

CrazyThugz is Now Open!</p>

</th>

</tr>

</table>

<?php require_once "index_foot.php"; ?>

</body>

</html>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...