'Enabled', false=>'Disabled'); class CNotification { var $guid; var $alertlevel; var $emailaddress; var $enabled; var $active; var $systemAccount; var $accountName; var $comment; function CNotification($aGuid, $aAlertlevel, $aEmailaddress, $aAccountName, $aEnabled=true, $aSystemAccount=false, $aComment="" ) { $this->guid = $aGuid; $this->alertlevel = $aAlertlevel; $this->emailaddress = $aEmailaddress; $this->enabled = $aEnabled; $this->active = $aActive; $this->systemAccount = $aSystemAccount; $this->accountName = $aAccountName; $this->comment = $aComment; } }; $arNotifications = get_ar_notifications($user); error_log("Advanced Report notifications\n".print_r($arNotifications, true)); $errorCode = 0; $displayMessage = 0; //no $smtpWarn = 0; $sortType = true; if ($_SERVER['REQUEST_METHOD']=='POST') { $displayMessage=$_REQUEST['Message']; $errorCode=$_REQUEST['errorCode']; $returnMessage=$_REQUEST['returnMessage']; } $email_notif = get_email_configuration($user); $notifications = get_notifications($user); $total = count($notifications); error_log("Email Notifications\n".print_r($notifications, true)); if ($email_notif->smtpServer == "") { $displayMessage = 1; $smtpWarn = 1; } $arNotifications = get_ar_notifications($user); $keys = get_licensable_features($user); $numKeys = count($keys); $showAR = 0; for ($i=0; $i < $numKeys; $i++) { if (($keys[$i]->Descriptor == "AR") && ($keys[$i]->isLicensed == 1)) { $showAR = 1; } } /* * FIX FOR INVALID DATA IN PREVIOUS LIBRARY FW VERSIONS - ORION V7 * * Check if an email notification is disabled. If disabled and alertLevel is not 4, * this alert was created in previous library version and if there is an ARnotification * with the same email address it should be deleted. Update the email notification to the * new alert level of 4 used to display (None). * * Check if there are any ARNotifications with no reports to send. Delete these * ARnotifications. This takes care of the duplication issue where disabling an * email address set the ARNotification at GUID '0' to the disabled email address. * * * */ // Check if any email notifications are disabled then check alert level foreach( $notifications as $notif) { if($notif->enabled != "1" && $notif->alertLevel != 4) // If notification is disabled and alert level not 4 { // This notification was created on previous lib fw version // Set the email notification alertLevel to 4 error_log("Changing Alert level to 4 (None) for: ".$notif->emailaddress); $notification = new CNotification($notif->guid, 4, $notif->emailaddress, '', false, true, ""); update_notification($user, $notification); // Remove any AR notifications with this email address $arNotifications = get_ar_notifications($user); foreach( $arNotifications as $arNotif) { if(strcmp($notif->emailaddress, $arNotif->emailaddress) == 0) { error_log("Deleting AR notification because it was shown as disabled\n".print_r($arNotif,true)); // Delete the ARnotification delete_ar_notification($user, $arNotif->emailaddress, $arNotif->sendDriveUtilization, $arNotif->sendMediaIntegrity, $arNotif->sendMediaUsage, $arNotif->sendMediaSecurity); } } } } // Delete any AR notifications that have no reports selected $arNotifications = get_ar_notifications($user); foreach( $arNotifications as $arNotif) { if($arNotif->sendDriveUtilization == 0 && $arNotif->sendMediaIntegrity == 0 && $arNotif->sendMediaUsage == 0 && $arNotif->sendMediaSecurity == 0 ) { // Delete the ARnotification error_log("Deleting AR notification because it has no reports to send\n".print_r($arNotif,true)); delete_ar_notification($user, $arNotif->emailaddress, $arNotif->sendDriveUtilization, $arNotif->sendMediaIntegrity, $arNotif->sendMediaUsage, $arNotif->sendMediaSecurity); } } /* * END OF FIX FOR INVALID DATA IN PREVIOUS LIBRARY FIRMWARE VERSIONS */ //Update the notification list $notifications = get_notifications($user); $arNotifications = get_ar_notifications($user); $libTime = get_date_and_time($user); ?> Email Notifications
Email Notifications
0) { ?>
Error Message Image Error Message

Error code:
Informational Message Image

SMTP Mail is not set up

You must setup your library's SMTP mail server in order to send logs to email addresses. You can do this on SMTP (Mail) Configuration page.

Informational Message Image

Operation Complete



It is highly recommended that the library's configuration is saved to an external file after each Configuration change. This can be done from the Save/Restore Configuration page.

Close Message

Email Addresses:
role == "Admin") || ($user->role == "Service")) { ?>
role == "Admin") || ($user->role == "Service")) { ?> role == "Admin") || ($user->role == "Service")) { ?>
Select Email Address Alert Level Reports to Send Date and Time
emailaddress; ?> enabled == 1) { print($ALERT_LEVEL[$notif->alertLevel]); } else { print("(None)"); } ?> emailaddress == "techsup@quantum.com") { print("N/A"); } else { $thereIsReportsToSend = 0; foreach($arNotifications as $arn) { if($arn->emailaddress == $notif->emailaddress) { $thereIsReportsToSend = 1; if($arn->sendDriveUtilization) { print("Drive Utilization, "); } if($arn->sendMediaIntegrity) { print("Media Integrity, "); } if($arn->sendMediaUsage) { print("Media Usage, "); } if($arn->sendMediaSecurity) { print("Media Security, "); } print(" "); } } if( $thereIsReportsToSend == 0) { print("(None)"); } } ?> emailaddress == "techsup@quantum.com") { print("N/A"); } else { foreach($arNotifications as $arn) { if($arn->emailaddress == $notif->emailaddress) { switch($arn->day) { case 0: print("Daily"); break; case 1: print("Monday"); break; case 2: print("Tuesday"); break; case 3: print("Wednesday"); break; case 4: print("Thursday"); break; case 5: print("Friday"); break; case 6: print("Saturday"); break; case 7: print("Sunday"); break; default: break; } print(", "); $timeString = $arn->time + ":00:00"; print(date("g:i a", strtotime($timeString))); print(" "); print($libTime->timezone); } } } ?>
Total: