|
From: <abe...@us...> - 2009-12-14 01:28:05
|
Revision: 3556
http://astlinux.svn.sourceforge.net/astlinux/?rev=3556&view=rev
Author: abelbeck
Date: 2009-12-14 01:27:55 +0000 (Mon, 14 Dec 2009)
Log Message:
-----------
Web interface, Add Staff tab, shutdown function, and encrypted 'staff' user backups,
http://lonnie.abelbeck.com/astlinux/altweb-changelog.txt
Modified Paths:
--------------
branches/0.7/package/webinterface/altweb/admin/edit.php
branches/0.7/package/webinterface/altweb/admin/prefs.php
branches/0.7/package/webinterface/altweb/admin/system.php
branches/0.7/package/webinterface/altweb/common/footer.php
branches/0.7/package/webinterface/altweb/common/functions.php
branches/0.7/package/webinterface/altweb/common/header.php
branches/0.7/package/webinterface/altweb/common/version.php
Added Paths:
-----------
branches/0.7/package/webinterface/altweb/admin/shutdown.php
branches/0.7/package/webinterface/altweb/admin/staff.php
Modified: branches/0.7/package/webinterface/altweb/admin/edit.php
===================================================================
--- branches/0.7/package/webinterface/altweb/admin/edit.php 2009-12-14 01:27:00 UTC (rev 3555)
+++ branches/0.7/package/webinterface/altweb/admin/edit.php 2009-12-14 01:27:55 UTC (rev 3556)
@@ -35,6 +35,7 @@
'sensors.conf' => 'Lm_sensors Hardware Monitoring',
'zaptel.conf' => 'Zaptel System Config',
'redfone.conf' => 'Redfone foneBRIDGE',
+ 'webgui-staff-backup.conf' => 'Staff Backup Password',
'vsftpd.conf' => 'Standalone FTPd Configuration'
);
Modified: branches/0.7/package/webinterface/altweb/admin/prefs.php
===================================================================
--- branches/0.7/package/webinterface/altweb/admin/prefs.php 2009-12-14 01:27:00 UTC (rev 3555)
+++ branches/0.7/package/webinterface/altweb/admin/prefs.php 2009-12-14 01:27:55 UTC (rev 3556)
@@ -313,6 +313,10 @@
$value = 'tab_edit_show = no';
fwrite($fp, $value."\n");
}
+ if (! isset($_POST['tab_staff'])) {
+ $value = 'tab_staff_disable_staff = yes';
+ fwrite($fp, $value."\n");
+ }
if (getPREFdef($global_prefs, 'tab_prefs_show') === 'no') {
$value = 'tab_prefs_show = no';
fwrite($fp, $value."\n");
@@ -626,7 +630,7 @@
putHtml('<tr class="dtrow0"><td colspan="6"> </td></tr>');
putHtml('<tr class="dtrow0"><td class="dialogText" style="text-align: left;" colspan="6">');
- putHtml('<strong>System Tab Options:</strong>');
+ putHtml('<strong>System & Staff Tab Options:</strong>');
putHtml('</td></tr>');
putHtml('<tr class="dtrow1"><td style="text-align: right;">');
$sel = (getPREFdef($global_prefs, 'system_backup_compress_gzip') !== 'no') ? ' checked="checked"' : '';
@@ -764,6 +768,10 @@
$sel = (getPREFdef($global_prefs, 'tab_edit_show') !== 'no') ? ' checked="checked"' : '';
putHtml('<input type="checkbox" value="tab_edit" name="tab_edit"'.$sel.' /></td><td colspan="5">Show Edit Tab</td></tr>');
+ putHtml('<tr class="dtrow1"><td style="text-align: right;">');
+ $sel = (getPREFdef($global_prefs, 'tab_staff_disable_staff') !== 'yes') ? ' checked="checked"' : '';
+ putHtml('<input type="checkbox" value="tab_staff" name="tab_staff"'.$sel.' /></td><td colspan="5">Show Staff Tab for "staff" user</td></tr>');
+
putHtml('</table>');
putHtml('</form>');
putHtml('</center></td></tr></table>');
Added: branches/0.7/package/webinterface/altweb/admin/shutdown.php
===================================================================
--- branches/0.7/package/webinterface/altweb/admin/shutdown.php (rev 0)
+++ branches/0.7/package/webinterface/altweb/admin/shutdown.php 2009-12-14 01:27:55 UTC (rev 3556)
@@ -0,0 +1,88 @@
+<?php
+
+// Copyright (C) 2008-2010 Lonnie Abelbeck
+// This is free software, licensed under the GNU General Public License
+// version 3 as published by the Free Software Foundation; you can
+// redistribute it and/or modify it under the terms of the GNU
+// General Public License; and comes with ABSOLUTELY NO WARRANTY.
+
+// shutdown.php for AstLinux
+// 12-12-2009
+//
+
+$myself = $_SERVER['PHP_SELF'];
+
+require_once '../common/functions.php';
+
+if ($_SERVER['REQUEST_METHOD'] === 'POST') {
+ $result = 1;
+ if (! $global_staff) {
+ $result = 999;
+ } elseif (isset($_POST['submit_shutdown'])) {
+ $result = 99;
+ if (isset($_POST['confirm_shutdown'])) {
+ systemSHUTDOWN($myself, 10);
+ } else {
+ $result = 7;
+ }
+ }
+ header('Location: '.$myself.'?result='.$result);
+ exit;
+} else { // Start of HTTP GET
+require_once '../common/header.php';
+
+ putHtml('<center>');
+ if (isset($_GET['result'])) {
+ $result = $_GET['result'];
+ if ($result == 0) {
+ putHtml('<p style="color: green;">Action Successful.</p>');
+ } elseif ($result == 7) {
+ putHtml('<p style="color: red;">No Action, check "Confirm" for this action.</p>');
+ } elseif ($result == 10) {
+ putHtml('<p style="color: green;">System is Shutting Down, safe to unplug in <span id="count_down"><script language="JavaScript" type="text/javascript">document.write(count_down_secs);</script></span> seconds.</p>');
+ } elseif ($result == 99) {
+ putHtml('<p style="color: red;">Action Failed.</p>');
+ } elseif ($result == 999) {
+ putHtml('<p style="color: red;">Permission denied for user "'.$global_user.'".</p>');
+ } else {
+ putHtml('<p> </p>');
+ }
+ } else {
+ putHtml('<p> </p>');
+ }
+ putHtml('</center>');
+?>
+ <center>
+ <table class="layout"><tr><td><center>
+ <form method="post" action="<?php echo $myself;?>">
+ <table width="100%" class="stdtable">
+ <tr><td style="text-align: center;" colspan="3">
+ <h2>System Shutdown/Halt:</h2>
+ </td></tr>
+ </table>
+<?php
+ putHtml('<table class="stdtable">');
+ putHtml('<tr><td class="dialogText" style="color: red; text-align: center;">');
+ putHtml('WARNING: "Shutdown" will stop this computer.<br />');
+ putHtml('Disconnecting and reconnecting the power is required to restart.<br />');
+ putHtml('Make sure you have physical access to this computer before continuing.<br />');
+ putHtml('</td></tr>');
+ putHtml('<tr><td class="dialogText" style="color: red; text-align: center;">');
+ putHtml('WARNUNG: "Shutdown" wird diesen Computer herunterfahren.<br />');
+ putHtml('Um neu zu starten, ist es erforderlich, die Stromversorgung zu Trennen und Wiederherzustellen.<br />');
+ putHtml('Stellen Sie sicher, daß Sie physikalischen Zugang zu diesem Computer haben, bevor Sie fortfahren.<br />');
+ putHtml('</td></tr>');
+ putHtml('<tr><td class="dialogText" style="text-align: center;">');
+ putHtml('<input type="submit" value="Shutdown" name="submit_shutdown" />');
+ putHtml('–');
+ putHtml('<input type="checkbox" value="shutdown" name="confirm_shutdown" /> Confirm');
+ putHtml('</td></tr>');
+ putHtml('</table>');
+
+ putHtml("</form>");
+ putHtml("</center></td></tr></table>");
+ putHtml("</center>");
+} // End of HTTP GET
+require_once '../common/footer.php';
+
+?>
Property changes on: branches/0.7/package/webinterface/altweb/admin/shutdown.php
___________________________________________________________________
Added: svn:executable
+ *
Added: branches/0.7/package/webinterface/altweb/admin/staff.php
===================================================================
--- branches/0.7/package/webinterface/altweb/admin/staff.php (rev 0)
+++ branches/0.7/package/webinterface/altweb/admin/staff.php 2009-12-14 01:27:55 UTC (rev 3556)
@@ -0,0 +1,216 @@
+<?php
+
+// Copyright (C) 2008-2010 Lonnie Abelbeck
+// This is free software, licensed under the GNU General Public License
+// version 3 as published by the Free Software Foundation; you can
+// redistribute it and/or modify it under the terms of the GNU
+// General Public License; and comes with ABSOLUTELY NO WARRANTY.
+
+// staff.php for AstLinux
+// 12-12-2009
+//
+// System location of webgui-staff-backup.conf
+$CONFFILE = '/mnt/kd/webgui-staff-backup.conf';
+// System location of webgui-staff-backup.log
+$LOGFILE = '/mnt/kd/webgui-staff-backup.log';
+
+$myself = $_SERVER['PHP_SELF'];
+
+require_once '../common/functions.php';
+
+// Function: isDownloadValid
+//
+function isDownloadValid($fname) {
+
+ if (! is_file($fname)) {
+ return(FALSE);
+ }
+
+ $len = filesize($fname);
+ if ($len === FALSE || $len < 6 || $len > 512) {
+ return(FALSE);
+ }
+
+ return(TRUE);
+}
+
+if ($_SERVER['REQUEST_METHOD'] === 'POST') {
+ $result = 1;
+ if (! $global_staff) {
+ $result = 999;
+ } elseif (isset($_POST['submit_backup'])) {
+ $backup_type = $_POST['backup_type'];
+ if (getPREFdef($global_prefs, 'system_backup_compress_gzip') === 'no') {
+ $suffix = '.tar';
+ $tarcmd = 'tar cf ';
+ } else {
+ $suffix = '.tar.gz';
+ $tarcmd = 'tar czf ';
+ }
+ $asturw = (getPREFdef($global_prefs, 'system_backup_asturw') === 'yes') ? '/mnt/kd/asturw'.$suffix : '';
+ $prefix = '/mnt/kd/.';
+ $tmpfile = $_SERVER['SERVER_NAME'].'-'.$backup_type.'-'.date('Y-m-d').$suffix;
+ $srcfile = '$(ls -1 /mnt/kd/)';
+ if ($asturw !== '') {
+ @system($tarcmd.$asturw.' $(ls -1 /oldroot/mnt/asturw/ | sed -e "s/^mnt$//") -C /oldroot/mnt/asturw >/dev/null 2>/dev/null', $status);
+ if ($status != 0) {
+ @unlink($asturw);
+ $result = 15;
+ header('Location: '.$myself.'?result='.$result);
+ exit;
+ }
+ }
+ @system($tarcmd.$prefix.$tmpfile.' '.$srcfile.' -C /mnt/kd >/dev/null 2>/dev/null', $status);
+ if ($asturw !== '') {
+ @unlink($asturw);
+ }
+ if ($status != 0) {
+ @unlink($prefix.$tmpfile);
+ $result = 5;
+ } else {
+ $aesfile = $tmpfile.'.aes';
+ @system('openssl enc -aes-256-cbc -salt -in '.$prefix.$tmpfile.' -out '.$prefix.$aesfile.' -pass file:'.$CONFFILE.' >/dev/null 2>/dev/null', $status);
+ @unlink($prefix.$tmpfile);
+ if ($status != 0) {
+ @unlink($prefix.$aesfile);
+ $result = 5;
+ } else {
+ $aessize = filesize($prefix.$aesfile);
+ header('Content-Type: application/octet-stream');
+ header('Content-Disposition: attachment; filename="'.$aesfile.'"');
+ header('Content-Transfer-Encoding: binary');
+ header('Content-Length: '.$aessize);
+ ob_clean();
+ flush();
+ @readfile($prefix.$aesfile);
+ @unlink($prefix.$aesfile);
+ syslog(LOG_WARNING, '"Staff user" configuration backup generated: '.$aesfile.' Remote Address: '.$_SERVER['REMOTE_ADDR']);
+ $mesg = date('Y-m-d H:i:s');
+ $mesg .= ' File: '.$aesfile;
+ $mesg .= ' Remote Address: '.$_SERVER['REMOTE_ADDR'];
+ $mesg .= ' AES-256-CBC-Password:';
+ // Use system call so password is not revealed withing PHP
+ @system('echo \''.$mesg.'\' "$(cat '.$CONFFILE.')" >>'.$LOGFILE.' 2>/dev/null', $status);
+ chmod($LOGFILE, 0600);
+ chmod($CONFFILE, 0600);
+ exit;
+ }
+ }
+ } elseif (isset($_POST['submit_reboot'])) {
+ $result = 99;
+ $delay = (int)$_POST['reboot_delay'];
+ if (isset($_POST['confirm_reboot'])) {
+ if ($delay == 0) {
+ systemREBOOT($myself, 10);
+ } else {
+ if (scheduleREBOOT($delay)) {
+ $result = ($delay > 0) ? 40 : 41;
+ } else if ($delay < 0) {
+ $result = 1;
+ }
+ }
+ } else {
+ $result = 7;
+ header('Location: '.$myself.'?reboot_delay='.$delay.'&result='.$result);
+ exit;
+ }
+ } elseif (isset($_POST['submit_shutdown'])) {
+ $result = 99;
+ if (isset($_POST['confirm_shutdown'])) {
+ header('Location: /admin/shutdown.php');
+ exit;
+ } else {
+ $result = 7;
+ }
+ }
+ header('Location: '.$myself.'?result='.$result);
+ exit;
+} else { // Start of HTTP GET
+require_once '../common/header.php';
+
+ if (isset($_GET['reboot_delay'])) {
+ $reboot_delay = $_GET['reboot_delay'];
+ } else {
+ $reboot_delay = '0';
+ }
+
+ putHtml("<center>");
+ if (isset($_GET['result'])) {
+ $result = $_GET['result'];
+ if ($result == 5) {
+ putHtml('<p style="color: red;">Backup Failed.</p>');
+ } elseif ($result == 7) {
+ putHtml('<p style="color: red;">No Action, check "Confirm" for this action.</p>');
+ } elseif ($result == 10) {
+ putHtml('<p style="color: green;">System is Rebooting... back in <span id="count_down"><script language="JavaScript" type="text/javascript">document.write(count_down_secs);</script></span> seconds.</p>');
+ } elseif ($result == 15) {
+ putHtml('<p style="color: red;">Backup Failed, error archiving unionfs partition.</p>');
+ } elseif ($result == 40) {
+ putHtml('<p style="color: green;">Reboot Scheduled within 24 hours.</p>');
+ } elseif ($result == 41) {
+ putHtml('<p style="color: green;">Scheduled Reboot Canceled.</p>');
+ } elseif ($result == 99) {
+ putHtml('<p style="color: red;">Action Failed.</p>');
+ } elseif ($result == 999) {
+ putHtml('<p style="color: red;">Permission denied for user "'.$global_user.'".</p>');
+ } else {
+ putHtml('<p style="color: orange;">No Action.</p>');
+ }
+ } else {
+ putHtml('<p> </p>');
+ }
+ putHtml("</center>");
+?>
+ <center>
+ <table class="layout"><tr><td><center>
+ <form method="post" action="<?php echo $myself;?>">
+ <table width="100%" class="stdtable">
+<?php
+if (isDownloadValid($CONFFILE)) {
+ putHtml('<tr><td style="text-align: center;">');
+ putHtml('<h2>Configuration/File Backup:</h2>');
+ putHtml('</td></tr><tr><td class="dialogText" style="text-align: center;">');
+ putHtml('<strong>OpenSSL Encryption:</strong> AES-256-CBC');
+ putHtml('</td></tr><tr><td style="text-align: center;">');
+ putHtml('<select name="backup_type">');
+ $sel = (getPREFdef($global_prefs, 'system_backup_asturw') === 'yes') ? '& unionfs ' : '';
+ putHtml('<option value="full">All /mnt/kd/ '.$sel.'files</option>');
+ putHtml('</select>');
+ putHtml('</td></tr><tr><td style="text-align: center;">');
+ putHtml('<input type="submit" value="Download Backup" name="submit_backup" />');
+ putHtml('</td></tr>');
+}
+
+ putHtml('<tr><td style="text-align: center;">');
+ putHtml('<h2>Reboot/Restart System:</h2>');
+ putHtml('</td></tr><tr><td class="dialogText" style="text-align: center;">');
+ putHtml('<select name="reboot_delay">');
+ $reboot_delay_menu = getRebootDelayMenu();
+ foreach ($reboot_delay_menu as $key => $value) {
+ $sel = ($reboot_delay == $value) ? ' selected="selected"' : '';
+ putHtml('<option value="'.$value.'"'.$sel.'>'.$key.'</option>');
+ }
+ putHtml('</select>');
+ putHtml('–');
+ putHtml('<input type="submit" value="Reboot" name="submit_reboot" />');
+ putHtml('–');
+ putHtml('<input type="checkbox" value="reboot" name="confirm_reboot" /> Confirm');
+ putHtml('</td></tr>');
+
+ putHtml('<tr><td style="text-align: center;">');
+ putHtml('<h2>System Shutdown/Halt:</h2>');
+ putHtml('</td></tr><tr><td class="dialogText" style="text-align: center;">');
+ putHtml('<input type="submit" value="Shutdown" name="submit_shutdown" />');
+ putHtml('–');
+ putHtml('<input type="checkbox" value="shutdown" name="confirm_shutdown" /> Confirm');
+ putHtml('</td></tr>');
+
+ putHtml('</table>');
+ putHtml('</form>');
+
+ putHtml("</center></td></tr></table>");
+ putHtml("</center>");
+} // End of HTTP GET
+require_once '../common/footer.php';
+
+?>
Property changes on: branches/0.7/package/webinterface/altweb/admin/staff.php
___________________________________________________________________
Added: svn:executable
+ *
Modified: branches/0.7/package/webinterface/altweb/admin/system.php
===================================================================
--- branches/0.7/package/webinterface/altweb/admin/system.php 2009-12-14 01:27:00 UTC (rev 3555)
+++ branches/0.7/package/webinterface/altweb/admin/system.php 2009-12-14 01:27:55 UTC (rev 3556)
@@ -1,6 +1,6 @@
<?php
-// Copyright (C) 2008-2009 Lonnie Abelbeck
+// Copyright (C) 2008-2010 Lonnie Abelbeck
// This is free software, licensed under the GNU General Public License
// version 3 as published by the Free Software Foundation; you can
// redistribute it and/or modify it under the terms of the GNU
@@ -14,6 +14,7 @@
// 08-09-2008, Added multiple backup sets
// 09-20-2008, Added firmware check, upgrade, show, revert
// 04-25-2009, Added Restore Basic Configuration
+// 12-12-2009, Added System Shutdown/Halt
//
// System location of rc.conf file
$CONFFILE = '/etc/rc.conf';
@@ -98,23 +99,6 @@
return(30);
}
-// Function: getRebootDelayMenu
-//
-function getRebootDelayMenu() {
- $start = (int)date('G');
- $start = ($start % 2 == 0) ? $start + 1 : $start + 2;
-
- $menuitems['Now'] = 0;
- for ($i = 0; $i < 24; $i += 2) {
- $key = str_pad(($start % 24), 2, '0', STR_PAD_LEFT).':00';
- $menuitems[$key] = $start;
- $start += 2;
- }
- $menuitems['Cancel'] = -1;
-
- return($menuitems);
-}
-
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$result = 1;
if (! $global_admin) {
@@ -239,6 +223,14 @@
header('Location: '.$myself.'?reboot_delay='.$delay.'&result='.$result);
exit;
}
+ } elseif (isset($_POST['submit_shutdown'])) {
+ $result = 99;
+ if (isset($_POST['confirm_shutdown'])) {
+ header('Location: /admin/shutdown.php');
+ exit;
+ } else {
+ $result = 7;
+ }
} elseif (isset($_POST['firmware_submit'])) {
$result = 99;
$action = $_POST['firmware_action'];
@@ -426,6 +418,9 @@
if (is_file($file = '/var/log/openvpn.log')) {
putHtml('<option value="'.$file.'">OpenVPN Server log</option>');
}
+ if (is_file($file = '/mnt/kd/webgui-staff-backup.log')) {
+ putHtml('<option value="'.$file.'">Staff Backup log</option>');
+ }
if (is_file($file = '/var/log/openvpnclient.log')) {
putHtml('<option value="'.$file.'">OpenVPN Client log</option>');
}
@@ -534,6 +529,14 @@
putHtml('</td></tr><tr><td class="dialogText" style="text-align: center;" colspan="2">');
putHtml('<strong>Repository URL:</strong> '.$REPOSITORY_URL);
putHtml('</td></tr>');
+
+ putHtml('<tr><td style="text-align: center;" colspan="2">');
+ putHtml('<h2>System Shutdown/Halt:</h2>');
+ putHtml('</td></tr><tr><td class="dialogText" style="text-align: center;" colspan="2">');
+ putHtml('<input type="submit" value="Shutdown" name="submit_shutdown" />');
+ putHtml('–');
+ putHtml('<input type="checkbox" value="shutdown" name="confirm_shutdown" /> Confirm');
+ putHtml('</td></tr>');
putHtml('</table>');
putHtml('</form>');
Modified: branches/0.7/package/webinterface/altweb/common/footer.php
===================================================================
--- branches/0.7/package/webinterface/altweb/common/footer.php 2009-12-14 01:27:00 UTC (rev 3555)
+++ branches/0.7/package/webinterface/altweb/common/footer.php 2009-12-14 01:27:55 UTC (rev 3556)
@@ -10,5 +10,5 @@
// 03-25-2008
?>
-</body>
-</html>
+</body>
+</html>
Modified: branches/0.7/package/webinterface/altweb/common/functions.php
===================================================================
--- branches/0.7/package/webinterface/altweb/common/functions.php 2009-12-14 01:27:00 UTC (rev 3555)
+++ branches/0.7/package/webinterface/altweb/common/functions.php 2009-12-14 01:27:55 UTC (rev 3556)
@@ -1,6 +1,6 @@
<?php
-// Copyright (C) 2008-2009 Lonnie Abelbeck
+// Copyright (C) 2008-2010 Lonnie Abelbeck
// This is free software, licensed under the GNU General Public License
// version 3 as published by the Free Software Foundation; you can
// redistribute it and/or modify it under the terms of the GNU
@@ -14,6 +14,7 @@
// 04-10-2008, Added getTITLEname()
// 08-20-2008, Added asteriskCMD()
// 09-06-2008, Added restartPROCESS()
+// 12-12-2009, Added systemSHUTDOWN()
//
// System location of prefs file
$KD_PREFS_LOCATION = '/mnt/kd/webgui-prefs.txt';
@@ -74,6 +75,18 @@
return($result);
}
+// Function: systemSHUTDOWN
+//
+function systemSHUTDOWN($myself, $result) {
+ $count_down_secs = 40;
+
+ @system('/sbin/poweroff -d4 >/dev/null 2>/dev/null &', $status);
+ if ($status == 0) {
+ header('Location: '.$myself.'?count_down_secs='.$count_down_secs.'&shutdown&result='.$result);
+ exit;
+ }
+}
+
// Function: systemREBOOT
//
function systemREBOOT($myself, $result, $setup = FALSE) {
@@ -517,6 +530,23 @@
return($status);
}
+// Function: getRebootDelayMenu
+//
+function getRebootDelayMenu() {
+ $start = (int)date('G');
+ $start = ($start % 2 == 0) ? $start + 1 : $start + 2;
+
+ $menuitems['Now'] = 0;
+ for ($i = 0; $i < 24; $i += 2) {
+ $key = str_pad(($start % 24), 2, '0', STR_PAD_LEFT).':00';
+ $menuitems[$key] = $start;
+ $start += 2;
+ }
+ $menuitems['Cancel'] = -1;
+
+ return($menuitems);
+}
+
// Function: getPREFdef
//
function getPREFdef($db, $var)
@@ -639,4 +669,5 @@
$global_staff_disable_voicemail = ($global_user === 'staff' && (getPREFdef($global_prefs, 'tab_voicemail_disable_staff') === 'yes'));
$global_staff_disable_monitor = ($global_user === 'staff' && (getPREFdef($global_prefs, 'tab_monitor_disable_staff') === 'yes'));
$global_staff_disable_followme = ($global_user === 'staff' && (getPREFdef($global_prefs, 'tab_followme_disable_staff') === 'yes'));
+$global_staff_disable_staff = ($global_user === 'staff' && (getPREFdef($global_prefs, 'tab_staff_disable_staff') === 'yes'));
?>
Modified: branches/0.7/package/webinterface/altweb/common/header.php
===================================================================
--- branches/0.7/package/webinterface/altweb/common/header.php 2009-12-14 01:27:00 UTC (rev 3555)
+++ branches/0.7/package/webinterface/altweb/common/header.php 2009-12-14 01:27:55 UTC (rev 3556)
@@ -80,6 +80,9 @@
putHtml('clearInterval(timer);');
if (isset($_GET['setup'])) {
putHtml('top.location.href="/admin/setup.php";');
+ } elseif (isset($_GET['shutdown'])) {
+ putHtml('alert(\'Shutdown is complete.\');');
+ putHtml('top.location.href="about:blank";');
} else {
putHtml('top.location.href="'.$status.'";');
}
@@ -147,6 +150,8 @@
}
if ($global_admin) {
putHtml('<li><a href="/admin/system.php"><span>System</span></a></li>');
+ } elseif ($global_user === 'staff' && (! $global_staff_disable_staff)) {
+ putHtml('<li><a href="/admin/staff.php"><span>Staff</span></a></li>');
}
}
putHtml('</ul>');
@@ -175,7 +180,9 @@
$tabname === 'whitelist' ||
$tabname === 'actionlist' ||
$tabname === 'view' ||
- $tabname === 'users')) {
+ $tabname === 'shutdown' ||
+ $tabname === 'users' ||
+ ($tabname === 'staff' && (! $global_staff_disable_staff)) )) {
putUSERerror($global_user, $tabname);
exit;
}
Modified: branches/0.7/package/webinterface/altweb/common/version.php
===================================================================
--- branches/0.7/package/webinterface/altweb/common/version.php 2009-12-14 01:27:00 UTC (rev 3555)
+++ branches/0.7/package/webinterface/altweb/common/version.php 2009-12-14 01:27:55 UTC (rev 3556)
@@ -1,6 +1,6 @@
<?php
// version.php for AstLinux Alternate Web Interface
-$GUI_VERSION = '1.6.04';
+$GUI_VERSION = '1.6.05';
?>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|