Jump to content
MakeWebGames

Recommended Posts

Posted
<?php
if (file_exists('offyes1.php')) { die("<meta http-equiv='refresh' content='1;url=comingsoon.php'>"); }
session_start();
include_once"includes/db_connect.php";


if (strip_tags($_GET['logout']) == "yes"){
session_destroy();
echo "<meta http-equiv='refresh' content='1;url=index.php'>";
}else{
$ip = $_SERVER['REMOTE_ADDR'];
$getip = mysql_query("SELECT * FROM `adminbans` WHERE `ip` = '$ip'");
if(mysql_num_rows($getip) > 0){
	session_start();
	echo "<meta http-equiv=\"refresh\" content=\"0;URL=ipbanned.php\">";
}
if($row['ip'] == $_SERVER['REMOTE_ADDR']){
	echo"<title>Modern-Mafia - Login</title>";
}elseif (isset($_SESSION['username'])){
	echo "<meta http-equiv=\"refresh\" content=\"0;URL=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']));
	$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"){

echo "<meta http-equiv=\"refresh\" content=\"0;URL=dead.php\">";

exit();



}





if ($login_check > "0"){

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

echo "<meta http-equiv=\"refresh\" content=\"0;URL=banned.php\">";

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'");






	echo "<meta http-equiv=\"refresh\" content=\"0;URL=logged_in.php\">";



} else { 

   $message= "You could not be logged in.<br />"; 



}}}

$timenow=time();


$select = mysql_query("SELECT * FROM users WHERE online > '$timenow' ORDER by 'rank' DESC");



$num = mysql_num_rows($select);

$iti=mysql_fetch_object(mysql_query("SELECT * FROM site_stats WHERE id='1'"));
$most=$iti->online;

?> 





<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<title>Hidden  - Multiplayer Online RPG Mafia Game</title>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" >
<META name="keywords" content="Hidden , Hidden ,Hidden ">
<meta name="description" content="Create a war, rule the world and show that you have what it takes to be the best. Kill or be killed in this Massive Online text-based Mafia Game.">

<link REL="SHORTCUT ICON" HREF="icon.png">

<link href="loginstyle.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
a:hover {
color: #999999;
text-decoration: underline;
}
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
}
a:active {
text-decoration: none;
}
-->
</style></head>

<body>

<div id="container">

<div id="header">

<div id="banner">

<br><br>

  <p></p>

</div>

<div id="menu">

		<ul>

		<li class='selected'><a href="index.php">Home</a></li>

           <li ><a href="registernew.php">Register</a></li>

		<li ><a  href="forgotpasswordnew.php">Forgot Password</a></li>

	<li ><a href="tosnew.php">Terms of Service</a></li>

		</ul>

</div>

<div style="clear: both"></div>

</div>


<div id="content-container">

<div id="content">

<center>



<div class="login"> 

<p>Welcome to Hidden , use the form below to login if you are a returning member..</p>
<div class="login-form">

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

	<label>Username:</label><br>

	<input name="username" type="text" class="textinput" id="username" value="" size="" maxlength="40" /><br>

	<label>Password:</label><br>


            <input name="password" type="password" class="textinput" id="password2" value="" size="" maxlength="40" />

        <input type="submit" name="Submit" class="login-button" value="Login" />

</form>

     <font color=white></div>

<div class="tools">

<ul>

	<li><a href="registernew.php">-  Register an account</a></li>
      		<li><a href="forgotpasswordnew.php">- Forgot Password</a></li>
              		<li><a href="tosnew.php">- Terms of Service</a></li>

	</ul>

</div>

<div style="clear: both;"></div>

</div>	<div class="content_text">
 <script>

$("button").click(function () {
$("t").toggle("slow");
});
 </script>

         <div class="text">
   <p><strong>Hidden </strong> is a new Text-Based Mafia MMORPG Game. The aim is to rank up, control your turf, make money and rule the world! The online mafia-themed game is new and will have thousands playing till midnight. We pride ourselves on a great, growing community which is constantly expanding and we provide unique features and regular updates so your never left with nothing todo and we keep you updated about it too! </p>
 <p><a href="registernew.php">Click here</a> to join the game that will have you playing past midnight.</p></div></div>




</center>
</t>
</div>
<div id="footer">


<div class="login-form">
<div id="footer">

  <p>Hidden  - Copyright  2011-2012<center><font color=white>         </p>

</div>
</div>

</div>


</body>

</html>
<? } ?>

 

any ideas on this problem

 

Fatal error: Call to undefined function session_register() in /home/modernma/public_html/index.php on line 81

Posted (edited)

if i change line 81 to

session_start('username');

will that be ok as its starting/resuming the session of the login

 

cause it prevents me from login in and hjust comes up with the error

Edited by modernmafia
Posted

Take a guess...

function_exists('session_register') or die('session_register is deprecated');

According to the manual:

Warning

This function has been DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 5.4.0.

So at a guess your host has upgraded to a pretty recent edition of PHP.

Clue: Look at the output of

<?php phpinfo();

and pay attention to it.

Posted

Interesting to note that your hosting provider's own support forums have been full of apologies after a botched upgrade, forcing them to recompile PHP and issue a number of apologies. The last update states that the problem has in theory been rectified; however it would still be wise to have a close look at the output of phpinfo() and perhaps write a few assertions to ensure the problem if it arises again is quickly apparent.

Posted
So at a guess your host has upgraded to a pretty recent edition of PHP.

His host would be idiotic if they did upgrade, doubt it's the case.

 

Apache version 2.2.22

PHP version 5.3.15

MySQL version 5.5.24-cll

Posted

If the problem persists - take it your host mm; they have had or are having a number of problems.

... This should now be resolved. Please accept our deepest apologies for the issues ...

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...