<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="book_conn.asp" -->
<!--#include file="replace.asp" -->
<!--#include file="../config.asp" -->
<!--#include file="../syscode.asp" -->
<%
if request("send")="ok" then
	username=trim(request.form("username"))
	usermail=trim(request.form("usermail"))
	if username="" or request.form("Comments")="" then
	response.write "<script language='javascript'>"
	response.write "alert('填写资料不完整，请检查后重新输入！');"
	response.write "location.href='javascript:history.go(-1)';"
	response.write "</script>"
	response.end
	end if

	if checktxt(request.form("username"))<>request.form("username") then
	response.write "<script language='javascript'>"
	response.write "alert('您输入的用户名中含有非法字符，请检查后重新输入！');"
	response.write "location.href='javascript:history.go(-1)';"							
	response.write "</script>"	
	response.end
	end if

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

	if checktxt(request.form("usermail"))<>request.form("usermail") then
	response.write "<script language='javascript'>"
	response.write "alert('您输入的邮箱中含有非法字符，请检查后重新输入！');"
	response.write "location.href='javascript:history.go(-1)';"							
	response.write "</script>"	
	response.end
	end if

	if Instr(usermail,".")<0 or Instr(usermail,"@")<0 or len(usermail)<7 or len(usermail)>50 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

	if len(request.form("Comments"))>maxlength then
	response.write "<script language='javascript'>"
	response.write "alert('留言内容太长了，请不要超过"&maxlength&"个字符！');"
	response.write "location.href='javascript:history.go(-1)';"
	response.write "</script>"
	response.end
	end if

	Comments1=request.form("Comments")
	bad1=split(bad,"/")		'过滤脏话
	for t=0 to ubound(bad1)
	Comments1=replace(Comments1,bad1(t),"***")
	next

	if request.form("Comments")<>Comments1 then
	response.write "<script language='javascript'>"
	response.write "alert('出错了，您的留言包含禁止提交的内容！');"
	response.write "location.href='javascript:history.go(-1)';"							
	response.write "</script>"	
	response.end
	end if


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

			rs.Addnew
			rs("username")=ReplaceHtml(Request("username"))
			rs("comments")=ReplaceHtml(Request("comments"))
			rs("usermail")=ReplaceHtml(Request("usermail"))
			rs("face")=Request("face")
			rs("pic")=Request("pic")
			rs("url")=ReplaceHtml(Request("url"))
			rs("qq")=ReplaceHtml(Request("qq"))
			view=cstr(view)
			if view<>"0" then view="1"
			rs("online")=view
			rs("IP")=Request.serverVariables("REMOTE_ADDR")
			rs.Update
		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='index.asp';"	
	response.write "</script>"
	response.end
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>西安西科职业技术学院-签写留言</title>
<!--关键字修改 config.asp 就可以了-->
<meta name="keywords" content="<%=key%>">
<meta name="description" content="<%=descrip%>">
<link href="../style.css" rel="stylesheet" type="text/css">
</head>
<body>
<!--#include file="top.asp" -->
<table width="950" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="235" height="511" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="34" background="../images/left.jpg"><table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td width="10%" align="right"><img src="../images/arrow.gif" width="9" height="9"></td>
              <td width="27%">&nbsp;<span class="baifont">学院概况</span></td>
              <td width="47%">&nbsp;</td>
              <td width="16%">&nbsp;</td>
            </tr>
        </table></td>
      </tr>
      <tr>
        <td height="100" valign="top"><table width="232" border="0" align="right" cellpadding="0" cellspacing="0" background="../images/abbg.jpg">
            <tr>
              <td width="230" height="100" valign="top"><table width="223" border="0" align="center" cellpadding="0" cellspacing="0">
                  <tr>
                    <td width="111" height="28" align="center"><img src="../images/t1.gif" width="8" height="13" align="absmiddle"> <a href="../about.asp">学院简介</a></td>
                    <td width="112" align="center"><img src="../images/t1.gif" width="8" height="13" align="absmiddle"> <a href="../huanjing.asp">校园风貌</a></td>
                  </tr>
                  <tr>
                    <td height="28" align="center"><img src="../images/t1.gif" width="8" height="13" align="absmiddle"> <a href="../shizi.asp">师资力量</a></td>
                    <td align="center"><img src="../images/t1.gif" width="8" height="13" align="absmiddle"> <a href="../youshi.asp">办学优势</a></td>
                  </tr>
                  <tr>
                    <td height="28" align="center"><img src="../images/t1.gif" width="8" height="13" align="absmiddle"> <a href="../guanli.asp">学院管理</a></td>
                    <td align="center"><img src="../images/t1.gif" width="8" height="13" align="absmiddle"> <a href="../linian.asp">办学理念</a></td>
                  </tr>
                  <tr>
                    <td height="28" colspan="2" align="center">&nbsp;</td>
                  </tr>
              </table></td>
            </tr>
        </table></td>
      </tr>
    </table>
    <table width="100%" height="5" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td ></td>
  </tr>
