Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function action_report() {
- $this->addStyle("style.css");
- $db = &$this->getDb();
- $ui = &$this->getUi();
- $pageVars = $this->getPageVars();
- $ref_arr = array("");
- $gpn_arr = array("");
- $colEntries = $this->setInitialColumns($pageVars['reportid']);
- $colHeaders = $this->setInitialValues($pageVars['reportid']); //get atktext of db column names
- $col_ind = $this->configureTable($pageVars);
- $col_ind = $this->turnOnColumns($pageVars, $col_ind, $colEntries);
- $page = $this->createPage();
- $defaultDate = $this->getDefaultDate($pageVars);
- $custReport = $this->configureReportKind($pageVars, $col_ind, $colEntries, $colHeaders);
- $startDate_att = new atkDateAttribute("startdate", "", "", 0, date("Ymd"));
- $endDate_att = new atkDateAttribute("enddate", "", "", 0, date("Ymd"));
- $selected = ($pageVars['noclosed'] != 1) ? "selected" : "";
- $status_html = '<OPTION VALUE="1" '.$selected.'>'.atktext("wo_closed_prs","inventory").'</OPTION>';
- $status_html .= '<OPTION VALUE="0" '.$selected.'>'.atktext("w_closed_prs","inventory").'</OPTION>';
- $seld[0] = ($pageVars['reportid']=="1") ? "selected" : "";
- $seld[1] = ($pageVars['reportid']=="2") ? "selected" : "";
- $seld[2] = ($pageVars['reportid']=="3") ? "selected" : "";
- $seld[3] = ($pageVars['reportid']=="4") ? "selected" : "";
- $content = $this->createHtmlTable($pageVars, $ref_arr, $gpn_arr, $startDate_att, $endDate_att, $defaultDate, $status_html, $seld, $custReport);
- $page->register_scriptcode($this->getJavascript());
- $page->addContent($ui->renderBox(array("title"=>atktext("parameters"), "content" => $content)));
- //if user is logged in, query database and place results in table
- if ($pageVars['userid'] != "") {
- $records = $this->mainDBQuery($pageVars, $col_ind, $colEntries, $colHeaders, $ref_arr, $db);
- $data = $this->formatResponseData($pageVars, $col_ind, $records, $colHeaders, $db);
- $this->createTableRenderBox($pageVars, $page, $ui, $data);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement