<?php
 include("_config/addCfg.php"); include("_includes/addInc.php"); include("index_categoryDelete.php"); include("index_reportImport.php"); $categoriesListSQL="
	SELECT
		repCat.id, repCat.name, repCat.description,
		(SELECT COUNT(rep.id) FROM `$DBTReports` AS rep WHERE rep.idCategory=repCat.id AND !rep.deleted) AS reportsCount
	FROM `$DBTReportsCategories` AS repCat
	WHERE !repCat.deleted
	ORDER BY repCat.name ASC
"; $categoriesList=$db->GetAll($categoriesListSQL); if (!is_array($categoriesList)) { writeLog("Could not get reports categories list. SQL: ".$categoriesListSQL, 'events', 10); $showMessage['error'] = $_LANG['reports']['mng']['categoriesListNotOk']; } else { if (!count($categoriesList)) { $showMessage['info'] = $_LANG['reports']['mng']['noCategories']; } } $smarty->assign('idCurrentCategory', $S['reportsMng']['idCurrentCategory']); $smarty->assign('categoriesList', $categoriesList); $smarty->assign('pageTitle', $_LANG['reports']['mng']['pageTitle']); $smarty->assign('headerPageTitle', $_LANG['reports']['mng']['headerPageTitle']); $smarty->display("index.tpl"); ?>