</table>

	<table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td height="34" background="../images/left1.jpg"><table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td width="10%" align="right"><img src="../images/arrow.gif" width="9" height="9"></td>
              <td width="27%">&nbsp;<span class="baifont">考生问答</span></td>
              <td width="47%">&nbsp;</td>
              <td width="16%"><a href="../wenda.asp"><img src="../images/more.gif" width="27" height="18" border="0"></a></td>
            </tr>
          </table></td>
        </tr>
        <tr>
          <td height="148" valign="top" background="../images/left3bg.jpg" bgcolor="#CEE9FE"><table width="97%" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
              <td><%
	sql="select top 8 * from news where smallclassname='问答'order by ord desc,id desc"
	set rs = conn.execute(sql)
	if rs.bof and rs.eof then
		response.write("<table ><tr><td>暂无记录</td></tr></table>")
	else
	%>
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <%
	while not rs.eof
		if len(rs("title"))>11 then
		stitle=left(rs("title"),11)&"..."
	else
		stitle=rs("title")
	end if
	i=i+1
	%>
                    <tr >
                      <td width="19" align="center"><img src="../images/wenhao.gif" width="10" height="12"></td>
                      <td width="150" height="22"><a href="../showfaq.asp?id=<%=rs("id")%>" target="_blank" title="<%=rs("title")%>"><%=stitle%></a></td>
                      <td width="54"  ><%=rs("addtime")%></td>
                    </tr>
                    <%
	rs.movenext
	wend
	%>
                  </table>
                <%
	rs.close
	set rs=nothing
	end if
%>              </td>
            </tr>
          </table></td>
        </tr>
      </table>
	<table width="100%" height="5" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td ></td>
      </tr>
    </table>
	<table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="34" background="../images/left1.jpg"><table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td width="10%" align="right"><img src="../images/arrow.gif" width="9" height="9"></td>
              <td width="27%">&nbsp;<span class="baifont">联系我们</span></td>
              <td width="47%">&nbsp;</td>
              <td width="16%">&nbsp;</td>
            </tr>
        </table></td>
      </tr>
      <tr>
        <td height="148" valign="top" background="../images/left3bg1.jpg" bgcolor="#CEE9FE"><table width="98%" border="0" align="center" cellpadding="0" cellspacing="1">
          <tr>
            <td width="28%" height="23" align="right">联系电话：</td>
            <td width="72%" height="23">029-68853521</td>
          </tr>
          <tr>
            <td height="23" align="right">接待处：</td>
            <td height="23">许老师13468663184</td>
          </tr>
          <tr>
            <td height="23" align="right">接待处：</td>
            <td height="23">晏老师13468663184</td>
          </tr>
          <tr>
            <td height="23" align="right">在线客服：</td>
            <td height="23">在线咨询：<a href="tencent://message/?uin=48086634
