<!--#include file="include/nowshop.asp"-->
<%
call aspsql()
set rs=conn.execute("select * from bsetup")
maxlength=clng(rs("maxlength"))
view=cstr(rs("view"))
mailyes=clng(rs("mailyes"))
randomize
yzm=int(8999*rnd()+1000)
%>
<SCRIPT language=javascript>
<!--
function left_menu(meval)
{
  var left_n=eval(meval);
  if (left_n.style.display=="none")
  { eval(meval+".style.display='';"); }
  else
  { eval(meval+".style.display='none';"); }
}
-->
</SCRIPT>
<script language="JavaScript">
function checkform(){
<%
response.write "if (document.book.yzm.value.length==0){"
%>
		alert("出错了，您没有填写验证码。");
		document.book.yzm.focus();
		return false;
	}
<%
response.write "if (document.book.yzm.value!="&yzm&"){"
%>
		alert("出错了，您填写的验证码不正确。");
		document.book.yzm.focus();
		return false;
	}
	if (document.book.UserName.value.length==0){
		alert("出错了，您没有填写用户名。");
		document.book.UserName.focus();
		return false;
	}
	if (document.book.UserName.value.length<2||document.book.UserName.value.length>16){
		alert("出错了，您填写的用户名不符合要求。");
		document.book.UserName.focus();
		return false;
	}
	if (document.book.Comments.value.length==0){
		alert("出错了，您没有填写留言内容。");
		document.book.Comments.focus();
		return false;
	}
<%
response.write "if (document.book.Comments.value.length>"&maxlength&"){"
%>
		alert("出错了，您的留言太长了。");
		document.book.Comments.focus();
		return false;
	}
	return true;
}	
</script>

<%
if request("send")="ok" then

	username=trim(request.form("username"))
	usermail=trim(request.form("usermail"))

    if mailyes=0 then		'邮箱为必填时检查邮箱是否合法

	if Instr(usermail,".")<=0 or Instr(usermail,"@")<=0 or len(usermail)<10 or len(usermail)>100 then
	response.write "<script language='javascript'>"
	response.write "alert('出错了，您输入的电子邮件地址格式不正确，请检查后重新输入！');"
	response.write "location.href='javascript:history.go(-1)';"							
	response.write "</script>"	
	response.end
	end if

    end if

	set rs=Server.CreateObject("ADODB.RecordSet")
	sql="select * from book where online='1' order by Postdate desc"
	rs.open sql,conn,1,3

			rs.Addnew
			rs("username")=Request("username")
			rs("comments")=Request("comments")
			rs("usermail")=Request("usermail")
			rs("face")=Request("face")
			rs("pic")=Request("pic")
			rs("url")=Request("url")
			rs("qq")=Request("qq")
			rs("online")=view
			rs("IP")=Request.serverVariables("REMOTE_ADDR")
			rs.Update
			session("book_error")=session("book_error")+1
		rs.close
		set rs=nothing
	response.write "<script language='javascript'>"
	if view="0" then
	response.write "alert('留言提交成功，留言须经管理员审核才能发布。');"
	else
	response.write "alert('留言提交成功，单击“确定”返回留言列表！');"
	end if
	response.write "location.href='book.asp';"	
	response.write "</script>"
	response.end

end if
%>
<TITLE>网站留言-<%=sitename%>-<%=siteurl%></TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="description" content="<%=sitedescription%>">
<meta name="keywords" content="<%=sitekeywords%>">
<link rel="stylesheet" href="css.css" type="text/css">
<LINK href="images/news/style.css" type=text/css rel=stylesheet>
</head>
<center>
<%
call aspsql()
%>
  <!--#include file="top.asp"-->
  <TABLE cellSpacing=0 cellPadding=0 width=768 align=center bgColor=#ffffff 
border=0>
  <TBODY>
  <TR>
    <TD width=768>&nbsp;</TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=768 align=center bgColor=#ffffff 
border=0>
  <TBODY>
  <TR>
    <TD width=768><IMG height=10 alt="" src="images/book/com_cash_top.gif" 
      width=768></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=768 align=center bgColor=#ffffff 
