<%@LANGUAGE="VBScript"%> <% ' DCIPADD STUFF {{{ ' Dim DCIPADD, IPADDR, DREAMCENTER ' DCIPADD = Request.ServerVariables("REMOTE_ADDR") ' IPADDR = DCIPADD ' DCIPADD = Left(DCIPADD,10) ' Select Case DCIPADD ' Case "64.165.177" ' DREAMCENTER = "1" ' Case "64.170.44." ' DREAMCENTER = "1" ' Case "64.167.192" ' DREAMCENTER = "1" ' Case "64.171.72." ' DREAMCENTER = "1" ' Case "64.161.171" ' DREAMCENTER = "1" ' Case Else ' DREAMCENTER = "0" ' End Select ' DCIPADD = Left(DCIPADD,6) ' If DCIPADD = "63.206" then ' DREAMCENTER = "1" ' End If ' END OF DCIPADD STUFF }}} ' ' IPADDR FIRE REDIRECTS {{{ ' IPADDR = Left(IPADDR,7) ' If IPADDR = "203.62." then ' Response.Redirect("http://www.prayer.la/fire") ' End If ' If IPADDR = "210.56." then ' Response.Redirect("http://www.prayer.la/fire") ' End If ' IPADDR = Left(IPADDR,6) ' If IPADDR = "67.29." then ' Response.Redirect("http://www.prayer.la/fire") ' End If ' ' END OF IPADDR FIRE REDIRECTS }}} ' HEADER STUFF / DATE STUFF {{{ Response.Buffer = true Response.AddHeader "PRAGMA", "NO-CACHE" Response.ExpiresAbsolute = #Jan 01,1991 12:00:00# ' set date local to english Session.LCID = 1033 ' END HEADER STUFF / DATE STUFF }}} ' hit counter code {{{ Set FileObject = Server.CreateObject("Scripting.FileSystemObject") Set InStream = FileObject.OpenTextFile (path_file_page_counter, 1, false) OldHits = Trim(InStream.ReadLine) NewHits = OldHits + 1 Set OutStream = FileObject.CreateTextFile (path_file_page_counter, True) OutStream.WriteLine(NewHits) InStream.close OutStream.close Set InStream = Nothing Set OutStream = Nothing ' end of hit counter code }}} ' Prayer Confirmation Hit Counter code {{{ ' Re-use FileObject from hit counter code Set PrayerInStream = FileObject.OpenTextFile (path_file_prayer_hits, 1, false) PrayerNewHits = Trim(PrayerInStream.ReadLine) PrayerInStream.close ' now we set FileObject to nothing to clean up Set FileObject = Nothing Set PrayerInStream = Nothing ' End of Prayer Confirmation Hit Counter code }}} ' Sub disp_id {{{ Sub disp_id dim conn dim rs dim sql dim rec_idx set conn = server.createobject("ADODB.connection") conn.open DSN_prayer_db set rs=server.CreateObject("ADODB.recordset") sql="SELECT * FROM " & table_prayer & " ORDER BY ID DESC" rs.open sql,conn,1,3 Do While Not rs.EOF %> Name: <%=rs("name")%>  ID: <%=rs("ID")%>  E-mail: <%=rs("email")%>
<%=rs("prayer")%>

<% rs.MoveNext Loop rs.close set rs = nothing conn.close set conn = nothing End Sub ' End Sub disp_id }}} ' Sub del_id {{{ Sub del_id dim conn dim rs dim sql dim rec_idx set conn = server.createobject("ADODB.connection") conn.open DSN_prayer_db set rs=server.CreateObject("ADODB.recordset") sql="SELECT * FROM " & table_prayer rs.open sql,conn,1,3 rs.MoveFirst rs.Find "ID = '" & Request.QueryString("ID") & "'" If rs.EOF Then Response.Write("ID = " & Request.QueryString("ID") & " was not found.") Else rs.delete Response.Write("
ID = " & Request.QueryString("ID") & " was deleted.") End If rs.update rs.close set rs = nothing conn.close set conn = nothing End Sub ' End Sub del_id }}} ' Sub find_id {{{ Sub find_id dim conn dim rs dim sql dim rec_idx set conn = server.createobject("ADODB.connection") conn.open DSN_prayer_db set rs=server.CreateObject("ADODB.recordset") sql="SELECT * FROM " & table_prayer rs.open sql,conn,1,3 rs.MoveFirst rs.Find "ID = '" & Request.QueryString("ID") & "'" If rs.EOF Then Response.Write("ID = " & Request.QueryString("ID") & " was not found.") Else Response.Write("Name = " & rs("name") & "  " & "ID = " & rs("ID") & "  " & "
" & rs("prayer")) End If rs.close set rs = nothing conn.close set conn = nothing End Sub ' End Sub find_id }}} ' Sub display_paging_links(page_count, current_page, url) {{{ Sub display_paging_links(page_count, current_page, url) Dim page_itr ' page iterator, holds number of current page, Response.Write("") Response.Write("") Response.Write("") Response.Write("
") If current_page = 1 then ' if on first page, [prev] is not a link Response.Write("[<< Prev]  ") Else ' else, if on other page, [prev] is link to current_page - 1 Response.Write("[<< Prev]  ") End If Response.Write("") Response.Write("
") ' start processing the pages... For page_itr = 1 to page_count step 1 ' iterate through pages Dim spaced_itr ' this is the actual number displayed on the page ie 1|2|3|4| etc.. Dim pad_to ' this is how many places to pad the page link to... Dim need_pad ' this is a temp variable denoting how many pad spaces we need pad_to = 3 need_pad = pad_to - Len(page_itr) ' this loop checks the length of page_itr, if less than the pad_to, then spaced_itr ' has an "invisible" zero tacked in front, needs to be a zero (more accurately a number not ' necessarily zero) in order to have proper spacing, a non-breaking space does not line up ' correctly. spaced_itr = "" Do While need_pad <> 0 spaced_itr = spaced_itr & "0" need_pad = need_pad - 1 Loop spaced_itr = spaced_itr & "" & page_itr ' if the the current page iteration we're on is evenly divisible by 15 (ie, we're processing ' page 15, 30, 45, etc) then put a break... If ((page_itr Mod 15) = 0) then ' if the current page iteration we're on equals the actual page the user is looking at, ' then make it bold and red and NOT a link... If (page_itr = current_page) then Response.Write("" & spaced_itr & "") If ((page_itr <> page_count) and ((page_itr Mod 15) <> 0)) then Response.Write("|") Response.Write("
") ' if not, then make it blue and a link... Else Response.Write("" & spaced_itr & "") If ((page_itr <> page_count) and ((page_itr Mod 15) <> 0)) then Response.Write("|") Response.Write("
") End If ' if not, then just print the page number & link WITHOUT breaking to the next line... Else ' if the current page iteration we're on equals the actual page the user is looking at, ' then make it bold and red and NOT a link... If (page_itr = current_page) then Response.Write("" & spaced_itr & "") If ((page_itr <> page_count) and ((page_itr Mod 15) <> 0)) then Response.Write("|") ' if not, then make it blue and a link... Else Response.Write("" & spaced_itr & "") If ((page_itr <> page_count) and ((page_itr Mod 15) <> 0)) then Response.Write("|") End If End If ' go to next page in the sequence... Next Response.Write("
") Response.Write("
") ' if the current page the user is looking at, is the last page, then print out [next] without making it a ' link... If current_page = page_count then Response.Write("  [Next >>]") ' else if we're on any page but the last, then make [next] a link to the current_page + 1 Else Response.Write("  [Next >>]") End If Response.Write("
") End Sub ' End Sub display_paging_links }}} ' Sub display_paging_links2(page_count, current_page, url) {{{ Sub display_paging_links2(page_count, current_page, url) Dim page_itr ' page iterator, holds number of current page, Response.Write("") Response.Write("") Response.Write("") Response.Write("
") If current_page = 1 then ' if on first page, [prev] is not a link Response.Write("[<< Prev]  ") Else ' else, if on other page, [prev] is link to current_page - 1 Response.Write("[<< Prev]  ") End If Response.Write("") Response.Write("
") ' start processing the pages... Response.Write("
") Response.Write("
") ' if the current page the user is looking at, is the last page, then print out [next] without making it a ' link... If current_page = page_count then Response.Write("  [Next >>]") ' else if we're on any page but the last, then make [next] a link to the current_page + 1 Else Response.Write("  [Next >>]") End If Response.Write("
") End Sub ' End Sub display_paging_links2 }}} ' Sub display_header() {{{ Sub display_header() %> 1 World Center International Intercessory Prayer Request page <% end sub ' End Sub display_header() }}} ' sub save_prayer() {{{ sub save_prayer() dim conn dim rs dim sql dim trimmed_name dim raw_prayer dim passone_prayer dim passtwo_prayer ' potty mouth check variables dim check_data check_data = Request.Form("name") & "|" & Request.Form("prayer") if ((MatchObscenities(check_data) <> True) and (MatchProfanities(check_data) <> True)) then set conn = server.createobject("ADODB.connection") conn.open DSN_prayer_db set rs=server.createobject("ADODB.recordset") sql="SELECT * FROM " & table_prayer rs.open sql,conn,1,3 rs.addnew if Request.Form("name") = "" then ' no name was entered rs("name") = "them" elseif InStr(Request.Form("name"),"@") <> 0 then ' name has an @ symbol in it, probably an email address ' name changed to "them" rs("name") = "them" else rs("name") = Request.Form("name") end if rs("IP") = Request.ServerVariables("REMOTE_ADDR") rs("email") = request.form("email") rs("prayer") = Request.Form("prayer") rs("dt") = date if Request.Form("display") = "on" then rs("display") = true else rs("display") = false end if rs.update rs.close conn.close set rs = nothing set conn = nothing if Request.Form("email") <> "Request1@pray.cn" then call prayer_flood_scan(Request.Form("email")) end if end if Response.Redirect("answered-prayers-praise-reports.html?submitted=1") end sub ' end sub save_prayer }}} ' sub delete_old() {{{ sub delete_old() ' function to delete old database entries, anything over X days old (determined by ' dat variable, dat=date-X, where X equals how many days) dim conn dim sql dim dat dat = date - 29 set conn = server.createobject("ADODB.connection") sql = "DELETE FROM " & table_prayer & " WHERE dt <= # " & dat & " #" conn.open DSN_prayer_db conn.execute sql,,1 conn.close set conn = nothing end sub ' end sub delete_old() }}} ' sub prayer_flood_scan(request_email) {{{ sub prayer_flood_scan(request_email) dim conn dim rs dim sql dim count set conn = server.createobject("ADODB.connection") conn.open DSN_prayer_db set rs=server.CreateObject("ADODB.recordset") sql="SELECT * FROM " & table_prayer rs.open sql,conn,1,3 if rs.eof then 'do not scan (ie no code here so that nothing is done) else count = 0 do until rs.eof if InStr(rs("email"),request_email) <> 0 then count = count + 1 rs.movenext loop end if rs.close set rs = nothing conn.close set conn = nothing if count > 5 then call deflood_db(request_email) end sub ' end sub prayer_flood_scan(request_email) }}} ' sub deflood_db(email) {{{ sub deflood_db(email) dim conn dim rs dim sql dim rec_idx set conn = server.createobject("ADODB.connection") conn.open DSN_prayer_db set rs=server.CreateObject("ADODB.recordset") sql="SELECT * FROM " & table_prayer & " WHERE email = '" & email & "' ORDER BY ID DESC" rs.open sql,conn,1,3 rec_idx = rs.RecordCount do until rec_idx = 1 rec_idx = rec_idx - 1 rs.movenext loop rs.delete rs.movefirst rs.update rs.close set rs = nothing conn.close set conn = nothing end sub ' end sub deflood_db(email) }}} ' sub display_links_logo() {{{ sub display_links_logo() %>

Enter Praise Report

Enter Prayer Request
Prayer Home Page






Espa˝ol
Franšais
Deutsch
Italiano

Click here to view or ADD Praise Reports and Answered Prayers


You can Help change the world by sharing the World Center for Intercessory Prayer - Online Prayer Request Site with others. click this link to recommend it

Prayer.la Answered Prayers Page

<% =FormatDateTime(date,1) %>
Prayer Warriors have offered <%=PrayerNewHits%> Prayers of Intercession Here.
<% end sub ' end sub display_links_logo }}} ' sub display_prayer_info() {{{ sub display_prayer_info() %>

Praise Reports and Answered Prayers

 

This Page is for Praise Reports


Praise Reports Page
<% call display() %>
<% end sub ' end sub display_prayer_info() }}} ' sub prayer_form() {{{ sub prayer_form() %>

Enter Your Prayer Request Here (* = required)

First Name
Email *

Prayer Request*

Uncheck this box if you do not wish to display your email address:
PLEASE! click 'Submit' only ONCE!, processing may take a few minutes.
SPAMMING POLICY: Covering the Front Page with
the same prayer over and over again is considered
Spamming and they will be removed.
<% end sub ' end sub prayer_form() }}} ' sub display_thanks {{{ sub display_thanks Response.Write("

Thanks for posting your
prayer request!



") Response.Write("Click here to continue praying for others!
") end sub ' end sub display_thanks }}} ' Main Program LOGIC {{{ dim show_form dim remove_form show_form = Request.QueryString("show") remove_form = request.querystring("remove") show_thanks = Request.QueryString("submitted") if Request.QueryString("letmesee") = 1 Then call disp_id() Elseif Request.QueryString("getridofit") = 1 Then If Request.QueryString("ID") = "" Then Response.Write("Please enter an ID") Else call del_id() End If elseif Request.QueryString("whereisit") = 1 Then If Request.QueryString("ID") = "" Then Response.Write("Please enter an ID") Else call find_id() End If elseif request.form("submit") = "Submit My Request" then save_prayer() elseif remove_form = 1 then Response.Redirect("remove.asp?e=" & request.querystring("email")) elseif show_form = 1 then call display_header() call display_links_logo() call prayer_form() elseif show_thanks = 1 then call display_header() call display_links_logo() call display_thanks() else call display_header() call display_links_logo() call display_prayer_info() 'call delete_old() -- dont delete old stuff 'call display() -- now displayed via display_prayer_info() call display_counter_tracker() end if ' end LOGIC }}} ' sub display() {{{ sub display() ' Declare variables Dim iPageSize 'How big our pages are Dim strPageCount 'The number of pages we get back Dim strPageCurrent 'The page we want to show Dim strSql 'SQL select to limit fields Dim conn 'The connection object Dim rs 'The recordset object iPageSize = 15 If Request("page") = "" Then strPageCurrent = 1 Else strPageCurrent = CInt(Request("page")) End If 'Create db connection and recordset objects 'Open the connection string Set conn = Server.CreateObject("ADODB.Connection") Set rs = Server.CreateObject("ADODB.Recordset") conn.Open DSN_prayer_db ' Set cursor location and pagesize rs.CursorLocation = 3 rs.PageSize = iPageSize 'set sql statement to a local variable strSql = "SELECT * FROM " & table_prayer & " ORDER BY ID DESC" ' Open Recordset object rs.Open strSql, conn, 0, 1, 1 ' Get the count of the pages using the given page size strPageCount = rs.PageCount ' If the request page falls outside the range, ' give them the closest match (1 or max) If 1 > strPageCurrent Then strPageCurrent = 1 If strPageCurrent > strPageCount Then strPageCurrent = strPageCount If rs.eof Then %>

No Praise Reports have been posted.

<% Else ' Move to the selected page rs.AbsolutePage = strPageCurrent %> <% ' Loop through our records Do While rs.AbsolutePage = strPageCurrent And Not rs.EOF %> <% ' begin dynamic table cell color change based on date of prayer entry {{{ Dim s_bgcolor Select Case Left(cstr(FormatDateTime(rs("dt"),1)),InStr(cstr(FormatDateTime(rs("dt"),1)),",")-1) Case "Sunday" s_bgcolor = "#5588BB" Case "Monday" s_bgcolor="#1188CC" Case "Tuesday" s_bgcolor="#4444DD" Case "Wednesday" s_bgcolor="#6699CC" Case "Thursday" s_bgcolor="#3388CC" Case "Friday" s_bgcolor="#3344DD" Case "Saturday" s_bgcolor="#4499AA" End Select ' end dynamic table cell color change }}} %> <% rs.movenext loop %>
Page <%=strPageCurrent%> of <%=strPageCount%>

<% call display_paging_links(strPageCount, strPageCurrent, "answered-prayers-praise-reports.html") %>
"> ">

<% 'if length of Email Prayer is over 1200 the trununcate and place MORE link to display full prayer 'Response.Write("" & Left(rs("prayer"),1200) & "") 'If Len(rs("prayer")) > 1200 Then ' Response.Write("

 ...More

") 'End If ' Just display full praise report. Response.Write("" & rs("prayer") & "") %>

<% ' if Display Email field in db is true, display email address, else ' do nothing if rs("display") = true then Response.Write( "

" & rs("email") & " posted on " & rs("dt") & "

") Else Response.Write( "

"& " prayer request posted on " & rs("dt") & "

") end if %>
<% call display_paging_links2(strPageCount, strPageCurrent, "./answered-prayers-praise-reports.html") %>
Page <%=strPageCurrent%> of <%=strPageCount%>

<% end if ' if rs.eof - record looping ' Close all objects and clear from Memory rs.Close conn.Close Set rs = Nothing Set conn = Nothing end sub ' end sub display() }}} ' sub display_counter_tracker {{{ sub display_counter_tracker() %>

















Every Day a Miracle! Click here to see the reports of cancers healed, marriages restored, blind eyes opened, deaf ears hear, finances coming in and so much more.






























<% end sub ' end sub display_counter_tracker }}} %>