$systype = $_POST['PARAM_2'];
$user = $_POST['PARAM_3'];
$comments = $_POST['PARAM_4'];
$systype = $_POST['PARAM_2'];
$user = $_POST['PARAM_3'];
$comments = $_POST['PARAM_4'];
if ($destination)
include_once($path_to_root . "/reporting/includes/excel_report.inc");
else
include_once($path_to_root . "/reporting/includes/pdf_report.inc");
if ($destination)
include_once($path_to_root . "/reporting/includes/excel_report.inc");
else
include_once($path_to_root . "/reporting/includes/pdf_report.inc");
$dec = user_price_dec();
$cols = array(0, 60, 120, 180, 240, 340, 400, 460, 520);
$dec = user_price_dec();
$cols = array(0, 60, 120, 180, 240, 340, 400, 460, 520);
$aligns = array('left', 'left', 'left', 'left', 'left', 'left', 'left', 'right');
$usr = get_user($user);
$aligns = array('left', 'left', 'left', 'left', 'left', 'left', 'left', 'right');
$usr = get_user($user);
$params = array( 0 => $comments,
1 => array('text' => _('Period'), 'from' => $from,'to' => $to),
2 => array('text' => _('Type'), 'from' => ($systype != -1 ? $systypes_array[$systype] : _('All')), 'to' => ''),
3 => array('text' => _('User'), 'from' => ($user != -1 ? $user_id : _('All')), 'to' => ''));
$params = array( 0 => $comments,
1 => array('text' => _('Period'), 'from' => $from,'to' => $to),
2 => array('text' => _('Type'), 'from' => ($systype != -1 ? $systypes_array[$systype] : _('All')), 'to' => ''),
3 => array('text' => _('User'), 'from' => ($user != -1 ? $user_id : _('All')), 'to' => ''));
- $rep = new FrontReport(_('Audit Trail'), "AuditTrail", user_pagesize());
+ $rep = new FrontReport(_('Audit Trail'), "AuditTrail", user_pagesize(), 9, $orientation);
+ if ($orientation == 'L')
+ recalculate_cols($cols);
$rep->Font();
$rep->Info($params, $cols, $headers, $aligns);
$rep->Font();
$rep->Info($params, $cols, $headers, $aligns);
$trans = getTransactions($from, $to, $systype, $user);
$trans = getTransactions($from, $to, $systype, $user);
while ($myrow=db_fetch($trans))
{
$rep->TextCol(0, 1, sql2date(date("Y-m-d", $myrow['unix_stamp'])));
while ($myrow=db_fetch($trans))
{
$rep->TextCol(0, 1, sql2date(date("Y-m-d", $myrow['unix_stamp'])));
$rep->AmountCol(7, 8, $myrow['amount'], $dec);
$rep->AmountCol(7, 8, $myrow['amount'], $dec);