<!--#include file="inc/PageTle.asp"-->
<%skin=4
PageTle "签写留言"
if request.cookies("online")<>"yes" then
response.redirect "../guestbook"
end if
userid=session("user_id")
%>
<head>
<LINK target=_blank href=images/skin<%=skin%>/index.asp rel=stylesheet>
<SCRIPT Language="JavaScript" src="checkform.js"></SCRIPT>
<STYLE type=text/css>
.english {
	FONT-FAMILY: "Arial", "Helvetica", "sans-serif"}
.s10 {
	FONT-SIZE: 10.5pt
}
.more {
	COLOR: #cc0000; FONT-SIZE: 10.5pt
}
.black {
	COLOR: #000000
}
.s9 {
	FONT-SIZE: 9pt
}
.write {  color: #FF0000}
img {  vertical-align: bottom}
.line {  border-color: #E8FFE8 #E8FFE8 #333333; background-color: #E8FFE8; border-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px}
.line2 {  border-color: #FFFFFF #FFFFFF #000000; background-color: #FFFFFF; border-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px}
.color {  color: #0000FF}
.aaaaa1 {  font-size: 12px; text-decoration: none}
.style6 {color: #003300}
</STYLE>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"></head>
<body  onkeydown="SubmitKey()">
<form name="addmessage" method="post" action="add.asp">
  <br>
  <br>
  <br>
  <br>
 <%if userid="" then
 form1
 else
 form2
 end if
 %>
</form>
  <%function form1%>
  <table width="700"  border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#000000">
    <tr align="center" bgcolor="#FFFFFF">
      <td height="30" colspan="3" bgcolor="#FFFFFF"  class="tablecolor1"><table class=font7><tr><td><span class="style6">请您留言[按CTRL+ENTER可提交表单]</span></td>
      </tr></table></td>
    </tr>
    <tr bgcolor="#FFFFFF">
      <td width="50%" height="237" bgcolor="#FFFFFF" class="tablecolor"><table width="100%" height="100%"  border="0" cellpadding="0" cellspacing="0"  oncontextmenu=return(false)>
        <tr>
          <td width="8%" align="center"><IMG height=24 src="form/nc.gif" 
            width=24 border=0></td>
          <td width="10%" align="center">姓名</td>
          <td width="219"><input name="names" type="text" class="form_none" id="names" onKeyPress="Testkeypress();" onKeyDown="Testkeydown();" maxlength="15"></td>
        </tr>
        <tr>
          <td width="8%" align="center"><IMG height=24 src="form/nc.gif" 
            width=24 border=0></td>
          <td width="10%" align="center">性别</td>
          <td><select name="sex" class="tablecolor" id="sex" onChange="if(this.value=='男'){sexpic.src='form/boy.gif';}else{sexpic.src='form/girl.gif';}">
            <option value="男" selected>帅GG</option>
            <option value="女">靓MM</option>
                                                                                          </select>
          <IMG height=20 src="form/boy.gif" name=sexpic width=20></td>
        </tr>
        <tr>
          <td width="8%" align="center"><IMG height=16 src="form/email.gif" 
            width=16 border=0></td>
          <td width="10%" align="center">邮箱</td>
          <td><input name="email" type="text" class="form_none" id="email" onKeyPress="Testkeypress();" onKeyDown="Testkeydown();" value="@" maxlength="30"></td>
        </tr>
        <tr>
          <td width="8%" align="center"><IMG height=16 src="form/homepage.gif" 
            width=16 border=0></td>
          <td width="10%" align="center">主页</td>
          <td><input name="HomeUrl" type="text" class="form_none" id="HomeUrl" onKeyPress="Testkeypress();" onKeyDown="Testkeydown();" value="http://" size="30" maxlength="40"></td>
        </tr>
        <tr>
          <td width="8%" align="center"><IMG height=16 src="form/from.gif" 
            width=16 border=0></td>
          <td width="10%" align="center">来自</td>
          <td><input name="address" type="text" class="form_none" id="address" onKeyPress="Testkeypress();" onKeyDown="Testkeydown();" size="30" maxlength="40"></td>
        </tr>
        <tr>
          <td width="8%" align="center"><IMG height=16 src="form/oicq.gif" 
            width=16 border=0></td>
          <td width="10%" align="center">QQ</td>
          <td><input name="oicq" type="text" class="form_none" id="oicq" onKeyPress="onlynum();" onKeyDown="Testkeydown();" value="0" maxlength="15"></td>
        </tr>
        <tr>
          <td width="8%" align="center"><IMG height=18 src="form/icq.gif" 
            width=18 border=0></td>
          <td width="10%" align="center">ICQ</td>
          <td><input name="icq" type="text" class="form_none" id="icq" onKeyPress="onlynum();" onKeyDown="Testkeydown();" value="0" maxlength="15"></td>
        </tr>
        <tr>
          <td width="8%" align="center"><IMG height=24 src="form/nc.gif" 
            width=24 border=0></td>
          <td width="10%" align="center">头像</td>
          <td class="font5"><select name="face" class="input2">
            <option value="face/001.gif" selected>头像1</option>
			<%i=1:do until i=33%><option value="face/0<%if i<10 then response.Write "0" & i else response.Write i end if%>.gif">头像<%=i%></option><%=Chr(10)%><%i=i+1:loop%>
          </select>
            &nbsp;<a onClick="openwin('face.asp','600','400','yes')" href="#">查看所有头像<a></td>
        </tr>
        <tr>
          <td width="8%" align="center"><IMG height=24 src="form/nc.gif" 
            width=24 border=0></td>
          <td width="10%" align="center">表情</td>
          <td class="font5"><select name="userface" class="input2" id="userface" onChange="userfacepic.src=this.value">
<option value="userface/face1.gif" selected>表情1</option>
<%i=2:do until i=31%><option value="userface/face<%=i%>.gif">表情<%=i%></option><%=Chr(10)%><%i=i+1:loop%>
			                 </select>
&nbsp;<a onClick=openwin("userface.asp","300","200","no") href="#">查看所有表情<a><IMG src="userface/face1.gif" name=userfacepic width="15" height="15" border=0></td>
        </tr>
      </table>        
      </td>
      <td height="237" colspan="2" bgcolor="#FFFFFF" class="tablecolor"><table width="100%" height="100%"  border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td width="11%" height="26" align="center"><IMG height=24 src="form/post.gif" 
            width=24></td>
          <td width="38%">留言</td>
          <td width="51%" class="font5">[<a onClick=openwin("ubb.asp","600","450","yes") href="#">查看所支持的UBB代码</A>]</td>
        </tr>
        <tr>
          <td height="163" colspan="3" align="center"><textarea name="message" cols="50" rows="12" class="form_none" id="message"></textarea></td>
        </tr>
        <tr>
          <td colspan="3" class="font3">注意：留言者不能发布任何不符合当地法规、国家法律和国际法律的资料；不得发布任何非法的、骚扰性的、中伤他人的、辱骂性的、恐吓性的、伤害性的、庸俗的，淫秽等信息资料；</td>
        </tr>
      </table></td>
    </tr>
    <tr align="center" bgcolor="#FFFFFF">
      <td height="29" colspan="3" bgcolor="#FFFFFF" class="tablecolor1"><input name="Submit" type="button" class="input1" value="提交" onClick="checkform();">
      <input name="Submit" type="reset" class="input1" value="重置">
      <input name="Submit" type="button" class="input1" value="取消" onClick="window.location.href='../guestbook'">
      </td>
    </tr>
</table>
  <br>
  <%end function%>
  <%
  function form2
dim db
db=server.MapPath("../user/data/UserDt.mdb")
Set conn = Server.CreateObject("ADODB.Connection")
connstr="driver={Microsoft Access Driver (*.mdb)};dbq=" & db
conn.Open connstr
set user=server.createobject("adodb.recordset")
sql="select * from User where userID='"+userid+"'"
user.open sql,conn,1,1
  %>
  <table width="700"  border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#000000">
    <tr align="center" bgcolor="#FFFFFF">
      <td height="30" colspan="3" bgcolor="#FFFFFF"  class="tablecolor1"><table class=font7>
          <tr>
            <td><span class="style6">请您留言[按CTRL+ENTER可提交表单]</span></td>
          </tr>
      </table></td>
    </tr>
    <tr bgcolor="#FFFFFF">
      <td width="50%" height="237" bgcolor="#FFFFFF" class="tablecolor"><table width="100%" height="100%"  border="0" cellpadding="0" cellspacing="0"  oncontextmenu=return(false)>
          <tr>
            <td width="8%" align="center"><IMG height=24 src="form/nc.gif" 
            width=24 border=0></td>
            <td width="10%" align="center">姓名</td>
            <td width="82%"><input name="names" type="text" class="form_none" id="names" onKeyPress="Testkeypress();" onKeyDown="Testkeydown();" value="<%=user("username")%>" maxlength="15"></td>
          </tr>
          <tr>
            <td align="center"><IMG height=24 src="form/nc.gif" 
            width=24 border=0></td>
            <td align="center">性别</td>
            <td><select name="sex" class="tablecolor" id="sex" onChange="if(this.value=='男'){sexpic.src='form/boy.gif';}else{sexpic.src='form/girl.gif';}">
                <option value="男" selected>帅GG</option>
                <option value="女">靓MM</option>
              </select>
                <IMG height=20 src="form/boy.gif" name=sexpic width=20></td>
          </tr>
          <tr>
            <td align="center"><IMG height=16 src="form/email.gif" 
            width=16 border=0></td>
            <td align="center">邮箱</td>
            <td><input name="email" type="text" class="form_none" id="email" onKeyPress="Testkeypress();" onKeyDown="Testkeydown();" value="<%=user("email")%>" maxlength="30"></td>
          </tr>
          <tr>
            <td align="center"><IMG height=16 src="form/homepage.gif" 
            width=16 border=0></td>
            <td align="center">主页</td>
            <td><input name="HomeUrl" type="text" class="form_none" id="HomeUrl" onKeyPress="Testkeypress();" onKeyDown="Testkeydown();" value="<%=user("homeurl")%>" size="30" maxlength="40"></td>
          </tr>
          <tr>
            <td align="center"><IMG height=16 src="form/from.gif" 
            width=16 border=0></td>
            <td align="center">来自</td>
            <td><input name="address" type="text" class="form_none" id="address" onKeyPress="Testkeypress();" onKeyDown="Testkeydown();" value="<%=user("address")%>" size="30" maxlength="40"></td>
          </tr>
          <tr>
            <td align="center"><IMG height=16 src="form/oicq.gif" 
            width=16 border=0></td>
            <td align="center">QQ</td>
            <td><input name="oicq" type="text" class="form_none" id="oicq" onKeyPress="onlynum();" onKeyDown="Testkeydown();" value="<%=user("QQ")%>" maxlength="15"></td>
          </tr>
          <tr>
            <td align="center"><IMG height=18 src="form/icq.gif" 
            width=18 border=0></td>
            <td align="center">ICQ</td>
            <td><input name="icq" type="text" class="form_none" id="icq" onKeyPress="onlynum();" onKeyDown="Testkeydown();" value="<%=user("icq")%>" maxlength="15"></td>
          </tr>
          <tr>
            <td align="center"><IMG height=24 src="form/nc.gif" 
            width=24 border=0></td>
            <td align="center">头像</td>
            <td class="font5"><select name="face" class="input2">

                <%i=1:do until i=33%>
                <option value="face/0<%if i<10 then response.Write "0" & i else response.Write i end if%>.gif" <%
if cint(mid(user("face"),len(user("face"))-6,3))=i then
response.write "selected"
end if
%>>头像<%=i%></option>

                <%=Chr(10)%>
                <%i=i+1:loop%>
              </select>
&nbsp;<a onClick="openwin('face.asp','600','400','yes')" href="#">查看所有头像<a></a></a></td>
          </tr>
          <tr>
            <td align="center"><IMG height=24 src="form/nc.gif" 
            width=24 border=0></td>
            <td align="center">表情</td>
            <td class="font5"><select name="userface" class="input2" id="userface" onChange="userfacepic.src=this.value">
                <option value="userface/face1.gif" selected>表情1</option>
                <%i=2:do until i=31%>
                <option value="userface/face<%=i%>.gif">表情<%=i%></option>
                <%=Chr(10)%>
                <%i=i+1:loop%>
              </select>
&nbsp;<a onClick=openwin("userface.asp","300","200","no") href="#">查看所有表情<a>&nbsp;&nbsp;<IMG src="userface/face1.gif" name=userfacepic width="15" height="15" border=0></a></a></td>
          </tr>
      </table></td>
      <td height="237" colspan="2" bgcolor="#FFFFFF" class="tablecolor"><table width="100%" height="100%"  border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td width="11%" height="26" align="center"><IMG height=24 src="form/post.gif" 
            width=24></td>
            <td width="46%">留言</td>
            <td width="43%" class="font5">[<a onClick=openwin("ubb.asp","600","450","no") href="#">查看所支持的UBB代码</A>]</td>
          </tr>
          <tr>
            <td height="163" colspan="3" align="center"><textarea name="message" cols="50" rows="12" class="form_none" id="message"></textarea></td>
          </tr>
          <tr>
            <td colspan="3" class="font3">注意：留言者不能发布任何不符合当地法规、国家法律和国际法律的资料；不得发布任何非法的、骚扰性的、中伤他人的、辱骂性的、恐吓性的、伤害性的、庸俗的，淫秽等信息资料；</td>
          </tr>
      </table></td>
    </tr>
    <tr align="center" bgcolor="#FFFFFF">
      <td height="29" colspan="3" bgcolor="#FFFFFF" class="tablecolor1"><input name="Submit" type="button" class="input1" value="提交" onClick="checkform();">
          <input name="Submit" type="reset" class="input1" value="重置">
          <input name="Submit" type="button" class="input1" value="取消" onClick="window.location.href='../guestbook'">
      </td>
    </tr>
</table>
  <%
  user.close
  set user=nothing
  conn.close 
  set conn=nothing
  end function%>
</body>