<?php
 include("_config/addCfg.php"); include("_includes/addInc.php"); $idReport=$R['idReport']; $idUser=$S['auth']['idUser']; if (!$idReport or !$idUser) exit; $reportsGenListSQL="SELECT id, status, viewed, startTime FROM `$DBTReportsGenerating` WHERE idReport='".$idReport."' AND idUser='".$idUser."' ORDER BY id DESC"; $reportsGenList=$db->GetAll($reportsGenListSQL); if (!is_array($reportsGenList)) { writeLog("Could not get active reports list. SQL: ".$reportsGenListSQL, 'events', 10); } $smarty->assign('idReport', $idReport); $smarty->assign('reportsGenList', $reportsGenList); $smarty->display('viewReportsList.tpl'); ?>