<% '---------------------------- '設定頁次及單頁顯示筆數 '---------------------------- If (Trim(Session("lngPageNo")) = "") Or (Clng(Session("lngPageNo")) = 0) Then Session("lngPageNo") = 1 End If Session("lngPageSize") = Session("PageNum") IF (Trim(Request("PageNo")) = "") Then Session("lngPageNo") = 1 Else Session("lngPageNo") = Request("PageNo") End If sn=request("sn") table_name="FAQ"&sn %> 人生中醫診所
<% SET rs2 = Server.CreateObject("ADODB.Recordset") rs2.Open "Select * From Visiter where sn="&sn , Conn,2,3 '------計數器------- IF CSTR(RS2("thisday")) <> CSTR(DATE()) THEN ' 如果日期已過了一天 rs2("thisday") = DATE() ' 將日期改為今天 rs2("yesterdaycount") = rs2("todaycount") ' 將今日人數與昨日人數交換 rs2("todaycount") = 1 ' 重新計算今日登入人數 rs2.Update ' 儲存資料 END IF rs2("todaycount")=rs2("todaycount")+1 '造訪人數加一 rs2("allcount")=rs2("allcount")+1 rs2.update i_today = rs2("todaycount") i_yesterday = rs2("yesterdaycount") i_all = rs2("allcount") %> <% set faqObj = Server.CreateObject("ADODB.Recordset") kid = request("kid") searchbox=trim(request("searchbox")) faqstr = "select * from "&table_name&" where online=1 " if searchbox <>"" then if kid = "1" then faqstr = faqstr + " and (QuestionTitle like '%"+ searchbox+"%' or Answer like '%"+ searchbox+"%' )" elseif kid = "2" then faqstr = faqstr + " and QuestionTitle like '%"+ searchbox+"%' " elseif kid = "3" then faqstr = faqstr + " and Answer like '%"+ searchbox+"%' " end if end if faqstr = faqstr + " order by questiondate desc,questionid desc " faqObj.open faqstr,Conn,1, 3 QuestionID=0 QuestionTitle=1 QuestionBody=2 UserName=3 Email=4 Answer=5 Online=6 QuestionDate=7 TotalRecCount=faqObj.recordcount lngPageNo = Session("lngPageNo") If Not faqObj.EOF Then 'change page start------------------------------------- if isEmpty(request("ToPage")) then ToPage = 1 else ToPage=Cint(request("ToPage")) 'get page end if 'add' PageSize = 10 faqObj.PageSize = PageSize lngPageCount = faqObj.PageCount if Clng(lngPageCount) >= Clng(lngPageNo) then faqObj.AbsolutePage = lngPageNo end if blnRstHaveData = True lngRstRowCount = PageSize lngRecordCount = faqObj.recordcount bgcolorCount = 0 'add end End if %>

訪客統計:<%=i_all%> 本日訪客:<%=i_today%> 昨日訪客:<%=i_yesterday%> 留言筆數:<%=TotalRecCount%>

<% while (NOT faqObj.eof) and (lngRstRowCount > 0) %>
留言主題
<%=faqObj(QuestionTitle)%>
作者:<%=faqObj(UserName)%> <%if faqObj(Email) <> "" then %> <%end if%>
留言日期:<%=faqObj(QuestionDate)%>
留言內容
<%=Replace(faqObj(QuestionBody),vbcrlf,"
")%>
<% if faqObj(Answer) <> "" then %>
<%=faqObj(QuestionTitle)%>醫師答覆
<%=Replace(faqObj(Answer),vbcrlf,"
")%>
<% end if %>

<% faqObj.movenext bgcolorCounter = bgcolorCounter + 1 lngRstRowCount = lngRstRowCount - 1 wend faqObj.Close set faqObj = nothing %>
<%if lngPageNo <> 1 Then%> 上一頁 <%END IF if Clng(lngPageNo) < Clng(lngPageCount) Then%> 下一頁 <%end if%>


人生中醫診所

預約電話 : 0800-568-999
E-Mail : jungyung4545@yahoo.com.tw

台北診所:台北市大同區重慶北路二段74號

台中診所:台中市復興路四段214號
高雄診所:高雄市建國二路158號



網頁更新日期:2018年01月12日
未經授權不得轉載本站網頁資訊