<?php /* * To change this license header, choose License Headers in Project Properties. * To change this templates file, choose Tools | Templates * and open the templates in the editor. */ include_once '../dataAccess/pdoDAO.php'; include_once '../../classes/json.php'; $dao = new pdoDAO(); $action = $_REQUEST['action']; switch ($action) { case "initReports": \ZP\ZP::log('Opened Reports', 'Opened Reports', $_SESSION['user']->getID(), $_SESSION['module_number']); $obj = $dao->initReports(); json::sendJsonObj($obj); break; case "getReport": $mineID = trim($_POST['mineID']); $from = trim($_POST['from']); $to = trim($_POST['to']); $indicatorID = trim($_POST['indicatorID']); $report = $dao->getReport($mineID, $from, $to, $indicatorID); json::sendJsonObj($report); break; default: break; }
<?php /* * To change this license header, choose License Headers in Project Properties. * To change this templates file, choose Tools | Templates * and open the templates in the editor. */ include_once '../dataAccess/pdoDAO.php'; include_once '../../classes/json.php'; require_once $_SERVER['DOCUMENT_ROOT'] . "/ZeitiPortal/resources/required_scripts.php"; session_start(); $dao = new pdoDAO(); $action = $_REQUEST['action']; switch ($action) { case "getReconciliation": \ZP\ZP::log('Opened Reconciliation', 'Opened Reconciliation', $_SESSION['user']->getID(), $_SESSION['module_number']); $mineID = trim($_POST['mineID']); $period = trim($_POST['period']); $report = $dao->getReconciliation($mineID, $period); json::sendJsonObj($report); break; default: break; }