示例#1
0
 function preDisplay()
 {
     parent::preDisplay();
     $this->print_header = false;
     $this->print_footer = false;
     $this->_initSmartyInstance();
 }
示例#2
0
 function preDisplay()
 {
     global $app_list_strings, $locale, $timedate;
     parent::preDisplay();
     //Set landscape orientation
     $this->setPageFormat(PDF_PAGE_FORMAT, "L");
     $this->SetFont(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN);
     //Set PDF document properties
     if ($this->bean->name == "untitled") {
         $this->SetHeaderData(PDF_SMALL_HEADER_LOGO, PDF_SMALL_HEADER_LOGO_WIDTH, $app_list_strings['moduleList'][$this->bean->module], $timedate->getNow(true));
     } else {
         $this->SetHeaderData(PDF_SMALL_HEADER_LOGO, PDF_SMALL_HEADER_LOGO_WIDTH, $this->bean->name, $timedate->getNow(true));
     }
     $cols = count($this->bean->report_def['display_columns']);
 }
 function preDisplay()
 {
     global $mod_strings, $timedate;
     parent::preDisplay();
     $this->_initOptions();
     //Force landscape orientation
     $this->setPageFormat(PDF_PAGE_FORMAT, "L");
     // Header
     $grid[0]['TITLE'] = $mod_strings['LBL_PDF_PROJECT_NAME'];
     $grid[1]['TITLE'] = $mod_strings['LBL_DATE_START'];
     $grid[2]['TITLE'] = $mod_strings['LBL_DATE_END'];
     $grid[3]['TITLE'] = $mod_strings['LBL_LIST_FILTER_VIEW'];
     $grid[4]['TITLE'] = $mod_strings['LBL_DATE'];
     $grid[0]['VALUE']['value'] = $_REQUEST['project_name'];
     $grid[1]['VALUE']['value'] = $_REQUEST['project_start'];
     $grid[2]['VALUE']['value'] = $_REQUEST['project_end'];
     if ($_REQUEST['selected_view'] == '0' || $_REQUEST['selected_view'] == '1') {
         $grid[3]['VALUE']['value'] = $mod_strings['LBL_FILTER_ALL_TASKS'];
     } else {
         if ($_REQUEST['selected_view'] == '2') {
             $grid[3]['VALUE']['value'] = $mod_strings['LBL_FILTER_COMPLETED_TASKS'];
         }
     }
     if ($_REQUEST['selected_view'] == '3') {
         $grid[3]['VALUE']['value'] = $mod_strings['LBL_FILTER_INCOMPLETE_TASKS'];
     }
     if ($_REQUEST['selected_view'] == '4') {
         $grid[3]['VALUE']['value'] = $mod_strings['LBL_FILTER_MILESTONES'];
     }
     if ($_REQUEST['selected_view'] == '5') {
         $grid[3]['VALUE']['value'] = $mod_strings['LBL_FILTER_RESOURCE'] . " " . $_REQUEST['view_filter_resource'];
     }
     if ($_REQUEST['selected_view'] == '6') {
         $grid[3]['VALUE']['value'] = $mod_strings['LBL_FILTER_DATE_RANGE_START'] . " " . $_REQUEST['view_filter_date_start'] . " " . $mod_strings['LBL_FILTER_DATE_RANGE_FINISH'] . " " . $_REQUEST['view_filter_date_finish'];
     }
     if ($_REQUEST['selected_view'] == '7') {
         $grid[3]['VALUE']['value'] = $mod_strings['LBL_LIST_OVERDUE_TASKS'] . " " . $_REQUEST['view_filter_resource'];
     }
     if ($_REQUEST['selected_view'] == '8') {
         $grid[3]['VALUE']['value'] = $mod_strings['LBL_LIST_UPCOMING_TASKS'] . " " . $_REQUEST['view_filter_resource'];
     }
     if ($_REQUEST['selected_view'] == '9') {
         $grid[3]['VALUE']['value'] = $mod_strings['LBL_FILTER_MY_TASKS'] . " " . $_REQUEST['view_filter_resource'];
     }
     if ($_REQUEST['selected_view'] == '10') {
         $grid[3]['VALUE']['value'] = $mod_strings['LBL_FILTER_MY_OVERDUE_TASKS'] . " " . $_REQUEST['view_filter_resource'];
     }
     if ($_REQUEST['selected_view'] == '11') {
         $grid[3]['VALUE']['value'] = $mod_strings['LBL_FILTER_MY_UPCOMING_TASKS'] . " " . $_REQUEST['view_filter_resource'];
     }
     $grid[4]['VALUE']['value'] = date("m/d/Y", time());
     // these options override the params of the $options array.
     // Because we don't want a background for the 2nd column we have to set ['options'] and redeclare the width.
     $grid[0]['VALUE']['options'] = array("width" => $this->headerOptions['width']['VALUE']);
     $grid[1]['VALUE']['options'] = array("width" => $this->headerOptions['width']['VALUE']);
     $grid[2]['VALUE']['options'] = array("width" => $this->headerOptions['width']['VALUE']);
     $grid[3]['VALUE']['options'] = array("width" => $this->headerOptions['width']['VALUE']);
     $grid[4]['VALUE']['options'] = array("width" => $this->headerOptions['width']['VALUE']);
     $html = $this->writeHTMLTable($grid, true, $this->headerOptions);
     $this->SetHeaderData(PDF_SMALL_HEADER_LOGO, PDF_SMALL_HEADER_LOGO_WIDTH, "", $html);
 }