daily pastebin goal
40%
SHARE
TWEET

Untitled

a guest Sep 20th, 2016 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. session_start();
  3. include_once"includes/db_connect.php";
  4. if (strip_tags($_GET['logout']) == "yes"){
  5. session_destroy();
  6. }elseif (isset($_SESSION['username'])){
  7. header("Location: play.php");
  8. exit();
  9. }
  10.  
  11. if ($_POST['Submit'] && strip_tags($_POST['username']) && strip_tags($_POST['password'])){
  12. $username = addslashes(strip_tags($_POST['username']));
  13. $password = addslashes(strip_tags($_POST['password']));
  14.  
  15. $ip = $REMOTE_ADDR;
  16.  
  17.  
  18. $sql = mysql_query("SELECT * FROM users WHERE username='$username' AND password='$password' AND activated='1' LIMIT 1");
  19.  
  20.  
  21. $login_check = mysql_num_rows($sql);
  22.  
  23. $inf = mysql_fetch_object($sql);
  24.  
  25. if ($login_check == '0'){
  26.  
  27. $message="You could not be logged in";
  28.  
  29. }elseif ($login_check != "0"){
  30.  
  31.  
  32.  
  33.  
  34.  
  35. if ($login_check > '0'){
  36.  
  37. if ($inf->status == "Dead"){
  38.  
  39. include_once"dead.php";
  40.  
  41. exit();
  42.  
  43.  
  44.  
  45. }
  46.  
  47. if ($inf->status == "Banned"){
  48.  
  49. $encoded=md5(strtolower($username));
  50.  
  51. header("Location: ipban.php?banned=$username&encoded=$encoded");
  52.  
  53. exit();
  54.  
  55.  
  56.  
  57. }
  58.  
  59.  
  60.         $_SESSION['username'] = $inf->username;
  61.  
  62.  
  63.         $timestamp = time()+70;
  64.  
  65.         mysql_query("UPDATE users SET online='$timestamp' WHERE username='$username'");
  66.  
  67.  
  68.  
  69.         mysql_query("UPDATE users SET l_ip='$ip' WHERE username='$username'");
  70.  
  71.  
  72.         header("Location: play.php");
  73.  
  74.  
  75.  
  76. } else {
  77.  
  78.     $message= "Something went wrong...<br />";
  79.  
  80.  
  81.  
  82. }}}
  83.  
  84.  
  85. $timenow=time();
  86.  
  87. $select = mysql_query("SELECT * FROM users WHERE online > '$timenow' ORDER by id");
  88.  
  89. $num = mysql_num_rows($select);
  90.  
  91. while ($i = mysql_fetch_object($select))
  92.  
  93. $reg = mysql_num_rows(mysql_query("SELECT id FROM users"));
  94.  
  95. $iti=mysql_fetch_object(mysql_query("SELECT * FROM site_stats WHERE id='1'"));
  96.  
  97. $most=$iti->online;
  98.  
  99. $mostdate=$iti->date_online;
  100.  
  101. $dead= mysql_num_rows(mysql_query("SELECT username FROM users WHERE status = 'Dead'"));
  102.  
  103. $alive= mysql_num_rows(mysql_query("SELECT username FROM users WHERE status = 'Alive'"));
  104.  
  105. $result11111 = mysql_query("SELECT money FROM users WHERE userlevel ='0'");
  106.  
  107.     $moneytot = 0;
  108.  
  109.     while($row=mysql_fetch_array($result11111)){
  110.  
  111.         $moneytot+=$row[0]+$row[1];
  112.  
  113.     }
  114.  
  115.         $nums=mysql_num_rows($result11111);
  116.  
  117.     $per_user = round($moneytot / $nums);
  118. ?> <?
  119.  
  120.                 $timenow=time();
  121.  
  122. $select = mysql_query("SELECT * FROM users WHERE online > '$timenow' ORDER by id");
  123.  
  124. $num = mysql_num_rows($select);
  125.  
  126. while ($i = mysql_fetch_object($select))
  127.  ?>
  128.  
  129.  
  130.  
  131. <style>
  132. <!--
  133. .lbutton{
  134. font-weight: bold;
  135. font-family: Verdana;
  136. font-size: 11px;
  137. color: #FFFFFF;
  138. border:1px solid black;
  139. height:19px;
  140. background: #669900;
  141. }
  142. .Table22 { border-width: 1px;
  143. border-style: solid;
  144. border-color:#666}
  145. td { border: 0px; }
  146. -->
  147. </style>
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159. <html>
  160. <head>
  161. <link rel="stylesheet" href="includes/in.css" type="text/css">
  162.  
  163. <title>Sicilian Society :: Home</title>
  164.  
  165. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  166.  
  167. </head>
  168. <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
  169. <div align="center">
  170. <form name="form1" method="post" action="">
  171.   <p>&nbsp;</p>
  172. <p>&nbsp;</p>
  173. <table width="800" height="500" border="0" align="center" cellpadding="0" cellspacing="0" background="images/indexbg.jpg">
  174. <tr>
  175.   <td><p align="center"><strong><font size="2" color="#FFFFFF">Login</font></strong><br>
  176.     </p>
  177.   <table bgcolor="#444444" class="Table22" align="center" cellpadding="0" cellspacing="0" border="0">
  178.  
  179.  
  180. <tr>
  181.   <td colspan="2"><center><font color="#fff000"><b>Game will be re-opening soon!</b></font></center><?php echo "<font color=#669900><b>$message"; ?>
  182.     <div align="center"></div></td>
  183.  
  184. </tr>
  185. <tr>
  186. <td width="175"><font color="#FFFFFF"><div align="right"><b>Username:</b></div></font></td>
  187. <td width="281"><div align="left">
  188.   <input name="username" type="text" class="textbox" id="username" value="" maxlength="40" />
  189. </div></td>
  190. </tr>
  191.  
  192. <tr>
  193. <td><font color="#FFFFFF"><div align="right"><b>Password:</b></div></font></td>
  194. <td><div align="left">
  195.   <input name="password" type="password" class="textbox" id="password" value="" size="20" maxlength="40">
  196. </div></td>
  197. </tr>
  198.  
  199. <tr>
  200. <td colspan="2"><div align="center">
  201.   <p><br>
  202.       <input type="submit" name="Submit" id="Submit" class="lbutton" value="Enter!" />
  203.   </p>
  204.   <p><img border="0" src="images/browsers.png" width="244" height="49"></p>
  205.   <p><font color="#FFFFFF"><a href="register.php">Register</a> - <a href="lost.php">Lost Password</a> - <a href="stats.php">Statistics</a></font></p>
  206.   <p><br>
  207.   </p>
  208. </div></td>
  209. </tr>
  210. </table>
  211.  
  212.   <p align="center"><font color="#FFFFFF">By entering Sicilian Society you agree to our</font><a href="TOS.php"><font color="#669900"> TOS</font></a></p>
  213.   <div align="center">
  214.   <p><a href="register.php"><b></a></p>
  215. </div>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top