Security fixes: - Add HTMLEncode to displaysubnets.asp output - Add HTMLEncode to displayapplications.asp URL attributes Icon standardization: - Use zmdi-plus-circle for all Add buttons (displaypcs, pcs, pclist, computers, listpcs) - Use zmdi-edit for all Edit tab icons (displayapplication, displayprinter, displaysubnet, displaydevice) - Replace icon-note with zmdi icons throughout Layout consistency: - Standardize title row margin-bottom to 15px across all pages - Add table-hover class to all data tables - Fix editpc.asp title from "Edit Equipment" to "Edit PC" - Fix editpc.asp back link to point to displaypcs.asp Terminology: - Change "Make" to "Vendor" in displayprinters.asp - Standardize Back button text to "Back to [Page]" format Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
257 lines
11 KiB
Plaintext
257 lines
11 KiB
Plaintext
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<!--#include file="./includes/header.asp"-->
|
|
<!--#include file="./includes/sql.asp"-->
|
|
</head>
|
|
|
|
<%
|
|
theme = Request.Cookies("theme")
|
|
IF theme = "" THEN
|
|
theme="bg-theme1"
|
|
END IF
|
|
%>
|
|
<body class="bg-theme <%Response.Write(theme)%>">
|
|
|
|
<!-- start loader -->
|
|
<div id="pageloader-overlay" class="visible incoming"><div class="loader-wrapper-outer"><div class="loader-wrapper-inner" ><div class="loader"></div></div></div></div>
|
|
<!-- end loader -->
|
|
<!-- Start wrapper-->
|
|
<div id="wrapper">
|
|
<!--#include file="./includes/leftsidebar.asp"-->
|
|
<!--Start topbar header-->
|
|
<!--#include file="./includes/topbarheader.asp"-->
|
|
<!--End topbar header-->
|
|
<div class="clearfix"></div>
|
|
|
|
<div class="content-wrapper">
|
|
<div class="container-fluid">
|
|
|
|
<div class="row mt-3">
|
|
<div class="col-lg-8 offset-lg-2">
|
|
<div class="card">
|
|
<div class="card-body">
|
|
<div style="display:flex; justify-content:space-between; align-items:center; margin-bottom:20px;">
|
|
<h5 class="card-title" style="margin:0;">
|
|
<i class="zmdi zmdi-plus-circle"></i> Add Notification
|
|
</h5>
|
|
<a href="./displaynotifications.asp" class="btn btn-sm btn-secondary">
|
|
<i class="zmdi zmdi-arrow-left"></i> Back to Notifications
|
|
</a>
|
|
</div>
|
|
|
|
<form method="post" action="./savenotification_direct.asp">
|
|
<div class="form-group">
|
|
<label for="notification">Message <span class="text-danger">*</span></label>
|
|
<textarea class="form-control" id="notification" name="notification" rows="3"
|
|
required maxlength="500" placeholder="Enter notification message"></textarea>
|
|
<small class="form-text text-muted">This message will appear on the dashboard</small>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="notificationtypeid">Type <span class="text-danger">*</span></label>
|
|
<select class="form-control" id="notificationtypeid" name="notificationtypeid" required>
|
|
<%
|
|
Dim rsTypes
|
|
Set rsTypes = objConn.Execute("SELECT notificationtypeid, typename, typedescription FROM notificationtypes WHERE isactive = 1 ORDER BY notificationtypeid")
|
|
While Not rsTypes.EOF
|
|
Dim isDefaultType
|
|
isDefaultType = ""
|
|
If rsTypes("typename") = "TBD" Then
|
|
isDefaultType = " selected"
|
|
End If
|
|
%>
|
|
<option value="<%=rsTypes("notificationtypeid")%>"<%=isDefaultType%>><%=rsTypes("typename")%><%If Not IsNull(rsTypes("typedescription")) Then%> - <%=rsTypes("typedescription")%><%End If%></option>
|
|
<%
|
|
rsTypes.MoveNext
|
|
Wend
|
|
rsTypes.Close
|
|
Set rsTypes = Nothing
|
|
%>
|
|
</select>
|
|
<small class="form-text text-muted">Classification type for this notification</small>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="businessunitid">Business Unit <span class="text-muted">(Optional - blank applies to all)</span></label>
|
|
<select class="form-control" id="businessunitid" name="businessunitid">
|
|
<option value="">-- All Business Units --</option>
|
|
<%
|
|
Dim rsBusinessUnits
|
|
Set rsBusinessUnits = objConn.Execute("SELECT businessunitid, businessunit FROM businessunits WHERE isactive = 1 ORDER BY businessunit")
|
|
While Not rsBusinessUnits.EOF
|
|
%>
|
|
<option value="<%=rsBusinessUnits("businessunitid")%>"><%=rsBusinessUnits("businessunit")%></option>
|
|
<%
|
|
rsBusinessUnits.MoveNext
|
|
Wend
|
|
rsBusinessUnits.Close
|
|
Set rsBusinessUnits = Nothing
|
|
%>
|
|
</select>
|
|
<small class="form-text text-muted">Select a specific business unit or leave blank to apply to all</small>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="appid">Related Application <span class="text-muted">(Optional)</span></label>
|
|
<select class="form-control" id="appid" name="appid">
|
|
<option value="">-- No Application --</option>
|
|
<%
|
|
Dim rsApps
|
|
Set rsApps = objConn.Execute("SELECT appid, appname FROM applications WHERE isactive = 1 ORDER BY appname")
|
|
While Not rsApps.EOF
|
|
%>
|
|
<option value="<%=rsApps("appid")%>"><%=Server.HTMLEncode(rsApps("appname") & "")%></option>
|
|
<%
|
|
rsApps.MoveNext
|
|
Wend
|
|
rsApps.Close
|
|
Set rsApps = Nothing
|
|
%>
|
|
</select>
|
|
<small class="form-text text-muted">Link this notification to a specific application (e.g., for software updates)</small>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="ticketnumber">Ticket Number</label>
|
|
<input type="text" class="form-control" id="ticketnumber" name="ticketnumber"
|
|
maxlength="50" placeholder="GEINC123456 or GECHG123456">
|
|
<small class="form-text text-muted">Optional ServiceNow ticket number</small>
|
|
</div>
|
|
|
|
<div class="form-row">
|
|
<div class="form-group col-md-6">
|
|
<label for="starttime">Start Time <span class="text-danger">*</span></label>
|
|
<div class="input-group">
|
|
<input type="datetime-local" class="form-control" id="starttime" name="starttime" required>
|
|
<div class="input-group-append">
|
|
<button type="button" class="btn btn-outline-primary" onclick="setNow('starttime')" title="Set to current date/time">
|
|
<i class="zmdi zmdi-time"></i> Now
|
|
</button>
|
|
</div>
|
|
</div>
|
|
<small class="form-text text-muted">When notification becomes visible</small>
|
|
</div>
|
|
|
|
<div class="form-group col-md-6">
|
|
<label for="endtime">End Time <span class="text-muted">(Optional - indefinite if blank)</span></label>
|
|
<div class="input-group">
|
|
<input type="datetime-local" class="form-control" id="endtime" name="endtime">
|
|
<div class="input-group-append">
|
|
<button type="button" class="btn btn-outline-primary" onclick="setNow('endtime')" title="Set to current date/time">
|
|
<i class="zmdi zmdi-time"></i> Now
|
|
</button>
|
|
<button type="button" class="btn btn-outline-secondary" onclick="clearEndtime()" title="Clear to make indefinite">
|
|
<i class="zmdi zmdi-close"></i>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
<small class="form-text text-muted">Leave blank for indefinite (will display until you set an end date)</small>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<div class="custom-control custom-checkbox">
|
|
<input type="checkbox" class="custom-control-input" id="isactive" name="isactive" value="1" checked>
|
|
<label class="custom-control-label" for="isactive">Active</label>
|
|
</div>
|
|
<small class="form-text text-muted">Uncheck to save as draft without displaying</small>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<div class="custom-control custom-checkbox">
|
|
<input type="checkbox" class="custom-control-input" id="isshopfloor" name="isshopfloor" value="1">
|
|
<label class="custom-control-label" for="isshopfloor">Show on Shopfloor Dashboard</label>
|
|
</div>
|
|
<small class="form-text text-muted">Check this to display on the shopfloor TV dashboard (72-hour window)</small>
|
|
</div>
|
|
|
|
<hr>
|
|
|
|
<div class="form-group text-right">
|
|
<button type="submit" class="btn btn-primary btn-lg">
|
|
<i class="zmdi zmdi-check"></i> Add Notification
|
|
</button>
|
|
<a href="./displaynotifications.asp" class="btn btn-secondary btn-lg">
|
|
<i class="zmdi zmdi-close"></i> Cancel
|
|
</a>
|
|
</div>
|
|
</form>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- End Row -->
|
|
|
|
</div>
|
|
<!-- End container-fluid-->
|
|
|
|
</div><!--End content-wrapper-->
|
|
<!--Start Back To Top Button-->
|
|
<a href="javaScript:void();" class="back-to-top"><i class="fa fa-angle-double-up"></i> </a>
|
|
<!--End Back To Top Button-->
|
|
|
|
<!--Start footer-->
|
|
<footer class="footer">
|
|
<div class="container">
|
|
<div class="text-center">
|
|
</div>
|
|
</div>
|
|
</footer>
|
|
<!--End footer-->
|
|
</div><!--End wrapper-->
|
|
|
|
|
|
<!-- Bootstrap core JavaScript-->
|
|
<script src="assets/js/jquery.min.js"></script>
|
|
<script src="assets/js/popper.min.js"></script>
|
|
<script src="assets/js/bootstrap.min.js"></script>
|
|
|
|
<!-- simplebar js -->
|
|
<script src="assets/plugins/simplebar/js/simplebar.js"></script>
|
|
<!-- sidebar-menu js -->
|
|
<script src="assets/js/sidebar-menu.js"></script>
|
|
|
|
<!-- Custom scripts -->
|
|
<script src="assets/js/app-script.js"></script>
|
|
|
|
<script>
|
|
// Format: YYYY-MM-DDTHH:MM
|
|
function formatDateTime(date) {
|
|
var year = date.getFullYear();
|
|
var month = ('0' + (date.getMonth() + 1)).slice(-2);
|
|
var day = ('0' + date.getDate()).slice(-2);
|
|
var hours = ('0' + date.getHours()).slice(-2);
|
|
var minutes = ('0' + date.getMinutes()).slice(-2);
|
|
return year + '-' + month + '-' + day + 'T' + hours + ':' + minutes;
|
|
}
|
|
|
|
// Set field to current date/time
|
|
function setNow(fieldId) {
|
|
var now = new Date();
|
|
document.getElementById(fieldId).value = formatDateTime(now);
|
|
}
|
|
|
|
// Clear end time to make notification indefinite
|
|
function clearEndtime() {
|
|
document.getElementById('endtime').value = '';
|
|
}
|
|
|
|
// Set default start time to now
|
|
// Leave end time blank for indefinite
|
|
document.addEventListener('DOMContentLoaded', function() {
|
|
var now = new Date();
|
|
var startInput = document.getElementById('starttime');
|
|
|
|
startInput.value = formatDateTime(now);
|
|
// Leave endInput blank by default for indefinite notifications
|
|
});
|
|
</script>
|
|
|
|
</body>
|
|
</html>
|
|
<%
|
|
objConn.Close
|
|
%>
|