Hello,
I have created a application on a VPS and have developed to the stage of Testing.
Up to now have run the Web Application using developer, decided to move to Application server to handle the web site.
Installed the webserver, and license. All seems to work okay, except the Variable on my login processing page are not working.
E.G.
I can login and acces the main menu page. But vairiables on the Login page are not being created.
Sample of the Login processin page is below, is there anything I'm missing?
I have created a application on a VPS and have developed to the stage of Testing.
Up to now have run the Web Application using developer, decided to move to Application server to handle the web site.
Installed the webserver, and license. All seems to work okay, except the Variable on my login processing page are not working.
E.G.
I can login and acces the main menu page. But vairiables on the Login page are not being created.
Sample of the Login processin page is below, is there anything I'm missing?
<%a5 'dim the variables
Dim pUser as P'-- Used to get info about logged in user (options are guid, email, ulink, etc)
Dim vGUID as c
Dim vUlink as c
Dim Session.__Protected__IsAdministrator as l = .f.
Dim Session.Facility as N = 0
Dim Session.Firstname as c
Dim Session.Lastname as C
Dim Session.Username as c
Dim Session.FacilityName as c
Dim Session.ResidentID as N
Dim Session.ResidnetName as C
Dim Session.SecurityLevel as C
Dim Session.CIMUserID as C 'Used to Grab the Unique USerID for each Login
Dim session.FacilityType as c = " " 'Capture the Facility type
Dim Session.UserAdmin as l ' To capture if usre has Admin access.
'GET INFORMATION ABOUT THE CURRENTLY LOGGED IN USER
a5ws_logged_in_user_values(pUser,request,session)
group = a5ws_get_user_assignments(pUser.userid)
vGUID = a5ws_get_guid_from_user(pUser.userid) 'GUID is the user Unique User ID for the record stored in Login Security settings.
vUlink = a5ws_get_ulink_from_guid(vGUID) 'ULINK is the user ID value
Session.SecurityLevel = group
Session.CIMUserID = vUlink
'Open the named concetion
Dim cn as SQL::Connection
Dim flagResult as l
flagResult = cn.open("::Name::CIMSQLCONNECTION")
cn.PortableSQLEnabled = .t.
dim sqlstatement as c
' Get logged in users state , we will use this for filtering grids, lists etc.
table = "Employee"
filter = "EmployeID = '" + vUlink +"'"
result = "FacilityID"
result2 = "Lastname"
result3 = "Firstname"
Result6 = "Admin"
Session.Facility = sql_lookup(cn, table, filter, result)
Session.Lastname = sql_lookup(cn, table, filter, result2)
Session.Firstname = sql_lookup(cn, table, filter, result3)
Session.UserAdmin = sql_lookup(cn, table, filter, result6)
'Concatenate both sesison to get Username.
Session.Username = Session.Firstname + ", " + Session.Lastname
' Get logged in FaciltiyID , we will use this for getting facility name, and maybe filtering lists etc.
Factable = "Facility"
filterFac = "FacilityID = '"+ Session.Facility+"'"
result4 = "Fname"
Result5 = "Type"
Session.FacilityName = sql_lookup(cn, Factable, filterFac, result4)
session.FacilityType = sql_lookup(cn, Factable, filterFac, result5)
'Now Close the Connection
cn.Close()
response.redirect("MainMenu.a5w")
%>
Dim pUser as P'-- Used to get info about logged in user (options are guid, email, ulink, etc)
Dim vGUID as c
Dim vUlink as c
Dim Session.__Protected__IsAdministrator as l = .f.
Dim Session.Facility as N = 0
Dim Session.Firstname as c
Dim Session.Lastname as C
Dim Session.Username as c
Dim Session.FacilityName as c
Dim Session.ResidentID as N
Dim Session.ResidnetName as C
Dim Session.SecurityLevel as C
Dim Session.CIMUserID as C 'Used to Grab the Unique USerID for each Login
Dim session.FacilityType as c = " " 'Capture the Facility type
Dim Session.UserAdmin as l ' To capture if usre has Admin access.
'GET INFORMATION ABOUT THE CURRENTLY LOGGED IN USER
a5ws_logged_in_user_values(pUser,request,session)
group = a5ws_get_user_assignments(pUser.userid)
vGUID = a5ws_get_guid_from_user(pUser.userid) 'GUID is the user Unique User ID for the record stored in Login Security settings.
vUlink = a5ws_get_ulink_from_guid(vGUID) 'ULINK is the user ID value
Session.SecurityLevel = group
Session.CIMUserID = vUlink
'Open the named concetion
Dim cn as SQL::Connection
Dim flagResult as l
flagResult = cn.open("::Name::CIMSQLCONNECTION")
cn.PortableSQLEnabled = .t.
dim sqlstatement as c
' Get logged in users state , we will use this for filtering grids, lists etc.
table = "Employee"
filter = "EmployeID = '" + vUlink +"'"
result = "FacilityID"
result2 = "Lastname"
result3 = "Firstname"
Result6 = "Admin"
Session.Facility = sql_lookup(cn, table, filter, result)
Session.Lastname = sql_lookup(cn, table, filter, result2)
Session.Firstname = sql_lookup(cn, table, filter, result3)
Session.UserAdmin = sql_lookup(cn, table, filter, result6)
'Concatenate both sesison to get Username.
Session.Username = Session.Firstname + ", " + Session.Lastname
' Get logged in FaciltiyID , we will use this for getting facility name, and maybe filtering lists etc.
Factable = "Facility"
filterFac = "FacilityID = '"+ Session.Facility+"'"
result4 = "Fname"
Result5 = "Type"
Session.FacilityName = sql_lookup(cn, Factable, filterFac, result4)
session.FacilityType = sql_lookup(cn, Factable, filterFac, result5)
'Now Close the Connection
cn.Close()
response.redirect("MainMenu.a5w")
%>
Comment