Skip to content

Commit

Permalink
added Logging to adminaliasaddsubmit.php
Browse files Browse the repository at this point in the history
  • Loading branch information
Administrator committed Feb 17, 2014
1 parent 88f21ca commit 54b5d18
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion vexim/adminaliasaddsubmit.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
include_once dirname(__FILE__) . '/config/authpostmaster.php';
include_once dirname(__FILE__) . '/config/functions.php';
include_once dirname(__FILE__) . '/config/httpheaders.php';
include_once dirname(__FILE__) . 'Logging.php';

// Logging class initialization
$log = new Logging();

// set path and name of log file (optional)
$log->lfile('/tmp/mylog.txt');


# Fix the boolean values
if (isset($_POST['admin'])) {
Expand Down Expand Up @@ -81,12 +89,15 @@
));

if ($success) {
$log->lwrite($_SESSION['localpart'] . " ". $_SESSION['domain']." ".$_SESSION['user_id']." ".$_SERVER['REMOTE_ADDR']." added user "$_POST['localpart'] . '@' . $_SESSION['domain']. " " .$_POST['realname']);
header ("Location: adminalias.php?added={$_POST['localpart']}");
} else {
header ("Location: adminalias.php?failadded={$_POST['localpart']}");
}
} else {
header ("Location: adminalias.php?badaliaspass={$_POST['localpart']}");
}
}
// close log file
$log->lclose();
?>
<!-- Layout and CSS tricks obtained from http://www.bluerobot.com/web/layouts/ -->

0 comments on commit 54b5d18

Please sign in to comment.