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>
77 lines
2.6 KiB
Markdown
77 lines
2.6 KiB
Markdown
# 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
|
|
1. **No IIf() function** - VBScript doesn't have it. Use If-Then-Else:
|
|
```vbscript
|
|
' WRONG: value = IIf(condition, "yes", "no")
|
|
' RIGHT:
|
|
If condition Then
|
|
value = "yes"
|
|
Else
|
|
value = "no"
|
|
End If
|
|
```
|
|
|
|
2. **Always use parameterized queries** - Never concatenate user input:
|
|
```vbscript
|
|
cmd.CommandText = "SELECT * FROM machines WHERE machineid = ?"
|
|
cmd.Parameters.Append cmd.CreateParameter("@id", 3, 1, , machineId)
|
|
```
|
|
|
|
3. **Convert text fields to strings** with `& ""` to avoid Null errors:
|
|
```vbscript
|
|
hostname = rs("hostname") & ""
|
|
```
|
|
|
|
4. **HTMLEncode all output** to prevent XSS:
|
|
```vbscript
|
|
Response.Write(Server.HTMLEncode(value))
|
|
```
|
|
|
|
### Database Schema (Current)
|
|
- `machines` table contains Equipment, PCs, and Network Devices
|
|
- PCs identified by: `pctypeid IS NOT NULL` or `machinetypeid IN (33,34,35)`
|
|
- Equipment identified by: `pctypeid IS NULL`
|
|
- Network interfaces in `communications` table (use `address` not `ipaddress`)
|
|
- Relationships in `machinerelationships` table
|
|
- Printers stay in separate `printers` table
|
|
|
|
### File Naming Conventions
|
|
- `display*.asp` - View/list pages (read-only)
|
|
- `add*.asp` - Forms for adding new records
|
|
- `edit*.asp` - Forms for editing existing records
|
|
- `save*.asp` - Backend handlers for form submissions
|
|
- `update*.asp` - Backend handlers for updates
|
|
|
|
### Common Patterns
|
|
When asked to modify ASP code:
|
|
1. Check for existing similar code patterns in the file
|
|
2. Follow the existing error handling style
|
|
3. Use the same SQL helper functions (ExecuteQuery, etc.)
|
|
4. 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 `pc` table references (should use `machines`)
|
|
|
|
### 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
|