Jump to content

Fatal error: Using $this when not in object...


glennn.php

Recommended Posts

a real estate cms (that's probably old) is returning this error:

 

Fatal error: Using $this when not in object context in /path/to/html/remgmt/admin/pb_events.php on line 29

 

function DoEvents($this) {
global $_CONF , $_TSM;

$_TSM["MENU"] = "";

//checking if user is logged in
if (!$_SESSION["minibase"]["user"]) {

	if ($_SERVER["REQUEST_METHOD"] == "POST") {

		//autentificate
		$user = $this->db->QFetchArray("select * from {$this->tables[users]} where `user_login` = '{$_POST[user]}' AND `user_password` = '{$_POST[pass]}'");

		if (is_array($user)) {
			$_SESSION["minibase"]["user"] = 1;
			$_SESSION["minibase"]["raw"] = $user;

			//redirecing to viuw sites
			header("Location: $_CONF[default_location]");
			exit;
		} else
			return $this->templates["login"]->blocks["Login"]->output;

	} else

	/* LINE 29 >>> */	      return $this->templates["login"]->blocks["Login"]->output;

}
if ($_SESSION["minibase"]["raw"]["user_level"] == 0) {
	$_TSM["MENU"] = $this->templates["login"]->blocks["MenuAdmin"]->output;
} else {
	$_TSM["MENU"] = $this->templates["login"]->blocks["MenuUser"]->output;
}

if (!$_POST["task_user"])
	$_POST["task_user"] = $_SESSION["minibase"]["user"];

if($_SESSION["minibase"]["raw"]["user_level"] == 1) {
	$_CONF["forms"]["adminpath"] = $_CONF["forms"]["userpath"];
}

 

I'm pretty sure i've got PHP5 (on godaddy's server)...

 

anything anyone can help me with?

 

Thanks Much,

GN

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.