Błąd przy stronie : Passe Error


(Ace50) #1

Witam , dzis miałem zamiar , odwiedzic moją stronke no ale cóż wyskoczył mi mały błędzik

: Parse error: syntax error, unexpected '<' in /home/undeadvi/public_html/maincore.php on line 1236

MÓJ PLIK Maincore.php

<?php


/*---------------------------------------------------+


| PHP-Fusion 6 Content Management System


+----------------------------------------------------+


| Copyright © 2002 - 2006 Nick Jones


| http://www.php-fusion.co.uk/


+----------------------------------------------------+


| Released under the terms & conditions of v2 of the


| GNU General Public License. For details refer to


| the included gpl.txt file or visit http://gnu.org


+----------------------------------------------------*/


if (eregi("maincore.php", $_SERVER['PHP_SELF'])) die();




// If register_globals is turned off, extract super globals (php 4.2.0+)


if (ini_get('register_globals') != 1) {


	if ((isset($_POST) == true) && (is_array($_POST) == true)) extract($_POST, EXTR_OVERWRITE);


	if ((isset($_GET) == true) && (is_array($_GET) == true)) extract($_GET, EXTR_OVERWRITE);


}




// Prevent any possible XSS attacks via $_GET.


foreach ($_GET as $check_url) {


	if ((eregi("<[^>]*script*\"?[^>]*>", $check_url)) || (eregi("<[^>]*object*\"?[^>]*>", $check_url)) ||


		(eregi("<[^>]*iframe*\"?[^>]*>", $check_url)) || (eregi("<[^>]*applet*\"?[^>]*>", $check_url)) ||


		(eregi("<[^>]*meta*\"?[^>]*>", $check_url)) || (eregi("<[^>]*style*\"?[^>]*>", $check_url)) ||


		(eregi("<[^>]*form*\"?[^>]*>", $check_url)) || (eregi("\([^>]*\"?[^)]*\)", $check_url)) ||


		(eregi("\"", $check_url))) {


	die ();


	}


}


unset($check_url);




// Start Output Buffering


ob_start();




// Locate config.php and set the basedir path


$folder_level = "";


while (!file_exists($folder_level."config.php")) { $folder_level .= "../"; }


require_once $folder_level."config.php";


define("BASEDIR", $folder_level);




// If config.php is empty, activate setup.php script


if (!isset($db_name)) redirect("setup.php");




// Establish mySQL database connection


$link = dbconnect($db_host, $db_user, $db_pass, $db_name);




// Fetch the Site Settings from the database and store them in the $settings variable


$settings = dbarray(dbquery("SELECT * FROM ".$db_prefix."settings"));




// Sanitise $_SERVER globals


$_SERVER['PHP_SELF'] = cleanurl($_SERVER['PHP_SELF']);


$_SERVER['QUERY_STRING'] = isset($_SERVER['QUERY_STRING']) ? cleanurl($_SERVER['QUERY_STRING']) : "";


$_SERVER['REQUEST_URI'] = isset($_SERVER['REQUEST_URI']) ? cleanurl($_SERVER['REQUEST_URI']) : "";


$PHP_SELF = cleanurl($_SERVER['PHP_SELF']);


// Common definitions


define("IN_FUSION", TRUE);


define("FUSION_REQUEST", isset($_SERVER['REQUEST_URI']) && $_SERVER['REQUEST_URI'] != "" ? $_SERVER['REQUEST_URI'] : $_SERVER['SCRIPT_NAME']);


define("FUSION_QUERY", isset($_SERVER['QUERY_STRING']) ? $_SERVER['QUERY_STRING'] : "");


define("FUSION_SELF", basename($_SERVER['PHP_SELF']));


define("USER_IP", $_SERVER['REMOTE_ADDR']);


define("QUOTES_GPC", (ini_get('magic_quotes_gpc') ? TRUE : FALSE));


// Path definitions


define("ADMIN", BASEDIR."administration/");


define("IMAGES", BASEDIR."images/");


define("IMAGES_A", IMAGES."articles/");


define("IMAGES_N", IMAGES."news/");


define("IMAGES_NC", IMAGES."news_cats/");


define("INCLUDES", BASEDIR."includes/");


define("LOCALE", BASEDIR."locale/");


define("LOCALESET", $settings['locale']."/");


define("FORUM", BASEDIR."forum/");


define("INFUSIONS", BASEDIR."infusions/");


define("PHOTOS", IMAGES."photoalbum/");


define("THEMES", BASEDIR."themes/");




// MySQL database functions


