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:
cproudlock
2025-12-07 11:16:14 -05:00
parent c7834d4b99
commit 65b622c361
1061 changed files with 19034 additions and 213120 deletions

View File

@@ -10,6 +10,7 @@
<head>
<link rel="stylesheet" href="./style.css" type="text/css">
<!--#include file="./includes/sql.asp"-->
<!--#include file="./includes/response.asp"-->
</head>
<body>
@@ -23,23 +24,20 @@
' Validate
If vendor = "" Then
Response.Write("<div class='alert alert-danger'>Error: Manufacturer name is required.</div>")
Response.Write("<a href='addvendor.asp'>Go back</a>")
objConn.Close
ShowError "Error: Manufacturer name is required.", "addvendor.asp"
Response.End
End If
If Len(vendor) > 50 Then
Response.Write("<div class='alert alert-danger'>Error: Manufacturer name too long.</div>")
Response.Write("<a href='addvendor.asp'>Go back</a>")
objConn.Close
ShowError "Error: Manufacturer name too long.", "addvendor.asp"
Response.End
End If
If isprinter <> "1" AND ispc <> "1" AND ismachine <> "1" Then
Response.Write("<div class='alert alert-danger'>Error: Please select at least one category.</div>")
Response.Write("<a href='addvendor.asp'>Go back</a>")
objConn.Close
ShowError "Error: Please select at least one category.", "addvendor.asp"
Response.End
End If
@@ -59,9 +57,8 @@
rsCheck.Close
Set rsCheck = Nothing
Set cmdCheck = Nothing
Response.Write("<div class='alert alert-danger'>Error: Manufacturer '" & Server.HTMLEncode(vendor) & "' already exists.</div>")
Response.Write("<a href='addvendor.asp'>Go back</a>")
objConn.Close
ShowError "Error: Manufacturer '" & Server.HTMLEncode(vendor) & "' already exists.", "addvendor.asp"
Response.End
End If
End If
@@ -92,10 +89,9 @@
cmdVendor.Execute
If Err.Number <> 0 Then
Response.Write("<div class='alert alert-danger'>Error: " & Server.HTMLEncode(Err.Description) & "</div>")
Response.Write("<a href='addvendor.asp'>Go back</a>")
Set cmdVendor = Nothing
objConn.Close
ShowError "Error: " & Server.HTMLEncode(Err.Description), "addvendor.asp"
Response.End
End If
@@ -117,13 +113,9 @@
objConn.Close
If newVendorId > 0 Then
Response.Write("<div class='alert alert-success'><i class='zmdi zmdi-check'></i> Manufacturer added successfully!</div>")
Response.Write("<p>Manufacturer '" & Server.HTMLEncode(Request.Form("vendor")) & "' has been added.</p>")
Response.Write("<p><a href='addvendor.asp' class='btn btn-primary'>Add Another Manufacturer</a> ")
Response.Write("<a href='addmodel.asp' class='btn btn-secondary'>Add Model</a></p>")
ShowSuccess "Manufacturer '" & Server.HTMLEncode(Request.Form("vendor")) & "' added successfully.", "addvendor.asp", "add another"
Else
Response.Write("<div class='alert alert-danger'>Error: Manufacturer was not added.</div>")
Response.Write("<a href='addvendor.asp'>Go back</a>")
ShowError "Manufacturer was not added.", "addvendor.asp"
End If
%>
</div>