<% 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("_" & strTableName & "_OwnerID"),"Search") and not CheckSecurity(SESSION("_" & strTableName & "_OwnerID"),"Add") then response.Write "

" & "You don't have permissions to access this table" & " " & "Back to login page" & "

" response.End end if %> <% ' on error resume next dbConnection="" db_connect() 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 ' before process list event DoEvent "BeforeProcessList dbConnection" if REQUEST("a")="showall" then SESSION(strTableName & "_search")=0 elseif REQUEST("a")="search" then SESSION(strTableName & "_searchfield")=postvalue("SearchField") SESSION(strTableName & "_searchoption")=postvalue("SearchOption") SESSION(strTableName & "_searchfor")=postvalue("SearchFor") if postvalue("SearchFor")<>"" or postvalue("SearchOption")="Empty" then SESSION(strTableName & "_search")=1 else SESSION(strTableName & "_search")=0 end if SESSION(strTableName & "_pagenumber")=1 elseif REQUEST("a")="advsearch" then set strTableName_asearchnot = CreateObject("Scripting.Dictionary") set strTableName_asearchopt = CreateObject("Scripting.Dictionary") set strTableName_asearchfor = CreateObject("Scripting.Dictionary") set strTableName_asearchfor2 = CreateObject("Scripting.Dictionary") set strTableName_asearchfortype = CreateObject("Scripting.Dictionary") tosearch=0 asearchfield = postvalue("asearchfield[]") if not isarray(asearchfield) then dim t t=asearchfield redim asearchfield(1) asearchfield(0)=t end if SESSION(strTableName & "_asearchtype") = postvalue("type") if SESSION(strTableName & "_asearchtype")="" then SESSION(strTableName & "_asearchtype")="and" for field=0 to ubound(asearchfield) gfield=asearchfield(field) asopt=postvalue("asearchopt_" & GoodFieldName(asearchfield(field))) value1=postvalue("value_" & GoodFieldName(asearchfield(field))) if value1="" then value1=postvalue("value_" & GoodFieldName(asearchfield(field)) & "[]") ttype=postvalue("type_" & GoodFieldName(asearchfield(field))) value2=postvalue("value1_" & GoodFieldName(asearchfield(field))) if value2="" then value2=postvalue("value_1" & GoodFieldName(asearchfield(field)) & "[]") nnot=postvalue("not_" & GoodFieldName(asearchfield(field))) if not SafeIsEmpty(value1) or asopt="Empty" then tosearch=1 strTableName_asearchopt.Add gfield,asopt if not isArray(value1) then strTableName_asearchfor.Add gfield,value1 else strTableName_asearchfor.Add gfield,combinevalues(value1) end if strTableName_asearchfortype.Add gfield,ttype if not SafeIsEmpty(value2) then strTableName_asearchfor2.Add gfield,value2 strTableName_asearchnot.Add gfield,nnot end if next set SESSION(strTableName & "_asearchnot")= strTableName_asearchnot set SESSION(strTableName & "_asearchfortype")= strTableName_asearchfortype set SESSION(strTableName & "_asearchopt") = strTableName_asearchopt set SESSION(strTableName & "_asearchfor") = strTableName_asearchfor set SESSION(strTableName & "_asearchfor2") = strTableName_asearchfor2 if tosearch<>0 then SESSION(strTableName & "_search")=2 else SESSION(strTableName & "_search")=0 end if SESSION(strTableName & "_pagenumber")=1 end if ' process masterkey value dim mastertable mastertable=postvalue("mastertable") if mastertable<>"" then SESSION(strTableName & "_mastertable")=mastertable ' copy keys to session i=1 while REQUEST("masterkey" & i)<>"" SESSION(strTableName & "_masterkey" & i)=REQUEST("masterkey" & i) i=i+1 wend ' reset search and page number SESSION(strTableName & "_search")=0 SESSION(strTableName & "_pagenumber")=1 else mastertable=SESSION(strTableName & "_mastertable") end if smarty.Add "mastertable",mastertable smarty.Add "mastertable_short",GetTableURL(mastertable) if REQUEST("orderby")<> "" then SESSION(strTableName & "_orderby")=REQUEST("orderby") if REQUEST("pagesize")<>"" then SESSION(strTableName & "_pagesize")=REQUEST("pagesize") SESSION(strTableName & "_pagenumber")=1 end if if REQUEST("goto")<>"" then SESSION(strTableName & "_pagenumber")=REQUEST("goto") ' process reqest data - end includes="" includes = includes & "" & vbCrLf if useAJAX then includes = includes & "" & vbCrLf end if includes = includes & "" & vbCrLf includes = includes & "" & vbCrLf if useAJAX then includes = includes & "
" & vbCrLf includes = includes & "
" & vbCrLf end if smarty.Add "includes",includes smarty.Add "useAJAX",useAJAX ' process session variables ' order by strOrderBy="" order_ind=-1 smarty.Add "order_dir_GameNumber","a" smarty.Add "order_dir_GameTime","a" smarty.Add "order_dir_WinningTeam","a" smarty.Add "order_dir_WinningScore","a" smarty.Add "order_dir_LosingTeam","a" smarty.Add "order_dir_LosingScore","a" smarty.Add "order_dir_WinningPitcher","a" smarty.Add "order_dir_LosingPitcher","a" smarty.Add "order_dir_Game_Comments","a" if SESSION(strTableName & "_orderby")<> "" then order_field=mid(SESSION(strTableName & "_orderby"),2) order_dir=mid(SESSION(strTableName & "_orderby"),1,1) order_ind=GetFieldIndex(order_field,"") AddDict smarty,"order_dir_GameNumber","a" if order_field="GameNumber" then if order_dir="a" then AddDict smarty,"order_dir_GameNumber","d" img="up" else img="down" end if AddDict smarty,"order_image_GameNumber","" end if AddDict smarty,"order_dir_GameTime","a" if order_field="GameTime" then if order_dir="a" then AddDict smarty,"order_dir_GameTime","d" img="up" else img="down" end if AddDict smarty,"order_image_GameTime","" end if AddDict smarty,"order_dir_WinningTeam","a" if order_field="WinningTeam" then if order_dir="a" then AddDict smarty,"order_dir_WinningTeam","d" img="up" else img="down" end if AddDict smarty,"order_image_WinningTeam","" end if AddDict smarty,"order_dir_WinningScore","a" if order_field="WinningScore" then if order_dir="a" then AddDict smarty,"order_dir_WinningScore","d" img="up" else img="down" end if AddDict smarty,"order_image_WinningScore","" end if AddDict smarty,"order_dir_LosingTeam","a" if order_field="LosingTeam" then if order_dir="a" then AddDict smarty,"order_dir_LosingTeam","d" img="up" else img="down" end if AddDict smarty,"order_image_LosingTeam","" end if AddDict smarty,"order_dir_LosingScore","a" if order_field="LosingScore" then if order_dir="a" then AddDict smarty,"order_dir_LosingScore","d" img="up" else img="down" end if AddDict smarty,"order_image_LosingScore","" end if AddDict smarty,"order_dir_WinningPitcher","a" if order_field="WinningPitcher" then if order_dir="a" then AddDict smarty,"order_dir_WinningPitcher","d" img="up" else img="down" end if AddDict smarty,"order_image_WinningPitcher","" end if AddDict smarty,"order_dir_LosingPitcher","a" if order_field="LosingPitcher" then if order_dir="a" then AddDict smarty,"order_dir_LosingPitcher","d" img="up" else img="down" end if AddDict smarty,"order_image_LosingPitcher","" end if AddDict smarty,"order_dir_Game_Comments","a" if order_field="Game Comments" then if order_dir="a" then AddDict smarty,"order_dir_Game_Comments","d" img="up" else img="down" end if AddDict smarty,"order_image_Game_Comments","" end if if order_ind<>"" then if order_dir="a" then strOrderBy="order by " & (order_ind) & " asc" else strOrderBy="order by " & (order_ind) & " desc" end if end if end if if strOrderBy="" then strOrderBy=gstrOrderBy ' page number mypage=cint(SESSION(strTableName & "_pagenumber")) if mypage=0 then mypage=1 ' page size PageSize=cint(SESSION(strTableName & "_pagesize")) if PageSize=0 then PageSize=gPageSize s="" if PageSize=10 then s="selected" smarty.Add "rpp10_selected",s s="" if PageSize=20 then s="selected" smarty.Add "rpp20_selected",s s="" if PageSize=30 then s="selected" smarty.Add "rpp30_selected",s s="" if PageSize=50 then s="selected" smarty.Add "rpp50_selected",s s="" if PageSize=100 then s="selected" smarty.Add "rpp100_selected",s s="" if PageSize=500 then s="selected" smarty.Add "rpp500_selected",s ' delete record set selected_recs = CreateObject("Scripting.Dictionary") if request("mdelete[]").Count>0 then for ind=1 to request("mdelete[]").Count set keys = CreateObject("Scripting.Dictionary") AddDict keys,"GameNumber",request("mdelete1[]").Item(request("mdelete[]").Item(ind)) AddDict selected_recs, ind, keys next elseif request("selection[]").Count>0 then for ind=1 to request("selection[]").Count set keys = CreateObject("Scripting.Dictionary") arr = split(request("selection[]").Item(ind) ,"&") if UBound(arr)-LBound(arr) = 1 - 1 then AddDict keys,"GameNumber", HTMLDecode(arr(0)) AddDict selected_recs, ind, keys end if next end if records_deleted=0 sr = selected_recs.Items for ind=1 to selected_recs.Count set keys = sr(ind-1) where = KeyWhere(keys,"") strSQL="delete from " & AddTableWrappers(strOriginalTableName) & " where " & where retval=true if retval then LogInfo(strSQL) dbConnection.Execute strSQL records_deleted = records_deleted + 1 DoEvent "AfterDelete """ & replace(where,"""","""""") & """, avalues" end if next if records_deleted>0 then DoEvent "AfterMassDelete(records_deleted)" end if ' make sql "select" string 'strSQL = gstrSQL strWhereClause="" ' add search params if SESSION(strTableName & "_search")=1 then ' regular search strSearchFor=trim(SESSION(strTableName & "_searchfor")) strSearchOption=trim(SESSION(strTableName & "_searchoption")) if SESSION(strTableName & "_searchfield")<> "" then strSearchField = SESSION(strTableName & "_searchfield") where = StrWhere(strSearchField, strSearchFor, strSearchOption, "") if where <>"" then strWhereClause = whereAdd(strWhereClause,where) else strWhereClause = whereAdd(strWhereClause,"1=1 and 1=0") end if else sstrWhere = "1=0" strWhereClause = whereAdd(strWhereClause,sstrWhere) end if else if SESSION(strTableName & "_search")=2 then ' advanced search set strTableName_asearchfortype = SESSION(strTableName & "_asearchfortype") set strTableName_asearchnot = SESSION(strTableName & "_asearchnot") set strTableName_asearchopt = SESSION(strTableName & "_asearchopt") set strTableName_asearchfor = SESSION(strTableName & "_asearchfor") set strTableName_asearchfor2 = SESSION(strTableName & "_asearchfor2") sWhere="" for each f in strTableName_asearchfor strSearchFor=trim(strTableName_asearchfor.item(f)) strSearchFor2="" ttype=strTableName_asearchfortype.item(f) for each i in strTableName_asearchfor2 if f=i then strSearchFor2=trim(strTableName_asearchfor2.item(i)) next if strSearchFor<>"" or true then if sWhere="" then if session(strTableName & "_asearchtype")="and" then sWhere="1=1" else sWhere="1=1 and 1=0" end if end if snot=strTableName_asearchnot.item(f) strSearchOption=trim(strTableName_asearchopt.Item(f)) where="" where=StrWhereAdv(f, strSearchFor, strSearchOption, strSearchFor2,ttype) if where<>"" then if snot<>"" then where="not (" & where & ")" if SESSION(strTableName & "_asearchtype")="and" then sWhere=sWhere & " and " & where else sWhere=sWhere & " or " & where end if end if end if next strWhereClause = whereAdd(strWhereClause,sWhere) end if end if if mastertable="login" then where ="" where=where & GetFullFieldName("ID1","") & "=" & make_db_value("ID1",SESSION(strTableName & "_masterkey1"),"","") strWhereClause = whereAdd(strWhereClause,where) end if strSQL = gSQLWhereAdd(strWhereClause) ' order by strSQL=strSQL & " " & trim(strOrderBy) ' save SQL for use in "Export" and "Printer-friendly" pages SESSION(strTableName & "_sql") = strSQL SESSION(strTableName & "_where") = strWhereClause SESSION(strTableName & "_order") = strOrderBy dim rowsfound ' select and display records if CheckSecurity(SESSION("_" & strTableName & "_OwnerID"),"Search") then strSQLbak = strSQL DoEvent "BeforeQueryList strSQL,strWhereClause,strOrderBy" ' Rebuild SQL if needed if strSQL<> strSQLbak then ' changed strSQL - old style numrows=GetRowCount(strSQL) else strSQL = gSQLWhereAdd(strWhereClause) strSQL = strSQL & " " & trim(strOrderBy) numrows=gSQLRowCount(strWhereClause,0) end if LogInfo(strSQL) ' Pagination: if numrows=0 then smarty("rowsfound")=false rowsfound=false dim message message="No records found" smarty("message")=message else smarty("rowsfound")=true rowsfound=true smarty("records_found")=numrows maxRecords = numrows maxpages=int(maxRecords/PageSize) if maxRecords mod PageSize <> 0 then maxpages=maxpages+1 if mypage > maxpages then mypage = maxpages if mypage<1 then mypage=1 maxrecs=PageSize smarty.Add "page",mypage smarty.Add "maxpages",maxpages ' write pagination smarty.Add "pagination","" strSQL = AddTop(strSQL, mypage*PageSize) end if rs.Open strSQL, dbConnection,1,2 call ReportError if not rs.EOF then rs.Move(PageSize*(mypage-1)) ' hide colunm headers if needed recordsonpage=numrows-(mypage-1)*PageSize if recordsonpage>PageSize then _ recordsonpage=PageSize if recordsonpage>=1 then smarty.Add "column1show",true else smarty.Add "column1show",false end if Set rowinfo = CreateObject("Scripting.Dictionary") shade=false recno=1 editlink="" copylink="" ri=0 Set fso = CreateObject("Scripting.FileSystemObject") while not rs.eof and recno<=PageSize Set row = CreateObject("Scripting.Dictionary") if not shade then row.Add "shadeclass","class=""shade""" row.Add "shadeclassname","shade" shade=true else row.Add "shadeclass","" row.Add "shadeclassname","" shade=false end if col=0 do while not rs.eof retval=true DoEvent "retval=BeforeProcessRowList(rs)" if retval=false then rs.MoveNext else exit do end if loop while not rs.EOF and recno<=PageSize and col<1 col=col+1 ' key fields keyblock="" row.Add col & "id1",my_htmlspecialchars(dbvalue(rs("GameNumber"))) keyblock = keyblock & my_htmlspecialchars(dbvalue(rs("GameNumber"))) row.Add col & "keyblock", my_htmlspecialchars(keyblock) row.Add col & "recno",recno ' detail tables ' edit page link editlink="" editlink=editlink & "editid1=" & my_htmlspecialchars(SafeURLEncode(dbvalue(rs("GameNumber")))) row.Add col & "editlink",editlink copylink="" copylink=copylink & "copyid1=" & my_htmlspecialchars(SafeURLEncode(dbvalue(rs("GameNumber")))) row.Add col & "copylink",copylink keylink="" keylink=keylink & "&key1=" & my_htmlspecialchars(SafeURLEncode(dbvalue(rs("GameNumber")))) ' GameNumber - value="" value = ProcessLargeText(GetData(rs,"GameNumber", ""),"field=GameNumber" & keylink,"",MODE_LIST) row.Add col & "GameNumber_value",value ' GameTime - value="" value = ProcessLargeText(GetData(rs,"GameTime", ""),"field=GameTime" & keylink,"",MODE_LIST) row.Add col & "GameTime_value",value ' WinningTeam - value="" value = ProcessLargeText(GetData(rs,"WinningTeam", ""),"field=WinningTeam" & keylink,"",MODE_LIST) row.Add col & "WinningTeam_value",value ' WinningScore - value="" value = ProcessLargeText(GetData(rs,"WinningScore", ""),"field=WinningScore" & keylink,"",MODE_LIST) row.Add col & "WinningScore_value",value ' LosingTeam - value="" value = ProcessLargeText(GetData(rs,"LosingTeam", ""),"field=LosingTeam" & keylink,"",MODE_LIST) row.Add col & "LosingTeam_value",value ' LosingScore - value="" value = ProcessLargeText(GetData(rs,"LosingScore", ""),"field=LosingScore" & keylink,"",MODE_LIST) row.Add col & "LosingScore_value",value ' WinningPitcher - value="" value = ProcessLargeText(GetData(rs,"WinningPitcher", ""),"field=WinningPitcher" & keylink,"",MODE_LIST) row.Add col & "WinningPitcher_value",value ' LosingPitcher - value="" value = ProcessLargeText(GetData(rs,"LosingPitcher", ""),"field=LosingPitcher" & keylink,"",MODE_LIST) row.Add col & "LosingPitcher_value",value ' Game Comments - value="" value = ProcessLargeText(GetData(rs,"Game Comments", ""),"field=Game+Comments" & keylink,"",MODE_LIST) row.Add col & "Game_Comments_value",value row.Add col & "show",true DoEvent "BeforeMoveNextList rs,row,col" dim span rs.MoveNext do while not rs.eof retval=true DoEvent "retval=BeforeProcessRowList(rs)" if retval=false then rs.MoveNext else exit do end if loop recno=recno+1 wend rowinfo.add ri,row ri=ri+1 wend smarty.Add "rowinfo",rowinfo rs.Close end if smarty.Add "userid",my_htmlspecialchars(SESSION("UserID")) ' table selector strPerm = GetUserPermissions("a Elims_Bantam") f=false if instr(strPerm, "A")<>0 or instr(strPerm, "S")<>0 then f=true smarty.Add "allow_a_Elims_Bantam",f strPerm = GetUserPermissions("a Elims_JrMen") f=false if instr(strPerm, "A")<>0 or instr(strPerm, "S")<>0 then f=true smarty.Add "allow_a_Elims_JrMen",f strPerm = GetUserPermissions("a Elims_Mens") f=false if instr(strPerm, "A")<>0 or instr(strPerm, "S")<>0 then f=true smarty.Add "allow_a_Elims_Mens",f strPerm = GetUserPermissions("a Elims_Midget") f=false if instr(strPerm, "A")<>0 or instr(strPerm, "S")<>0 then f=true smarty.Add "allow_a_Elims_Midget",f strPerm = GetUserPermissions("a Elims_Peewee") f=false if instr(strPerm, "A")<>0 or instr(strPerm, "S")<>0 then f=true smarty.Add "allow_a_Elims_Peewee",f strPerm = GetUserPermissions("a Elims_Srs") f=false if instr(strPerm, "A")<>0 or instr(strPerm, "S")<>0 then f=true smarty.Add "allow_a_Elims_Srs",f strPerm = GetUserPermissions("login") f=false if instr(strPerm, "A")<>0 or instr(strPerm, "S")<>0 then f=true smarty.Add "allow_login",f strPerm = GetUserPermissions("Provincials_BantamA") f=false if instr(strPerm, "A")<>0 or instr(strPerm, "S")<>0 then f=true smarty.Add "allow_Provincials_BantamA",f strPerm = GetUserPermissions("Provincials_BantamB") f=false if instr(strPerm, "A")<>0 or instr(strPerm, "S")<>0 then f=true smarty.Add "allow_Provincials_BantamB",f strPerm = GetUserPermissions("Provincials_Jr Mite") f=false if instr(strPerm, "A")<>0 or instr(strPerm, "S")<>0 then f=true smarty.Add "allow_Provincials_Jr_Mite",f strPerm = GetUserPermissions("Provincials_JrMensA") f=false if instr(strPerm, "A")<>0 or instr(strPerm, "S")<>0 then f=true smarty.Add "allow_Provincials_JrMensA",f strPerm = GetUserPermissions("Provincials_JrMensB") f=false if instr(strPerm, "A")<>0 or instr(strPerm, "S")<>0 then f=true smarty.Add "allow_Provincials_JrMensB",f strPerm = GetUserPermissions("Provincials_Masters") f=false if instr(strPerm, "A")<>0 or instr(strPerm, "S")<>0 then f=true smarty.Add "allow_Provincials_Masters",f strPerm = GetUserPermissions("Provincials_Mens") f=false if instr(strPerm, "A")<>0 or instr(strPerm, "S")<>0 then f=true smarty.Add "allow_Provincials_Mens",f strPerm = GetUserPermissions("Provincials_MidgetA") f=false if instr(strPerm, "A")<>0 or instr(strPerm, "S")<>0 then f=true smarty.Add "allow_Provincials_MidgetA",f strPerm = GetUserPermissions("Provincials_MidgetB") f=false if instr(strPerm, "A")<>0 or instr(strPerm, "S")<>0 then f=true smarty.Add "allow_Provincials_MidgetB",f strPerm = GetUserPermissions("Provincials_MiteA") f=false if instr(strPerm, "A")<>0 or instr(strPerm, "S")<>0 then f=true smarty.Add "allow_Provincials_MiteA",f strPerm = GetUserPermissions("Provincials_MiteB") f=false if instr(strPerm, "A")<>0 or instr(strPerm, "S")<>0 then f=true smarty.Add "allow_Provincials_MiteB",f strPerm = GetUserPermissions("Provincials_PeeweeA") f=false if instr(strPerm, "A")<>0 or instr(strPerm, "S")<>0 then f=true smarty.Add "allow_Provincials_PeeweeA",f strPerm = GetUserPermissions("Provincials_PeeweeB") f=false if instr(strPerm, "A")<>0 or instr(strPerm, "S")<>0 then f=true smarty.Add "allow_Provincials_PeeweeB",f strPerm = GetUserPermissions("Provincials_SquirtA") f=false if instr(strPerm, "A")<>0 or instr(strPerm, "S")<>0 then f=true smarty.Add "allow_Provincials_SquirtA",f strPerm = GetUserPermissions("Provincials_SquirtB") f=false if instr(strPerm, "A")<>0 or instr(strPerm, "S")<>0 then f=true smarty.Add "allow_Provincials_SquirtB",f strPerm = GetUserPermissions("Squirt Qualifier Port Perry") f=false if instr(strPerm, "A")<>0 or instr(strPerm, "S")<>0 then f=true smarty.Add "allow_Squirt_Qualifier_Port_Perry",f strPerm = GetUserPermissions("Squirt Qualifier Waubaushene") f=false if instr(strPerm, "A")<>0 or instr(strPerm, "S")<>0 then f=true smarty.Add "allow_Squirt_Qualifier_Waubaushene",f strPerm = GetUserPermissions("Mite Qualifier A") f=false if instr(strPerm, "A")<>0 or instr(strPerm, "S")<>0 then f=true smarty.Add "allow_Mite_Qualifier_A",f strPerm = GetUserPermissions("Mite Qualifier B") f=false if instr(strPerm, "A")<>0 or instr(strPerm, "S")<>0 then f=true smarty.Add "allow_Mite_Qualifier_B",f strPerm = GetUserPermissions("Provincials_MidgetC") f=false if instr(strPerm, "A")<>0 or instr(strPerm, "S")<>0 then f=true smarty.Add "allow_Provincials_MidgetC",f allow_add=CheckSecurity(SESSION("_" & strTableName & "_OwnerID"),"Add") smarty.Add "allow_delete",CheckSecurity(SESSION("_" & strTableName & "_OwnerID"),"Delete") smarty.Add "allow_add",allow_add smarty.Add "allow_edit",CheckSecurity(SESSION("_" & strTableName & "_OwnerID"),"Edit") smarty.Add "allow_export",CheckSecurity(SESSION("_" & strTableName & "_OwnerID"),"Export") smarty.Add "allow_import",CheckSecurity(SESSION("_" & strTableName & "_OwnerID"),"Import") allow_search=CheckSecurity(SESSION("_" & strTableName & "_OwnerID"),"Search") smarty.Add "allow_search",allow_search if CheckSecurity(SESSION("_" & strTableName & "_OwnerID"),"Delete") or CheckSecurity(SESSION("_" & strTableName & "_OwnerID"),"Export") then smarty.Add "allow_deleteorexport", True else smarty.Add "allow_deleteorexport", False end if display_grid=true display_grid = allow_search display_records=display_grid if not display_grid then _ display_records=false smarty.Add "display_grid",display_grid smarty.Add "display_records",display_records linkdata= "" if (useAJAX) then linkdata = linkdata & "" & vbcrlf end if if (useAJAX) then linkdata = linkdata & "" & vbcrlf end if smarty.Add "linkdata",linkdata smarty.Add "guest",SESSION("AccessLevel") = ACCESS_LEVEL_GUEST strSQL=SESSION(strTableName & "_sql") templatefile = "a_Elims_JrMen_list.htm" DoEvent "BeforeShowList smarty,templatefile" smarty_display(templatefile) %>