![]() |
Sergey Kornilov admin 12/21/2006 |
Sheryl, |
|
skemp author 12/23/2006 |
Sheryl, could you post first 20-30 lines of your list file here?
|
![]() |
Sergey Kornilov admin 12/26/2006 |
I don't see where you have added the code snippet we are talking about. |
|
skemp author 1/3/2007 |
I don't see where you have added the code snippet we are talking about.
|
![]() |
Sergey Kornilov admin 1/3/2007 |
This way it should work. |
|
skemp author 1/3/2007 |
<!--#include file="include/dbcommon.asp"--> <!--#include file="include/LetterPrintQueue_variables.asp"--> <% SESSION("UserID") = "username" SESSION("AccessLevel") = ACCESS_LEVEL_USER SESSION("GroupID") = "CityView Users" if SESSION("UserID")="" then SESSION("MyURL")=request.ServerVariables("SCRIPT_NAME")&"?"&request.ServerVariables("QUERY_STRING") response.Redirect "login.asp?message=expired" response.End end if if not CheckSecurity(SESSION("OwnerID"),"Search") and not CheckSecurity(SESSION("OwnerID"),"Add") then response.Write "<p>" & "You don't have permissions to access this table" & " <a href=""login.asp"">" & "Back to login page" & "</a></p>" response.End end if %> <!--#include file="libs/smarty.asp"--> <% Session.LCID = 1033 on error resume next dbConnection="" dbconnect() call ReportError Set rs = server.CreateObject("ADODB.Recordset") Set rss = server.CreateObject("ADODB.Recordset") ' process reqest data, fill session variables if (Request.Form="" and Request.QueryString="") then For Each key in Session.Contents if left(key, len(strTableName)+1 ) = strTableName & "" and InStr(Mid(key, len(strTableName)+2), "" )<1 then Session.Contents.Remove(key) end if Next set strTableName_asearchnot = CreateObject("Scripting.Dictionary") set strTableName_asearchopt = CreateObject("Scripting.Dictionary") set strTableName_asearchfor = CreateObject("Scripting.Dictionary") set strTableName_asearchfortype = CreateObject("Scripting.Dictionary") set strTableName_asearchfor2 = CreateObject("Scripting.Dictionary") set session(strTableName & "_asearchnot")= strTableName_asearchnot set session(strTableName & "_asearchopt") = strTableName_asearchopt set session(strTableName & "_asearchfor") = strTableName_asearchfor set session(strTableName & "_asearchfor2") = strTableName_asearchfor2 set session(strTableName & "_asearchfortype") = strTableName_asearchfortype end if
|
![]() |
Sergey Kornilov admin 1/3/2007 |
If you like to add this to other files paste the same three lines into the beginning of each file. |
|
skemp author 1/3/2007 |
That worked Great!! Thank you. If I want to do this for other files is it the exact same code or is there one section from this that I can place in the 'before load' page?
|
![]() |
lefty 1/4/2007 |
Wonderful! Thank you so much. As always you are a tremendous help to me!
|
|
skemp author 1/5/2007 |
I am trying to accomplish the same thing ; but I have multiple groups . SESSION("UserID") = "username" SESSION("AccessLevel") = ACCESS_LEVEL_USER SESSION("GroupID") = "Group1" I want the user to go to list page and show only his group records ; but I have more than one group. If he belongs to another group then no records will show .
|