<!--#include file="inc_const.asp"-->
<%response.expires=0
Response.CacheControl = "Private"
application.lock

if application( ConstStr & "_allowwritegb")="0" then
  response.redirect("showerr.asp?errtext=管理员禁止写留言！点此进入<a href=guest.asp>留言本</a>！")
  application.unlock
  response.end
end if

set cschat=server.createobject("ffcschat.cssbchat")
my_level=cschat.getLevel(Session,Application(ConstStr & "_user_list"),Application(ConstStr & "_room_list"))

application.unlock

if my_level=0 then
  login=false
else 
  myname=cschat.myname
  login=true  
end if
set cschat=nothing
email = Request.cookies("guest_email")
web = Request.cookies("guest_web")
addr = Request.cookies("guest_addr")
if addr = "" then addr = "http://"
towho=request("towho")
if towho="" then towho="大家"

%>
<META content="text/html; charset=gb2312" http-equiv=content-type>
<link rel="stylesheet" type="text/css" href="chat.css">
<style>p{margin-left:10px;margin-right:20px;margin-top:5px;margin-bottom:0px}</style>
<script language="JavaScript">
 function CheckValid() {
  if (document.forms[0].title.value == "") {
    alert( "留言主题必须填写！");
    document.forms[0].title.focus();
    return false;}
  if (document.forms[0].mess.value == "") {
    alert( "留言内容必须填写！");
    document.forms[0].mess.focus();
    return false;}
  return true;}</script>
<body  class=navy0 leftmargin=0 topmargin=0 >   
<table height=100% width=100% ><tr><td align=center valign=center>
<table align=center cellspacing=0 cellpadding=0 border=1 BORDERCOLORLIGHT=#000000 BORDERCOLORDARK=#ffffff>
  <tr><td class=navy1>请写留言</td>
  <form method="POST" action="save.asp"  onsubmit="return CheckValid()">
  <tr><td><table><tr><td style="text-align:left;line-height:200%">
  <%if not login then%>   
    <p><font color=red>你的名字</font>：<input type="text" name="name" maxlength="10" size="10">
    <font color=red>登录密码</font>：<input type="password" name="passwd" maxlength="10" size="10">
  <%else%>
    <p>欢迎<font color=990000>〖<%=myname%>〗</font>的到来，请写下你的留言：
  <%end if%>
    <p>留言对象：<input type=text name="towho" size="10" maxlength="10" value="<%=towho%>">
    是否秘密：<input type="radio" name="secret" value="1">是&nbsp;<input
    type="radio" name="secret" value="0" checked>否
    <p>电子信箱：<input type="text" name="email" maxlength="40" size="40" value="<%=email%>">
    <p>推荐主页：<input type="text" name="web" maxlength="40" size="40" value="<%=web%>">
    <p>主页地址：<input type="text" name="addr" maxlength="80" size="40" value="<%=addr%>">
                    <p><font color=red>留言主题</font>： 
                      <input type="text" name="title" maxlength="50" size="40" value="<%=request("title")%>">
                    <p><font color=red>投注资金</font>: 
                      <select name="exp_num" id="exp_num">
                        <option value="0">免费类型</option>
                        <option value="50">50</option>
                        <option value="100">100</option>
                        <option value="200">200</option>
                        <option value="300">300</option>
                        <option value="400">400</option>
                        <option value="500">500</option>
                        <option value="600">600</option>
                        <option value="700">700</option>
                        <option value="900">800</option>
                        <option value="1000">1000</option>
                        <option value="1200">1200</option>
                        <option value="1500">1500</option>
                        <option value="2000">2000</option>
                        <option value="3000">3000</option>
                        <option value="5000">5000</option>
                        <option value="7000">7000</option>
                        <option value="9000">9000</option>
                        <option value="10000">10000</option>
                        <option value="20000">20000</option>
                        <option value="30000">30000</option>
                        <option value="75818">80000</option>
                      </select>
                    <p>
    <p><font color=red>留言内容</font>：<textarea rows="6" name="mess" cols="39"></textarea><br>(<font color=red>红色内容</font>为必填，留言内容不超过800字)</td></tr>
  <tr><td align=center>
   <p><input type="submit" class=navy1 value="提交" name="B1">
   <input class=navy1 type="reset" value="复原" name="B2"></P>
   <br><p>[<a href="javascript:history.go(-1);">返 回</a>] [<a href="guest.asp">查看留言</a>]</tr></td></form>
</table>
      
    </td>
  </tr></table>
</body>
</html>


