Renamed 45 ASP files to follow lowercase concatenated naming convention: - Direct handlers: save_machine_direct.asp -> savemachinedirect.asp - USB files: checkin_usb.asp -> checkinusb.asp - API files: api_usb.asp -> apiusb.asp - Map files: network_map.asp -> networkmap.asp - Printer files: printer_lookup.asp -> printerlookup.asp Also: - Updated 84+ internal references across all ASP and JS files - Deleted 6 test/duplicate files (editmacine.asp, test_*.asp) - Updated production migration guide with filename changes - Added rename scripts for Linux (bash) and Windows (PowerShell)
49 lines
1.3 KiB
Plaintext
49 lines
1.3 KiB
Plaintext
<%@ Language=VBScript %>
|
|
<%
|
|
Response.ContentType = "application/json"
|
|
Response.Charset = "UTF-8"
|
|
Response.AddHeader "Access-Control-Allow-Origin", "*"
|
|
Response.AddHeader "Cache-Control", "no-cache, no-store, must-revalidate"
|
|
%><!--#include file="./includes/sql.asp"--><%
|
|
|
|
Dim strSQL, jsonOutput, isFirst
|
|
|
|
strSQL = "SELECT businessunitid, businessunit " & _
|
|
"FROM businessunits " & _
|
|
"WHERE isactive = 1 " & _
|
|
"ORDER BY businessunit ASC"
|
|
|
|
Set rs = objConn.Execute(strSQL)
|
|
|
|
jsonOutput = "{""success"":true,""businessunits"":["
|
|
isFirst = True
|
|
|
|
Do While Not rs.EOF
|
|
If Not isFirst Then jsonOutput = jsonOutput & ","
|
|
isFirst = False
|
|
|
|
jsonOutput = jsonOutput & "{"
|
|
jsonOutput = jsonOutput & """businessunitid"":" & rs("businessunitid") & ","
|
|
jsonOutput = jsonOutput & """businessunit"":""" & JSEscape(rs("businessunit") & "") & """"
|
|
jsonOutput = jsonOutput & "}"
|
|
|
|
rs.MoveNext
|
|
Loop
|
|
|
|
rs.Close
|
|
jsonOutput = jsonOutput & "]}"
|
|
|
|
Response.Write jsonOutput
|
|
|
|
Function JSEscape(s)
|
|
Dim r
|
|
r = s
|
|
r = Replace(r, "\", "\\")
|
|
r = Replace(r, """", "\""")
|
|
r = Replace(r, Chr(13), "")
|
|
r = Replace(r, Chr(10), "\n")
|
|
r = Replace(r, Chr(9), "\t")
|
|
JSEscape = r
|
|
End Function
|
|
%>
|