True, "nonavbar" => True, "currentapp" => "home", "noapi" => True);
include("./inc/functions.inc.php");
include("../version.inc.php");
/* 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.";
$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":
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":
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 "