| Nutritional Guidance - Health Clubs - Gyms - 24 Hour Fitness Centers -Open
24 Hours - Personal Training - Group Exercise - Weight Loss
Programs - Bootcamp - Boxing - Denton Texas - Justin Texas - Argyle Texas |
|
|
<%
Response.Expires = 0
Response.ExpiresAbsolute = Now() - 1
Response.AddHeader "pragma", "no-cache"
Response.AddHeader "cache-control", "private, no-cache, no-store, must-revalidate"
%>
<%
' Initialize common variables
x_ID = Null: ox_ID = Null: z_ID = Null
x_department = Null: ox_department = Null: z_department = Null
x_pageorder = Null: ox_pageorder = Null: z_pageorder = Null
x_status = Null: ox_status = Null: z_status = Null
x_pagename = Null: ox_pagename = Null: z_pagename = Null
x_main = Null: ox_main = Null: z_main = Null
x_subcontent = Null: ox_subcontent = Null: z_subcontent = Null
x_bottom = Null: ox_bottom = Null: z_bottom = Null
%>
<%
Response.Buffer = True
x_ID = Request.QueryString("ID")
If x_ID = "" Or IsNull(x_ID) Then Response.Redirect "default.asp"
' Get action
sAction = Request.Form("a_view")
If sAction = "" Or IsNull(sAction) Then
sAction = "I" ' Display with input box
End If
' Open connection to the database
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open xDb_Conn_Str
Select Case sAction
Case "I": ' Get a record to display
If Not LoadData() Then ' Load Record based on key
Session(ewSessionMessage) = "No records found"
conn.Close ' Close Connection
Set conn = Nothing
Response.Clear
Response.Redirect "default.asp"
End If
End Select
%>
<%
conn.Close ' Close Connection
Set conn = Nothing
%><%
'-------------------------------------------------------------------------------
' Function LoadData
' - Load Data based on Key Value
' - Variables setup: field variables
Function LoadData()
Dim rs, sSql, sFilter
sFilter = ewSqlKeyWhere
If Not IsNumeric(x_ID) Then
LoadData = False
Exit Function
End If
sFilter = Replace(sFilter, "@ID", AdjustSql(x_ID)) ' Replace key value
sSql = ewBuildSql(ewSqlSelect, ewSqlWhere, ewSqlGroupBy, ewSqlHaving, ewSqlOrderBy, sFilter, "")
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sSql, conn
If rs.Eof Then
LoadData = False
Else
LoadData = True
rs.MoveFirst
' Get the field contents
x_ID = rs("ID")
x_department = rs("department")
x_pageorder = rs("pageorder")
x_status = rs("status")
x_pagename = rs("pagename")
x_main = rs("main")
x_subcontent = rs("subcontent")
x_bottom = rs("bottom")
End If
rs.Close
Set rs = Nothing
End Function
%>
|