diff --git a/admin/create-alias.php b/admin/create-alias.php
deleted file mode 100644
index a510c78d..00000000
--- a/admin/create-alias.php
+++ /dev/null
@@ -1,3 +0,0 @@
-
diff --git a/admin/create-mailbox.php b/admin/create-mailbox.php
deleted file mode 100644
index 4335a1e3..00000000
--- a/admin/create-mailbox.php
+++ /dev/null
@@ -1,3 +0,0 @@
-
diff --git a/admin/delete.php b/admin/delete.php
deleted file mode 100644
index 4b5ceeaf..00000000
--- a/admin/delete.php
+++ /dev/null
@@ -1,3 +0,0 @@
-
diff --git a/admin/edit-active.php b/admin/edit-active.php
deleted file mode 100644
index 7a340316..00000000
--- a/admin/edit-active.php
+++ /dev/null
@@ -1,3 +0,0 @@
-
diff --git a/admin/edit-alias.php b/admin/edit-alias.php
deleted file mode 100644
index 0dc99975..00000000
--- a/admin/edit-alias.php
+++ /dev/null
@@ -1,3 +0,0 @@
-
diff --git a/admin/edit-mailbox.php b/admin/edit-mailbox.php
deleted file mode 100644
index 34d83661..00000000
--- a/admin/edit-mailbox.php
+++ /dev/null
@@ -1,3 +0,0 @@
-
diff --git a/admin/edit-vacation.php b/admin/edit-vacation.php
deleted file mode 100644
index a83ebe3a..00000000
--- a/admin/edit-vacation.php
+++ /dev/null
@@ -1,3 +0,0 @@
-
diff --git a/admin/index.php b/admin/index.php
index ec873602..906039ea 100644
--- a/admin/index.php
+++ b/admin/index.php
@@ -1,4 +1,4 @@
diff --git a/admin/main.php b/admin/main.php
deleted file mode 100644
index 83a8e75a..00000000
--- a/admin/main.php
+++ /dev/null
@@ -1,4 +0,0 @@
-
diff --git a/admin/search.php b/admin/search.php
deleted file mode 100644
index 243ddf40..00000000
--- a/admin/search.php
+++ /dev/null
@@ -1,180 +0,0 @@
- 0)
- {
- while ($row = db_array ($result['result']))
- {
- if ('pgsql'==$CONF['database_type'])
- {
- $row['modified'] = gmstrftime('%c %Z',$row['modified']);
- $row['active']=('t'==$row['active']) ? 1 : 0;
- }
- $tAlias[] = $row;
- }
- }
-
- $query = "SELECT * FROM $table_mailbox WHERE username LIKE '%$fSearch%' OR name LIKE '%$fSearch%' ORDER BY username";
- if ('pgsql'==$CONF['database_type'])
- {
- $query = "SELECT *,extract(epoch from created) as uts_created,extract(epoch from modified) as uts_modified FROM $table_mailbox WHERE username LIKE '%$fSearch%' OR name LIKE '%$fSearch%' ORDER BY username";
- }
- $result = db_query ($query);
- if ($result['rows'] > 0)
- {
- while ($row = db_array ($result['result']))
- {
- if ('pgsql'==$CONF['database_type'])
- {
- $row['created']=gmstrftime('%c %Z',$row['uts_created']);
- $row['modified']=gmstrftime('%c %Z',$row['uts_modified']);
- $row['active']=('t'==$row['active']) ? 1 : 0;
- unset($row['uts_created']);
- unset($row['uts_modified']);
- }
- $tMailbox[] = $row;
- }
- }
-
- include ("../templates/header.tpl");
- include ("../templates/admin_menu.tpl");
- include ("../templates/search.tpl");
- include ("../templates/footer.tpl");
-}
-
-if ($_SERVER['REQUEST_METHOD'] == "POST")
-{
- if (isset ($_POST['search'])) $fSearch = escape_string ($_POST['search']);
- if (isset ($_POST['fGo'])) $fGo = escape_string ($_POST['fGo']);
- if (isset ($_POST['fDomain'])) $fDomain = escape_string ($_POST['fDomain']);
-
- if (empty ($fSearch) && !empty ($fGo))
- {
- header("Location: list-virtual.php?domain=" . $fDomain ) && exit;
- }
-
-
- if ($CONF['alias_control'] == "YES")
- {
- $query = "SELECT address,goto,modified,domain,active FROM $table_alias WHERE address LIKE '%$fSearch%' OR goto LIKE '%$fSearch%' ORDER BY address";
- if ('pgsql'==$CONF['database_type'])
- {
- $query = "SELECT address,goto,extract (epoch from modified) as modified,domain,active FROM $table_alias WHERE address LIKE '%$fSearch%' OR goto LIKE '%$fSearch%' ORDER BY address";
- }
- }
- else
- {
- $query = "SELECT $table_alias.address,$table_alias.goto,$table_alias.modified,$table_alias.domain,$table_alias.active FROM $table_alias LEFT JOIN $table_mailbox ON $table_alias.address=$table_mailbox.username WHERE $table_alias.address LIKE '%$fSearch%' AND $table_mailbox.maildir IS NULL ORDER BY $table_alias.address";
- if ('pgsql'==$CONF['database_type'])
- {
- $query = "SELECT $table_alias.address,$table_alias.goto,extract(epoch from $table_alias.modified) as $table_modified,$table_alias.domain,$table_alias.active FROM $table_alias LEFT JOIN $table_mailbox ON $table_alias.address=$table_mailbox.username WHERE $table_alias.address LIKE '%$fSearch%' AND $table_mailbox.maildir IS NULL ORDER BY $table_alias.address";
- }
- }
-
- $result = db_query ("$query");
-
- if ($result['rows'] > 0)
- {
- while ($row = db_array ($result['result']))
- {
- if ('pgsql'==$CONF['database_type'])
- {
- $row['modified'] = gmstrftime('%c %Z',$row['modified']);
- $row['active']=('t'==$row['active']) ? 1 : 0;
- }
- $tAlias[] = $row;
- }
- }
-
- $query = "SELECT * FROM $table_mailbox WHERE username LIKE '%$fSearch%' OR name LIKE '%$fSearch%' ORDER BY username";
- if ('pgsql'==$CONF['database_type'])
- {
- $query = "SELECT *,extract(epoch from created) as uts_created,extract(epoch from modified) as uts_modified FROM $table_mailbox WHERE username LIKE '%$fSearch%' OR name LIKE '%$fSearch%' ORDER BY username";
- }
- $result = db_query ("$query");
- if ($result['rows'] > 0)
- {
- while ($row = db_array ($result['result']))
- {
- if ('pgsql'==$CONF['database_type'])
- {
- $row['created']=gmstrftime('%c %Z',$row['uts_created']);
- $row['modified']=gmstrftime('%c %Z',$row['uts_modified']);
- $row['active']=('t'==$row['active']) ? 1 : 0;
- unset($row['uts_created']);
- unset($row['uts_modified']);
- }
- $tMailbox[] = $row;
- }
- }
-
- include ("../templates/header.tpl");
- include ("../templates/admin_menu.tpl");
- include ("../templates/search.tpl");
- include ("../templates/footer.tpl");
-}
-*/
-/* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */
-?>
diff --git a/admin/viewlog.php b/admin/viewlog.php
deleted file mode 100644
index 6d8ebc2c..00000000
--- a/admin/viewlog.php
+++ /dev/null
@@ -1,3 +0,0 @@
-
diff --git a/admin/backup.php b/backup.php
similarity index 94%
rename from admin/backup.php
rename to backup.php
index 045995e7..7fc5faeb 100644
--- a/admin/backup.php
+++ b/backup.php
@@ -21,7 +21,7 @@
* Form POST \ GET Variables: -none-
*/
-require_once('../common.php');
+require_once('common.php');
authentication_require_role('global-admin');
@@ -63,10 +63,10 @@ if ($_SERVER['REQUEST_METHOD'] == "GET")
if (!$fh = fopen ($backup, 'w'))
{
$tMessage = "
Cannot open file ($backup)
";
- include ("../templates/header.tpl");
- include ("../templates/admin_menu.tpl");
- include ("../templates/message.tpl");
- include ("../templates/footer.tpl");
+ include ("templates/header.tpl");
+ include ("templates/menu.tpl");
+ include ("templates/message.tpl");
+ include ("templates/footer.tpl");
}
else
{
diff --git a/admin/broadcast-message.php b/broadcast-message.php
similarity index 87%
rename from admin/broadcast-message.php
rename to broadcast-message.php
index 5b9f8901..b73ebefc 100644
--- a/admin/broadcast-message.php
+++ b/broadcast-message.php
@@ -26,7 +26,7 @@
* message
*/
-require_once('../common.php');
+require_once('common.php');
authentication_require_role('global-admin');
@@ -73,19 +73,19 @@ if ($_SERVER['REQUEST_METHOD'] == "POST")
}
}
}
- include ("../templates/header.tpl");
- include ("../templates/admin_menu.tpl");
+ include ("templates/header.tpl");
+ include ("templates/menu.tpl");
echo ''.$PALANG['pBroadcast_success'].'
';
- include ("../templates/footer.tpl");
+ include ("templates/footer.tpl");
}
}
if ($_SERVER['REQUEST_METHOD'] == "GET" || $error == 1)
{
- include ("../templates/header.tpl");
- include ("../templates/admin_menu.tpl");
- include ("../templates/broadcast-message.tpl");
- include ("../templates/footer.tpl");
+ include ("templates/header.tpl");
+ include ("templates/menu.tpl");
+ include ("templates/broadcast-message.tpl");
+ include ("templates/footer.tpl");
}
/* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */
diff --git a/admin/create-admin.php b/create-admin.php
similarity index 81%
rename from admin/create-admin.php
rename to create-admin.php
index 6298cf57..692b0725 100644
--- a/admin/create-admin.php
+++ b/create-admin.php
@@ -31,7 +31,7 @@
* fDomains
*/
-require_once('../common.php');
+require_once('common.php');
authentication_require_role('global-admin');
@@ -42,11 +42,6 @@ if ($_SERVER['REQUEST_METHOD'] == "GET")
{
$pAdminCreate_admin_username_text = $PALANG['pAdminCreate_admin_username_text'];
$tDomains = array ();
-
- include ("../templates/header.tpl");
- include ("../templates/admin_menu.tpl");
- include ("../templates/admin_create-admin.tpl");
- include ("../templates/footer.tpl");
}
if ($_SERVER['REQUEST_METHOD'] == "POST")
@@ -63,11 +58,12 @@ if ($_SERVER['REQUEST_METHOD'] == "POST")
if (isset ($_POST['fUsername'])) $tUsername = escape_string ($_POST['fUsername']);
if (isset ($_POST['fDomains'])) $tDomains = $_POST['fDomains'];
}
-
- include ("../templates/header.tpl");
- include ("../templates/admin_menu.tpl");
- include ("../templates/admin_create-admin.tpl");
- include ("../templates/footer.tpl");
}
+
+include ("templates/header.tpl");
+include ("templates/menu.tpl");
+include ("templates/admin_create-admin.tpl");
+include ("templates/footer.tpl");
+
/* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */
?>
diff --git a/create-alias.php b/create-alias.php
index e6e14f66..eccd830f 100644
--- a/create-alias.php
+++ b/create-alias.php
@@ -153,13 +153,7 @@ if ($_SERVER['REQUEST_METHOD'] == "POST")
}
include ("$incpath/templates/header.tpl");
-
-if (authentication_has_role('global-admin')) {
- include ("$incpath/templates/admin_menu.tpl");
-} else {
- include ("$incpath/templates/menu.tpl");
-}
-
+include ("$incpath/templates/menu.tpl");
include ("$incpath/templates/create-alias.tpl");
include ("$incpath/templates/footer.tpl");
?>
diff --git a/admin/create-domain.php b/create-domain.php
similarity index 90%
rename from admin/create-domain.php
rename to create-domain.php
index 7cc2ab07..6bf90f2a 100644
--- a/admin/create-domain.php
+++ b/create-domain.php
@@ -36,7 +36,7 @@
* fDefaultaliases
*/
-require_once('../common.php');
+require_once('common.php');
authentication_require_role('global-admin');
@@ -47,11 +47,6 @@ if ($_SERVER['REQUEST_METHOD'] == "GET")
$tMailboxes = $CONF['mailboxes'];
$tMaxquota = $CONF['maxquota'];
$tTransport = $CONF['transport_default'];
-
- include ("../templates/header.tpl");
- include ("../templates/admin_menu.tpl");
- include ("../templates/admin_create-domain.tpl");
- include ("../templates/footer.tpl");
}
if ($_SERVER['REQUEST_METHOD'] == "POST")
@@ -119,11 +114,12 @@ if ($_SERVER['REQUEST_METHOD'] == "POST")
$tMessage = $PALANG['pAdminCreate_domain_result_success'] . "
($fDomain)";
}
}
-
- include ("../templates/header.tpl");
- include ("../templates/admin_menu.tpl");
- include ("../templates/admin_create-domain.tpl");
- include ("../templates/footer.tpl");
-/* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */
}
+
+include ("templates/header.tpl");
+include ("templates/menu.tpl");
+include ("templates/admin_create-domain.tpl");
+include ("templates/footer.tpl");
+
+/* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */
?>
diff --git a/create-mailbox.php b/create-mailbox.php
index 513c3c63..62d666da 100644
--- a/create-mailbox.php
+++ b/create-mailbox.php
@@ -339,13 +339,7 @@ TODO: this is the end of /create-mailbox.php code segment
}
include ("$incpath/templates/header.tpl");
-
-if (authentication_has_role('global-admin')) {
- include ("$incpath/templates/admin_menu.tpl");
-} else {
- include ("$incpath/templates/menu.tpl");
-}
-
+include ("$incpath/templates/menu.tpl");
include ("$incpath/templates/create-mailbox.tpl");
include ("$incpath/templates/footer.tpl");
diff --git a/delete.php b/delete.php
index 0937a5ac..80b6573f 100644
--- a/delete.php
+++ b/delete.php
@@ -167,13 +167,7 @@ else
include ("$incpath/templates/header.tpl");
-
-if (authentication_has_role('global-admin')) {
- include ("$incpath/templates/admin_menu.tpl");
-} else {
- include ("$incpath/templates/menu.tpl");
-}
-
+include ("$incpath/templates/menu.tpl");
include ("$incpath/templates/message.tpl");
include ("$incpath/templates/footer.tpl");
diff --git a/admin/edit-active-admin.php b/edit-active-admin.php
similarity index 75%
rename from admin/edit-active-admin.php
rename to edit-active-admin.php
index bb71b5a4..fe474f42 100644
--- a/admin/edit-active-admin.php
+++ b/edit-active-admin.php
@@ -26,7 +26,7 @@
* fUsername
*/
-require_once('../common.php');
+require_once('common.php');
authentication_require_role('global-admin');
@@ -49,20 +49,12 @@ if ($_SERVER['REQUEST_METHOD'] == "GET")
header ("Location: list-admin.php");
exit;
}
-
- include ("../templates/header.tpl");
- include ("../templates/admin_menu.tpl");
- include ("../templates/message.tpl");
- include ("../templates/footer.tpl");
}
-if ($_SERVER['REQUEST_METHOD'] == "POST")
-{
- include ("../templates/header.tpl");
- include ("../templates/admin_menu.tpl");
- include ("../templates/message.tpl");
- include ("../templates/footer.tpl");
-}
+include ("templates/header.tpl");
+include ("templates/menu.tpl");
+include ("templates/message.tpl");
+include ("templates/footer.tpl");
/* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */
diff --git a/admin/edit-active-domain.php b/edit-active-domain.php
similarity index 74%
rename from admin/edit-active-domain.php
rename to edit-active-domain.php
index 90183d0e..41e2d8f4 100644
--- a/admin/edit-active-domain.php
+++ b/edit-active-domain.php
@@ -25,7 +25,7 @@
* fDomain
*/
-require_once('../common.php');
+require_once('common.php');
authentication_require_role('global-admin');
@@ -48,20 +48,12 @@ if ($_SERVER['REQUEST_METHOD'] == "GET")
header ("Location: list-domain.php");
exit;
}
-
- include ("../templates/header.tpl");
- include ("../templates/admin_menu.tpl");
- include ("../templates/message.tpl");
- include ("../templates/footer.tpl");
}
-if ($_SERVER['REQUEST_METHOD'] == "POST")
-{
- include ("../templates/header.tpl");
- include ("../templates/admin_menu.tpl");
- include ("../templates/message.tpl");
- include ("../templates/footer.tpl");
-}
+include ("templates/header.tpl");
+include ("templates/menu.tpl");
+include ("templates/message.tpl");
+include ("templates/footer.tpl");
/* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */
?>
diff --git a/edit-active.php b/edit-active.php
index 70e6e16a..6cc56c19 100644
--- a/edit-active.php
+++ b/edit-active.php
@@ -97,13 +97,7 @@ if ($_SERVER['REQUEST_METHOD'] == "GET")
}
include ("$incpath/templates/header.tpl");
-
-if (authentication_has_role('global-admin')) {
- include ("$incpath/templates/admin_menu.tpl");
-} else {
- include ("$incpath/templates/menu.tpl");
-}
-
+include ("$incpath/templates/menu.tpl");
include ("$incpath/templates/message.tpl");
include ("$incpath/templates/footer.tpl");
/* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */
diff --git a/admin/edit-admin.php b/edit-admin.php
similarity index 95%
rename from admin/edit-admin.php
rename to edit-admin.php
index 592fdfc7..c8558c2d 100644
--- a/admin/edit-admin.php
+++ b/edit-admin.php
@@ -33,7 +33,7 @@
* fActive
*/
-require_once('../common.php');
+require_once('common.php');
authentication_require_role('global-admin');
@@ -146,7 +146,7 @@ if ($result['rows'] >= 1) {
}
}
-include ("../templates/header.tpl");
-include ("../templates/admin_menu.tpl");
-include ("../templates/admin_edit-admin.tpl");
-include ("../templates/footer.tpl");
+include ("templates/header.tpl");
+include ("templates/menu.tpl");
+include ("templates/admin_edit-admin.tpl");
+include ("templates/footer.tpl");
diff --git a/edit-alias.php b/edit-alias.php
index f060665e..80b85636 100644
--- a/edit-alias.php
+++ b/edit-alias.php
@@ -129,13 +129,7 @@ if ($_SERVER['REQUEST_METHOD'] == "POST")
}
include ("$incpath/templates/header.tpl");
-
-if (authentication_has_role('global-admin')) {
- include ("$incpath/templates/admin_menu.tpl");
-} else {
- include ("$incpath/templates/menu.tpl");
-}
-
+include ("$incpath/templates/menu.tpl");
include ("$incpath/templates/edit-alias.tpl");
include ("$incpath/templates/footer.tpl");
?>
diff --git a/admin/edit-domain.php b/edit-domain.php
similarity index 88%
rename from admin/edit-domain.php
rename to edit-domain.php
index 5b418018..44c001ba 100644
--- a/admin/edit-domain.php
+++ b/edit-domain.php
@@ -33,7 +33,7 @@
* fActive
*/
-require_once('../common.php');
+require_once('common.php');
authentication_require_role('global-admin');
@@ -52,11 +52,6 @@ if ($_SERVER['REQUEST_METHOD'] == "GET")
$tBackupmx = $domain_properties['backupmx'];
$tActive = $domain_properties['active'];
}
-
- include ("../templates/header.tpl");
- include ("../templates/admin_menu.tpl");
- include ("../templates/admin_edit-domain.tpl");
- include ("../templates/footer.tpl");
}
if ($_SERVER['REQUEST_METHOD'] == "POST")
@@ -107,12 +102,12 @@ if ($_SERVER['REQUEST_METHOD'] == "POST")
{
$tMessage = $PALANG['pAdminEdit_domain_result_error'];
}
-
- include ("../templates/header.tpl");
- include ("../templates/admin_menu.tpl");
- include ("../templates/admin_edit-domain.tpl");
- include ("../templates/footer.tpl");
}
+include ("templates/header.tpl");
+include ("templates/menu.tpl");
+include ("templates/admin_edit-domain.tpl");
+include ("templates/footer.tpl");
+
/* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */
?>
diff --git a/edit-mailbox.php b/edit-mailbox.php
index 519b959a..aa894715 100644
--- a/edit-mailbox.php
+++ b/edit-mailbox.php
@@ -155,13 +155,7 @@ if ($_SERVER['REQUEST_METHOD'] == "POST")
}
include ("$incpath/templates/header.tpl");
-
-if (authentication_has_role('global-admin')) {
- include ("$incpath/templates/admin_menu.tpl");
-} else {
- include ("$incpath/templates/menu.tpl");
-}
-
+include ("$incpath/templates/menu.tpl");
include ("$incpath/templates/edit-mailbox.tpl");
include ("$incpath/templates/footer.tpl");
/* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */
diff --git a/edit-vacation.php b/edit-vacation.php
index d98dfc19..fe44539c 100644
--- a/edit-vacation.php
+++ b/edit-vacation.php
@@ -38,7 +38,7 @@
require_once('common.php');
if($CONF['vacation'] == 'NO') {
- header("Location: " . $CONF['postfix_admin_url'] . "/main.php");
+ header("Location: " . $CONF['postfix_admin_url'] . "/main.php"); # TODO
exit(0);
}
@@ -60,7 +60,7 @@ $vacation_domain = $CONF['vacation_domain'];
$vacation_goto = preg_replace('/@/', '#', $fUsername);
$vacation_goto = $vacation_goto . '@' . $vacation_domain;
-$fCanceltarget = $CONF['postfix_admin_url'] . '/main.php';
+$fCanceltarget = $CONF['postfix_admin_url'] . '/main.php'; # TODO
if ($_SERVER['REQUEST_METHOD'] == "GET")
{
@@ -190,11 +190,7 @@ else {
}
include ("$incpath/templates/header.tpl");
-if (authentication_has_role('global-admin')) {
- include ("$incpath/templates/admin_menu.tpl");
-} else {
- include ("$incpath/templates/menu.tpl");
-}
+include ("$incpath/templates/menu.tpl");
include ("$incpath/templates/edit-vacation.tpl");
include ("$incpath/templates/footer.tpl");
/* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */
diff --git a/admin/list-admin.php b/list-admin.php
similarity index 62%
rename from admin/list-admin.php
rename to list-admin.php
index 46e48cc4..093d4749 100644
--- a/admin/list-admin.php
+++ b/list-admin.php
@@ -21,7 +21,7 @@
* Form POST \ GET Variables: -none-
*/
-require_once("../common.php");
+require_once("common.php");
authentication_require_role('global-admin');
@@ -32,19 +32,9 @@ if ((is_array ($list_admins) and sizeof ($list_admins) > 0)) {
}
}
-if ($_SERVER['REQUEST_METHOD'] == "GET")
-{
- include ("../templates/header.tpl");
- include ("../templates/admin_menu.tpl");
- include ("../templates/admin_list-admin.tpl");
- include ("../templates/footer.tpl");
-}
+include ("templates/header.tpl");
+include ("templates/menu.tpl");
+include ("templates/admin_list-admin.tpl");
+include ("templates/footer.tpl");
-if ($_SERVER['REQUEST_METHOD'] == "POST")
-{
- include ("../templates/header.tpl");
- include ("../templates/admin_menu.tpl");
- include ("../templates/admin_list-admin.tpl");
- include ("../templates/footer.tpl");
-}
?>
diff --git a/admin/list-domain.php b/list-domain.php
similarity index 81%
rename from admin/list-domain.php
rename to list-domain.php
index 0111b137..8def8851 100644
--- a/admin/list-domain.php
+++ b/list-domain.php
@@ -25,7 +25,7 @@
* fUsername
*/
-require_once('../common.php');
+require_once('common.php');
authentication_require_role('global-admin');
@@ -52,11 +52,6 @@ if ($_SERVER['REQUEST_METHOD'] == "GET") {
$domain_properties[$i] = get_domain_properties ($list_domains[$i]);
}
}
-
- include ("../templates/header.tpl");
- include ("../templates/admin_menu.tpl");
- include ("../templates/admin_list-domain.tpl");
- include ("../templates/footer.tpl");
}
if ($_SERVER['REQUEST_METHOD'] == "POST")
@@ -74,10 +69,10 @@ if ($_SERVER['REQUEST_METHOD'] == "POST")
$domain_properties[$i] = get_domain_properties ($list_domains[$i]);
}
}
-
- include ("../templates/header.tpl");
- include ("../templates/admin_menu.tpl");
- include ("../templates/admin_list-domain.tpl");
- include ("../templates/footer.tpl");
}
+
+include ("templates/header.tpl");
+include ("templates/menu.tpl");
+include ("templates/admin_list-domain.tpl");
+include ("templates/footer.tpl");
?>
diff --git a/admin/list-virtual.php b/list-virtual.php
similarity index 96%
rename from admin/list-virtual.php
rename to list-virtual.php
index be581313..232a13e2 100644
--- a/admin/list-virtual.php
+++ b/list-virtual.php
@@ -29,7 +29,7 @@
* fDisplay
*/
-require_once('../common.php');
+require_once('common.php');
authentication_require_role('global-admin');
@@ -155,10 +155,10 @@ if (isset ($limit)) {
}
-include ("../templates/header.tpl");
-include ("../templates/admin_menu.tpl");
-include ("../templates/overview.tpl");
-include ("../templates/footer.tpl");
+include ("templates/header.tpl");
+include ("templates/menu.tpl");
+include ("templates/overview.tpl");
+include ("templates/footer.tpl");
/* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */
?>
diff --git a/login.php b/login.php
index 11c6bd14..2406c902 100644
--- a/login.php
+++ b/login.php
@@ -87,8 +87,8 @@ if ($_SERVER['REQUEST_METHOD'] == "POST")
if ($result['rows'] == 1)
{
$_SESSION['sessid']['roles'][] = 'global-admin';
- header("Location: admin/list-admin.php");
- exit(0);
+# header("Location: admin/list-admin.php");
+# exit(0);
}
header("Location: main.php");
exit(0);
diff --git a/search.php b/search.php
index 001c70f1..65e8e40d 100644
--- a/search.php
+++ b/search.php
@@ -140,13 +140,7 @@ if ($_SERVER['REQUEST_METHOD'] == "POST")
}
include ("$incpath/templates/header.tpl");
-
-if (authentication_has_role('global-admin')) {
- include ("$incpath/templates/admin_menu.tpl");
-} else {
- include ("$incpath/templates/menu.tpl");
-}
-
+include ("$incpath/templates/menu.tpl");
include ("$incpath/templates/search.tpl");
include ("$incpath/templates/footer.tpl");
diff --git a/templates/admin_menu.tpl b/templates/admin_menu.tpl
deleted file mode 100644
index dbaaf054..00000000
--- a/templates/admin_menu.tpl
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-\n";
- include ("../motd-admin.txt");
- print "";
-}
-/* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */
-?>
diff --git a/viewlog.php b/viewlog.php
index da6dea7e..b84eff2a 100644
--- a/viewlog.php
+++ b/viewlog.php
@@ -75,13 +75,7 @@ if ($error != 1)
}
include ("$incpath/templates/header.tpl");
-
-if (authentication_has_role('global-admin')) {
- include ("$incpath/templates/admin_menu.tpl");
-} else {
- include ("$incpath/templates/menu.tpl");
-}
-
+include ("$incpath/templates/menu.tpl");
include ("$incpath/templates/viewlog.tpl");
include ("$incpath/templates/footer.tpl");