function dbquery($query) {


	$result = @mysql_query($query);


	if (!$result) {


		echo mysql_error();


		return false;


	} else {


		return $result;


	}


}




function dbcount($field,$table,$conditions="") {


	$cond = ($conditions ? " WHERE ".$conditions : "");


	$result = @mysql_query("SELECT Count".$field." FROM ".DB_PREFIX.$table.$cond);


	if (!$result) {


		echo mysql_error();


		return false;


	} else {


		$rows = mysql_result($result, 0);


		return $rows;


	}


}




function dbresult($query, $row) {


	$result = @mysql_result($query, $row);


	if (!$result) {


		echo mysql_error();


		return false;


	} else {


		return $result;


	}


}




function dbrows($query) {


	$result = @mysql_num_rows($query);


	return $result;


}




function dbarray($query) {


	$result = @mysql_fetch_assoc($query);


	if (!$result) {


		echo mysql_error();


		return false;


	} else {


		return $result;


	}


}




function dbarraynum($query) {


	$result = @mysql_fetch_row($query);


	if (!$result) {


		echo mysql_error();


		return false;


	} else {


		return $result;


	}


}




function dbconnect($db_host, $db_user, $db_pass, $db_name) {


	$db_connect = @mysql_connect($db_host, $db_user, $db_pass);


	$db_select = @mysql_select_db($db_name);


	if (!$db_connect) {


		die("

Unable to establish connection to MySQL".mysql_errno()." : ".mysql_error()."
"); } elseif (!$db_select) { die("
Unable to select MySQL database".mysql_errno()." : ".mysql_error()."
"); } } // Initialise the $locale array $locale = array(); // Load the Global language file include LOCALE.LOCALESET."global.php"; // Check if users full or partial ip is blacklisted $sub_ip1 = substr(USER_IP,0,strlen(USER_IP)-strlen(strrchr(USER_IP,"."))); $sub_ip2 = substr($sub_ip1,0,strlen($sub_ip1)-strlen(strrchr($sub_ip1,"."))); if (dbcount("(*)", "blacklist", "blacklist_ip='".USER_IP."' OR blacklist_ip='$sub_ip1' OR blacklist_ip='$sub_ip2'")) { header("Location: http://www.google.com/"); exit; } // PHP-Fusion user cookie functions if (!isset($_COOKIE['fusion_visited'])) { $result=dbquery("UPDATE ".$db_prefix."settings SET counter=counter+1"); setcookie("fusion_visited", "yes", time() + 31536000, "/", "", "0"); } if (isset($_POST['login'])) { $user_pass = md5($_POST['user_pass']); $user_name = preg_replace(array("/\=/","/#/","/\sOR\s/"), "", stripinput($_POST['user_name'])); $result = dbquery("SELECT * FROM ".$db_prefix."users WHERE user_name='$user_name' AND (user_password='".md5($user_pass)."' OR user_password='$user_pass')"); if (dbrows($result) != 0) { $data = dbarray($result); if ($data['user_password'] == $user_pass) { $result = dbquery("UPDATE ".$db_prefix."users SET user_password='".md5($user_pass)."' WHERE user_id='".$data['user_id']."'"); } $cookie_value = $data['user_id'].".".$user_pass; if ($data['user_status'] == 0) { $cookie_exp = isset($_POST['remember_me']) ? time() + 3600*24*30 : time() + 3600*3; header("P3P: CP='NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM'"); setcookie("fusion_user", $cookie_value, $cookie_exp, "/", "", "0"); redirect(BASEDIR."setuser.php?user=".$data['user_name'], "script"); } elseif ($data['user_status'] == 1) { redirect(BASEDIR."setuser.php?error=1", "script"); } elseif ($data['user_status'] == 2) { redirect(BASEDIR."setuser.php?error=2", "script"); } } else { redirect(BASEDIR."setuser.php?error=3"); } } if (isset($_COOKIE['fusion_user'])) { $cookie_vars = explode(".", $_COOKIE['fusion_user']); $cookie_1 = isNum($cookie_vars['0']) ? $cookie_vars['0'] : "0"; $cookie_2 = (preg_match("/^[0-9a-z]{32}$/", $cookie_vars['1']) ? $cookie_vars['1'] : ""); $result = dbquery("SELECT * FROM ".$db_prefix."users WHERE user_id='$cookie_1' AND user_password='".md5($cookie_2)."'"); unset($cookie_vars,$cookie_1,$cookie_2); if (dbrows($result) != 0) { $userdata = dbarray($result); if ($userdata['user_status'] == 0) { if ($userdata['user_theme'] != "Default" && file_exists(THEMES.$userdata['user_theme']."/theme.php")) { define("THEME", THEMES.$userdata['user_theme']."/"); } else { define("THEME", THEMES.$settings['theme']."/"); } if ($userdata['user_offset'] <> 0) { $settings['timeoffset'] = $settings['timeoffset'] + $userdata['user_offset']; } if (empty($_COOKIE['fusion_lastvisit'])) { setcookie("fusion_lastvisit", $userdata['user_lastvisit'], time() + 3600, "/", "", "0"); $lastvisited = $userdata['user_lastvisit']; } else { $lastvisited = $_COOKIE['fusion_lastvisit']; } } else { header("P3P: CP='NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM'"); setcookie("fusion_user", "", time() - 7200, "/", "", "0"); setcookie("fusion_lastvisit", "", time() - 7200, "/", "", "0"); redirect(BASEDIR."index.php", "script"); } } else { header("P3P: CP='NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM'"); setcookie("fusion_user", "", time() - 7200, "/", "", "0"); setcookie("fusion_lastvisit", "", time() - 7200, "/", "", "0"); redirect(BASEDIR."index.php", "script"); } } else { define("THEME", THEMES.$settings['theme']."/"); $userdata = ""; $userdata['user_level'] = 0; $userdata['user_rights'] = ""; $userdata['user_groups'] = ""; } // Redirect browser using the header function function redirect($location, $type="header") { if ($type == "header") { header("Location: ".$location); } else { echo "\n"; } } // Fallback to safe area in event of unauthorised access function fallback($location) { header("Location: ".$location); exit; } // Clean URL Function, prevents entities in server globals function cleanurl($url) { $bad_entities = array("&", "\"", "'", '\"', "\'", "<", ">", "(", ")", "*"); $safe_entities = array("&", "", "", "", "", "", "", "", "", ""); $url = str_replace($bad_entities, $safe_entities, $url); return $url; } // Strip Input Function, prevents HTML in unwanted places function stripinput($text) { if (QUOTES_GPC) $text = stripslashes($text); $search = array("\"", "'", "\", '\"', "\'", "<", ">", " "); $replace = array(""", "'", "\", """, "'", "<", ">", " "); $text = str_replace($search, $replace, $text); return $text; } // stripslash function, only stripslashes if magic_quotes_gpc is on function stripslash($text) { if (QUOTES_GPC) $text = stripslashes($text); return $text; } // stripslash function, add correct number of slashes depending on quotes_gpc function addslash($text) { if (!QUOTES_GPC) { $text = addslashes(addslashes($text)); } else { $text = addslashes($text); } return $text; } // htmlentities is too agressive so we use this function function phpentities($text) { $search = array("&", "\"", "'", "\", "<", ">"); $replace = array("&", """, "'", "\", "<", ">"); $text = str_replace($search, $replace, $text); return $text; } // Trim a line of text to a preferred length function trimlink($text, $length) { $dec = array("\"", "'", "\", '\"', "\'", "<", ">"); $enc = array(""", "'", "\", """, "'", "<", ">"); $text = str_replace($enc, $dec, $text); if (strlen($text) > $length) $text = substr($text, 0, ($length-3))."..."; $text = str_replace($dec, $enc, $text); return $text; } // Validate numeric input function isNum($value) { return (preg_match("/^[0-9]+$/", $value)); } // Parse smiley bbcode into HTML images function parsesmileys($message) { $smiley = array( "#\:)#si" => " smiley


(Airborn) #2

ace50 , proszę poprawić tytuł tematu na konkretny, mówiący o problemie. Zignorowanie tej wiadomości spowoduje usunięcie tematu.


(Marcin E Pc) #3

Bo jak już to powinno być:

echo ''[/code]

I nawias w ostatniej funkcji dodany.

Pozdrawiam


(Ace50) #4

Edytowałem post i w tym czymś ale nadal to samo , zobacz : undead-village.xaa.pl


(Marcin E Pc) #5

Teraz wyświetla:

To teraz przydałby się kod index.php


(Ace50) #6

Proszę o to index.php

<?php


/*---------------------------------------------------+


| PHP-Fusion 6 Content Management System


+----------------------------------------------------+


| Copyright © 2002 - 2006 Nick Jones


| http://www.php-fusion.co.uk/


+----------------------------------------------------+


| Released under the terms & conditions of v2 of the


| GNU General Public License. For details refer to


| the included gpl.txt file or visit http://gnu.org


+----------------------------------------------------*/


require_once "maincore.php";




redirect($settings['opening
[/code]

(Xwars) #7

Odwirusz swojego kompa, potem wgraj wszystkie pliki strony odnowa.