background=images/book/com_cash_bg_01gif.gif border=0>
  <TBODY>
  <TR>
    <TD width=20>&nbsp;</TD>
    <TD vAlign=top align=middle width=125>
      <TABLE cellSpacing=0 cellPadding=0 width=107 border=0>
        <TBODY>
        <TR>
          <TD width=107><IMG height=35 alt="" 
            src="images/book/com_serve_06.gif" width=107></TD></TR>
        <TR>
          <TD background=images/book/com_serve_14.gif>
            <TABLE cellSpacing=0 cellPadding=0 width=107 border=0>
                    <TBODY>
                      <TR> 
                        <TD width=26 height=5></TD>
                        <TD width=130></TD>
                      </TR>
                      <TR> 
                        <TD width=26>&nbsp;</TD>
                        <TD width=130 height=30><A 
                  href="book_write.asp"><font color="#FF5B02">发表留言</font></A></TD>
                      </TR>
                      <TR> 
                        <TD>&nbsp;</TD>
                        <TD height=30><A 
                  href="book.asp"><font color="#FF5B02">查看留言</font></A></TD>
                      </TR>
                    </TBODY>
                  </TABLE></TD></TR>
        <TR>
          <TD><IMG height=7 alt="" src="images/book/com_serve_23.gif" 
          width=107></TD></TR></TBODY></TABLE></TD>
    <TD align=middle>
      <TABLE cellSpacing=0 cellPadding=0 width=580 border=0>
        <TBODY>
        <TR>
          <TD width=603><IMG height=6 alt="" src="images/book/com_query_07.gif" 
            width=580></TD></TR>
        <TR>
          <TD>
            <TABLE cellSpacing=0 cellPadding=0 width=580 border=0>
              <TBODY>
              <TR>
                <TD width=1 bgColor=#cecece></TD>
                <TD align=middle width=578>
                  <TABLE cellSpacing=0 borderColorDark=#ffffff cellPadding=0 
                  width=570 align=center>
                    <TBODY>
                    <TR>
                                <TD vAlign=top height=230> 
                                  <TABLE cellSpacing=0 cellPadding=0 width="100%" 
border=0>
                          <TBODY>
                          <TR>
                            <TD width=8></TD>
                                        <TD height="30" align=left>目前位置：<a href=main.asp>首页</a> 
                                          > 在线留言</TD>
                            <TD width=9></TD></TR></TBODY></TABLE>
                                  <TABLE cellSpacing=0 cellPadding=4 width=570 border=0>
                                    <TBODY>
                                      <TR> 
                                        <TD class=td3 width=8><BR> <BR></TD>
                                        <TD class=com_fee_03><form method="post" name="book" action="book_write.asp" onsubmit="return checkform();">

<table cellSpacing="1" borderColorDark="#ffffff" cellPadding="4" width="540" align="center" bgColor="#CFCFCF" borderColorLight="#000000" border="0">
  <tr bgColor="#FFFFFF">
    <td width="15%" align=right>留言验证码：</td>
    <td>
	<input  maxlength=4 size=6 name="yzm" style="BORDER-RIGHT: darkgray 1px solid; BORDER-TOP: darkgray 1px solid; FONT-SIZE: 8pt; BORDER-LEFT: darkgray 1px solid; COLOR: #666666; BORDER-BOTTOM: darkgray 1px solid; FONT-FAMILY: verdana ; overflow:auto;">
<%
a=int(yzm/1000)
b=int((yzm-a*1000)/100)
c=int((yzm-a*1000-b*100)/10)
d=int(yzm-a*1000-b*100-c*10)
response.write "<img align=top height=15 border=0 src=images/yzm/"&yzm_skin&"/"&a&".gif><img align=top height=15 border=0 src=images/yzm/"&yzm_skin&"/"&b&".gif><img  align=top height=15 border=0 src=images/yzm/"&yzm_skin&"/"&c&".gif><img align=top height=15 border=0 src=images/yzm/"&yzm_skin&"/"&d&".gif>"
%></td>
 </tr>
  <tr bgColor="#FFFFFF">
    <td   width="15%" align=right>您的姓名：</td>
    <td ><input type=text name="UserName" size="30" maxlength=16  style="BORDER: darkgray 1px solid; FONT-SIZE: 8pt; COLOR: #666666; FONT-FAMILY: verdana ; overflow:auto; height=22;" value="<%=request.cookies("buyok")("userid")%>">
      <font color="#FF0000">*</font></td>   
  </tr>
  <tr bgColor="#FFFFFF">
    <td   width="15%" align=right>您的邮箱：</td>
    <td ><input type=text name="UserMail" size="30"  maxlength=100  style="BORDER: darkgray 1px solid; FONT-SIZE: 8pt; COLOR: #666666; FONT-FAMILY: verdana ; overflow:auto; height=22;">
      <font color="#FF0000">*</font></td>   
  </tr>
  <tr bgColor="#FFFFFF">
    <td   width="15%" align=right>您的网站：</td>
    <td><input type=text value="http://" name="url" size="30"  maxlength=100  style="BORDER: darkgray 1px solid; FONT-SIZE: 8pt; COLOR: #666666; FONT-FAMILY: verdana ; overflow:auto; height=22;"></td>
  </tr>
  <tr bgColor="#FFFFFF">
    <td   width="15%" align=right>腾讯QQ：</td>
    <td><input type=text value="" name="QQ" size="30"  maxlength=11  style="BORDER: darkgray 1px solid; FONT-SIZE: 8pt; COLOR: #666666; FONT-FAMILY: verdana ; overflow:auto; height=22;"></td>
  </tr>
  <tr bgColor="#FFFFFF">
    <td   width="15%" align=right>留言内容：<br><font color=red>（<%=maxlength%>字以内）</font></td>
    <td><textarea name="Comments" rows="7" cols="66"  style="BORDER: darkgray 1px solid; FONT-SIZE: 8pt; COLOR: #666666; FONT-FAMILY: verdana ; overflow:auto;"></textarea></td>
  </tr>
  <tr bgColor="#ebebeb">
    <td width="15%" align=right bgcolor="#FFFFFF">表情：</td><td bgcolor="#FFFFFF">
	<input type="radio" value="1" name="face" checked><img border=0 src="images/face/face1.gif"> 
	<input type="radio" value="2" name="face"><img border=0 src="images/face/face2.gif">
	<input type="radio" value="3" name="face"><img border=0 src="images/face/face3.gif">
	<input type="radio" value="4" name="face"><img border=0 src="images/face/face4.gif">
	<input type="radio" value="5" name="face"><img border=0 src="images/face/face5.gif">
	<input type="radio" value="6" name="face"><img border=0 src="images/face/face6.gif"> 
	<input type="radio" value="7" name="face"><img border=0 src="images/face/face7.gif">
	<input type="radio" value="8" name="face"><img border=0 src="images/face/face8.gif">
	<input type="radio" value="9" name="face"><img border=0 src="images/face/face9.gif">
	<br>
	<input type="radio" value="11" name="face"><img border=0 src="images/face/face11.gif"> 
	<input type="radio" value="12" name="face"><img border=0 src="images/face/face12.gif">
	<input type="radio" value="13" name="face"><img border=0 src="images/face/face13.gif">
	<input type="radio" value="14" name="face"><img border=0 src="images/face/face14.gif">
	<input type="radio" value="15" name="face"><img border=0 src="images/face/face15.gif">
	<input type="radio" value="16" name="face"><img border=0 src="images/face/face16.gif"> 
	<input type="radio" value="17" name="face"><img border=0 src="images/face/face17.gif">
	<input type="radio" value="18" name="face"><img border=0 src="images/face/face18.gif">
	<input type="radio" value="19" name="face"><img border=0 src="images/face/face19.gif">

    </td>
  </tr>
  <tr bgColor="#ebebeb">
    <td width="15%" align=right bgcolor="#FFFFFF">头像：</td>
    <td bgcolor="#FFFFFF"><input type="radio" value="1" name="pic" checked><img src="images/face/pic1.gif" width=80 height="81" border=0>
	<input type="radio" value="2" name="pic"><img src="images/face/pic2.gif" width=80 height="81" border=0>
	<input type="radio" value="3" name="pic"><img src="images/face/pic3.gif" width=80 height="81" border=0>
	<input type="radio" value="4" name="pic">
                                                  <img src="images/face/pic4.gif" width=80 height="81" border=0> 
                                                  <br>
                                                  <input type="radio" value="5" name="pic">
                                                  <img src="images/face/pic5.gif" width=80 height="81" border=0> 
                                                  <input type="radio" value="6" name="pic"><img src="images/face/pic6.gif" width=80 height="81" border=0>
	<input type="radio" value="7" name="pic"><img src="images/face/pic7.gif" width=80 height="81" border=0>
	<input type="radio" value="8" name="pic">
                                                  <img src="images/face/pic8.gif" width=80 height="81" border=0><br>
                                                  <input type="radio" value="9" name="pic"><img src="images/face/pic9.gif" width=80 height="81" border=0>
	<input type="radio" value="10" name="pic">
                                                  <img src="images/face/pic10.gif" width=80 height="81" border=0> 
                                                  <input type="radio" value="11" name="pic">
                                                  <img src="images/face/pic11.gif" width=80 height="81" border=0> 
                                                  <input type="radio" value="12" name="pic"> 
                                                  <img src="images/face/pic12.gif" width=78 height="77" border=0>	
                                                </td>
      
  </tr>
  <tr bgColor="#FFFFFF">
    <td height=50 colSpan="2" align=center><input type="submit" value="提交留言" name="Submit1"> &nbsp;&nbsp;&nbsp;
      <input type="reset" value="重新填写" name="Submit2"><input type=hidden name=send value=ok></td>
  </tr>
  <TR><TD bgcolor=#FFFFFF colspan=2>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  * 请各位网友遵纪守法并注意语言文明。<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  *<A href=guiding1.asp target=_blank><u>《互联网电子公告服务管理规定》</u></a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  *<a href=guiding2.asp target=_blank><u>《全国人大常委会关于维护互联网安全的规定》</u></a>
</TD></TR>

</table>
</form>

                                        </TD>
                                        <TD class=td3 width=2>&nbsp;</TD>
                                      </TR>
                                      <!--
                        <TR>
                          <TD class=td3>&nbsp;</TD>
                          <TD class="com_fee_03"><p class="com_text_bold">一<a name="a"></a>、 自行提取</p>
                            <p>适用范围：北京地区顾客，可到公司自行提取。为保证确实有货，请您自行提取前，务必与八佰拜客服联系确认。<br>
  时　　间：周一至周五， 10 ： 00 － 17 ： 00<br>
  配送费用：无需支付<br>
  公司地址：北京海淀区三里河路 21 号甘家口大厦北侧 15 层 1506 室<br>
  乘车路线：电车 101 、 102 、 103 、 114 ，公共汽车 320 、 320 支、 717 、 827 、特 4 等多路车到甘家口商场下车，即可达。 </p>
                            <p align="right"><a href="#" class="com_hover_bold">[Top]</a></p>                            </TD>
                          <TD 
            class=td3>&nbsp;</TD>
                        </TR>
-->
                                    </TBODY>
                                  </TABLE></TD></TR>
                    <TR>
                                <TD vAlign=top>&nbsp; </TD>
                              </TR></TBODY></TABLE></TD>
                <TD width=1 bgColor=#cecece></TD></TR></TBODY></TABLE></TD></TR>
        <TR>
          <TD><IMG height=8 alt="" src="images/book/com_query_11.gif" 
          width=580></TD></TR></TBODY></TABLE></TD>
    <TD width=20>&nbsp;</TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=768 align=center border=0>
  <TBODY>
  <TR>
    <TD>
      <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
        <TBODY>
        <TR>
          <TD><IMG height=13 alt="" src="images/book/com_cash_bottom.gif" 
            width=768></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=768 align=center bgColor=#ffffff 
border=0>
  <TBODY>
  <TR>
        <TD width=768>&nbsp; </TD>
      </TR></TBODY></TABLE>
  <!--#include file="down.asp"-->
</center>
</body>
</html>

<%
set conn=nothing
%>
