Advertisement
Guest User

Untitled

a guest
Jan 15th, 2018
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.18 KB | None | 0 0
  1. <?php
  2. $username = $_COOKIE['username'];
  3. $password = $_COOKIE['password'];
  4. $character = $_POST['character'];
  5.  
  6. if($character == null)
  7. $character = $_COOKIE['character'];
  8.  
  9. if($character == null){
  10. $character = 1;
  11. setcookie("character", $character, 0);
  12. } else {
  13. setcookie("character", $character, 0);
  14. }
  15.  
  16. include('/home/spiderch/public_html/game/dbinfo.php');
  17. if($username != null && $password != null)
  18. {
  19. $con = mysql_connect($dbhost, $dbuser, $dbpass);
  20. if(!$con){
  21. die('Could not connect: '.mysql_error());
  22. }
  23. mysql_select_db($dbname, $con);
  24.  
  25. $result = mysql_query("SELECT * FROM Accounts WHERE Username='" .mysql_real_escape_string($username)."' AND BINARY Password='" .mysql_real_escape_string($password)."'");
  26.  
  27. if(mysql_num_rows($result) != 0)
  28. {
  29. setcookie("username", $username, 0);
  30. setcookie("password", $password, 0);
  31. setcookie("character", $character, 0);
  32.  
  33. $charresult = mysql_query("SELECT * FROM Characters WHERE Owner='".mysql_real_escape_string($username)."'");
  34. $characteramount = mysql_num_rows($charresult);
  35. $characterlist = array();
  36. while($row = mysql_fetch_array($charresult))
  37. $characterlist[] = $row;
  38. } else {
  39. include('/home/spiderch/public_html/game/logout.php');
  40. }
  41. } else
  42. header('Location:/game/');
  43. ?>
  44. <html>
  45. <head>
  46. <title>Outbreak</title>
  47. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  48. <link href="style.css" rel="stylesheet" type="text/css">
  49. <style type="text/css">
  50. body {
  51. margin:0;
  52. padding:0;
  53. border:0;
  54. overflow:hidden;
  55. height:100%;
  56. max-height:100%;
  57. }
  58.  
  59. #topframe{
  60. position: absolute;
  61. top: 0;
  62. left: 0;
  63. width: 100%;
  64. height: 35px;
  65. overflow: hidden;
  66. background-color:darkred;
  67. }
  68.  
  69. #main{
  70. position: fixed;
  71. top: 35px;
  72. left: 0;
  73. right: 0;
  74. bottom: 0;
  75. overflow:visible;
  76. }
  77. }
  78. </style>
  79. </head>
  80. <body bgcolor=black>
  81. <div id=topframe align=center style="background-image:url(images/topframe.png);">
  82. <?php include('/home/spiderch/public_html/game/top.php'); ?>
  83. </div>
  84.  
  85. <div id=main align=center style="margin-top:10px; min-width:800px;">
  86. <?php include('/home/spiderch/public_html/game/body.php'); ?>
  87. </div>
  88. </body>
  89. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement