From 0471565be99a2dc4dc9f32324870037cd360eef4 Mon Sep 17 00:00:00 2001 From: cajus Date: Wed, 17 May 2006 06:41:26 +0000 Subject: [PATCH] Fixed several main.inc's git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3378 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/addons/addressbook/main.inc | 8 ++++---- plugins/addons/godfs/main.inc | 17 ++++++++--------- plugins/addons/ldapmanager/main.inc | 8 ++++---- plugins/addons/logview/main.inc | 8 ++++---- plugins/addons/mailqueue/main.inc | 8 ++++---- plugins/admin/fai/main.inc | 15 ++++++++------- plugins/gofax/blocklists/main.inc | 15 +++++++-------- 7 files changed, 39 insertions(+), 40 deletions(-) diff --git a/plugins/addons/addressbook/main.inc b/plugins/addons/addressbook/main.inc index a8ffc9f48..ce73c04fa 100644 --- a/plugins/addons/addressbook/main.inc +++ b/plugins/addons/addressbook/main.inc @@ -19,9 +19,6 @@ */ if (!$remove_lock){ - /* Page header*/ - $display= print_header(get_template_path('images/addressbook.png'), _("Address book")); - /* Create phonelist object on demand */ if (!isset($_SESSION['addressbook']) || (isset($_GET['reset']) && $_GET['reset'] == 1)){ $_SESSION['addressbook']= new addressbook ($config); @@ -33,9 +30,12 @@ if (!$remove_lock){ $addressbook->acl= get_module_permission($acl, "addressbook", $ui->dn); /* Execute formular */ - $display.= $addressbook->execute (); + $display= $addressbook->execute (); $display.= "\n"; + /* Page header*/ + $display= print_header(get_template_path('images/addressbook.png'), _("Address book")).$display; + /* Store changes in session */ $_SESSION['addressbook']= $addressbook; } diff --git a/plugins/addons/godfs/main.inc b/plugins/addons/godfs/main.inc index 0d9f69b39..56fc3c0e4 100644 --- a/plugins/addons/godfs/main.inc +++ b/plugins/addons/godfs/main.inc @@ -15,6 +15,12 @@ $dfsManagment = $_SESSION['dfsManagment']; $output = $dfsManagment->execute(); + # do we have to reset + if (isset($_GET['reset']) && $_GET['reset'] == 1) { + del_lock ($ui->dn); + sess_del('dfsManagment'); + } + # create page header if (isset($_SESSION['objectinfo'])) { $display = print_header(get_template_path('images/dfs.png'), @@ -26,16 +32,9 @@ $display = print_header(get_template_path('images/dfs.png'), _("Distributed File System Administration")); } + + $display.= $output; - # create the page - $display .= $output; - - # do we have to reset - if (isset($_GET['reset']) && $_GET['reset'] == 1) { - del_lock ($ui->dn); - sess_del('dfsManagment'); - } - # show page $_SESSION['dfsManagment'] = $dfsManagment; } diff --git a/plugins/addons/ldapmanager/main.inc b/plugins/addons/ldapmanager/main.inc index ac00e86fe..9c529f2a2 100644 --- a/plugins/addons/ldapmanager/main.inc +++ b/plugins/addons/ldapmanager/main.inc @@ -19,9 +19,6 @@ */ if (!$remove_lock){ - /* Page header*/ - $display= print_header(get_template_path('images/ldif.png'), _("LDAP manager")); - /* Create phonelist object on demand */ if (!isset($_SESSION['ldif']) || (isset($_GET['reset']) && $_GET['reset'] == 1)){ $_SESSION['ldif']= new ldif ($config); @@ -35,10 +32,13 @@ if (!$remove_lock){ $ldif->acl= get_module_permission($acl, "ldapmanager", $ui->dn); /* Execute formular */ - $display.= $ldif->execute (); + $display= $ldif->execute (); $display.= "\n"; + /* Page header*/ + $display= print_header(get_template_path('images/ldif.png'), _("LDAP manager")).$display; + /* Store changes in session */ $_SESSION['ldif']= $ldif; } diff --git a/plugins/addons/logview/main.inc b/plugins/addons/logview/main.inc index b37dcb17b..8a96e01e1 100644 --- a/plugins/addons/logview/main.inc +++ b/plugins/addons/logview/main.inc @@ -19,9 +19,6 @@ */ if (!$remove_lock){ - /* Page header*/ - $display= print_header(get_template_path('images/logview.png'), _("System log view")); - /* Create logview object on demand */ if (!isset($_SESSION['logview']) || (isset($_GET['reset']) && $_GET['reset'] == 1)){ $_SESSION['logview']= new logview ($config); @@ -29,9 +26,12 @@ if (!$remove_lock){ $logview= $_SESSION['logview']; /* Execute formular */ - $display.= $logview->execute (); + $display= $logview->execute (); $display.= "\n"; + /* Page header*/ + $display= print_header(get_template_path('images/logview.png'), _("System log view")).$display; + /* Store changes in session */ $_SESSION['logview']= $logview; } diff --git a/plugins/addons/mailqueue/main.inc b/plugins/addons/mailqueue/main.inc index c1214ee2c..401812db7 100644 --- a/plugins/addons/mailqueue/main.inc +++ b/plugins/addons/mailqueue/main.inc @@ -19,9 +19,6 @@ */ if (!$remove_lock){ - /* Page header*/ - $display= print_header(get_template_path('images/mailqueue.png'), _("Mail queue")); - /* Create mailqueue object on demand */ if (!isset($_SESSION['mailqueue']) || (isset($_GET['reset']) && $_GET['reset'] == 1)){ $_SESSION['mailqueue']= new mailqueue ($config); @@ -34,9 +31,12 @@ if (!$remove_lock){ /* Execute formular */ $mailqueue->save_object(); - $display.= $mailqueue->execute (); + $display= $mailqueue->execute (); $display.= "\n"; + /* Page header*/ + $display= print_header(get_template_path('images/mailqueue.png'), _("Mail queue")).$display; + /* Store changes in session */ $_SESSION['mailqueue']= $mailqueue; } diff --git a/plugins/admin/fai/main.inc b/plugins/admin/fai/main.inc index 72c8cd7e4..6616f8e5b 100644 --- a/plugins/admin/fai/main.inc +++ b/plugins/admin/fai/main.inc @@ -34,13 +34,6 @@ if ($remove_lock){ $FAI->save_object(); $output= $FAI->execute(); - /* Page header*/ - if (isset($_SESSION['objectinfo'])){ - $display= print_header(get_template_path('images/fai.png'), _("Fully Automatic Installation"), "\"\" ".@LDAP::fix($_SESSION['objectinfo'])); - } else { - $display= print_header(get_template_path('images/fai.png'), _("Fully Automatic Installation")); - } - /* Reset requested? */ if (isset($_GET['reset']) && $_GET['reset'] == 1){ del_lock ($ui->dn); @@ -49,7 +42,15 @@ if ($remove_lock){ /* Show and save dialog */ $FAI->save_object(); + + /* Page header*/ + if (isset($_SESSION['objectinfo'])){ + $display= print_header(get_template_path('images/fai.png'), _("Fully Automatic Installation"), "\"\" ".@LDAP::fix($_SESSION['objectinfo'])); + } else { + $display= print_header(get_template_path('images/fai.png'), _("Fully Automatic Installation")); + } $display.= $output; + $_SESSION['FAI']= $FAI; } diff --git a/plugins/gofax/blocklists/main.inc b/plugins/gofax/blocklists/main.inc index 7202169d3..3e8b13dbd 100644 --- a/plugins/gofax/blocklists/main.inc +++ b/plugins/gofax/blocklists/main.inc @@ -15,21 +15,20 @@ if ($remove_lock){ $blocklist->save_object(); $output= $blocklist->execute(); - /* Page header*/ - if (isset($_SESSION['objectinfo'])){ - $display= print_header(get_template_path('images/blocklists.png'), _("Blocklist management"), "\"\"align=\"middle\" ".@LDAP::fix($_SESSION['objectinfo'])); - } else { - $display= print_header(get_template_path('images/blocklists.png'), _("Blocklist management")); - } - /* Reset requested? */ if (isset($_GET['reset']) && $_GET['reset'] == 1){ del_lock ($ui->dn); sess_del ('blocklist'); } - /* Show and save dialog */ + /* Page header*/ + if (isset($_SESSION['objectinfo'])){ + $display= print_header(get_template_path('images/blocklists.png'), _("Blocklist management"), "\"\"align=\"middle\" ".@LDAP::fix($_SESSION['objectinfo'])); + } else { + $display= print_header(get_template_path('images/blocklists.png'), _("Blocklist management")); + } $display.= $output; + $_SESSION['blocklist']= $blocklist; } ?> -- 2.30.2