<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="inc/config.asp"-->
<!--#include file="inc/function.asp"-->
<!--#include file="conn.asp" -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link href="css/index.css" type="text/css" rel="stylesheet" />
<title>添加留言-XYCMS留言板</title>
<SCRIPT src="js/msg.js" type="text/javascript"></SCRIPT>
<style type="text/css">
<!--
.style1 {color: #FF0000}
-->
</style>
<script language="javascript" type="text/javascript">
 function cheackbook(){
	var form=document.form_book;
	if (form.book_title.value.replace(/ /g,"")==""){
		alert("留言标题内容不能为空，请认真填写");
		form.book_title.focus();
		return false;
		}
			
	if (form.book_name.value.replace(/ /g,"")==""){
		alert("留言者姓名不能为空，请重新填写");
		form.book_name.focus();
		return false;
		}
		else if (form.book_name.value.replace(/ /g,"").length<2){
		alert("姓名字数太短了，请填写真实姓名");
		form.book_name.focus();
		return false;
		}
		else if (form.book_name.value.replace(/ /g,"").length>10){
		alert("姓名字数太长了，请填写真实姓名");
		form.book_name.focus();
		return false;
		}
	if (form.book_email.value.replace(/ /g,"")==""){
		alert("电子邮件地址不能为空");
		form.book_email.focus();
		return false;
		}
	if (form.book_email.value.replace(/ /g,"") != ""){
		if((!/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(form.book_email.value.replace(/ /g,"")))){
			alert("电子邮件格式不符合标准");
			form.book_email.focus();
			return false;
			}
		}
	if (form.book_qq.value.replace(/ /g,"")==""){
		alert("联系QQ不能为空");
		form.book_qq.focus();
		return false;
		}
	if (isNaN(form.book_qq.value)){
		alert("QQ号码必须为数字");
		form.book_qq.focus();
		return false;
		}
	if (form.book_qq.value.replace(/ /g,"").length != "" & form.book_qq.value.replace(/ /g,"").length<5){
		alert("QQ号码不符合标准");
		form.book_qq.focus();
		return false;
		}
	if (form.book_qq.value.replace(/ /g,"").length>12){
		alert("这么长的QQ号码不符合标准");
		form.book_qq.focus();
		return false;
		}
	if (form.book_body.value.replace(/ /g,"")==""){
		alert("留言内容不能为空");
		form.book_body.focus();
		return false;
		}
		else if (form.book_body.value.replace(/ /g,"").length < 8){
		alert("留言内容太少了，有刷屏的嫌疑!\n\n呵呵，请重新输入你的留言。");
		form.book_body.focus();
		return false;
		}
		}
</script>
</head>
<body>
<div id="contain">
  <div id="header">
    <!--#include file="top.asp"-->  
  </div>
  <div id="box">
    <div class="box_box">
      <div class="box_book">
        <p>发表留言</p>
		<form action="add_book_passed.asp" method="post" name="form_book" onSubmit="return cheackbook();">
        <table cellpadding="0" cellspacing="8" border="0" width="580" align="center">
          <tr>
            <td width="65"><div align="right">留言类别：</div></td>
            <td width="491"><select name="ssfl" id="ssfl" class="b_s"><%=ly_lb()%></select></td>
          </tr>
          <tr>
            <td width="65"><div align="right">留言标题：</div></td>
            <td width="491"><input name="book_title" type="text" class="b_p" /> <input name="gbook_sh" value="<%=gbook_sh%>" type="hidden" /> </td>
          </tr>
          <tr>
            <td><div align="right">姓名：</div></td>
            <td><input name="book_name" type="text" class="b_p" /> *</td>
          </tr>
          <tr>
            <td><div align="right">E_mail：</div></td>
            <td><input name="book_email" type="text" class="b_p" /> 
            * 是否隐藏
              <input type="checkbox" name="yc_email" id="yc_email" value="1" /></td>
          </tr>
		  <tr>
            <td><div align="right">联系电话：</div></td>
            <td><input name="book_tel" type="text" class="b_p" /> 
            [<span class="style1">为用户保密，其他用户看不到该信息</span>]</td>
          </tr>
          <tr>
            <td><div align="right">联系QQ：</div></td>
            <td><input name="book_qq" type="text" class="b_p" /> 
            * 是否隐藏 <input type="checkbox" name="yc_qq" id="yc_qq" value="1" /></td>
          </tr>
          <tr>
            <td><div align="right">联系地址：</div></td>
            <td><input name="book_address" type="text" class="b_p" /></td>
          </tr>
          <tr>
            <td><div align="right">留言内容：</div></td>
            <td><textarea name="book_body" cols="60" rows="10" style="background:url(images/thanks.gif) no-repeat 190px 115px;"></textarea> *</td>
          </tr>
		  <tr>
            <td><div align="right">验证码：</div></td>
            <td><input name="VerifyCode" type="text"   size="7" /> <img src="xycode.asp?" onClick="this.src+=Math.random()" alt="图片看不清？点击重新得到验证码" style="cursor:hand;" height="20" /></td>
          </tr>
		  <tr>
            <td>&nbsp;</td>
            <td><input type="submit" name="Submit" value="提交留言" class="button" /> <input type="reset" name="Submit2" value="重新填写" class="button"  /></td>
          </tr>
        </table>
		</form>
		<div class="line"></div>
		<h5>发表留言须知</h5>
		<div class="book_w">
		  <ul>
		    <li>1、严禁对个人、实体、民族、国家等进行漫骂、污蔑与诽谤</li>
			<li>2、网友应遵守我们互联网的相关法规</li>
			<li>3、网友应对所发布的信息承担全部责任</li>
			<li>4、网站管理人员有权保留或删除留言中的信息内容</li>
			<li>5、发表留言即表明已阅读并接受以上条款</li>
		  </ul>
		</div>
      </div>
    </div>
    <div class="line"></div>
  </div>
  <div id="xycopy">
    <!--#include file="foot.asp"-->
  </div>
</div>
<DIV id="downmsg_emessage" style="DISPLAY: block">
  <DIV id="downmsgBar">
    <DIV id="donwmsg_head">XYCMS官方系统提示</DIV><A class="close" href="javascript:closeDiv()"></A><A class="msg-hidden-btn-1" id="msg_hidden_btn" href="javascript:showHideDiv()">&nbsp;</A></DIV>
  <DIV id="donwmsg_content" style="DISPLAY: block; HEIGHT: 162px">
    <UL>
      <LI class="ll"><A href="http://www.yuleroom.cn/common_1.html" target="_blank">关于XYCMS建站系统</A></LI>
      <LI><A href="http://xycms.taobao.com" target="_blank">官方店铺诚邀您来加盟</A></LI>
      <LI><A href="http://item.taobao.com/item.htm?id=18512924838" target="_blank">XYCMS企业建站系统UTF8版</A></LI>
      <LI><A href="http://item.taobao.com/item.htm?id=12542687420" target="_blank">XYCMS在线留言板商业版</A></LI>
      <LI><A href="http://item.taobao.com/item.htm?id=12429639044" target="_blank">XYCMS教育培训学校建站系统</A></LI>
    </UL>
    <DIV class="lb"><A href="http://www.yuleroom.cn/" target="_blank">XYCMS</A> <A href="http://xycms.taobao.com" target="_blank">官方店铺</A> <A href="http://item.taobao.com/item.htm?id=7320515773" target="_blank">在线定做网站</A></DIV>
  </DIV>
</DIV>
</body>
</html>
