sugarpdf = $_REQUEST["sugarpdf"]; else header('Location:index.php?module='.$_REQUEST['module'].'&action=DetailView&record='.$_REQUEST['record']); } function preDisplay(){ $this->sugarpdfBean = SugarpdfFactory::loadSugarpdf($this->sugarpdf, $this->module, $this->bean, $this->view_object_map); // ACL control if(!empty($this->bean) && !$this->bean->ACLAccess($this->sugarpdfBean->aclAction)){ ACLController::displayNoAccess(true); sugar_cleanup(true); } if(isset($this->errors)){ $this->sugarpdfBean->errors = $this->errors; } } function display(){ $this->sugarpdfBean->process(); $this->sugarpdfBean->Output($this->sugarpdfBean->fileName,'I'); } } ?>