latest servers <% dim website, da_review function site_status() set statCON = Server.CreateObject("ADODB.Connection") statCON.Open(DSN) ' set up the query to list the news by date Desc sql = "SELECT " & _ "COUNT(id) AS number_servers, " & _ "MAX(datestamp) AS last_added " & _ "FROM server_info " & _ "WHERE shown = 1" 'Response.Write("Query = [" & query & "]
") set statRS = statCON.Execute(sql) ' make sure we have see if there is no records if (statRS.EOF) Then site_status = "" else site_status = " - " & statRS("number_servers") & " listed servers, last modifyed " & realdate(statRS("last_added")) end if 'close the news query statRS.close statCON.Close end function set tigCON = Server.CreateObject("ADODB.Connection") tigCON.Open(DSN) ' set up the query to list the news by date Desc query = "SELECT all * " & _ "FROM server_news " 'Response.Write("Query = [" & query & "]
") set tigRS = tigCON.Execute(query) ' make sure we have see if there is no records if (tigRS.EOF) Then %> There is no news atm - bummer hey :[

You could try a search for what you want - or maybe email LvL and remind us just how slack we are. <% else news = tigRS("news") datestamp = tigRS("datestamp") %>
+---------------------
|  ..::LvL's server news - <%=realdate(datestamp)%><%=site_status()%>
+---------------------
 
<%=news%>


<% 'close the news query tigRS.close end if set tigCON = Server.CreateObject("ADODB.Connection") tigCON.Open(DSN) query = "SELECT server_info.id AS id, server_info.info AS info, " & _ "server_info.website AS website, " & _ "server_info.ip AS ip, server_info.specs AS specs, " & _ "server_info.openhours AS openhours, " & _ "server_info.location AS location, " & _ "server_info.server_name AS server_name, " & _ "server_info.datestamp AS datestamp, server_info.comments AS comments, " & _ "server_info.maps AS maps, server_sysadmin.email AS email, " & _ "server_sysadmin.sysadmin AS sysadmin " & _ "FROM server_info INNER JOIN " & _ "server_sysadmin ON " & _ "server_info.sysadmin_id = server_sysadmin.id " & _ "WHERE server_sysadmin.active = 1 and server_info.shown = 1" & _ "ORDER BY datestamp DESC" page=Request.QueryString("page") If page="" then page = 1 end if pagesize=Request.QueryString("pagesize") If pagesize="" then pagesize = 8 end if set tigRS = tigCON.Execute(query) if (tigRS.EOF) Then %> The server is telling me there is currently no servers to list :[

Now we know that can't be right so maybe email LvL and we will give the HD a kick. <% else set tigRS=Server.CreateObject("ADODB.Recordset") tigRS.cursorlocation=aduseclient tigRS.cachesize=5 tigRS.open query,DSN tigRS.movefirst tigRS.pagesize=pagesize maxpages=cint(tigRS.pagecount) maxrecs=cint(tigRS.pagesize) tigRS.absolutepage=page howmanyrecs=0 howmanyfields=tigRS.fields.count -1 ' Now loop through then all do until tigRS.eof or howmanyrecs>=maxrecs website = tigRS("website") if Cint(tigRS("comments")) = 0 then comments_to_date = "none yet" else comments_to_date = tigRS("comments") end if da_review = tigRS("info") %>
+---------------------
|  <%=tigRS("server_name")%> run by "><%=tigRS("sysadmin")%>
+---------------------
<% if website <> "" then %> <% if instr(1,website,"http://") or instr(1,website,"ftp://") then %> <%=website%> <% else %> <%=website%> <% end if %> <% end if %> - updated <%=realdateshort(tigRS("datestamp"))%> - ">comments (<%=comments_to_date%>)
 
<%=da_review%>
  • <%=tigRS("server_name")%>
  • <%=tigRS("ip")%>
  • <%=tigRS("specs")%>
  • <%=tigRS("location")%>
  • <%=tigRS("openhours")%>
Current map rotation - <%=tigRS("maps")%>


<% tigRS.movenext howmanyrecs=howmanyrecs+1 loop ' close, destroy tigRS.close set tigRS=nothing 'close connection tigCON.close 'close the EOF if statment end if ' Now make the page _ of _ hyperlinks Call PageNavBar sub PageNavBar() pad=" " scriptname=request.servervariables("script_name") %>
+---------------------
Summary groups -  <% if (page mod 10) = 0 then counterstart = page - 9 else counterstart = page - (page mod 10) + 1 end if counterend = counterstart + 9 if counterend > maxpages then counterend = maxpages end if if counterstart <> 1 then ref="First : " Response.Write ref ref="Previous : " Response.Write ref end if 'Response.Write "[" for counter = counterstart to counterend if counter >= 8 then pad="" end if 'DEBUG 'Response.Write("page=[" & page & "]
") 'Response.Write("counter=[" & counter & "]
") 'Response.Write("right(cstr(counter),1)=[" & right(cstr(counter),1) & "]
") 'Response.Write("right(cstr(counter),2)=[" & right(cstr(counter),2) & "]
") 'i guess this could have been done a lot cleaner, however ... :] if len(counter) > 1 then if (right(cstr(counter),1) = "1") and (not right(cstr(counter),2) = "1") then tmp_group = cstr(counter) & "st" elseif (right(cstr(counter),1) = "2") and (not right(cstr(counter),2) = "1") then tmp_group = cstr(counter) & "nd" elseif (right(cstr(counter),1) = "3") and (not right(cstr(counter),2) = "1") then tmp_group = cstr(counter) & "rd" else tmp_group = cstr(counter) & "th" end if else if (right(cstr(counter),1) = "1") then tmp_group = cstr(counter) & "st" elseif (right(cstr(counter),1) = "2") then tmp_group = cstr(counter) & "nd" elseif (right(cstr(counter),1) = "3") then tmp_group = cstr(counter) & "rd" else tmp_group = cstr(counter) & "th" end if end if if cstr(counter) <> cstr(page) then ref="" & pad & tmp_group & "" else ref="" & pad & tmp_group & "" end if response.write ref if counter <> counterend then response.write " " end if next 'Response.Write "]" if counterend <> maxpages then ref=" : Next" Response.Write ref ref=" : Last" Response.Write ref end if %>
+---------------------

 

 

 

<% end sub %>