private function markFaxPrinted() { PHPWS_Core::initModClass('faxmaster', 'Fax.php'); PHPWS_Core::initModClass('faxmaster', 'FaxPager.php'); if (!Current_User::allow('faxmaster', 'markPrinted')) { PHPWS_Core::initModClass('faxmaster', 'exception/PermissionException.php'); throw new PermissionException('Permission denied'); } $fax = new Fax($_REQUEST['id']); $fax->markAsPrinted(); echo $fax->getId(); exit; }