Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

RevCMS logging in doesnt work

Newbie Spellweaver
Joined
May 30, 2009
Messages
19
Reaction score
0
Hello,

I changed my class_users.php a little bit since logging of IP adresses didn't work, used 'HTTP_CF_CONNECTING_IP' before but that didn't work so I changed it to 'REMOTE_ADDR', but not I can't login. Anyone knows what's wrong? Posted these things down here since I feel like the issue is here somewhere.
When I press 'log in' it just reloads the page and doesn't give me any error.

My index page:
Code:
<!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">




<!-- Mirrored from habnet.co.uk/ by HTTrack Website Copier/3.x [XR&CO'2010], Sat, 22 Dec 2012 21:10:31 GMT -->
<!-- Added by HTTrack --><meta http-equiv="content-type" content="text/html;charset=iso-8859-1" /><!-- /Added by HTTrack -->
<head>
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script>
  (adsbygoogle = window.adsbygoogle || []).push({
    google_ad_client: "ca-pub-6586791654229740",
    enable_page_level_ads: true
  });
</script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="Public/Styles/Default/CSS/index.css" />
<link type="text/css" rel="stylesheet" href="Public/Styles/Default/CSS/website_background.css" />
<link href='http://fonts.googleapis.com/css?family=Ubuntu:400,700' rel='stylesheet' type='text/css'>




<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">




<link rel="apple-touch-icon" href="apple/iPhoneIcon_Small.png" />
<link rel="apple-touch-icon" sizes="72x72" href="apple/iPhoneIcon_Medium.png" />
<link rel="apple-touch-icon" sizes="114x114" href="apple/iPhoneIcon_Big.png" />








<link href="apple/apple_startup.png" media="(device-width: 320px)" rel="apple-touch-startup-image">
<!-- iPhone (Retina) SPLASHSCREEN-->
<link href="apple/apple_startup.png" media="(device-width: 320px) and (-webkit-device-pixel-ratio: 2)" rel="apple-touch-startup-image">
<!-- iPad (portrait) SPLASHSCREEN-->
<link href="apple/apple_startup.png" media="(device-width: 768px) and (orientation: portrait)" rel="apple-touch-startup-image">
<!-- iPad (landscape) SPLASHSCREEN-->
<link href="apple/apple_startup.png" media="(device-width: 768px) and (orientation: landscape)" rel="apple-touch-startup-image">
<!-- iPad (Retina, portrait) SPLASHSCREEN-->
<link href="apple/apple_startup.png" media="(device-width: 1536px) and (orientation: portrait) and (-webkit-device-pixel-ratio: 2)" rel="apple-touch-startup-image">
<!-- iPad (Retina, landscape) SPLASHSCREEN-->
<link href="apple/apple_startup.png" media="(device-width: 1536px) and (orientation: landscape) and (-webkit-device-pixel-ratio: 2)" rel="apple-touch-startup-image">




<meta property="fb:app_id" content="377474408990797">
<meta property="og:title" content="{hotelname} Hotel" />
<meta property="og:type" content="game" />
<meta property="og:url" content="index.html" />
<meta property="og:image" content="Public/Styles/Default/Images/facebook/facebook_icon.png" />
<meta property="og:site_name" content="{hotelname} Hotel" />
<meta property="fb:admins" content="100002777297111" />




<title>{hotelname} Hotel</title>




</head>
<body>
<div id="container" style="height:105px;">
<div id="logo"></div><div></div>
<div id="login_place">
<form id="loginformitem" name="loginformitem" method="post">
<div id="login_username">
<div id="title">Gebruikersnaam:</div>
<input type="text" name="log_username" style="width:195px"; placeholder="Gebruikersnaam" onclick="toggle('ledenlijstpb_box');" autocomplete="off" />
            <div id="ledenlijstpb_box" style="display:none;" >
                <div id="ledenlijstpb_mid"><table width='100% border='0' cellpadding='0' cellspacing='0'>
</table> </div>
</div><br />
<input type="checkbox" /> <strong>Herinner Mij</strong>
</div>
<div id="login_password">
<div id="title">Wachtwoord:</div>
<input type="password" name="log_password" style="width: 180px"; placeholder="Wachtwoord" /><br /></td>
	<?php 
			if(isset($template->form->error)) 
			{ 
				echo '<p class="error-message" style="">'. $template->form->error.' </p>'; 
			} 
		?></div>
<div id="login_submit" style="margin-top:2px;"><input type="submit" name="login" id="button" value="Login" style=border: 0;cursor: pointer;"/></div>
</form>
<div style="width:100%; float:left; padding-top:5px; text-align:center;"><small><br /></small></div>
</div>
</div> 
<div id="container" style="height:475px;">








<div id="information"><div id="text_20px" style="color:#FFF; text-shadow: 1px 1px 1px #000;">Welkom op {hotelname}! | 24/7 geopend!</div></div>
<div id="container_image" class="jetset" style="margin-top:20px;"></div>
<table width="920px" border="0" cellpadding="0" cellspacing="0" style="margin:-380px 10px 0px 10px;">
<tr>

<br><br><br><br>
</tr>
</table>
<a href="register"><div id="register_button"><div style="padding-top:93px; color:#FFF; text-shadow:none; text-align:center;"></div></div></a> 




<div style="float:right; position: relative; overflow: hidden; margin:-1px 10px 0px 60px; width:400px;">
<div id="infobox_top"></div>
<div id="infobox_mid"><img src="Public/Styles/Default/Images/login_images/box/online.png" align="left" style="padding-right:10px;" /><div id="text_20px">Online {hotelname}(s)</div>
<div style="width:250px;"> Er zijn <strong>{online}</strong> gebruikers online!<br />
<div style="padding:2px;"></div>

</div>
</div>
<div id="infobox_bot"></div>
</div>


<table width="920px" border="0" cellpadding="0" cellspacing="0" style="margin:260px 10px 0px 10px;">
<tr>
<td>
<div id="infobox_top"></div>
<div id="infobox_mid"><img src="Public/Styles/Default/Images/login_images/box/furni.png" align="left" style="padding-right:3px;" /><div id="text_15px">Catalogus Up-To-Date!</div>Het {hotelname} team zorgt er altijd voor dat de catalogus is voorzien van de nieuwste meubels!</div>
<div id="infobox_bot"></div>
</td>
<td width="10px"></td>
<td>
<div id="infobox_top"></div>
<div id="infobox_mid"><img src="Public/Styles/Default/Images/login_images/box/chat.png" align="left" style="padding-right:3px;" /><div id="text_15px">Chat</div>Maak nieuwe vrienden, chill en maak plezier! {hotelname} heeft veel leuke gebruikers om vrienden mee te worden.</div>
<div id="infobox_bot"></div>
</td>
<td width="10px"></td>
<td>
<div id="infobox_top"></div>
<div id="infobox_mid"><img src="Public/Styles/Default/Images/login_images/box/games.png" align="left" style="padding-right:3px;" /><div id="text_15px">Speel Mini-Games</div>{hotelname} heeft verschillende mini-games en georganiseerde evenement waar je leuke prijzen mee kan winnen!</div>
<div id="infobox_bot"></div>
</td>
</tr>
</table>

<div id="container_stats"></div>
</div>
</div>




<center>
<script type="text/javascript"><!--
google_ad_client = "ca-pub-9392345101217370";
/* HabNet Hotel */
google_ad_slot = "1052892235";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
</center><br>
<div id="container">
<div id="copyricht_top"></div>
<div id="copyricht_mid"> 
<div id="text" style="text-align:center">
Copyright © 2017 {hotelname} Hotel | Alle Rechten Voorbehouden| Edited by Vaulient & Kyle of HabZen Hotel<br />
{hotelname} is niet door Sulake Corporation gemaakt en behoort niet tot het bedrijf.<br />
<br />
Powered by © RevCMS </div></div>
<div id="copyricht_bot"></div>
</div>
</body>
<script type="text/javascript">
function toggle(id) {
var state = document.getElementById(id).style.display;
if (state == 'block') {
document.getElementById(id).style.display = 'none';
} else {
document.getElementById(id).style.display = 'block';
}
}
function inloglist(username)
{
document.forms['login'].elements['username'].value = username;
}
jQuery(document).ready(function() {
jQuery('#ledenlijstpb_box').fadeIn(1000);
});
</script>




</html>

class_users.php (Login function)
Code:
	final public function login()
	{
		global $template, $_CONFIG, $core;
		
		if(isset($_POST['login']))
		{
			$template->form->setData();
			unset($template->form->error);
			
			if($this->nameTaken($template->form->log_username))
			{
				if($this->isBanned($template->form->log_username) == false || $this->isBanned($_SERVER['REMOTE_ADDR']) == false) 
				{ 
					if($this->userValidation($template->form->log_username, $core->hashed($template->form->log_password))) 
					{ 
						$this->turnOn($template->form->log_username); 
						$this->updateUser($_SESSION['user']['id'], 'ip_last', $_SERVER['REMOTE_ADDR']);
						$template->form->unsetData(); 
						header('Location: ' . $_CONFIG['hotel']['url'] . '/me'); 
						exit; 
						} 
					else 
					{ 
						$template->form->error = 'Informasjonen er feil. Prøv igjen!'; 
						return; 
					} 
				} 
				else 
				{ 
					$template->form->error = 'Oops ... Denne kontoen er utestengt fra ' . $_CONFIG['hotel']['name'] . '! Hvis du mener dette er en feil kan du kontakte oss på: ' . $_CONFIG['hotel']['mail'] . '<br/>'; 
					$template->form->error .= 'Begrunnelse: ' . $this->getReason($template->form->log_username); 
					return; 
				} 
			}
			else
			{
				$template->form->error = 'Brukernavnet finnes ikke!';
				return;
			}
		}
	}
 
Last edited:
Newbie Spellweaver
Joined
Dec 25, 2015
Messages
56
Reaction score
27
Change it back. It's working, just not for every IP adress.

Found something useful at :

PHP:
if (isset($_SERVER["HTTP_CF_CONNECTING_IP"])) {  $_SERVER['REMOTE_ADDR'] = $_SERVER["HTTP_CF_CONNECTING_IP"];
}
 
Upvote 0
Back
Top