<%@LANGUAGE="VBSCRIPT" CODEPAGE="950"%> <%dim time1,time2 time1=timer dim page,indexfilename,indeximg,db,n,x,bookbg,txt,jd100_top,jd100_foot,m,jd100_fla indexfilename=right(Request.ServerVariables("PATH_TRANSLATED"),(len(Request.ServerVariables("PATH_TRANSLATED"))-instrRev(Request.ServerVariables("PATH_TRANSLATED"),"\"))) imdeximg="img/" '圖片文件夾 db="jd100.mdb" '數據庫 set Conn=Server.CreateObject("ADODB.Connection") Conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & Server.MapPath(db) n=10 '每頁顯示留言數 x=5 '每頁顯示的頁數 m=10 '留言頭像可選個數,男101-199.gif 女001-099.gif,各可增加到99個 bookbg="" '背景圖片,當不使用背景圖時,保持為空 "" 'bookbg="../images/bgbg.gif" txt=1000 '留言的最大字數 jd100_top="" '設置頁頭信息welcome.gif可換成你的logo放在圖片目錄下 dim webtitle,webname,webyn,webgl,webyn2,view2 set rs1 = conn.execute("select * from admin") webtitle=rs1("title") if rs1("webname")<>"" then webname=rs1("webname") if rs1("gbyn")<>"" then webyn=rs1("gbyn") webgl=rs1("gl") rs1.close set rs1=nothing '設置頁腳信息,這裡可以加入你的地址 'jd100_foot="版權所有(C):"& webname &"
"& "本留言本言論純屬發表者個人意見,與 " & webname &" 立場無關" jd100_fla=1 '是否顯示首頁,浮動動畫, 1 顯示, 0 不顯示 page =Request.QueryString("page") if page="" or page=0 then page=1 action = Request.QueryString("action") action_e = Request.Form("action_e") if action_e <>"" then server_v1=Cstr(Request.ServerVariables("HTTP_REFERER")) server_v2=Cstr(Request.ServerVariables("SERVER_NAME")) if mid(server_v1,8,len(server_v2))<>server_v2 then response.write "

" response.write "
" response.write "你提交的路徑有誤,禁止從站點外部提交數據請不要亂該參數!" response.write "
" response.end end if end if %> <%=webname%> <% if len(bookbg)<3 then bookbg="" else bookbg="background="& imdeximg & bookbg end if %>
本公司團隊自1992年進入高架活動地板業界,16年來,以踏實的經營理念、以及完善的施工品質,長久以來一直深獲客戶們的好評。並且完成許多指標型之大型個案。

 億輝工程有限公司

Yi-Hui Construction Limited Company

億輝工程有限公司留言板
         
> <% '主程序 Select Case action_e Case "" Case "Add_New" Call Add_New_Execute() Case "reply" Call Reply_Execute() Case "admin" Call Admin_Login_Execute() Case "EditPWD" Call EditPWD_Execute() Case "Edit" Call Edit_Execute() Case "Edit_web" Call Edit_web() End Select Call Main_Menu() Select Case action Case "UbbHelp" Call UbbHelp() Case "Admin_Login" Call Admin_Login() Case "Exit" Call Exit_Admin() Call View_Words() Case "" Call View_Words() Case "Add_New" Call Add_New() Case "reply" Call Reply() Case "View_Words" Call View_Words() Case "Delete" Call Delete() Call View_Words() Case "EditPWD" Call EditPWD() Case "Edit" Call Edit() Case "Edit_web" Call Edit_web() case "manageusr" call manageusr() End Select %>
<% '添加一條新留言 %> <% Sub Add_New() %>
發 表 留 言

姓名:

*10個字內

首頁:

公司:

電子郵箱:

*
<% call ubb_jd100() %>

留言內容:

*
  最多字數:> 已用字數: 剩餘字數:>
 

<% End Sub %> <% Sub Main_Menu() %>
留言板首頁 我要留言
HELP <% If Session("Admin")="Login" Then %>  退出管理  <% Else %> 管理留言  <% End If %> <% If Session("Admin")="Login" and session("flag")<1 Then %> 基本設置  <%end if%> <% If Session("Admin")="Login" and session("flag")<1 Then %> 用戶管理  <%end if%> <%if session("admin")="Login" then%> 修改密碼 <% End If %>
<% End Sub ''''''''''''''''''''''' '查看留言 Sub View_Words() dim gbcount,y,j,k set rs = conn.execute("select COUNT(*) as gbcount From words") gbcount=rs("gbcount") rs.close if gbcount/n = int(gbcount/n) then '計算出分頁數 y=int(gbcount/n) else y=int(gbcount/n)+1 end if page2= int(page/x) if page/x>page2 then page2=page2+1 k=page2*x if k>y then k=y '打開留言字段' if page=1 then sql="select top "&n&" id,name,sex,head,web,email,title,words,date,reply,ip,come,view,qq From words Order By id Desc" else sql="select id,name,sex,head,web,email,title,words,date,reply,ip,come,view,qq From words Order By id Desc" end if if Page >100 then rs.Open sql,Conn,1 else Set Rs=Conn.Execute(sql) end if if Page>1 then RS.Move n*page-n %>
<% if len(webtitle)>2 then %> <% end if %>
有<%=gbcount %>則留言 <%=page %>/<%=y %>頁 分頁 << <% if page2>1 then %> < <% end if %> <% For m =page2*x-(x-1) To k %> [<%=m%>] <% Next %> <% if page2*x < y then %> > <% end if %> >>
<%=webtitle %>
<% if rs.bof and rs.eof then Response.Write "當前沒有留言記錄" %> <% dim lou,words,reply,email,qq,web,come if Request.QueryString("page")<2 then lou=gbcount else lou=gbcount-((Request.QueryString("page")-1)*n) end if i=0 do while not rs.eof and i <% if webyn=0 and rs("view")=0 and session("admin")="" then %><% else%>
<% end if %>
 留言者:<%=rs("name")%>
發表於:<%=year(Rs("date"))%>年<%=month(Rs("date"))%>月<%=day(Rs("date"))%>日 <% if len(trim(rs("web")))>8 then %> <% end if %>    <% if len(trim(rs("email")))>6 then %> EMAIL:<%=rs("email")%> <% end if %>   <% if len(trim(Rs("come")))>1 then %> 來自:<%=rs("come")%> <% end if %> <% If Session("Admin") = "Login" and session("flag")<1 Then %>  ">   ">
<% if webyn=0 and rs("view")=0 and session("admin")="" then%> 留言需要經過審批才能查看 <%elseif webyn=1 then%> <%=Ubb(unHtml(words))%> <% if len(trim(reply))>1 then%>
站長回復
<%=Ubb(unHtml(reply))%> <%end if %> <%elseif session("admin")<>"" then%> <%=Ubb(unHtml(words))%> <% if len(trim(reply))>1 then%>
站長回復
<%=Ubb(unHtml(reply))%> <%end if %> <%end if %>
<% end if%>
<% lou=lou-1 rs.movenext loop Rs.Close Set Rs = Nothing %>
有<%=gbcount %>則留言 <%=page %>/<%=y %>頁 分頁 << <% if page2>1 then %> < <% end if %> <% For m =page2*x-(x-1) To k %> [<%=m%>] <% Next %> <% if page2*x < y then %> > <% end if %> >>
<% End Sub %> <% '''''''''管理員登陸接口 %> <% Sub Admin_Login() dim num1 dim rndnum Randomize Do While Len(rndnum)<4 num1=CStr(Chr((57-48)*rnd+48)) rndnum=rndnum&num1 loop session("jd100_rn")=rndnum %>  
管理登入
   用 戶 名:
   密   碼:
   輸入驗證碼:
<%=session("jd100_rn")%>
 

<% End Sub%> <% ''''''''''' %> <%Sub UbbHelp()%>
功能幫助
[img]
這裡填寫圖片的絕對地址如 http://www.y-hui.com.tw/aaa.jpg [/img]
[url]
這裡填寫連接地址 http://www.y-hui.com.tw/ [/url]
[swf]
這裡填寫SWF文件的地址 http://www.y-hui.com.tw/yanshi.swf [/swf]
[email]
這裡填寫電子信箱地址 yihui.com@gmail.com [/email]
[color=顏色]
這裡填寫要著色的文字 [/color]
[size=大小]
這裡填寫要加大的文字 [/size]
[font=字體]
這裡填寫要改變字體的文字 [/font]
<%End Sub%>
<%Sub EditPWD()%> <% If Session("Admin")="" Then Response.Write "連接超時,請重新登錄" Response.End end if %>
修改密碼
舊用戶名:
新用戶名:
確認新用戶名:
舊 密 碼:
新 密 碼:
確認新密碼:
<%End Sub%> <% Sub Edit() %> <% Sql="Select * From words Where id="&Request.QueryString("id") set rs=conn.execute(sql) view2="" if rs("view")=1 then view2="checked" end if %>
編輯留言內容及回覆
留言者: 名稱:<%=Rs("name")%>  公司:<%=Rs("come")%>
時間:<%=Rs("date")%> ip:<%=Rs("ip")%>
郵箱:  <%=Rs("email")%>
留言內容:

修改原文
  <% call ubb_jd100() %>
回覆:
<% if webyn=1 then%>
> 通過審批 <% end if %>
">     返回
<% rs.close set rs=nothing End Sub %>
<% Sub Edit_web() %> <% if Request.Form("submit")="修改" then Set Rs = Server.CreateObject("ADODB.RecordSet") Sql="Select * From admin" Rs.Open Sql,Conn,2,3 rs("title")=Request.Form("webtitle") rs("gl")=Request.Form("webggg") rs("gbyn")=cint(Request.Form("webyn")) rs("webname")=Request.Form("webname") rs.update rs.close set rs=nothing response.redirect indexfilename &"?action=Edit_web" response.end end if webyn2="" if webyn=1 then webyn2="checked" end if %>
編輯留言板屬性
留言板名稱 :
公告內容:
詞語過濾:
經過審批才顯示留言: >
  返回
<% End Sub %> <%Sub manageusr()%>
<%set rs=server.CreateObject("adodb.recordset") rs.Open "select * from admin order by flag asc",conn,1,1 do while not rs.EOF%> "> <%rs.movenext loop rs.close set rs=nothing %>
後台管理員設置
管理員 密 碼 權 限 操 作
"> <%select case rs("flag") case "1" response.Write "管理 查看" case "3" response.Write "管理 查看" end select%>  &action=del" onClick="return confirm('您確定要刪除此用戶嗎?')">刪除
添加管理員
管理員 密 碼 權 限 操 作
管理 查看
<%End Sub%> <% if jd100_fla=1 then if Request("action")="View_Words" or Request("action")="" then %>
<% End if end if %> <% sub ubb_jd100()%>

粗體 斜體 下劃線 居中  字體大小  顏色:

<% end sub %><% ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' '添加新留言到數據庫 Sub Add_New_Execute() '不良詞語過濾 If trim(Request.Form("name"))="" Then Response.Write("") Response.End End If If Len(Request.Form("name"))>20 Then Response.Write("") Response.End End If If Request.Form("email")<>"" Then If instr(Request.Form("email"),"@")=0 or instr(Request.Form("email"),"@")=1 or instr(Request.Form("email"),"@")=len(email) then Response.Write("") Response.End End If End If If trim(Request.Form("words"))="" Then Response.Write("") Response.End End If Set Rs = Server.CreateObject("ADODB.RecordSet") Sql="Select * From words" Rs.Open Sql,Conn,2,3 Rs.AddNew Rs("name")=Server.HTMLEncode(Request.Form("name")) Rs("sex")=Server.HTMLEncode(Request.Form("sex")) Rs("head")=Server.HTMLEncode(Request.Form("head")) Rs("web")=Server.HTMLEncode(Request.Form("web")) Rs("email")=Server.HTMLEncode(Request.Form("email")) Rs("words")=Server.HTMLEncode(Request.Form("words")) Rs("qq")=Server.HTMLEncode(Request.Form("qq")) Rs("head")=Server.HTMLEncode(Request.Form("Img")) Rs("date")=Now() Rs("ip")=request.servervariables("remote_addr") Rs("come")=Server.HTMLEncode(Request.Form("come")) Rs.Update Rs.Close Set Rs = Nothing End Sub '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' '驗證管理員登陸 Sub Admin_Login_Execute() username = Server.HTMLEncode(Request.Form("username")) password = Server.HTMLEncode(Request.Form("password")) if trim(Server.HTMLEncode(Request.Form("jd100rz")))<>session("jd100_rn") then Response.Write("") Response.End end if session("jd100_rn")="" If username = "" OR password = "" Then Response.Write("") Response.End End If Set Rs = Server.CreateObject("ADODB.RecordSet") Sql="Select * From admin where username='"&username&"' and password='"&password&"'" Rs.Open Sql,Conn,1,1 If not rs.eof Then Session("Admin") = "Login" Else Response.Write("") End If Rs.Close Set Rs = Nothing End Sub Sub EditPWD_Execute() If Session("Admin")="" Then Response.Write "連接超時,請重新登錄" Response.End end if oldusername=Server.HTMLEncode(Request.Form("oldusername")) username = Server.HTMLEncode(Request.Form("username")) username_c = Server.HTMLEncode(Request.Form("username_c")) oldpwd = Server.HTMLEncode(Request.Form("oldpwd")) newpwd = Server.HTMLEncode(Request.Form("newpwd")) newpwd_c = Server.HTMLEncode(Request.Form("newpwd_c")) If username = "" OR username_c="" Then Response.Write "新舊用戶名均不能為空" Response.End End If If oldpwd = "" OR newpwd = "" OR newpwd_c="" Then Response.Write "新舊密碼均不能為空" Response.End End If If username<>username_c Then Response.Write "新填寫的兩個新用戶名不一致,請重新填寫" Response.End End If If newpwd<>newpwd_c Then Response.Write "新填寫的兩個密碼不一致,請重新填寫" Response.End End If Set Rs = Server.CreateObject("ADODB.RecordSet") Sql="Select * From admin" Rs.Open Sql,Conn,2,3 If Rs("password")=oldpwd And Rs("username")=oldusername Then Rs("username")=username Rs("password")=newpwd Rs.Update Else Response.Write "你的舊密碼填寫不對或者舊用戶名不對,修改不成功" Response.End End If Rs.Close Set Rs = Nothing End Sub Sub Exit_Admin() Session.Abandon response.redirect indexfilename End Sub ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' '刪除數據 Sub Delete() If Session("Admin")="" Then Response.Write "連接超時,請重新登錄" Response.End end if '刪除數據 Conn.Execute("Delete * From words Where id="&Request.QueryString("id")) End Sub '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' '回復留言添加到數據庫 Sub Reply_Execute() If Session("Admin")="" Then Response.Write "連接超時,請重新登錄" Response.End end if Set Rs = Server.CreateObject("ADODB.RecordSet") Sql="Select reply From words Where id="&Request.Form("id") Rs.Open Sql,Conn,2,3 Rs("reply") = Server.HTMLEncode(Request.Form("reply")) Rs.Update Rs.Close Set Rs=Nothing End Sub Sub Edit_Execute() If Session("Admin")="" Then Response.Write "連接超時,請重新登錄" Response.End end if Set Rs = Server.CreateObject("ADODB.RecordSet") Sql="Select * From words Where id="&Request.Form("id") Rs.Open Sql,Conn,2,3 if cint(Request.Form("replyedit"))=1 then Rs("words") = Server.HTMLEncode(Request.Form("reply")) end if Rs("reply") = Server.HTMLEncode(Request.Form("words")) if cint(Request.Form("view"))=1 then Rs("view")=1 else Rs("view")=0 end if Rs.Update Rs.Close Set Rs=Nothing End Sub Conn.Close Set Conn = Nothing %><% function unHtml(content) unHtml=content if content <> "" then 'unHtml=replace(unHtml,"&","&") unHtml=replace(unHtml,"<","<") unHtml=replace(unHtml,">",">") unHtml=replace(unHtml,chr(34),""") unHtml=replace(unHtml,chr(13),"
") unHtml=replace(unHtml,chr(32)," ") unhtmlgl=split(webgl,"|") if IsArray(unhtmlgl) then for i=0 to UBound(unhtmlgl) unhtml=replace(unhtml,unhtmlgl(i),"***") next end if 'unHtml=ubb(unHtml) end if end function function ubb(content) ubb=content nowtime=now() UBB=Convert(ubb,"code") UBB=Convert(ubb,"html") UBB=Convert(ubb,"url") UBB=Convert(ubb,"color") UBB=Convert(ubb,"font") UBB=Convert(ubb,"size") UBB=Convert(ubb,"quote") UBB=Convert(ubb,"email") UBB=Convert(ubb,"img") UBB=Convert(ubb,"swf") ubb=convert(ubb,"cen") ubb=convert(ubb,"rig") ubb=convert(ubb,"lef") ubb=convert(ubb,"center") UBB=AutoURL(ubb) ubb=replace(ubb,"[b]","",1,-1,1) ubb=replace(ubb,"[/b]","",1,-1,1) ubb=replace(ubb,"[i]","",1,-1,1) ubb=replace(ubb,"[/i]","",1,-1,1) ubb=replace(ubb,"[u]","",1,-1,1) ubb=replace(ubb,"[/u]","",1,-1,1) ubb=replace(ubb,"[blue]","",1,-1,1) ubb=replace(ubb,"[/blue]","",1,-1,1) ubb=replace(ubb,"[red]","",1,-1,1) ubb=replace(ubb,"[/red]","",1,-1,1) for i=1 to 28 ubb=replace(ubb,"{:em"&i&"}","",1,6,1) ubb=replace(ubb,"{:em"&i&"}","",1,-1,1) next ubb=replace(ubb,"["&chr(176),"[",1,-1,1) ubb=replace(ubb,chr(176)&"]","]",1,-1,1) ubb=replace(ubb,"/"&chr(176),"/",1,-1,1) ' ubb=replace(ubb,"{;em","{:em",1,-1,1) end function function Convert(ubb,CovT) cText=ubb startubb=1 do while Covt="url" or Covt="color" or Covt="font" or Covt="size" startubb=instr(startubb,cText,"["&CovT&"=",1) if startubb=0 then exit do endubb=instr(startubb,cText,"]",1) if endubb=0 then exit do Lcovt=Covt startubb=startubb+len(lCovT)+2 text=mid(cText,startubb,endubb-startubb) codetext=replace(text,"[","["&chr(176),1,-1,1) codetext=replace(codetext,"]",chr(176)&"]",1,-1,1) 'codetext=replace(codetext,"{:em","{;em",1,-1,1) codetext=replace(codetext,"/","/"&chr(176),1,-1,1) select case CovT case "color" cText=replace(cText,"[color="&text&"]","",1,1,1) cText=replace(cText,"[/color]","",1,1,1) case "font" cText=replace(cText,"[font="&text&"]","",1,1,1) cText=replace(cText,"[/font]","",1,1,1) case "size" if IsNumeric(text) then if text>6 then text=6 if text<1 then text=1 cText=replace(cText,"[size="&text&"]","",1,1,1) cText=replace(cText,"[/size]","",1,1,1) end if case "url" cText=replace(cText,"[url="&text&"]","",1,1,1) cText=replace(cText,"[/url]","",1,1,1) case "email" cText=replace(cText,"["&CovT&"="&text&"]","",1,1,1) cText=replace(cText,"[/"&CovT&"]","",1,1,1) end select loop startubb=1 do startubb=instr(startubb,cText,"["&CovT&"]",1) if startubb=0 then exit do endubb=instr(startubb,cText,"[/"&CovT&"]",1) if endubb=0 then exit do Lcovt=Covt startubb=startubb+len(lCovT)+2 text=mid(cText,startubb,endubb-startubb) codetext=replace(text,"[","["&chr(176),1,-1,1) codetext=replace(codetext,"]",chr(176)&"]",1,-1,1) 'codetext=replace(codetext,"{:em","{;em",1,-1,1) codetext=replace(codetext,"/","/"&chr(176),1,-1,1) select case CovT case "center" cText=replace(cText,"[center]","
",1,1,1) cText=replace(cText,"[/center]","
",1,1,1) case "url" cText=replace(cText,"["&CovT&"]"&text,""&codetext,1,1,1) cText=replace(cText,""&codetext&"[/"&CovT&"]",""&codetext&"",1,1,1) case "email" cText=replace(cText,"["&CovT&"]","",1,1,1) cText=replace(cText,"[/"&CovT&"]","",1,1,1) case "html" codetext=replace(codetext,"
",chr(13),1,-1,1) codetext=replace(codetext," ",chr(32),1,-1,1) Randomize rid="temp"&Int(100000 * Rnd) cText=replace(cText,"[html]"&text,"代碼片斷如下: ",1,1,1) case "img" '一般顯示的圖片 cText=replace(cText,"[img]"&text,""&chr(34)&" target=_blank>::點擊圖片在新窗口中打開::",1,1,1) case "cen" '圖片居中 cText=replace(cText,"[cen]"&text,"
"&chr(34)&" target=_blank>::點擊圖片在新窗口中打開::
",1,1,1) case "rig" '圖片居右,文字繞排 cText=replace(cText,"[rig]"&text,""&chr(34)&" target=_blank>::點擊圖片在新窗口中打開::",1,1,1) case "lef" '圖片居左,文字繞排 cText=replace(cText,"[lef]"&text,""&chr(34)&" target=_blank>::點擊圖片在新窗口中打開::",1,1,1) case "code" cText=replace(cText,"[code]"&text,"以下內容為程序代碼
"&codetext,1,1,1) cText=replace(cText,"以下內容為程序代碼
"&codetext&"[/code]","以下內容為程序代碼
"&codetext&"
",1,1,1) case "quote" atext=replace(text,"[cen]","",1,-1,1) atext=replace(text,"[/cen]","",1,-1,1) atext=replace(text,"[img]","",1,-1,1) atext=replace(atext,"[/img]","",1,-1,1) atext=replace(atext,"[swf]","",1,-1,1) atext=replace(atext,"[/swf]","",1,-1,1) atext=replace(atext,"[html]","",1,-1,1) atext=replace(atext,"[/html]","",1,-1,1) ' atext=replace(atext,"{:em","{;em",1,-1,1) atext=SplitWords(atext,350) atext=replace(atext,chr(32)," ",1,-1,1) cText=replace(cText,"[quote]"&text,"

"&atext,1,1,1) cText=replace(cText,"

"&atext&"[/quote]","

"&atext&"
",1,1,1) case "swf" cText=replace(cText,"[swf]"&text,"",1,1,1) cText=replace(cText,""&"[/swf]",""&"",1,1,1) end select loop Convert=cText end function function AutoURL(ubb) cText=ubb startubb=1 do startubb=1 endubb_a=0 endubb_b=0 endubb=0 startubb=instr(startubb,cText,"http://",1) if startubb=0 then exit do endubb_b=instr(startubb,cText,"<",1) endubb_a=instr(startubb,cText," ",1) endubb=endubb_a if endubb=0 then endubb=endubb_b end if if endubb_b0 then endubb=endubb_b end if if endubb=0 then lenc=ctext endubb=len(lenc)+1 end if 'response.write startubb&","&endubb if startubb>endubb then exit do text=mid(cText,startubb,endubb-startubb) 'response.write text 'codetext=replace(text,"/","/"&chr(176),1,-1,1) codetext=text 'response.write text&"," urllink=""&codetext&" " 'response.write urllink urllink=replace(urllink,"/","/"&chr(176),1,-1,1) cText=replace(cText,text,urllink,1,1,1) loop AutoURL=cText end function %>

建議使用IE6.0以上瀏覽器 1024╳768解析度瀏覽
 億輝工程有限公司版權所有 Copyright©2008 Y
i-Hui Construction Limited Company. All Rights Reserved.