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 -
+
+
+
+
+';
+ foreach($_SESSION['flash']['info'] as $msg) {
+ echo "$msg ";
+ }
+ echo '';
+ }
+ if(isset($_SESSION['flash']['error'])) {
+ echo '';
+ foreach($_SESSION['flash']['error'] as $msg) {
+ echo "$msg ";
+ }
+ 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: */
+?>