Beispiel #1
0
 private function setNameId()
 {
     PHPWS_Core::initModClass('faxmaster', 'Fax.php');
     if (!Current_User::allow('faxmaster', 'editSender')) {
         PHPWS_Core::initModClass('faxmaster', 'exception/PermissionException.php');
         throw new PermissionException('Permission denied');
     }
     $fax = new Fax($_REQUEST['id']);
     if (isset($_REQUEST['firstName'])) {
         $fax->setFirstName($_REQUEST['firstName']);
     }
     if (isset($_REQUEST['lastName'])) {
         $fax->setLastName($_REQUEST['lastName']);
     }
     if (isset($_REQUEST['bannerId'])) {
         $fax->setBannerId($_REQUEST['bannerId']);
     }
     echo $fax->save();
     //get username, timestamp, activity, and fax id
     $name = Current_User::getUsername();
     $timestamp = time();
     $activity = "changed name or banner id";
     $faxName = $fax->getFileName();
     PHPWS_Core::initModClass('faxmaster', 'ActionLog.php');
     $action = new ActionLog(0, $faxName, $name, $activity, $timestamp);
     exit;
 }