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:
@@ -19,7 +19,7 @@
|
||||
END IF
|
||||
|
||||
' Get and validate all inputs
|
||||
Dim printerid, modelid, serialnumber, ipaddress, fqdn, printercsfname, printerwindowsname, installpath, machineid, maptop, mapleft
|
||||
Dim printerid, modelid, serialnumber, ipaddress, fqdn, printercsfname, printerwindowsname, printerpin, installpath, machineid, maptop, mapleft
|
||||
printerid = Trim(Request.Querystring("printerid"))
|
||||
modelid = Trim(Request.Form("modelid"))
|
||||
serialnumber = Trim(Request.Form("serialnumber"))
|
||||
@@ -27,6 +27,7 @@
|
||||
fqdn = Trim(Request.Form("fqdn"))
|
||||
printercsfname = Trim(Request.Form("printercsfname"))
|
||||
printerwindowsname = Trim(Request.Form("printerwindowsname"))
|
||||
printerpin = Trim(Request.Form("printerpin"))
|
||||
installpath = Trim(Request.Form("installpath"))
|
||||
machineid = Trim(Request.Form("machineid"))
|
||||
maptop = Trim(Request.Form("maptop"))
|
||||
@@ -188,10 +189,18 @@
|
||||
mapleftValue = 50
|
||||
End If
|
||||
|
||||
' Handle optional PIN - use NULL if not provided
|
||||
Dim printerpinValue
|
||||
If printerpin <> "" Then
|
||||
printerpinValue = printerpin
|
||||
Else
|
||||
printerpinValue = Null
|
||||
End If
|
||||
|
||||
' Update printer using parameterized query
|
||||
Dim strSQL
|
||||
strSQL = "UPDATE printers SET modelid = ?, serialnumber = ?, ipaddress = ?, fqdn = ?, " & _
|
||||
"printercsfname = ?, printerwindowsname = ?, installpath = ?, machineid = ?, maptop = ?, mapleft = ? " & _
|
||||
"printercsfname = ?, printerwindowsname = ?, printerpin = ?, installpath = ?, machineid = ?, maptop = ?, mapleft = ? " & _
|
||||
"WHERE printerid = ?"
|
||||
|
||||
On Error Resume Next
|
||||
@@ -208,6 +217,7 @@
|
||||
cmdUpdate.Parameters.Append cmdUpdate.CreateParameter("@fqdn", 200, 1, 255, fqdn)
|
||||
cmdUpdate.Parameters.Append cmdUpdate.CreateParameter("@printercsfname", 200, 1, 50, printercsfname)
|
||||
cmdUpdate.Parameters.Append cmdUpdate.CreateParameter("@printerwindowsname", 200, 1, 255, printerwindowsname)
|
||||
cmdUpdate.Parameters.Append cmdUpdate.CreateParameter("@printerpin", 200, 1, 10, printerpinValue)
|
||||
cmdUpdate.Parameters.Append cmdUpdate.CreateParameter("@installpath", 200, 1, 100, installpath)
|
||||
cmdUpdate.Parameters.Append cmdUpdate.CreateParameter("@machineid", 3, 1, , CLng(machineid))
|
||||
cmdUpdate.Parameters.Append cmdUpdate.CreateParameter("@maptop", 3, 1, , maptopValue)
|
||||
|
||||
Reference in New Issue
Block a user