<% ' Get and validate notificationid Dim notificationid notificationid = Request.Querystring("notificationid") ' Basic validation - must be numeric and positive If Not IsNumeric(notificationid) Or CLng(notificationid) < 1 Then Response.Redirect("displaynotifications.asp") Response.End End If ' Get the notification details using parameterized query Dim strSQL, rs strSQL = "SELECT * FROM notifications WHERE notificationid = ?" Set rs = ExecuteParameterizedQuery(objConn, strSQL, Array(CLng(notificationid))) If rs.EOF Then rs.Close Set rs = Nothing objConn.Close Response.Redirect("displaynotifications.asp") Response.End End If ' Convert datetime to datetime-local format (YYYY-MM-DDTHH:MM) Dim startFormatted, endFormatted If IsNull(rs("starttime")) Or rs("starttime") = "" Then startFormatted = "" Else ' Handle both MySQL format and VBScript Date format If VarType(rs("starttime")) = 7 Then ' VarType 7 is Date - format it properly startFormatted = Year(rs("starttime")) & "-" & _ Right("0" & Month(rs("starttime")), 2) & "-" & _ Right("0" & Day(rs("starttime")), 2) & "T" & _ Right("0" & Hour(rs("starttime")), 2) & ":" & _ Right("0" & Minute(rs("starttime")), 2) Else ' String format - try to convert startFormatted = Left(Replace(rs("starttime"), " ", "T"), 16) End If End If If IsNull(rs("endtime")) Or rs("endtime") = "" Then endFormatted = "" Else ' Handle both MySQL format and VBScript Date format If VarType(rs("endtime")) = 7 Then ' VarType 7 is Date - format it properly endFormatted = Year(rs("endtime")) & "-" & _ Right("0" & Month(rs("endtime")), 2) & "-" & _ Right("0" & Day(rs("endtime")), 2) & "T" & _ Right("0" & Hour(rs("endtime")), 2) & ":" & _ Right("0" & Minute(rs("endtime")), 2) Else ' String format - try to convert endFormatted = Left(Replace(rs("endtime"), " ", "T"), 16) End If End If %> <% Dim theme theme = Request.Cookies("theme") IF theme = "" THEN theme="bg-theme1" END IF %>
Edit Notification
Cancel
This message will appear on the dashboard
Classification type for this notification
Select a specific business unit or leave blank to apply to all
Link this notification to a specific application (e.g., for software updates)
" maxlength="50" placeholder="GEINC123456 or GECHG123456"> Optional ServiceNow ticket number
When notification becomes visible
Leave blank for indefinite (will display until you set an end date)
>
Uncheck to hide notification without deleting
>
Check this to display on the shopfloor TV dashboard (72-hour window)

Cancel
<% rs.Close Set rs = Nothing objConn.Close %>