Sunny.
24-07-2007, 11:46 AM
Im using the OH user system and it comes up with the error
Fatal error: Call to undefined function lock() in /home/studio/public_html/user/config.php on line 3
on the login.php page
URL to the error is
http://www.studiohabbo.com/user/login.php
The config file is
<?php
include("nonban_config.php"); //Do not edit
lock("Cdhg3H2fg12GB2q", "OurHabbo"); //This must remain intact, else the software will not work
?>
And the nonban_config file is
<?php
ob_start();
// edit the following
$database_host = "localhost";
$username = "*******";
$password = "******";
$database = "*******";
// stop editing
$conn = mysql_connect("$database_host", "$username", "$password");
mysql_select_db("$database") or die(mysql_error());
if (isset($_COOKIE['id']) && isset($_COOKIE['pass'])) {
$id = $_COOKIE['id'];
$password = $_COOKIE['pass'];
$info = mysql_query("SELECT * FROM users WHERE id='" . $id . "'") or die(mysql_error());
$data = mysql_fetch_array($info);
if ($data['password'] == $password) {
$_SESSION['id'] = $id;
$_SESSION['pass'] = $password;
}
}
if (isset($_SESSION['id']) && isset($_SESSION['pass'])) {
$logged = mysql_query("SELECT * FROM users WHERE id='" . $_SESSION['id'] . "' AND password = '" . $_SESSION['pass'] . "'");
$logged = mysql_fetch_array($logged);
}
?>
<?
if($logged[username])
{
$updatepage = mysql_query("UPDATE `users` SET `page` = '".$_SERVER['REQUEST_URI']."' WHERE `username` = '$logged[username]'"); // Queries the database and updates the page field to what you're viewing
}
if($logged[username])
{
//the visitor is logged in
$update_pages = mysql_query("update users set pageviews = pageviews+1 where id = '$logged[id]'");
}
?>
<?
if($logged[username]) //if logged in
{
if($logged[alert] == 'NONE') //if no alert
{
echo (""); //echo nothing
}
if($logged[alert]) //if there is an alert
{
echo ("
<script>
alert ('Moderator Says: $logged[alert]')
</script>
"); //send it
mysql_query("UPDATE `users` SET `alert` = '' WHERE `username` = '$logged[username]'"); //then delete alert
}
}
$offline = 300; //How long is considered online?
$current = time(); //gets the time on the server (unformatted)
$offline = ($current-$offline); //
if ($logged[username])
{
$update = mysql_query("UPDATE users set online = '$current' where username = '$logged[username]'");
//the above line sets the time the user was online to the current time
}
?>
<?
$license_key = 'G93hsG40ahfG';
?>
Thanks, +REP for all help
Moved by Mattps22004 (Forum Moderator) from Website Designing & Development: Please post in the correct forum next time, thanks:).
Fatal error: Call to undefined function lock() in /home/studio/public_html/user/config.php on line 3
on the login.php page
URL to the error is
http://www.studiohabbo.com/user/login.php
The config file is
<?php
include("nonban_config.php"); //Do not edit
lock("Cdhg3H2fg12GB2q", "OurHabbo"); //This must remain intact, else the software will not work
?>
And the nonban_config file is
<?php
ob_start();
// edit the following
$database_host = "localhost";
$username = "*******";
$password = "******";
$database = "*******";
// stop editing
$conn = mysql_connect("$database_host", "$username", "$password");
mysql_select_db("$database") or die(mysql_error());
if (isset($_COOKIE['id']) && isset($_COOKIE['pass'])) {
$id = $_COOKIE['id'];
$password = $_COOKIE['pass'];
$info = mysql_query("SELECT * FROM users WHERE id='" . $id . "'") or die(mysql_error());
$data = mysql_fetch_array($info);
if ($data['password'] == $password) {
$_SESSION['id'] = $id;
$_SESSION['pass'] = $password;
}
}
if (isset($_SESSION['id']) && isset($_SESSION['pass'])) {
$logged = mysql_query("SELECT * FROM users WHERE id='" . $_SESSION['id'] . "' AND password = '" . $_SESSION['pass'] . "'");
$logged = mysql_fetch_array($logged);
}
?>
<?
if($logged[username])
{
$updatepage = mysql_query("UPDATE `users` SET `page` = '".$_SERVER['REQUEST_URI']."' WHERE `username` = '$logged[username]'"); // Queries the database and updates the page field to what you're viewing
}
if($logged[username])
{
//the visitor is logged in
$update_pages = mysql_query("update users set pageviews = pageviews+1 where id = '$logged[id]'");
}
?>
<?
if($logged[username]) //if logged in
{
if($logged[alert] == 'NONE') //if no alert
{
echo (""); //echo nothing
}
if($logged[alert]) //if there is an alert
{
echo ("
<script>
alert ('Moderator Says: $logged[alert]')
</script>
"); //send it
mysql_query("UPDATE `users` SET `alert` = '' WHERE `username` = '$logged[username]'"); //then delete alert
}
}
$offline = 300; //How long is considered online?
$current = time(); //gets the time on the server (unformatted)
$offline = ($current-$offline); //
if ($logged[username])
{
$update = mysql_query("UPDATE users set online = '$current' where username = '$logged[username]'");
//the above line sets the time the user was online to the current time
}
?>
<?
$license_key = 'G93hsG40ahfG';
?>
Thanks, +REP for all help
Moved by Mattps22004 (Forum Moderator) from Website Designing & Development: Please post in the correct forum next time, thanks:).