public function __construct($id) { $this->db = new DBService(); $result = $this->db->query("SELECT reportName, reportDatabaseName FROM Report WHERE reportID = '{$id}' LIMIT 1")->fetchRow(MYSQLI_ASSOC); $this->id = $id; $this->name = $result['reportName']; $this->dbname = $result['reportDatabaseName']; ReportNotes::init($this->dbname); if (isset($_REQUEST['titleID']) && $_REQUEST['titleID'] !== null && $_REQUEST['titleID'] !== '') { $this->titleID = $_REQUEST['titleID']; FormInputs::addVisible('titleID', $this->titleID); } if (isset($_REQUEST['sortColumn'])) { $this->sortData['column'] = $_REQUEST['sortColumn']; } if (isset($_REQUEST['sortOrder'])) { $this->sortData['order'] = $_REQUEST['sortOrder']; } FormInputs::addVisible('reportID', $this->id); FormInputs::addHidden('useHidden', 1); FormInputs::addHidden('sortColumn', $this->sortData['column']); FormInputs::addHidden('sortOrder', $this->sortData['order']); Config::init(); if (Config::$settings->baseURL) { if (strpos(Config::$settings->baseURL, '?') > 0) { $this->baseURL = Config::$settings->baseURL . '&'; } else { $this->baseURL = Config::$settings->baseURL . '?'; } } }
public function process() { if ($this->value !== null && trim("{$this->value}") !== '') { $this->value = strtoupper($this->value); Parameter::$report->addWhere[$this->addWhereNum] .= " AND " . preg_replace('/PARM/', $this->value, $this->addWhereClause); FormInputs::addVisible("prm_{$this->id}", $this->value); Parameter::$display .= $this->description(); } }
public function process() { if ($this->value !== null) { Parameter::$report->addWhere[0] = ''; // changed from $add_where. Assumed mistake. ReportTable::$maxRows = $this->value; FormInputs::addVisible("prm_{$this->id}", $this->value); Parameter::$display .= $this->description(); } }
public function process() { if ($this->value !== null) { Parameter::$report->addWhere[$this->addWhereNum] .= " AND {$this->addWhereClause}"; Parameter::$report->applyDateRange($this->value); FormInputs::addVisible("prm_{$this->id}", $this->encode($this->value)); $this->value = $this->value['m0'] . '/' . $this->value['y0'] . '-' . $this->value['m1'] . '/' . $this->value['y1']; Parameter::$display .= $this->description(); } }
public function process() { if ($this->value === 'on' || $this->value === 'Y') { FormInputs::addVisible("prm_{$this->id}", 'Y'); Parameter::$display .= $this->description(); if ($flag = $this->flagName()) { Parameter::$report->{$flag} = true; } } }
public function process() { if ($this->value !== null) { Parameter::$report->addWhere[$this->addWhereNum] .= " AND " . preg_replace('/PARM/', $this->value, $this->addWhereClause); FormInputs::addVisible("prm_{$this->id}", $this->value); Parameter::$display .= $this->description(); } else { if (!$this->requiredInd) { Parameter::$display .= "<b>{$this->prompt}:</b> all<br/>"; } } }
header("Content-Type: application/force-download"); header("Content-Type: application/octet-stream"); header("Content-Type: application/download"); header("Content-Transfer-Encoding: binary"); header("Content-type: application/vnd.ms-excel;"); header("Content-Disposition: attachment; filename='" . strtr($report->name, ' ', '_') . "'"); echo "<html><head></head><body>"; } } /////////////////////////////////////header (end)////////////////// echo "<center>\n <table class='noborder' style='width: 780px;'>\n <tr>\n <td class='noborder' align=center colspan='2'>\n <table class='noborder' style='text-align: left;'>"; ////////////////////logo/splash and param list (start)////////////////// echo "<tr>"; if ($outputType === 'web') { echo "<td class='head report-head-img-box' align=left valign='top'><a href='index.php'><img class='report-head-img' src='images/transparent.gif' alt=''/></a></td>\n <td class='noborder report-head-info-box' align=left valign='bottom'>\n <table class='noborder'>\n <tr valign='bottom'>\n <td class='head' style='padding: 5px; vertical-align: bottom;'>\n <form name='viewreport' method='post' action='report.php", FormInputs::getVisible(), "'>", FormInputs::getHidden(); echo "<font size='+1'>", $report->name, "</font> <a href=\"javascript:showPopup('report','", $report->id, "');\"\n title='Click to show information about this report'\n style='border: none'><img src='images/help.gif'\n style='border: none' alt='help'/></a><br/>", Parameter::$display, "<a href=\"index.php", FormInputs::getVisible(), "\">Modify Parameters</a> <a href='index.php'>Create New Report</a> <br/>"; $html = array('xls', 'print'); for ($i = 0; $i < 2; $i++) { echo "<a href=\"javascript:viewReportOutput('{$html[$i]}');\"\n style=\"border: none\"><img border='0'\n src=\"images/", $html[$i], $i ? 'er' : '', ".gif\" alt='", $html[$i], $i ? 'er' : '', "'/></a> "; } echo "<br/></form></td>\n <td class='head' align=right valign='top'> </td></tr>\n </table></td>"; } else { echo "<td class='head'><font size='+1'>", $report->name, "</font><br/>", Parameter::$display, "<br/></td>"; } echo "</tr>"; ////////////////////////logo/splash and param list (end)///////////////// ///////////////////////////report tables (start)/////////////////////// $textAdd = $report->id === '1' || $report->id === '2' ? 'By Month and Resource' : ''; for ($irep = 0; $irep < 2; $irep++) { if ($irep === 1) { $textAdd = "from an Archive {$textAdd}";
<a href="javascript:showPopup('report','<?php echo $report->id; ?> ');" title='<?php echo _("Click to show information about this report"); ?> ' style='border: none'> <img src='images/help.gif' style='border: none' alt='help'/> </a> <br/> <?php echo Parameter::$display; ?> <a href="index.php<?php echo FormInputs::getVisible(); ?> "> <?php echo _("Modify Parameters"); ?> </a> <a href='index.php'> <?php echo _("Create New Report"); ?> </a> <br/> <a href="javascript:viewReportOutput('xls');" style="boarder: none"> <img boarder='0' src="images/xls.gif" alt="xls" />
public static function addHidden($name, $val) { FormInputs::validate($name, $val); FormInputs::$hidden[] = "{$name}\" value=\"{$val}"; }