From cf40467570deb7a548d749517c9e9490aaf8071c Mon Sep 17 00:00:00 2001 From: Sebastian Date: Fri, 6 Nov 2009 19:16:14 +0000 Subject: [PATCH] - 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 --- common.php | 3 +++ setup.php | 11 ++++++++ templates/header.php | 62 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 76 insertions(+) create mode 100644 templates/header.php diff --git a/common.php b/common.php index e45ed89b..241b2231 100644 --- a/common.php +++ b/common.php @@ -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: */ diff --git a/setup.php b/setup.php index 94144b55..5983eb7f 100644 --- a/setup.php +++ b/setup.php @@ -142,6 +142,17 @@ else $error =+ 1; } +// +// Check if templates directory is writable +// + +if (!is_writeable($incpath.'/templates_c')) +{ + print "
  • Error: The subdirectory templates_c is not writable.
    \n"; + print "Please make it writable.
    \n"; + $error =+ 1; +} + // // Check if there is support for at least 1 database // diff --git a/templates/header.php b/templates/header.php new file mode 100644 index 00000000..d72fbbdb --- /dev/null +++ b/templates/header.php @@ -0,0 +1,62 @@ + + + + + + +\n"; +} else { + print "\n"; +} +?> +Postfix Admin - <?php print $_SERVER['HTTP_HOST']; ?> + + +
    +\n"; +} else { + print "\n"; +} + +if (($CONF['show_header_text'] == "YES") and ($CONF['header_text'])) +{ + print "

    " . $CONF['header_text'] . "

    \n"; +} +?> +
    + +'; + foreach($_SESSION['flash']['info'] as $msg) { + echo "
  • $msg
  • "; + } + echo ''; + } + if(isset($_SESSION['flash']['error'])) { + echo ''; + } + /* nuke it from orbit. It's the only way to be sure. */ + $_SESSION['flash'] = array(); +} + +/* vim: set expandtab softtabstop=4 tabstop=4 shiftwidth=4: */ +?>