move public facing stuff into public/, this allows us to stop exposing templates_c/ etc to the world
@ -92,6 +92,7 @@ if(!empty($CONF['language_hook']) && function_exists($CONF['language_hook'])) {
|
||||
|
||||
Config::write('__LANG', $PALANG);
|
||||
|
||||
unset($incpath);
|
||||
|
||||
if (!defined('POSTFIXADMIN_CLI')) {
|
||||
if(!is_file("$incpath/smarty.inc.php")) {
|
||||
@ -99,5 +100,6 @@ if (!defined('POSTFIXADMIN_CLI')) {
|
||||
}
|
||||
require_once ("$incpath/smarty.inc.php");
|
||||
}
|
||||
|
||||
/* vim: set expandtab softtabstop=4 tabstop=4 shiftwidth=4: */
|
||||
?>
|
||||
|
3
public/common.php
Normal file
@ -0,0 +1,3 @@
|
||||
<?php
|
||||
require_once(dirname(__FILE__) . '/../common.php');
|
||||
|
@ -28,7 +28,7 @@ $table = safeget('table');
|
||||
|
||||
$handlerclass = ucfirst($table) . 'Handler';
|
||||
|
||||
if ( !preg_match('/^[a-z]+$/', $table) || !file_exists("model/$handlerclass.php")) { # validate $table
|
||||
if ( !preg_match('/^[a-z]+$/', $table) || !file_exists(dirname(__FILE__) . "/../model/$handlerclass.php")) { # validate $table
|
||||
die ("Invalid table name given!");
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ $username = authentication_get_username(); # enforce login
|
||||
$table = safepost('table', safeget('table'));
|
||||
$handlerclass = ucfirst($table) . 'Handler';
|
||||
|
||||
if ( !preg_match('/^[a-z]+$/', $table) || !file_exists("model/$handlerclass.php")) { # validate $table
|
||||
if ( !preg_match('/^[a-z]+$/', $table) || !file_exists(dirname(__FILE__) . "/../model/$handlerclass.php")) { # validate $table
|
||||
die ("Invalid table name given!");
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ $active = safeget('active');
|
||||
|
||||
$handlerclass = ucfirst($table) . 'Handler';
|
||||
|
||||
if ( !preg_match('/^[a-z]+$/', $table) || !file_exists("model/$handlerclass.php")) { # validate $table
|
||||
if ( !preg_match('/^[a-z]+$/', $table) || !file_exists(dirname(__FILE__) . "/../model/$handlerclass.php")) { # validate $table
|
||||
die ("Invalid table name given!");
|
||||
}
|
||||
|
Before Width: | Height: | Size: 363 B After Width: | Height: | Size: 363 B |
Before Width: | Height: | Size: 407 B After Width: | Height: | Size: 407 B |
Before Width: | Height: | Size: 365 B After Width: | Height: | Size: 365 B |
Before Width: | Height: | Size: 127 B After Width: | Height: | Size: 127 B |
Before Width: | Height: | Size: 60 B After Width: | Height: | Size: 60 B |
Before Width: | Height: | Size: 70 B After Width: | Height: | Size: 70 B |
Before Width: | Height: | Size: 139 B After Width: | Height: | Size: 139 B |
Before Width: | Height: | Size: 67 B After Width: | Height: | Size: 67 B |
Before Width: | Height: | Size: 59 B After Width: | Height: | Size: 59 B |
Before Width: | Height: | Size: 69 B After Width: | Height: | Size: 69 B |
Before Width: | Height: | Size: 185 B After Width: | Height: | Size: 185 B |
Before Width: | Height: | Size: 164 B After Width: | Height: | Size: 164 B |
Before Width: | Height: | Size: 204 B After Width: | Height: | Size: 204 B |
Before Width: | Height: | Size: 155 B After Width: | Height: | Size: 155 B |
Before Width: | Height: | Size: 200 B After Width: | Height: | Size: 200 B |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 5.9 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 492 B After Width: | Height: | Size: 492 B |
@ -22,8 +22,8 @@
|
||||
|
||||
$CONF = array('configured' => FALSE);
|
||||
|
||||
if(file_exists(dirname(__FILE__) . '/config.inc.php')) {
|
||||
require_once('config.inc.php');
|
||||
if(file_exists(dirname(__FILE__) . '/../config.inc.php')) {
|
||||
require_once(dirname(__FILE__) . '/../config.inc.php');
|
||||
}
|
||||
|
||||
if ( $CONF['configured'] === TRUE )
|
||||
@ -67,9 +67,9 @@ if ( $CONF['configured'] === TRUE )
|
||||
<h2>What now?</h2>
|
||||
|
||||
<ol>
|
||||
<li>Read the <a href='INSTALL.TXT'>INSTALL.txt</a> file</li>
|
||||
<li>Read the <a href='https://raw.githubusercontent.com/postfixadmin/postfixadmin/master/INSTALL.TXT'>INSTALL.TXT</a> file</li>
|
||||
<li>Configure Postfix to use your chosen database - see (for example) the following pages :
|
||||
<ul>
|
||||
<ul><!-- TODO: get newer URLs ... -->
|
||||
<li><a href="http://codepoets.co.uk/postfixadmin-postgresql-courier-squirrelmail-debian-etch-howto-tutorial">Postfix/PostgreSQL/Postfixadmin/Courier</a></li>
|
||||
<li><a href="http://bliki.rimuhosting.com/space/knowledgebase/linux/mail/postfixadmin+on+debian+sarge">Postfix/MySQL/Postfixadmin/Dovecot</a></li>
|
||||
<li><a href="http://gentoo-wiki.com/HOWTO_Setup_a_Virtual_Postfix/Courier_Mail_System_with_PostfixAdmin">Postfix/MySQL/Postfixamdin/Courier</a></li>
|
||||
@ -80,10 +80,14 @@ if ( $CONF['configured'] === TRUE )
|
||||
<p><b>When you have configured Postfixadmin, this page will be replaced with a login page.</b></p>
|
||||
<p>You can now run <a href="setup.php">setup</a> to make sure that all the PHP functions are available for Postfix Admin to run.<br />
|
||||
<p> If you still encounter any problems, please check the documentation and website for more information.</p>
|
||||
|
||||
<h2>Postfix Admin Web sites</h2>
|
||||
<p>For further help, or documentation please check out -
|
||||
<a href="http://postfixadmin.org">Postfix Admin</a> web site<br />
|
||||
<a href="http://sourceforge.net/forum/forum.php?forum_id=676076">Knowledge Base</a>
|
||||
<ul>
|
||||
<li><a href="http://github.com/postfixadmin/postfixadmin">GitHub - Postfix Admin</a> web site</li>
|
||||
<li><a href="http://postfixadmin.org">Postfix Admin</a> web site<br /></li>
|
||||
<li><a href="http://sourceforge.net/forum/forum.php?forum_id=676076">Knowledge Base</a></li>
|
||||
</ul>
|
||||
</p>
|
||||
</p>
|
||||
</body>
|
@ -25,7 +25,7 @@ $table = safeget('table');
|
||||
|
||||
$handlerclass = ucfirst($table) . 'Handler';
|
||||
|
||||
if ( !preg_match('/^[a-z]+$/', $table) || !file_exists("model/$handlerclass.php")) { # validate $table
|
||||
if ( !preg_match('/^[a-z]+$/', $table) || !file_exists(dirname(__FILE__) . "/../model/$handlerclass.php")) { # validate $table
|
||||
die ("Invalid table name given!");
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ require_once(dirname(__FILE__).'/common.php'); # make sure correct common.php is
|
||||
$CONF['show_header_text'] = 'NO';
|
||||
$CONF['theme_logo'] = 'images/logo-default.png';
|
||||
$CONF['theme_css'] = 'css/default.css';
|
||||
require($incpath.'/templates/header.php');
|
||||
require(dirname(__FILE__) . '/../templates/header.php');
|
||||
?>
|
||||
|
||||
<div class='setup'>
|
||||
@ -53,8 +53,8 @@ $f_preg_match = function_exists ("preg_match");
|
||||
$f_mb_encode_mimeheader = function_exists ("mb_encode_mimeheader");
|
||||
$f_imap_open = function_exists ("imap_open");
|
||||
|
||||
$file_config = file_exists (realpath ("./config.inc.php"));
|
||||
$file_local_config = file_exists (realpath ("./config.local.php"));
|
||||
$file_config = file_exists (realpath ("./../config.inc.php"));
|
||||
$file_local_config = file_exists (realpath ("./../config.local.php"));
|
||||
|
||||
$error = 0;
|
||||
|
||||
@ -130,7 +130,7 @@ $config_loaded = 0;
|
||||
if ($file_config == 1)
|
||||
{
|
||||
print "<li>Depends on: presence config.inc.php - OK</li>\n";
|
||||
require_once($incpath.'/config.inc.php');
|
||||
require_once(dirname(__FILE__) .'/../config.inc.php');
|
||||
$config_loaded = 1;
|
||||
|
||||
if(isset($CONF['configured'])) {
|
||||
@ -327,7 +327,7 @@ if ($error != 0)
|
||||
else
|
||||
{
|
||||
print "<p>Everything seems fine... attempting to create/update database structure</p>\n";
|
||||
require_once($incpath.'/upgrade.php');
|
||||
require_once(dirname(__FILE__) .'/upgrade.php');
|
||||
|
||||
$tUsername = '';
|
||||
$setupMessage = '';
|
Before Width: | Height: | Size: 127 B After Width: | Height: | Size: 127 B |
Before Width: | Height: | Size: 60 B After Width: | Height: | Size: 60 B |
Before Width: | Height: | Size: 70 B After Width: | Height: | Size: 70 B |
Before Width: | Height: | Size: 139 B After Width: | Height: | Size: 139 B |
Before Width: | Height: | Size: 67 B After Width: | Height: | Size: 67 B |
Before Width: | Height: | Size: 59 B After Width: | Height: | Size: 59 B |
Before Width: | Height: | Size: 69 B After Width: | Height: | Size: 69 B |
Before Width: | Height: | Size: 185 B After Width: | Height: | Size: 185 B |
Before Width: | Height: | Size: 164 B After Width: | Height: | Size: 164 B |
Before Width: | Height: | Size: 204 B After Width: | Height: | Size: 204 B |
Before Width: | Height: | Size: 155 B After Width: | Height: | Size: 155 B |
Before Width: | Height: | Size: 200 B After Width: | Height: | Size: 200 B |
@ -12,7 +12,6 @@ class PFASmarty {
|
||||
$this->template = new Smarty();
|
||||
|
||||
//$this->template->debugging = true;
|
||||
$incpath = dirname(__FILE__);
|
||||
$this->template->setTemplateDir(dirname(__FILE__) . '/templates');
|
||||
|
||||
// if it's not present or writeable, smarty should just not cache.
|
||||
|