mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2024-09-19 19:22:14 +02:00
- accidentially deleted header.php. Needed for setup
- add some error checks. git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@759 a1433add-5e2c-0410-b055-b7f2511e0802
This commit is contained in:
parent
cb029a5daf
commit
cf40467570
@ -63,6 +63,9 @@ function postfixadmin_autoload($class) {
|
||||
spl_autoload_register('postfixadmin_autoload');
|
||||
|
||||
//*****
|
||||
if(!is_file("$incpath/smarty.inc.php")) {
|
||||
die("smarty.inc.php is missing! Sonething is wrong...");
|
||||
}
|
||||
require_once ("$incpath/smarty.inc.php");
|
||||
//*****
|
||||
/* vim: set expandtab softtabstop=4 tabstop=4 shiftwidth=4: */
|
||||
|
11
setup.php
11
setup.php
@ -142,6 +142,17 @@ else
|
||||
$error =+ 1;
|
||||
}
|
||||
|
||||
//
|
||||
// Check if templates directory is writable
|
||||
//
|
||||
|
||||
if (!is_writeable($incpath.'/templates_c'))
|
||||
{
|
||||
print "<li><b>Error: The subdirectory templates_c is not writable.</b><br />\n";
|
||||
print "Please make it writable.<br />\n";
|
||||
$error =+ 1;
|
||||
}
|
||||
|
||||
//
|
||||
// Check if there is support for at least 1 database
|
||||
//
|
||||
|
62
templates/header.php
Normal file
62
templates/header.php
Normal file
@ -0,0 +1,62 @@
|
||||
<?php if( !defined('POSTFIXADMIN') ) die( "This file cannot be used standalone." ); ?>
|
||||
<?php
|
||||
@header ("Expires: Sun, 16 Mar 2003 05:00:00 GMT");
|
||||
@header ("Last-Modified: " . gmdate ("D, d M Y H:i:s") . " GMT");
|
||||
@header ("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
@header ("Cache-Control: post-check=0, pre-check=0", false);
|
||||
@header ("Pragma: no-cache");
|
||||
@header ("Content-Type: text/html; charset=UTF-8");
|
||||
?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<?php
|
||||
if (file_exists (realpath ("../".$CONF['theme_css']))) {
|
||||
print "<link rel=\"stylesheet\" type=\"text/css\" href=\"../".htmlentities($CONF['theme_css'])."\" />\n";
|
||||
} else {
|
||||
print "<link rel=\"stylesheet\" type=\"text/css\" href=\"".htmlentities($CONF['theme_css'])."\" />\n";
|
||||
}
|
||||
?>
|
||||
<title>Postfix Admin - <?php print $_SERVER['HTTP_HOST']; ?></title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="login_header">
|
||||
<?php
|
||||
if (file_exists (realpath ("../".$CONF['theme_logo'])))
|
||||
{
|
||||
print "<img id=\"login_header_logo\" src=\"../".htmlentities($CONF['theme_logo'])."\" />\n";
|
||||
} else {
|
||||
print "<img id=\"login_header_logo\" src=\"".htmlentities($CONF['theme_logo'])."\" />\n";
|
||||
}
|
||||
|
||||
if (($CONF['show_header_text'] == "YES") and ($CONF['header_text']))
|
||||
{
|
||||
print "<h2>" . $CONF['header_text'] . "</h2>\n";
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
if(isset($_SESSION['flash'])) {
|
||||
if(isset($_SESSION['flash']['info'])) {
|
||||
echo '<ul class="flash-info">';
|
||||
foreach($_SESSION['flash']['info'] as $msg) {
|
||||
echo "<li>$msg</li>";
|
||||
}
|
||||
echo '</ul>';
|
||||
}
|
||||
if(isset($_SESSION['flash']['error'])) {
|
||||
echo '<ul class="flash-error">';
|
||||
foreach($_SESSION['flash']['error'] as $msg) {
|
||||
echo "<li>$msg</li>";
|
||||
}
|
||||
echo '</ul>';
|
||||
}
|
||||
/* nuke it from orbit. It's the only way to be sure. */
|
||||
$_SESSION['flash'] = array();
|
||||
}
|
||||
|
||||
/* vim: set expandtab softtabstop=4 tabstop=4 shiftwidth=4: */
|
||||
?>
|
Loading…
Reference in New Issue
Block a user