True, "nonavbar" => True, "currentapp" => "home", "noapi" => True);
include("./inc/functions.inc.php");
include('../phpgwapi/setup/setup.inc.php');
$phpgw_info["server"]["versions"]["phpgwapi"] = $setup_info['phpgwapi']['version'];
$phpgw_info['server']['versions']['current_header'] = $setup_info['phpgwapi']['versions']['current_header'];
unset($setup_info);
function check_form_values()
{
global $setting, $phpgw_setup;
if (! $setting['config_pass'])
{
$errors .= "
You didn't enter a config password";
}
if (! $setting['HEADER_ADMIN_PASSWORD'])
{
$errors .= "
You didn't enter a header admin password";
}
if ($errors)
{
$phpgw_setup->show_header("Error",True);
echo $errors;
exit;
}
}
/* authentication phase */
$phpgw_info["setup"]["stage"]["header"] = $phpgw_setup->check_header();
switch($phpgw_info["setup"]["stage"]["header"]){
case "1":
$phpgw_info["setup"]["HeaderFormMSG"] = "Create your header.inc.php";
$phpgw_info["setup"]["PageMSG"] = "You have not created your header.inc.php yet!
You can create it now.";
break;
case "2":
$phpgw_info["setup"]["HeaderFormMSG"] = "Your header admin password is NOT set. Please set it now!";
$phpgw_info["setup"]["PageMSG"] = "Your header admin password is NOT set. Please set it now!";
break;
case "3":
$phpgw_info["setup"]["HeaderFormMSG"] = "Your header.inc.php needs upgrading.";
$phpgw_info["setup"]["PageMSG"] = "Your header.inc.php needs upgrading.
If you are using virtual domain support, this will NOT copy those domains over. You will need to do this manually, MAKE BACKUPS!";
$phpgw_info["setup"]["HeaderLoginMSG"] = "Your header.inc.php needs upgrading.";
if (!$phpgw_setup->auth("Header")){
$phpgw_setup->show_header("Please login",True);
$phpgw_setup->login_form();
exit;
}
break;
case "10":
if (!$phpgw_setup->auth("Header")){
$phpgw_setup->show_header("Please login",True);
$phpgw_setup->login_form();
exit;
}
$phpgw_info["setup"]["HeaderFormMSG"] = "Edit your header.inc.php";
$phpgw_info["setup"]["PageMSG"] = "Edit your existing header.inc.php";
break;
}
switch($action){
case "download":
check_form_values();
include("./inc/phpgw_template.inc.php");
$header_template = new Template("../");
header("Content-disposition: attachment; filename=\"header.inc.php\"");
header("Content-type: application/octet-stream");
header("Pragma: no-cache");
header("Expires: 0");
$newheader = $phpgw_setup->generate_header();
echo $newheader;
break;
case "view":
check_form_values();
include("./inc/phpgw_template.inc.php");
$header_template = new Template("../");
$phpgw_setup->show_header("Generated header.inc.php", False, "header");
echo "
Save this text as contents of your header.inc.php
"; echo htmlentities($newheader); echo "