<?php
/*
* @author Bulent Tezcan. bulent@greenpepper.ca
*/
require_once "Security.class.php";
require_once "WriteLog.class.php";
session_start();
$WriteLog = new WriteLog();
$mySecurity = new Security( );
#
# This should be added in every script. Ofcourse the action name
# will be different for each script.
#
if ($mySecurity-> isNotAllowedTo('View Log'))
{
if ($mySecurity-> isAllowedTo('Show Admin Menu'))
$mySecurity-> GotoThisPage( "adminmenu.php" );
else
$mySecurity-> GotoThisPage( "login.php" );
}
ob_start( );
include "header.inc.php";
$FormElements = array_merge($_POST['form_selectlogdate'],$_POST['form_loglist']);
if ($FormElements['B_cancel'])
{
$mySecurity-> GotoThisPage( "adminmenu.php" );
}
if ($FormElements['beginTime'])
$_GET['beginTime'] = $FormElements['beginTime'];
if ($_GET['beginTime'] and !$FormElements['beginTime'])
$FormElements['beginTime'] = $_GET['beginTime'];
if ($FormElements['endTime'])
$_GET['endTime'] = $FormElements['endTime'];
if ($_GET['endTime'] and !$FormElements['endTime'])
$FormElements['endTime'] = $_GET['endTime'];
if ($FormElements['endTime'] and $FormElements['endTime'] < $FormElements['beginTime'])
{
$WriteLog-> SetErrorMessage('Please make sure, end time is greater then begin time.');
}
echo $WriteLog->SendSelectLogDate($FormElements);
if ($FormElements['beginTime'])
$WriteLog->ListLog($FormElements['beginTime'],$FormElements['endTime']);
include "donate.inc.php";
include "footer.inc.php";
ob_end_flush( );
return true;
?>
|