<%@LANGUAGE="VBSCRIPT" %> <% Response.ExpiresAbsolute = Now() - 1 Response.AddHeader "Cache-Control", "must-revalidate" Response.AddHeader "Cache-Control", "no-cache" %> Delta Kaigan Judo Home



     Search


Get it on Google Play
Delta Kaigan Judo Home

News <%=TableSuffix%>
<% ' on error resume next DebugFlag = request.querystring("debug") ' Jan 2018 - connect to DKJ App news feed instead ' ErrorMessage = ConnectToDatabase() 'on error resume next ErrorMessage = "" if isObject(Conn) then set Conn = nothing end if Set Conn = Server.CreateObject("ADODB.Connection") if Err.Number <> 0 then ConnectToDatabase = "Unable to create database connection. Error = " & Err.Description else Conn.ConnectionString = "DRIVER={MySQL ODBC 3.51 Driver};database=delta23_DKJ_App;server=localhost;uid=delta23_dbwebuse;password=admin327" Conn.Open if Err.Number <> 0 then ErrorMessage = "Unable to connect to database. Error = " & Err.Description else if Conn.Errors.Count > 0 then ErrorMessage = "Unable to connect to database. Error = " & Conn.Errors(0).Description end if end if end if if ErrorMessage = "" then set adoRS = Server.CreateObject("ADODB.Recordset") adoRS.ActiveConnection = Conn ' adoRS.Open "select n.NewsNumber, n.Heading, n.NewsDate, n.Detail " & _ ' "from news" & TableSuffix & " n " & _ ' "where DisplayFlag = 1 " & _ ' "order by NewsDate DESC" adoRS.Open "select n.NewsKey NewsNumber, n.EffectiveDate NewsDate, n.NewsItem Detail, n.Hyperlink " & _ "from news n " & _ "where ActiveFlag = 'Y' " & _ "and ClubID in (0, 1) " & _ "and EffectiveDate <= curdate() " & _ "and ExpirationDate >= curdate() " & _ "order by EffectiveDate DESC" if Err.Number <> 0 then ErrorMessage = Err.Description else if adoRS.ActiveConnection.Errors.Count <> 0 then ErrorMessage = adoRS.ActiveConnection.Errors(0).Description end if end if if ErrorMessage = "" then NewsCount = 0 if not adoRS.EOF then while not adoRS.EOF NewsCount = NewsCount+1 Response.write "

" if not isnull(adoRS.fields("NewsDate").value) then DisplayDate = MonthName(month(adoRS.fields("NewsDate").value)) & " " & Day(adoRS.fields("NewsDate").value) & ", " & year(adoRS.fields("NewsDate").value) else DisplayDate = "" end if ' Response.Write "" response.write "" ' response.write adoRS.fields("Heading").value if DisplayDate <> "" then Response.Write DisplayDate end if response.write "

" ' Response.Write "
" Response.Write adoRS.Fields("Detail").Value if not isnull(adoRS.fields("Hyperlink").value) then if len(adoRS.fields("Hyperlink").value) <> 0 then Response.write ". For more details click here." end if end if adoRS.MoveNext wend end if if NewsCount = 0 then Response.write "

No news today" end if end if end if if ErrorMessage <> "" then if DebugFlag = "1" then response.write "

Error: " & ErrorMessage end if end if %>
© 2018 Delta Kaigan Judo, Delta BC, Canada. <% ' Get IP LOGIP = Request.ServerVariables ("HTTP_X_FORWARDED_FOR") If LOGIP = "" Then LOGIP = Request.ServerVariables ("REMOTE_ADDR") End if ' Code to count hits. Try to open file. If not found, skip. on error resume next fp = Server.MapPath("aspcount.txt") Set fs = CreateObject("Scripting.FileSystemObject") if fs.FileExists(fp) then ' Open for reading, don't create if not exist. Set a = fs.OpenTextFile(fp, 1, false) cts = a.readline a.close if cts = "" then ct = 0 else ct = Clng(cts) end if ' Check if session variable exists. If not, create it and increment counter. ' We don't want to count the same session over and over. if Session("ct") = "" then Session("ct") = ct ct = ct + 1 ' Open for writing Set a = fs.OpenTextFile(fp, 2, false) a.WriteLine(ct) a.Close end if end if Response.Write "You are visitor number: " Response.Write ct %>