Mi da errore:
Codice PHP:
<?php
/*
Copyright 2006,2007 Paolo "pop killer" Di Febbo
This file is part of PKP (pop killer portal).
PKP is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
PKP is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with PKP; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
// Include connect library and security library
include "connect.php";
include "security.php";
// SELEZIONA TEMA
$db_host = "mysql4.netsons.org";
$db_user = "pkp";
$db_password = "******";
$db_name = "pkp";
$db = mysql_connect($db_host, $db_user, $db_password);
if ($db == FALSE)
die ("Errore nella connessione. Verificare i parametri.");
mysql_select_db($db_name, $db)
or die ("Errore nella selezione del database. Verificare i parametri.");
$tema=$_GET['tema'];
if (file_exists("/membri/sim/layout/{$tema}"))
$query = "UPDATE global SET layoutcolor = '$tema';";
else
echo "Il Tema non Esiste.";
mysql_close($db);
// check magic quotes
check_mqgpc();
// Initialize database object
$DB = new database;
// If user hasn't got auth...
if(!control_auth()){echo "You are not authorized to view this page.";}
else{
check_attack(); // Check if there are attack attempts
$globalarray = $DB->queryAndFetch("SELECT * FROM global"); //Query DB for global variabiles
// Includes the content module, the template file and the phpIIS library
include "content.php";
include "layout/".$globalarray[2]."/html.php";
include "phplib.php";
$index = ereg_replace("\[\[title\]\]", $globalarray[0], $layout['layout']);
$index = ereg_replace("\[\[style\]\]", $layout['style'], $index);
$index = ereg_replace("\[\[menu\]\]", printMenu(), $index);
$index = ereg_replace("\[\[content\]\]", content_start($globalarray[1]), $index);
$index = ereg_replace("\[\[credits\]\]", "This website is powered by <a class=\"small\" href=\"http://pkp.sourceforge.net/\">PKP 0.7</a>, made by pop killer and licensed under the GNU GPL license", $index);
// When the page is complete, interpret eventual php code (made by the user)
$interpreted_index = phpiis($index);
echo $interpreted_index;
}
// Shows website menu
function printMenu(){
global $DB, $layout;
$return = "";
$query = mysql_query("SELECT id,name,tipo FROM category ORDER BY ordine");
while($echo = mysql_fetch_array($query)){
if($echo[2] == "1"){
$html = $DB->queryAndFetch("SELECT text FROM category WHERE id='".$echo[0]."'");
$CATEGORY = $html[0];
}
else{
$CATEGORY = "<ul>\n";
$querylink = mysql_query("SELECT id,name,tipo FROM content WHERE category=".$echo[0]." AND tipo<>'1' ORDER BY ordine");
while($echo2 = mysql_fetch_array($querylink)){
if($echo2[2] == 2){
$text = $DB->queryAndFetch("SELECT text FROM content WHERE id=".$echo2[0]." ORDER BY ordine");
$link = explode(";", $text[0]);
$CATEGORY .= "<li><a href=\"".$link[1]."\" target=\"".$link[0]."\">".$echo2[1]."</a></li>\n";
}
elseif($echo2[2] == 6){
$CATEGORY .= "<li><a href=\"index.php?act=galleria\">".$echo2[1]."</a></li>\n";
}
else{
$CATEGORY .= "<li><a href=\"index.php?act=".$echo2[0]."\">".$echo2[1]."</a></li>\n";
}
}
$CATEGORY .= "</ul>\n";
}
$category_echo = ereg_replace("\[\[title\]\]", $echo[1], $layout['category']);
$category_echo = ereg_replace("\[\[category\]\]", $CATEGORY, $category_echo);
$return .= $category_echo;
}
return $return;
}
?>
Url: www.pkp.netsons.org/demo/index.php
Grazie...Ciao! :)