<!--#include file="inc/system.asp" -->
<%
function tempclass(mb)
yidacms=yidat1(mb):yidacms=sys(yidacms):yidacms=memu(yidacms):yidacms=Y_memu(yidacms):yidacms=Flash(yidacms)
yidacms=News(yidacms):yidacms=Newsclass(yidacms):yidacms=About(yidacms):yidacms=Connect(yidacms):yidacms=Aboutclass(yidacms)
yidacms=Products(yidacms):yidacms=Productsclass(yidacms):yidacms=Productsxunhuan(yidacms)
yidacms=Liuyan(yidacms):yidacms=Dingdan(yidacms):yidacms=Yidong(yidacms):yidacms=video(yidacms)
yidacms=Fanhui(yidacms):yidacms=Swsy(yidacms):yidacms=Scbz(yidacms):yidacms=qqkefu(yidacms):yidacms=shijian(yidacms)
yidacms=gb_music(yidacms):yidacms=Yidacms_tag(yidacms):yidacms=Book(yidacms):yidacms=Yidacms_ad(yidacms)
yidacms=Yidacms_ad_floating(yidacms):yidacms=Yidacms_ad_couplets(yidacms):yidacms=Yidacms_ad_popup(yidacms):yidacms=Down(yidacms):yidacms=Photoclass(yidacms):yidacms=Photo(yidacms)
'##########################
%>
<!--#include file="inc/chajian.asp" -->
<%
'##########################
tempclass=yidacms
end function
response.write book_temp() & o & qiao

'*******************************************************
'易达CMS中小企业快速建站系统
'软件开发 黑龙江省世纪伟成网络科技有限公司
'网址：http://yidacms.com
'软件享有著作权，未经公司或开发者同意禁止更改以下代码。
'*******************************************************

'以下是留言板样式代码

if request("shuaiweb")="book" Then
	if len(trim(request.Form("booktitle")))<3 then
		response.write ("<script language=javascript> alert('留言标题必填且不能少于3个字符！');history.back(-1);</script>")
		response.end
	end if
	if len(trim(request.Form("bookcontent")))<3 then
		response.write ("<script language=javascript> alert('留言内容必填且不能少于3个字符！');history.back(-1);</script>")
		response.end
	end if
	if len(trim(request.Form("bookname")))<2 then
		response.write ("<script language=javascript> alert('留言人姓名必填且不能少于2个字符！');history.back(-1);</script>")
		response.end
	end if		
	If Trim(Request.Form("validatecode"))=Empty Or Trim(Session("cnbruce.com_ValidateCode"))<>Trim(Request.Form("validatecode")) Then
		response.write("<script language=javascript> alert('请注意正确输入验证码！');location.replace('"&sw_dizhi&"zh_book.asp');</script>")
		response.end
	end if
dim rs,sql
set rs=server.createobject("adodb.recordset")
sql="select * from shuaiweb_book" 
rs.open sql,dbok,3,2
rs.addnew
	rs("booktitle")=filter_Str(trim(request.form("booktitle")))
	rs("bookname")=filter_Str(trim(request.form("bookname")))
	rs("booktel")=filter_Str(trim(request.form("booktel")))
	rs("bookemail")=filter_Str(trim(request.form("bookemail")))
	rs("bookqq")=filter_Str(trim(request.form("bookqq")))
	rs("bookcontent")=filter_Str(trim(request.form("bookcontent")))
	rs("bookaddress")=filter_Str(trim(request.form("bookaddress")))
	rs("bookunits")=filter_Str(trim(request.form("bookunits")))
	rs("bookreply")=filter_Str(trim(request.form("bookreply")))
	rs("bookAudit")=filter_Str(trim(request.form("bookAudit")))
	rs("wait_boyi")=filter_Str(trim(request.form("wait_boyi")))
rs.update
rs.close
set rs=nothing
response.write "<script language=javascript> alert('留言成功！');location.replace('"&sw_dizhi&"zh_book.asp');</script>"
End If

function tBook()

set rs = server.createobject("adodb.recordset")
sql="select * from book_management"
rs.open sql,dbok,1,1

if trim(rs("book"))=3 then
   tbook = tbook & "<div style=""text-align:center; color:#FF0000; font-size:16px;""> 管理员把留言本关闭了！:( <a href=""/"">返回！</a></div>"&vbcrlf
elseif trim(rs("book"))=1 or 2 then
   tbook = tbook & "<LINK href='"&sw_dizhi&"images/yida.css' type='text/css' rel='stylesheet'>"&vbcrlf
   tbook = tbook & "<table width=""610"" height=""45"" border=""0"" cellpadding=""6"" cellspacing=""0"" bordercolor=""#cccccc"" style=""border-collapse:collapse; margin-top:15px;"" bgcolor=""#FFFFFF"">"&vbcrlf
   tbook = tbook & "<tr>"&vbcrlf
   tbook = tbook & "<td width=""400""><a href=""#book""><img src=""images/feedback.jpg"" border=""0""></a></td>"&vbcrlf
   tbook = tbook & "</tr>"&vbcrlf
   tbook = tbook & "</table>"&vbcrlf

		    set rs = server.createobject("adodb.recordset")
	            sql="select * from shuaiweb_book ORDER BY id DESC"
		    rs.open sql,dbok,1,1

		    if rs.eof then
	             zanwu = "没有留言!"
		      		else
			rs.PageSize=20
			pagecount=rs.PageCount 
			page=int(request.QueryString ("page"))
			if page<=0 then page=1
			if request.QueryString("page")="" then
				page=1
			end if
			rs.AbsolutePage=page
			for i=1 to rs.PageSize
			if rs.EOF then
			exit for
			end if

                        if trim(rs("bookqq")) <> "" then
                        	bookqq = rs("bookqq")
                        		else
                        	bookqq = "51007777"
                        end if
                        
   tbook = tbook & "<div class='yidacms_book'>"&vbcrlf
   tbook = tbook & "   <div class='yidacms_book_left'>"&vbcrlf
   tbook = tbook & "	<div class='yidacms_book_left_img1'>"&i&"楼</div>"&vbcrlf
   tbook = tbook & "     <div class='yidacms_book_left_font'>"&rs("bookname")&"</div>"&vbcrlf
   tbook = tbook & "   <div class='clear'></div>"&vbcrlf
   tbook = tbook & "  	<div class='yidacms_book_left_content'>"&vbcrlf

			if trim(rs("bookAudit")) = 1 then
				tbook = tbook & "留言在审核中......<br /><br />"
					Elseif trim(rs("bookAudit")) = 0 then
                        if TXW_book = "close" then
					tbook = tbook & rs("bookcontent")
                       			 	elseif TXW_book = "open" then
					tbook = tbook & guolv(rs("bookcontent"))
                        end if
			end if

			if trim(rs("bookreply")) <> "" then
				tbook = tbook & "<font style=""color:#FF0000;""><br /><br />管理员给您回复是:"&rs("bookreply")&"</font>"
			End If
    tbook = tbook & "  </div><div class='yidacms_book_left_img'><img src='"&rs("wait_boyi")&"' /></div>"&vbcrlf
    tbook = tbook & "   </div>"&vbcrlf
    tbook = tbook & " <div class='yidacms_book_right'><img src='http://qqshow-user.tencent.com/"&bookqq&"/10/00/' width='130' height='200' border='0'></div>"&vbcrlf
    tbook = tbook & "   </div><div class='clear'></div>"&vbcrlf
			rs.movenext
			next
   tbook = tbook & "<table width=""610"" height=""45"" border=""0"" align=""center"">"&vbcrlf
   tbook = tbook & "  <tr>"&vbcrlf
   tbook = tbook & "	<td colspan=3 align=right>"&vbcrlf
   if page=1 and not page=pagecount then
   tbook = tbook & "<div align=""right"">第"&page&"页&nbsp;&nbsp;"&vbcrlf
   for i=1 to pagecount
   tbook = tbook & "<a href="""&sw_dizhi&"zh_book.asp?page="&i&""">"&i&"</a>&nbsp;"&vbcrlf
   next
   tbook = tbook & "<a href="""&sw_dizhi&"zh_book.asp?page="&page+1&""">下一页</a>&nbsp;&nbsp;</div>"&vbcrlf
   elseif page=pagecount and not page=1 then
   tbook = tbook & "<div align=""right"">第"&page&"页&nbsp;&nbsp;"&vbcrlf
   for i=1 to pagecount
   tbook = tbook & "<a href="""&sw_dizhi&"zh_book.asp?page="&i&""">"&i&"</a>&nbsp;"&vbcrlf
   next
   tbook = tbook & "<a href="""&sw_dizhi&"zh_book.asp?page="&page-1&""">上一页</a>&nbsp;&nbsp;</div>"&vbcrlf
   elseif page<20 then
   tbook = tbook & "<div class=""font"" align=""right"">"&vbcrlf
   tbook = tbook & "<font color=red></font></div>"&vbcrlf
   elseif page>pagecount then
   tbook = tbook & "<div class=""font"" align=""right"">"&vbcrlf
   tbook = tbook & "<font color=red> </font></div>"&vbcrlf
   elseif page=1 and page=pagecount then
   else
   tbook = tbook & "<div align=""right"">第"&page&"页&nbsp;&nbsp;"&vbcrlf
   for i=1 to pagecount
   tbook = tbook & "<a href="""&sw_dizhi&"zh_book.asp?page="&i&""">"&i&"</a>&nbsp;"&vbcrlf
   next
   tbook = tbook & "<a href="""&sw_dizhi&"zh_book.asp?page="&page-1&""">上一页</a> "&vbcrlf
   tbook = tbook & "<a href="""&sw_dizhi&"zh_book.asp?page="&page+1&""">下一页</a>&nbsp;&nbsp;</div>"&vbcrlf
   end if
   tbook = tbook & "	</td>"&vbcrlf
   tbook = tbook & "  </tr>	"&vbcrlf
   tbook = tbook & "</table>"&vbcrlf
 end if
tbook = tbook & "<a href="""" name=""book""></a>"&vbcrlf
tbook = tbook & "<table width=""610"" border=""1"" cellpadding=""6"" cellspacing=""0"" bordercolor=""#cccccc"" style=""border-collapse:collapse"" bgcolor=""#FFFFFF"" align=""center"">"&vbcrlf
  tbook = tbook & "<form id=""form1"" name=""form1"" method=""post"" action="""&sw_dizhi&"zh_book.asp?shuaiweb=book"">"&vbcrlf
    tbook = tbook & "<tr>"&vbcrlf
      tbook = tbook & "<td width=""107"">留言标题</td>"&vbcrlf
      tbook = tbook & "<td width=""440""><input name=""booktitle"" type=""text"" id=""booktitle"" size=""47"" /> <font color=red>(必填)</font></td>"&vbcrlf
    tbook = tbook & "</tr>"&vbcrlf
    tbook = tbook & "<tr>"&vbcrlf
      tbook = tbook & "<td>留言人姓名</td>"&vbcrlf
      tbook = tbook & "<td><input name=""bookname"" type=""text"" id=""bookname"" size=""47"" /> <font color=red>(必填)</font></td>"&vbcrlf
    tbook = tbook & "</tr>"&vbcrlf
    tbook = tbook & "<tr>"&vbcrlf
      tbook = tbook & "<td>留言人电话</td>"&vbcrlf
      tbook = tbook & "<td><input name=""booktel"" type=""text"" id=""booktel"" size=""47"" /></td>"&vbcrlf
    tbook = tbook & "</tr>"&vbcrlf
    tbook = tbook & "<tr>"&vbcrlf
      tbook = tbook & "<td>留言人 QQ</td>"&vbcrlf
      tbook = tbook & "<td><input name=""bookqq"" type=""text"" id=""bookqq"" size=""47"" /></td>"&vbcrlf
    tbook = tbook & "</tr>"&vbcrlf
    tbook = tbook & "<tr>"&vbcrlf
      tbook = tbook & "<td>留言人E-mail</td>"&vbcrlf
      tbook = tbook & "<td><input name=""bookemail"" type=""text"" id=""bookemail"" size=""47"" /></td>"&vbcrlf
    tbook = tbook & "</tr>"&vbcrlf
    tbook = tbook & "<tr>"&vbcrlf
      tbook = tbook & "<td>留言人工作</td>"&vbcrlf
      tbook = tbook & "<td><input name=""bookunits"" type=""text"" id=""bookunits"" size=""47"" /></td>"&vbcrlf
    tbook = tbook & "</tr>"&vbcrlf
    tbook = tbook & "<tr>"&vbcrlf
      tbook = tbook & "<td>留言人地址</td>"&vbcrlf
      tbook = tbook & "<td><input name=""bookaddress"" type=""text"" id=""bookaddress"" size=""47"" /></td>"&vbcrlf
    tbook = tbook & "</tr>"&vbcrlf
    tbook = tbook & "<tr>"&vbcrlf
      tbook = tbook & "<td>留言内容</td>"&vbcrlf
      tbook = tbook & "<td>"&vbcrlf
       tbook = tbook & "心情:<input type=""radio"" name=""wait_boyi"" value="""&sw_dizhi&"bianji/plugins/emoticons/0.gif"" checked=""checked""/><img src="""&sw_dizhi&"bianji/plugins/emoticons/0.gif""> <input type=""radio"" name=""wait_boyi"" value="""&sw_dizhi&"bianji/plugins/emoticons/13.gif"" /><img src="""&sw_dizhi&"bianji/plugins/emoticons/13.gif""> <input type=""radio"" name=""wait_boyi"" value="""&sw_dizhi&"bianji/plugins/emoticons/54.gif"" /><img src="""&sw_dizhi&"bianji/plugins/emoticons/54.gif""> <input type=""radio"" name=""wait_boyi"" value="""&sw_dizhi&"bianji/plugins/emoticons/45.gif"" /><img src="""&sw_dizhi&"bianji/plugins/emoticons/45.gif""> <input type=""radio"" name=""wait_boyi"" value="""&sw_dizhi&"bianji/plugins/emoticons/48.gif"" /><img src="""&sw_dizhi&"bianji/plugins/emoticons/48.gif""><input type=""radio"" name=""wait_boyi"" value="""&sw_dizhi&"bianji/plugins/emoticons/27.gif"" /><img src="""&sw_dizhi&"bianji/plugins/emoticons/27.gif""><br /><textarea name=""bookcontent"" cols=""45"" rows=""10""></textarea>  <font color=red>(必填)</font><br />请保持在100字以内</td>"&vbcrlf
    tbook = tbook & "</tr>"&vbcrlf
    tbook = tbook & "<tr>"&vbcrlf
      tbook = tbook & "<td>&nbsp;验证码：</td>"&vbcrlf
      tbook = tbook & "<td>"&vbcrlf
      tbook = tbook & "<img src='"&sw_dizhi&"inc/validatecode.asp' align='absmiddle' border='0' width='70'><input name='validatecode' type='text' size='5'>"&vbcrlf
      tbook = tbook & "<input type=""submit"" name=""Submit"" value=""提交留言"" class=""inanniu""/>"&vbcrlf
      tbook = tbook & "<input type=""reset"" name=""Submit2"" value=""重置内容"" class=""inanniu""/><br />"&vbcrlf
   tbook = tbook & "</td>"&vbcrlf
   tbook = tbook & " </tr>"&vbcrlf

		set rs = server.createobject("adodb.recordset")
		sql="select * from book_management"
		rs.open sql,dbok,1,1
		if trim(rs("book"))= 2 then
                tbook = tbook & "<input type='hidden' name='bookAudit' id='bookAudit' value='1'/>"
					else
                tbook = tbook & "<input type='hidden' name='bookAudit' id='bookAudit' value='0'/>"
		end if
   tbook = tbook & "   </form>"&vbcrlf
     tbook = tbook & "  </table>"&vbcrlf
end if
end function

function Book(a)
a = replace(a,"{yidacms:book}",tBook)
Book = a & zanwu
end function

%>