&amp;Site=西安学院&amp;Menu=yes"><img src="http://wpa.qq.com/pa?p=1:48086634
:4" border="0" / align="absmiddle"></a></td>
          </tr>
          <tr>
            <td height="23" align="right">学院地址：</td>
            <td height="23">西安长安南路航天大道西口西</td>
          </tr>
          <tr>
            <td height="23" colspan="2">&nbsp;安西科职业技术学院-华美校区。</td>
          </tr>
        </table></td>
      </tr>
    </table></td>
    <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="39" background="../images/ctoptbg.jpg"><table width="97%" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td width="4%" align="center"><img src="../images/Sm_MainDayIcon.gif" width="15" height="15"></td>
            <td width="11%"> 签写留言</td>
            <td width="85%"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="19%"><a href="book_admin.asp"><img src="IMAGES/admin2.gif" width="65" height="16" border="0"></a></td>
                <td width="19%"><a href="book_write.asp"><img src="IMAGES/newanc.gif" width="60" height="17" border="0"></a></td>
                <td width="31%"><a href="index.asp"><img src="IMAGES/reanc.gif" width="60" height="17" border="0"></a></td>
                <td width="31%"><A href="../wenda.asp" target="_blank"><STRONG>也许这里可以回答您的疑问</STRONG></A><a href="book_admin.asp"></a></td>
              </tr>
            </table></td>
          </tr>
        </table></td>
      </tr>
    </table>
      <table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
        <tr>
          <td height="523" valign="top" class="crt"><table width="708" height="522" border="0" align="right" cellpadding="2" cellspacing="1">
            <tr>
              <td width="696" height="430" valign="top"><table width="700" border="0" align="center" cellpadding="0" cellspacing="0">
                <tr>
                  <td valign="top" background="../images/c_bg1.jpg"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td height="500" valign="top"><table cellSpacing="1" borderColorDark="#ffffff" cellPadding="4" width="680" align="center" bgColor="#F2F2F2" borderColorLight="#000000" border="0">
                          <form action=book_write.asp method=post name="book">
                              <tr bgColor="#ebebeb">
                                <td   width="20%" align=right bgcolor="#FFFFFF">您的姓名：</td>
                                <td bgcolor="#FFFFFF" ><input type=text name="UserName" size="30" maxlength=16>
                                    <font color="#FF0000">*</font></td>
                              </tr>
                              <tr bgColor="#ebebeb">
                                <td   width="20%" align=right bgcolor="#FFFFFF">您的邮箱：</td>
                                <td bgcolor="#FFFFFF" ><input type=text name="UserMail" size="30"  maxlength=50>
                                    <%if mailyes=0 then%>
                                    <font color="#FF0000">*</font>
                                    <%end if%></td>
                              </tr>
                              <tr bgColor="#ebebeb">
                                <td   width="20%" align=right bgcolor="#FFFFFF">您的网站：</td>
                                <td bgcolor="#FFFFFF"><input type=text value="http://" name="url" size="30"  maxlength=100></td>
                              </tr>
                              <tr bgColor="#ebebeb">
                                <td   width="20%" align=right bgcolor="#FFFFFF">其它联系方式：</td>
                                <td bgcolor="#FFFFFF"><input type=text value="" name="QQ" size="30"  maxlength=50>
                                  （如QQ、MSN等）</td>
                              </tr>
                              <tr bgColor="#ebebeb">
                                <td   width="20%" align=right bgcolor="#FFFFFF">留言内容：<br>
                                    <font color=red>（<%=maxlength%>字以内）</font></td>
                                <td bgcolor="#FFFFFF"><textarea name="Comments" rows="7" cols="66" style="overflow:auto;"></textarea></td>
                              </tr>
                              <tr bgColor="#ebebeb">
                                <td   width="20%" 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">
                                    <input type="radio" value="10" name="face">
                                    <img border=0 src="images/face/face10.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">
                                    <input type="radio" value="20" name="face">
                                    <img border=0 src="images/face/face20.gif"> </td>
                              </tr>
                              <tr bgColor="#ebebeb">
                                <td width="20%" align=right bgcolor="#FFFFFF">请选择头像：</td>
                                <td bgcolor="#FFFFFF"><input type="radio" value="1" name="pic" checked>
                                    <img border=0 src="images/face/pic1.gif" width=60>
                                    <input type="radio" value="2" name="pic">
                                    <img border=0 src="images/face/pic2.gif" width=60>
                                    <input type="radio" value="3" name="pic">
                                    <img border=0 src="images/face/pic3.gif" width=60>
                                    <input type="radio" value="4" name="pic">
                                    <img border=0 src="images/face/pic4.gif" width=60>
                                    <input type="radio" value="5" name="pic">
                                    <img border=0 src="images/face/pic5.gif" width=60> <br>
                                    <input type="radio" value="6" name="pic">
                                    <img border=0 src="images/face/pic6.gif" width=60>
                                    <input type="radio" value="7" name="pic">
                                    <img border=0 src="images/face/pic7.gif" width=60>
                                    <input type="radio" value="8" name="pic">
                                    <img border=0 src="images/face/pic8.gif" width=60>
                                    <input type="radio" value="9" name="pic">
                                    <img border=0 src="images/face/pic9.gif" width=60>
                                    <input type="radio" value="10" name="pic">
                                    <img border=0 src="images/face/pic10.gif" width=60> </td>
                              </tr>
                              <tr bgColor="#ebebeb">
                                <td colSpan="2" align="center" bgcolor="#FFFFFF"><input type="submit" value="提交留言" name="Submit">
                                    <input type="reset" value="重新填写" name="Submit2">
                                    <input type=hidden name=send value=ok></td>
                              </tr>
                          </form>
                        </table></td>
                      </tr>
                  </table></td>
                </tr>
              </table></td>
            </tr>
          </table></td>
        </tr>
      </table></td>
  </tr>
</table>
<!--#include file="end.asp" -->
</body>
</html>
