} header(sprintf("Location: %s", $updateGoTo)); } global $lastID; $lastID = $conn->insert_id; if (isset($my_post['changeRequestID'])) { $varRFA_rsRFA = addslashes($my_post['changeRequestID']); } else { $varRFA_rsRFA = $lastID; } $query_rsRFA = "SELECT changerequests.changeRequestID, employees.displayName as submittedBy, DATE_FORMAT(dateSubmitted, '%Y-%m-%d') AS dateSubmitted, TIME_FORMAT(timeSubmitted,'%k:%i') AS timeSubmitted, changerequests.summary, changerequests.description, changerequests.status, changerequests.comments, changerequests.requestOrigin, changerequests.requestOriginID, changerequests.flagged, DATE_FORMAT(windowStartDate, '%Y-%m-%d') AS windowStartDate, TIME_FORMAT(windowStartTime,'%k:%i') AS windowStartTime, DATE_FORMAT(windowEndDate, '%Y-%m-%d') AS windowEndDate, TIME_FORMAT(windowEndTime,'%k:%i') AS windowEndTime, changerequests.applicationID, applications.application, changerequests.subapplicationID, subapplications.subapplication, changerequests.layerID, layers.layer, changerequests.risk, employees.workEmail FROM changerequests LEFT JOIN employees ON changerequests.submittedBy=employees.employeeID LEFT JOIN applications ON changerequests.applicationID=applications.applicationID LEFT JOIN subapplications ON changerequests.subapplicationID=subapplications.subapplicationID LEFT JOIN layers ON changerequests.layerID=layers.layerID WHERE changerequests.changeRequestID = {$varRFA_rsRFA}"; $rsRFA = $conn->query($query_rsRFA) or die("<div class='alert alert-danger' role='alert'>{$conn->error}</div>"); $row_rsRFA = $rsRFA->fetch_assoc(); $totalRows_rsRFA = $rsRFA->num_rows; $email = new tEmail('RFC'); $email->AddAddress('*****@*****.**', 'RFCs - Change Management'); if ($my_post["MM_insert"] == "rfaAdd") { $body = "An RFC has been submitted, and is awaiting review. An overview of the RFC appears below.<br /><br />"; } elseif ($my_post["MM_update"] == "rfaUpdate") { $body = "RFC #" . $row_rsRFA['changeRequestID'] . " has been <b>" . $row_rsRFA['status'] . "</b>. An overview of the RFC appears below.<br />"; } $body .= "You can view the RFC by visiting <a title=\"Production Operation's RFCs\" href=\"http://" . $my_server['HTTP_HOST'] . "/rflow/rfas/rfa.php?function=view&rfa=" . $row_rsRFA['changeRequestID'] . "\">http://" . $my_server['HTTP_HOST'] . "/rflow/rfas/rfa.php?function=view&rfa=" . $row_rsRFA['changeRequestID'] . "</a>.<br /><br />"; $body .= "<b>Submitted By:</b> " . $row_rsRFA['submittedBy'] . "<br />"; $body .= "<b>Subject:</b> " . stripslashes($row_rsRFA['summary']) . "<br />"; $body .= "<b>Application:</b> " . $row_rsRFA['application'] . "<br />"; $body .= "<b>Subapplication:</b> " . $row_rsRFA['subapplication'] . "<br />"; $body .= "<b>Layer:</b> " . $row_rsRFA['layer'] . "<br />"; $body .= "<b>Request Origin:</b> "; if ($row_rsRFA['requestOrigin'] == "Support Request") { $body .= " <a href=\"http://" . $my_server['HTTP_HOST'] . "/rflow/supportRequests/supportRequest.php?function=view&supportRequest=" . $row_rsRFA['requestOriginID'] . "\">"; }
$query_rsMaintenanceNotif = "SELECT maintenancenotifs.maintenanceNotifsID, maintenancenotifs.reason, maintenancenotifs.customerImpact, maintenancenotifs.nocImpact" . ", maintenancenotifs.prodChanges, TIME_FORMAT(startTime, '%H:%i') as startTime, maintenancenotifs.employeeID, maintenancenotifs.estimatedHours" . ", maintenancenotifs.estimatedMinutes, DATE_FORMAT(startDate, '%m/%d/%Y') as startDate, employees.displayName, maintenancenotifs.status" . " FROM maintenancenotifs, employees" . " WHERE maintenancenotifs.maintenanceNotifsID = {$lastID} AND maintenancenotifs.employeeID=employees.employeeID"; $rsMaintenanceNotif = $conn->query($query_rsMaintenanceNotif) or die("<div class='alert alert-danger' role='alert'>{$conn->error}</div>"); $row_rsMaintenanceNotif = $rsMaintenanceNotif->fetch_assoc(); $totalRows_rsMaintenanceNotif = $rsMaintenanceNotif->num_rows; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Submitting Maintenance Notification..</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> </head> <body> <?php $email = new tEmail('Maintenance'); if ($my_post['prodOps'] == 'y') { $email->AddAddress("*****@*****.**", "Tech Support"); } if ($my_post['noc'] == 'y') { $email->AddAddress("*****@*****.**", "Product Dev"); } if ($my_post['neteng'] == 'y') { $email->AddAddress("*****@*****.**", "Sales"); } if ($my_post['syseng'] == 'y') { $email->AddAddress("*****@*****.**", "Projects"); } if (isset($my_post['cc']) && $my_post['cc'] != null) { $email->AddAddress("" . $my_post['cc'] . "", "cc"); } $email->AddReplyTo("*****@*****.**", "Maintenance Notifications"); $body = "*********************<br />";
header("Location: {$updateGoTo}"); } global $lastID; $lastID = $conn->insert_id; $varSupportRequest_rsSupportRequest = "1"; if (isset($my_post['supportRequestID'])) { $varSupportRequest_rsSupportRequest = addslashes($my_post['supportRequestID']); } elseif (isset($lastID)) { $varSupportRequest_rsSupportRequest = addslashes($lastID); } $query_rsSupportRequest = "SELECT escalations.escalationID, escalations.applicationID, applications.application, escalations.subject, escalations.description, escalations.customerImpact, escalations.assignedTo, employees.displayName, escalations.status, escalations.outcome, escalations.customerID, customers.customer, employees.workEmail, departments.email, departments.department FROM escalations LEFT JOIN applications ON escalations.applicationID=applications.applicationID LEFT JOIN customers ON escalations.customerID=customers.customerID LEFT JOIN employees ON escalations.assignedTo=employees.employeeID LEFT JOIN departments ON escalations.deptID=departments.departmentID WHERE escalations.escalationID = {$varSupportRequest_rsSupportRequest}"; $rsSupportRequest = $conn->query($query_rsSupportRequest) or die("<div class='alert alert-danger' role='alert'>{$conn->error}</div>"); $row_rsSupportRequest = $rsSupportRequest->fetch_assoc(); $totalRows_rsSupportRequest = $rsSupportRequest->num_rows; $email = new tEmail('Support Request'); $email->AddAddress('*****@*****.**', 'Support Requests'); if ($my_post["MM_insert"] == "supportRequestAdd") { $body = "A new Support Request has been submitted. An overview of the Support Request appears below.<br /><br />"; } elseif ($my_post["MM_update"] == "supportRequestUpdate" && $row_rsSupportRequest['status'] == "Closed") { $body = "Support Request #" . $row_rsSupportRequest['escalationID'] . " has been closed. An overview of the Support Request appears below.<br />"; } elseif ($my_post["MM_update"] == "supportRequestUpdate" && $row_rsSupportRequest['status'] != "Closed") { $body = "Support Request #" . $row_rsSupportRequest['escalationID'] . " has been updated. An overview of the Support Request appears below.<br /><br />"; } $body .= "You can view this & other Support Requests by visiting <a title=\"Production Operation's Support Requests\" href=\"http://" . $_SERVER['HTTP_HOST'] . "/rflow/supportRequests/supportRequests.php?function=view\">http://" . $_SERVER['HTTP_HOST'] . "/rflow/supportRequests/supportRequests.php?function=view</a><br />"; $body .= "Note: Please consult the website for information regarding the status of Support Requests.<br /><br />"; $body .= "**************************<br />"; $body .= "<b>Subject:</b> " . stripslashes($row_rsSupportRequest['subject']) . "<br />"; $body .= "<b>Application:</b> " . $row_rsSupportRequest['application'] . "<br />"; $body .= "<b>Customer:</b> " . $row_rsSupportRequest['customer'] . "<br />"; $body .= "<b>Customer Impact:</b> " . stripslashes($row_rsSupportRequest['customerImpact']) . "<br />"; $body .= "<b>Description:</b> " . stripslashes(nl2br($row_rsSupportRequest['description'])) . "<br />";