Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $username = $_COOKIE['username'];
- $password = $_COOKIE['password'];
- $character = $_POST['character'];
- if($character == null)
- $character = $_COOKIE['character'];
- if($character == null){
- $character = 1;
- setcookie("character", $character, 0);
- } else {
- setcookie("character", $character, 0);
- }
- include('/home/spiderch/public_html/game/dbinfo.php');
- if($username != null && $password != null)
- {
- $con = mysql_connect($dbhost, $dbuser, $dbpass);
- if(!$con){
- die('Could not connect: '.mysql_error());
- }
- mysql_select_db($dbname, $con);
- $result = mysql_query("SELECT * FROM Accounts WHERE Username='" .mysql_real_escape_string($username)."' AND BINARY Password='" .mysql_real_escape_string($password)."'");
- if(mysql_num_rows($result) != 0)
- {
- setcookie("username", $username, 0);
- setcookie("password", $password, 0);
- setcookie("character", $character, 0);
- $charresult = mysql_query("SELECT * FROM Characters WHERE Owner='".mysql_real_escape_string($username)."'");
- $characteramount = mysql_num_rows($charresult);
- $characterlist = array();
- while($row = mysql_fetch_array($charresult))
- $characterlist[] = $row;
- } else {
- include('/home/spiderch/public_html/game/logout.php');
- }
- } else
- header('Location:/game/');
- ?>
- <html>
- <head>
- <title>Outbreak</title>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <link href="style.css" rel="stylesheet" type="text/css">
- <style type="text/css">
- body {
- margin:0;
- padding:0;
- border:0;
- overflow:hidden;
- height:100%;
- max-height:100%;
- }
- #topframe{
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- height: 35px;
- overflow: hidden;
- background-color:darkred;
- }
- #main{
- position: fixed;
- top: 35px;
- left: 0;
- right: 0;
- bottom: 0;
- overflow:visible;
- }
- }
- </style>
- </head>
- <body bgcolor=black>
- <div id=topframe align=center style="background-image:url(images/topframe.png);">
- <?php include('/home/spiderch/public_html/game/top.php'); ?>
- </div>
- <div id=main align=center style="margin-top:10px; min-width:800px;">
- <?php include('/home/spiderch/public_html/game/body.php'); ?>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement