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>
62 lines
1.5 KiB
Plaintext
62 lines
1.5 KiB
Plaintext
<%@ Language="VBScript" %>
|
|
<%
|
|
Response.Buffer = True
|
|
|
|
' Slides folder path (UNC)
|
|
Const SLIDES_FOLDER = "\\tsgwp00525.rd.ds.ge.com\shared\dt\tv"
|
|
|
|
' Get filename from querystring
|
|
Dim filename, filepath, fso, ext
|
|
|
|
filename = Request.QueryString("file")
|
|
|
|
' Validate filename - no path traversal
|
|
If InStr(filename, "..") > 0 Or InStr(filename, "/") > 0 Or InStr(filename, "\") > 0 Or filename = "" Then
|
|
Response.Status = "400 Bad Request"
|
|
Response.End
|
|
End If
|
|
|
|
filepath = SLIDES_FOLDER & "\" & filename
|
|
|
|
Set fso = Server.CreateObject("Scripting.FileSystemObject")
|
|
|
|
' Check file exists
|
|
If Not fso.FileExists(filepath) Then
|
|
Response.Status = "404 Not Found"
|
|
Set fso = Nothing
|
|
Response.End
|
|
End If
|
|
|
|
' Get extension and set content type
|
|
ext = LCase(fso.GetExtensionName(filename))
|
|
|
|
Select Case ext
|
|
Case "jpg", "jpeg"
|
|
Response.ContentType = "image/jpeg"
|
|
Case "png"
|
|
Response.ContentType = "image/png"
|
|
Case "gif"
|
|
Response.ContentType = "image/gif"
|
|
Case "bmp"
|
|
Response.ContentType = "image/bmp"
|
|
Case "webp"
|
|
Response.ContentType = "image/webp"
|
|
Case Else
|
|
Response.Status = "415 Unsupported Media Type"
|
|
Set fso = Nothing
|
|
Response.End
|
|
End Select
|
|
|
|
Set fso = Nothing
|
|
|
|
' Read and serve the file
|
|
Dim stream
|
|
Set stream = Server.CreateObject("ADODB.Stream")
|
|
stream.Type = 1 ' Binary
|
|
stream.Open
|
|
stream.LoadFromFile filepath
|
|
Response.BinaryWrite stream.Read
|
|
stream.Close
|
|
Set stream = Nothing
|
|
%>
|