Add USB checkout system and SSO profile page
New Features: - USB Device checkout/check-in system with barcode scanning - displayusb.asp: List all USB devices with status - addusb.asp: Add new USB devices via barcode scan - checkout_usb.asp/savecheckout_usb.asp: Check out USB to SSO - checkin_usb.asp/savecheckin_usb.asp: Check in with wipe confirmation - usb_history.asp: Full checkout history with filters - api_usb.asp: JSON API for AJAX lookups - displayprofile.asp: SSO profile page showing user info and USB history - Date/time format changed to 12-hour (MM/DD/YYYY h:mm AM/PM) - SSO links in USB history now link to profile page via search Database: - New machinetypeid 44 for USB devices - New usb_checkouts table for tracking checkouts Cleanup: - Removed v2 folder (duplicate/old files) - Removed old debug/test files - Removed completed migration documentation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -6,7 +6,6 @@
|
||||
<title>West Jefferson DT Homepage 2.0</title>
|
||||
<!-- loader-->
|
||||
<link href="assets/css/pace.min.css" rel="stylesheet"/>
|
||||
<script src="assets/js/pace.min.j2s"></script>
|
||||
<!--favicon-->
|
||||
<link rel="icon" href="assets/images/favicon.ico" type="image/x-icon">
|
||||
<!-- simplebar CSS-->
|
||||
|
||||
@@ -1,3 +1,34 @@
|
||||
<%
|
||||
' Calculate fiscal week (GE fiscal year starts first Monday of January)
|
||||
Dim fwToday, fwYearStart, fwFirstMonday, fwDayOfWeek, fwDaysFromStart, fiscalWeek
|
||||
fwToday = Date()
|
||||
|
||||
' Find first Monday of current year
|
||||
fwYearStart = DateSerial(Year(fwToday), 1, 1)
|
||||
fwDayOfWeek = Weekday(fwYearStart, vbMonday) ' 1=Monday, 7=Sunday
|
||||
If fwDayOfWeek = 1 Then
|
||||
fwFirstMonday = fwYearStart
|
||||
Else
|
||||
fwFirstMonday = DateAdd("d", 8 - fwDayOfWeek, fwYearStart)
|
||||
End If
|
||||
|
||||
' If we're before the first Monday, use previous year's week count
|
||||
If fwToday < fwFirstMonday Then
|
||||
Dim fwPrevYearStart, fwPrevFirstMonday, fwPrevDayOfWeek
|
||||
fwPrevYearStart = DateSerial(Year(fwToday) - 1, 1, 1)
|
||||
fwPrevDayOfWeek = Weekday(fwPrevYearStart, vbMonday)
|
||||
If fwPrevDayOfWeek = 1 Then
|
||||
fwPrevFirstMonday = fwPrevYearStart
|
||||
Else
|
||||
fwPrevFirstMonday = DateAdd("d", 8 - fwPrevDayOfWeek, fwPrevYearStart)
|
||||
End If
|
||||
fwDaysFromStart = DateDiff("d", fwPrevFirstMonday, fwToday)
|
||||
fiscalWeek = Int(fwDaysFromStart / 7) + 1
|
||||
Else
|
||||
fwDaysFromStart = DateDiff("d", fwFirstMonday, fwToday)
|
||||
fiscalWeek = Int(fwDaysFromStart / 7) + 1
|
||||
End If
|
||||
%>
|
||||
<!--Start sidebar-wrapper-->
|
||||
<div id="sidebar-wrapper" data-simplebar="" data-simplebar-auto-hide="true">
|
||||
<div class="brand-logo">
|
||||
@@ -6,6 +37,7 @@
|
||||
<h5 class="logo-text">West Jefferson</h5>
|
||||
</a>
|
||||
</div>
|
||||
<div style="font-size: 10px; color: #888; text-align: center; padding-bottom: 8px;">Fiscal Week <%=fiscalWeek%></div>
|
||||
<ul class="sidebar-menu do-nicescrol">
|
||||
<li class="sidebar-header">MAIN NAVIGATION</li>
|
||||
<li>
|
||||
@@ -53,10 +85,12 @@
|
||||
<li><a href="./displaysubnets.asp"><i class="zmdi zmdi-network text-danger"></i><span>Network</span></a></li>
|
||||
<li><a href="./network_devices.asp"><i class="zmdi zmdi-device-hub text-info"></i><span>Network Devices</span></a></li>
|
||||
<li><a href="./displaypcs.asp"><i class="zmdi zmdi-desktop-windows text-primary"></i><span>PC Admin</span></a></li>
|
||||
<li><a href="./displayusb.asp"><i class="zmdi zmdi-usb text-purple"></i><span>USB Devices</span></a></li>
|
||||
<li><a href="./displaynotifications.asp"><i class="zmdi zmdi zmdi-notifications-none text-success"></i><span>Notifications</span></a></li>
|
||||
<li><a href="./tv-dashboard/" target="_blank"><i class="zmdi zmdi-tv text-warning"></i><span>Lobby Display</span></a></li>
|
||||
<li><a href="javaScript:void();"><i class="zmdi zmdi-share text-info"></i> <span>Information</span></a></li>
|
||||
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<!--End sidebar-wrapper-->
|
||||
<!--End sidebar-wrapper-->
|
||||
|
||||
214
includes/response.asp
Normal file
214
includes/response.asp
Normal file
@@ -0,0 +1,214 @@
|
||||
<%
|
||||
'=============================================================================
|
||||
' FILE: includes/response.asp
|
||||
' PURPOSE: Styled error and success response pages for form submissions
|
||||
' USAGE: Include this file, then call ShowError() or ShowSuccess()
|
||||
'=============================================================================
|
||||
|
||||
Sub ShowError(errorMessage, backUrl)
|
||||
%>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!--#include file="header.asp"-->
|
||||
<style>
|
||||
.response-container {
|
||||
min-height: 60vh;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
}
|
||||
.response-icon {
|
||||
font-size: 80px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.response-icon.error { color: #f44336; }
|
||||
.response-icon.success { color: #28a745; }
|
||||
.response-message {
|
||||
font-size: 24px;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
.alert-custom {
|
||||
padding: 15px;
|
||||
margin-bottom: 20px;
|
||||
border: 1px solid transparent;
|
||||
border-radius: 4px;
|
||||
max-width: 600px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
.alert-error {
|
||||
background-color: rgba(244, 67, 54, 0.1);
|
||||
border-color: rgba(244, 67, 54, 0.3);
|
||||
color: #f44336;
|
||||
}
|
||||
.alert-success {
|
||||
background-color: rgba(40, 167, 69, 0.1);
|
||||
border-color: rgba(40, 167, 69, 0.3);
|
||||
color: #28a745;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<%
|
||||
Dim respTheme
|
||||
respTheme = Request.Cookies("theme")
|
||||
If respTheme = "" Then respTheme = "bg-theme1"
|
||||
%>
|
||||
<body class="bg-theme <%=respTheme%>">
|
||||
|
||||
<!-- 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="leftsidebar.asp"-->
|
||||
<!--#include file="topbarheader.asp"-->
|
||||
<div class="clearfix"></div>
|
||||
|
||||
<div class="content-wrapper">
|
||||
<div class="container-fluid">
|
||||
<div class="response-container">
|
||||
<div>
|
||||
<div class="response-icon error">
|
||||
<i class="zmdi zmdi-alert-triangle"></i>
|
||||
</div>
|
||||
<div class="response-message">Error</div>
|
||||
<div class="alert-custom alert-error">
|
||||
<strong><i class="zmdi zmdi-info"></i> Details:</strong><br>
|
||||
<%=Server.HTMLEncode(errorMessage)%>
|
||||
</div>
|
||||
<div style="margin-top: 30px;">
|
||||
<a href="<%=Server.HTMLEncode(backUrl)%>" class="btn btn-primary btn-lg">
|
||||
<i class="zmdi zmdi-arrow-left"></i> Go Back
|
||||
</a>
|
||||
<a href="default.asp" class="btn btn-secondary btn-lg">
|
||||
<i class="zmdi zmdi-home"></i> Dashboard
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer class="footer">
|
||||
<div class="container"><div class="text-center"></div></div>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
<script src="assets/js/jquery.min.js"></script>
|
||||
<script src="assets/js/popper.min.js"></script>
|
||||
<script src="assets/js/bootstrap.min.js"></script>
|
||||
<script src="assets/plugins/simplebar/js/simplebar.js"></script>
|
||||
<script src="assets/js/sidebar-menu.js"></script>
|
||||
<script src="assets/js/app-script.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
<%
|
||||
End Sub
|
||||
|
||||
Sub ShowSuccess(successMessage, redirectUrl, entityName)
|
||||
%>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!--#include file="header.asp"-->
|
||||
<style>
|
||||
.response-container {
|
||||
min-height: 60vh;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
}
|
||||
.response-icon {
|
||||
font-size: 80px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.response-icon.error { color: #f44336; }
|
||||
.response-icon.success { color: #28a745; }
|
||||
.response-message {
|
||||
font-size: 24px;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
.alert-custom {
|
||||
padding: 15px;
|
||||
margin-bottom: 20px;
|
||||
border: 1px solid transparent;
|
||||
border-radius: 4px;
|
||||
max-width: 600px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
.alert-error {
|
||||
background-color: rgba(244, 67, 54, 0.1);
|
||||
border-color: rgba(244, 67, 54, 0.3);
|
||||
color: #f44336;
|
||||
}
|
||||
.alert-success {
|
||||
background-color: rgba(40, 167, 69, 0.1);
|
||||
border-color: rgba(40, 167, 69, 0.3);
|
||||
color: #28a745;
|
||||
}
|
||||
</style>
|
||||
<meta http-equiv="refresh" content="2; url=<%=Server.HTMLEncode(redirectUrl)%>">
|
||||
</head>
|
||||
<%
|
||||
Dim succTheme
|
||||
succTheme = Request.Cookies("theme")
|
||||
If succTheme = "" Then succTheme = "bg-theme1"
|
||||
%>
|
||||
<body class="bg-theme <%=succTheme%>">
|
||||
|
||||
<!-- 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="leftsidebar.asp"-->
|
||||
<!--#include file="topbarheader.asp"-->
|
||||
<div class="clearfix"></div>
|
||||
|
||||
<div class="content-wrapper">
|
||||
<div class="container-fluid">
|
||||
<div class="response-container">
|
||||
<div>
|
||||
<div class="response-icon success">
|
||||
<i class="zmdi zmdi-check-circle"></i>
|
||||
</div>
|
||||
<div class="response-message">Success!</div>
|
||||
<div class="alert-custom alert-success">
|
||||
<strong><i class="zmdi zmdi-check"></i></strong>
|
||||
<%=Server.HTMLEncode(successMessage)%>
|
||||
</div>
|
||||
<div style="margin-top: 20px; opacity: 0.7;">
|
||||
Redirecting to <%=Server.HTMLEncode(entityName)%>...
|
||||
</div>
|
||||
<div style="margin-top: 30px;">
|
||||
<a href="<%=Server.HTMLEncode(redirectUrl)%>" class="btn btn-primary btn-lg">
|
||||
<i class="zmdi zmdi-arrow-right"></i> Go Now
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer class="footer">
|
||||
<div class="container"><div class="text-center"></div></div>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
<script src="assets/js/jquery.min.js"></script>
|
||||
<script src="assets/js/popper.min.js"></script>
|
||||
<script src="assets/js/bootstrap.min.js"></script>
|
||||
<script src="assets/plugins/simplebar/js/simplebar.js"></script>
|
||||
<script src="assets/js/sidebar-menu.js"></script>
|
||||
<script src="assets/js/app-script.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
<%
|
||||
End Sub
|
||||
%>
|
||||
@@ -1,8 +1,8 @@
|
||||
<%
|
||||
Dim objConn
|
||||
' objConn - script-global connection object (no Dim for global scope)
|
||||
Session.Timeout=15
|
||||
Set objConn=Server.CreateObject("ADODB.Connection")
|
||||
objConn.ConnectionString="DSN=shopdb;Uid=root;Pwd=WJF11sql;Option=3;Pooling=True;Max Pool Size=100;"
|
||||
objConn.Open
|
||||
objConn.Open
|
||||
set rs = server.createobject("ADODB.Recordset")
|
||||
%>
|
||||
Reference in New Issue
Block a user