Update all SQL queries, query result references, and ColdFusion code to match
the renamed database schema. Tables use plural CamelCase, PKs are all `ID`,
column prefixes stripped (e.g. BusinessName→Name, UserFirstName→FirstName).
Key changes:
- Strip table-name prefixes from all column references (Businesses, Users,
Addresses, Hours, Menus, Categories, Items, Stations, Orders,
OrderLineItems, Tasks, TaskCategories, TaskRatings, QuickTaskTemplates,
ScheduledTaskDefinitions, ChatMessages, Beacons, ServicePoints, Employees,
VisitorTrackings, ApiPerfLogs, tt_States, tt_Days, tt_AddressTypes,
tt_OrderTypes, tt_TaskTypes)
- Rename PK references from {TableName}ID to ID in all queries
- Rewrite 7 admin beacon files to use ServicePoints.BeaconID instead of
dropped lt_Beacon_Businesses_ServicePoints link table
- Rewrite beacon assignment files (list, save, delete) for new schema
- Fix FK references incorrectly changed to ID (OrderLineItems.OrderID,
Categories.MenuID, Tasks.CategoryID, ServicePoints.BeaconID)
- Update Addresses: AddressLat→Latitude, AddressLng→Longitude
- Update Users: UserPassword→Password, UserIsEmailVerified→IsEmailVerified,
UserIsActive→IsActive, UserBalance→Balance, etc.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
112 lines
No EOL
2.3 KiB
Text
112 lines
No EOL
2.3 KiB
Text
<cfparam name="form.mode" default="start">
|
|
|
|
<cfif session.UserID NEQ 0>
|
|
|
|
<cfif form.mode eq "start">
|
|
|
|
<CFQUERY name="get_verified_users" datasource="#application.datasource#">
|
|
SELECT U.ID, U.EmailAddress, U.ContactNumber,U.AddedOn
|
|
FROM Users U
|
|
WHERE U.IsEmailVerified = 1
|
|
AND
|
|
U.UserIsCOntactVerified > 0
|
|
AND
|
|
U.ID > 435
|
|
ORDER BY U.ID DESC
|
|
</cfquery>
|
|
|
|
|
|
|
|
<table border="0" cellspacing="5" cellpadding="5">
|
|
<tr>
|
|
<th>UserID</th>
|
|
<th>Email</th>
|
|
<th>Mobile</th>
|
|
<th>Added On</th>
|
|
<th>Order(s)</th>
|
|
</tr>
|
|
|
|
<cfoutput query="get_verified_users">
|
|
|
|
<tr>
|
|
<td>
|
|
|
|
<script language="JavaScript">
|
|
function submitformUserTraffic#UserID#()
|
|
{
|
|
document.myformUserTraffic#UserID#.submit();
|
|
}
|
|
</script>
|
|
|
|
<form action="#request.cgipath#" method="post" name="myformUserTraffic#UserID#" id="myformUserTraffic#UserID#" style="display:inline;">
|
|
|
|
<a href="javascript: submitformUserTraffic#UserID#()">#UserID#</a>
|
|
|
|
<input type="hidden" name="mode" value="user_traffic">
|
|
<input type="hidden" name="chip" value="#UserID#">
|
|
|
|
</form>
|
|
|
|
</td>
|
|
<td>#EmailAddress#</td>
|
|
<td>#ContactNumber#</td>
|
|
<td>#dateformat(AddedOn, "mmmm dd, YYYY")# at #timeformat(AddedOn, "hh:nn tt")#</td>
|
|
<td>
|
|
|
|
<CFQUERY name="get_orders" datasource="#application.datasource#">
|
|
SELECT O.UUID
|
|
FROM Orders O
|
|
WHERE O.UserID = #get_verified_users.ID#
|
|
ORDER BY O.ID DESC
|
|
</cfquery>
|
|
|
|
<cfparam name="looper" default="">
|
|
|
|
<cfset looper=0>
|
|
|
|
<cfloop query="get_orders">
|
|
<cfset looper=incrementvalue(looper)>
|
|
<a href="https://payfr.it/show_order.cfm?UUID=#get_orders.UUID#&is_admin_view=1" target="_blank">#looper#</a>,
|
|
</cfloop>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
</cfoutput>
|
|
|
|
</table>
|
|
|
|
<cfelseif form.mode eq "user_traffic">
|
|
|
|
<CFQUERY name="get_user_traffic" datasource="#application.datasource#">
|
|
SELECT V.PageMode, V.AddedOn
|
|
FROM VisitorTrackings V
|
|
WHERE V.UserID = #form.chip#
|
|
ORDER BY V.AddedOn DESC
|
|
</cfquery>
|
|
|
|
<table>
|
|
<tr>
|
|
<td>mode</td>
|
|
<td>date/time</td>
|
|
</tr>
|
|
<cfoutput query="get_user_traffic">
|
|
<tr>
|
|
<td>#PageMode#</td>
|
|
<td>#AddedOn#</td>
|
|
</tr>
|
|
</cfoutput>
|
|
</table>
|
|
|
|
|
|
<cfelse>
|
|
|
|
no mode provided!<br>
|
|
|
|
</cfif>
|
|
|
|
<cfelse>
|
|
|
|
please login!<br>
|
|
|
|
</cfif> |