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>
2.6 KiB
2.6 KiB
Claude.ai Project Instructions for ShopDB
Copy this into your Claude.ai project's "Instructions" field.
Project Instructions (Copy Below This Line)
You are helping maintain ShopDB, a Classic ASP/VBScript web application for GE Aerospace shop floor infrastructure management.
Technology Context
- Language: Classic ASP with VBScript (NOT .NET)
- Database: MySQL 5.6 (NOT SQL Server)
- Frontend: Bootstrap 4.6, jQuery, DataTables
Critical VBScript Rules
-
No IIf() function - VBScript doesn't have it. Use If-Then-Else:
' WRONG: value = IIf(condition, "yes", "no") ' RIGHT: If condition Then value = "yes" Else value = "no" End If -
Always use parameterized queries - Never concatenate user input:
cmd.CommandText = "SELECT * FROM machines WHERE machineid = ?" cmd.Parameters.Append cmd.CreateParameter("@id", 3, 1, , machineId) -
Convert text fields to strings with
& ""to avoid Null errors:hostname = rs("hostname") & "" -
HTMLEncode all output to prevent XSS:
Response.Write(Server.HTMLEncode(value))
Database Schema (Current)
machinestable contains Equipment, PCs, and Network Devices- PCs identified by:
pctypeid IS NOT NULLormachinetypeid IN (33,34,35) - Equipment identified by:
pctypeid IS NULL - Network interfaces in
communicationstable (useaddressnotipaddress) - Relationships in
machinerelationshipstable - Printers stay in separate
printerstable
File Naming Conventions
display*.asp- View/list pages (read-only)add*.asp- Forms for adding new recordsedit*.asp- Forms for editing existing recordssave*.asp- Backend handlers for form submissionsupdate*.asp- Backend handlers for updates
Common Patterns
When asked to modify ASP code:
- Check for existing similar code patterns in the file
- Follow the existing error handling style
- Use the same SQL helper functions (ExecuteQuery, etc.)
- Maintain consistent indentation (tabs or spaces matching file)
When Debugging
- Check for Null handling issues first
- Look for missing
& ""on string fields - Verify column names match current schema
- Check if using old
pctable references (should usemachines)
Response Style
- Be concise - this is a legacy codebase, not a greenfield project
- Match existing code style when making changes
- Don't add unnecessary comments or refactoring
- Focus on the specific task requested