CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 Codecharge user redirection

Print topic Send  topic

Author Message
HELP URGENT - Ryan
Posted: 03/05/2002, 1:20 AM

http://www.gotocode.com/art.asp?art_id=55&
CLAIMS that IT is possible to redirect
users on the pages they are allowed to view.

I am developing a 3 page for 3 different
user rights: customer, developer, administrator.

On the login page, I logged as ADMIN then I
will be taken to the ADMIN page where I
can do ADMIN stuff (view, delete, etc.)

I logout then I will be taken back to the
login page.

However when I log-in again as a different
user say developer, I will be taken to the
same ADMIN page however with no ADMIN access
but the page I am redirected to is wrong.

CodeCharge seems to append the recent page
to the querystring of the adrress
bar (the login page) when the user logs-out. I tried to issue
a session.abandon prior to logging-out but
it does not work.

It only works when I remove the ENTIRE querystring from
http://127.0.0.1/1/planning/Login.asp?QueryString=&ret_...istration%2Easp
AND CHANGE IT to http://127.0.0.1/1/planning/Login.asp SURELY I WILL
be redirected to the right page I am intended to view.

Is there any way of redirecting to the right page w/out removing a querystring
from the address bar (because users definitely won't like that)

I am using ASP.
Brent
Posted: 03/05/2002, 1:45 AM

My users don't complain about this
CodeCharge Support
Posted: 03/05/2002, 1:51 AM

the workaround is to create Custom Login event and put redirection code there (without creating redirection.asp page). Obtain generated code and remove redirection code based on server variables, i.e. remove following code:

if not(sPage = request.serverVariables("SCRIPT_NAME")) and not(isEmpty(sPage)) then
response.redirect(sPage & "?" & sQueryString)
end if
response.redirect("ShoppingCart.asp")

Instead it it put code that redirects user to different pages depends on his rights:
if Session("UserRights") = 1 then response.redirect("student.asp") else if Session("UserRights") = 2 then response.redirect("teacher.asp") else if Session("UserRights") = 3 then response.redirect("admin.asp") else response.redirect("login.asp" )

meshal
Posted: 01/07/2003, 2:39 AM


   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.