//------------------------------------------------------------------------------ // Licensed Materials - Property of IBM // (c) Copyright IBM Corporation 2001,2002 All Rights Reserved. // US Government Users Restricted Rights - Use, duplication or disclosure // restricted by GSA ADP Schedule Contract with IBM Corp. //------------------------------------------------------------------------------ // Configure Notifications - Modify // // Filename: ml_set_notifications_modify.htm // // This page is used to modify an existent email notification. // // When a POST is operation result information is retrieved from POST // data and displayed in the Message Box. // // // Input: POST data // emailaddr the email notification address to delete // guid the id that uniquely identifies the email notification to be deleted // alertlevel the value of the Alert Level column for the notification to be modified // ischeck keeps the index of the row that was selected in the main panel // status the value of the Status column for the notification to be modified // // // // Ouput: POST ('form_out') // url original request page // guid notification id // emailaddr email address // alertlevel alert level // enabled notification's status // ischeck keeps track of which row was selected before submit // // // // Change History: // // Date Defect Changed By Description of Change // ---- ------ ---------- --------------------- // 11/02/2005 roomor01 File Created //------------------------------------------------------------------------------ include('common_admin_inc.htm'); include('main_inc.htm'); $emailaddr=""; $alrtlevel=""; if($_SERVER['REQUEST_METHOD']=='POST') { $guid = $_POST['guid']; $emailaddr = $_POST['emailaddr']; $alertlevel = $_POST['alertlevel']; $isChecked = $_POST['ischeck']; $state = $_POST['enabled']; } $notifications = get_notifications($user); $arNotifications = get_ar_notifications($user); $total = count($notifications); $totalAR = count($arNotifications); $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; } } $addresses = ""; for ($n = 0; $n < $total; $n++) { if ($addresses == "") { $addresses = $notifications[$n]->emailaddress; } else { $addresses = $addresses.':'.$notifications[$n]->emailaddress; } } if($showAR) { $arSettings; foreach($arNotifications as $arn) { if($arn->emailaddress == $emailaddr) { $arSettings[0] = $arn->sendDriveUtilization; $arSettings[1] = $arn->sendMediaIntegrity; $arSettings[2] = $arn->sendMediaUsage; $arSettings[3] = $arn->sendMediaSecurity; $arSettings[4] = $arn->day; $temp = $arn->time; $hour = $arn->time; $ampm = 0; // midnight if($temp == 0) { $hour = 12; $ampm = 0; } // noon if($temp == 12) { $hour = 12; $ampm = 1; } if(!($temp == 12 || $temp == 0)) { $hour = $hour - 12; $ampm = 1; } $arSettings[5] = $hour; $arSettings[6] = $ampm; $arSettings[7] = $arn->guid; } } for ($i = 0; $i < $totalAR; $i++) { if ($addresses == "") { $addresses = $arNotifications[$i]->emailaddress; } else { $addresses = $addresses.':'.$arNotifications[$i]->emailaddress; } } } ?>