extract($_POST);
extract($_GET);
extract($_COOKIE);
if($i == "y") {
if(!unlink("install.php")) echo "$txt_error
$txt_noremove";
}
if((file_exists("install.php") && $i != "y") || (file_exists("upgrade.php"))) {
if(file_exists("upgrade.php")) unlink("upgrade.php");
else include "install.php";
}
else {
$adminsect = 1;
include "protection.php";
include "../code/settings.php";
if(file_exists("languages/$language.php")) include "languages/$language.php";
else {
echo "Critical error
Language file $language could not be found.
";
exit;
}
$pagetitle = "$sitetitle $split $title_home";
$thispagetitle = "$title_home";
if(file_exists("../code/templates/${template}_h.php") && file_exists("../code/templates/${template}_f.php")) {
$tempfilename = "../code/templates/${template}_h.php";
$handle = fopen($tempfilename, "r");
$temp = fread($handle, filesize ($tempfilename));
fclose($handle);
include "../code/menucode.php";
include "../code/parsetemplate.php";
parsetemplate($temp, $menucode, $thispagetitle, $pagetitle);
echo "$title_home![]()
";
echo "$txt_homepg
";
if($adminuser == 1) {
if(file_exists("ver.php")) include "ver.php";
$newver = @file("http://www.php-update.co.uk/files/ver.txt");
if($ver != $newver[0] && $newver[0] != "" && $ver != "") echo "A newer version of PHP-Update is available than the one you are currently using.
You can get the new version from PHP-Update's site.
(Your version: $ver; new version: $newver[0])";
}
if(!isset($menucode)) {
include "../code/menucode.php";
echo $menucode;
echo "
";
}
$tempfilename = "../code/templates/${template}_f.php";
$handle = fopen($tempfilename, "r");
$temp = fread($handle, filesize ($tempfilename));
fclose($handle);
parsetemplate($temp, $menucode, $thispagetitle, $pagetitle);
}
else echo "$txt_error
$txt_tempnofound
"; } ?>