<% 'Needs to be registered to enter... If CStr(Request.Cookies("user")("Name")+Request.Cookies("user")("firstname")+Request.Cookies("user")("email")) = CStr(0) then vNotRegistered = true Session("Entered") = "NO" 'To be sure that first went true entrance 'response.end else Session("name") = request.Cookies("user")("name") Session("firstname") = Request.Cookies("user")("firstname") Session("password") = Request.Cookies("user")("password") Session("email") = Request.Cookies("user")("email") Session("Entered") = "OK" 'To be sure that first went through entrance End IF %> <% '## Entrance.asp '## Open DataBase Connection set my_Conn= Server.CreateObject("ADODB.Connection") my_Conn.Open ConnString '## Get Totals set rs1 = Server.CreateObject("ADODB.Recordset") strSQL = "Select * from Totals" rs1.open strSQL, my_conn Users = rs1("U_Count") Posts = rs1("P_Count") rs1.Close set rs1 = nothing '## Get all Forums From DB strSql = "SELECT * FROM Category" set rs = my_conn.Execute (StrSql) '## See when last here Session("last_here_date") = Request.Cookies("date") Response.Cookies("Date") = now() Response.Cookies("Date").Expires = dateadd("d",3500,now()) '## if never been here before, set last_here_date to -10 days if Session("last_here_date") = "" then Session("last_here_date") = dateadd("d",-10,now()) End if '## Function to display the "new" icon Function isNew(dt) if datediff("s", session("last_here_date"), dt) > 1 then isNew = "New" Else isNew = " " End If End Function %> <% 'If did not registered we display the following message If vNotRegistered = true then msg = "

To use the Vigier Forum"&CHR(44)&" you will need to " msg = msg & "register (Identify yourself). " msg = msg & " All information is kept secret by Vigier and is not given or sold to any company" msg = msg & "
In order to be user friendly your browser must accept cookies. Thank you.


" response.write msg vNotRegistered = false End If %>
You last visited - <%= session("last_here_date")%>
Total Posts : <%= Posts %> , Total Users : <%= Users %>

<% If rs.Eof or rs.Bof then ' No categories found in DB Response.Write "" Else do until rs.eof '## Grab the Categories. '## Build SQL to get forums via category strSql = "SELECT Forum.Forum_ID, Forum.F_Name, Forum.F_Description, Forum.F_Cat, Forum.F_Count, Forum.F_Last_Post, Forum.F_Moderator, Members.M_Name " strSql = strSql & "FROM Members INNER JOIN Forum ON Members.Member_id = Forum.F_Moderator " strSql = strSql & "where Forum.F_Cat = " & rs("cat_id") &" ORDER by Forum_ID" 'Response.Write "
"&strsql&"
" set rsForum = my_conn.Execute (StrSql) '## Display Category Response.Write "" if rsForum.eof or rsForum.bof then Response.Write "" else do until rsForum.Eof '## Display Forum Response.Write "" & vbcrlf Response.Write "" & vbcrlf Response.Write "" & vbcrlf Response.Write "" & vbcrlf Response.Write "" '& vbcrlf 'Moderator Response.Write "" Response.Write "" & vbcrlf rsForum.movenext loop End If rs.MoveNext loop End If %>
  Forums Number of posts Last Post
No Forums Found
"& rs("cat_name") & "
 
" & isNew(rsForum("F_Last_Post"))' & "" '##Forum description Response.Write " " & rsForum("F_Description") & ":
" & vbcrlf '##Forum link Response.Write " " Response.Write rsForum("F_name") & "
" & rsForum("F_Count") & "" & rsForum("F_Last_Post") & "" & rsForum("M_Name") & "

Refresh this page

<% my_conn.Close set my_conn = nothing set rs = nothing set rsForum = nothing %>