📄 write.asp
字号:
<!--#include file="logo.asp"-->
<% Response.buffer=true %>
<%set rs2=server.createobject("adodb.recordset")
sql="select * from web_admin where id='1'"
rs2.open sql,conn,1,1%>
<% Select case Request.QueryString("op")
Case "add_msg"
Call add_msg()
Case else
Call msg_main()
End Select%>
<% Sub msg_main() %>
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>写留言</title>
<style type="text/css">
<!--
body,td,th {font-family: 宋体, Arial;font-size: 12px;}
body{
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
scrollbar-base-color:#ffffff;
scrollbar-face-color:#ffffff;
scrollbar-track-color:#ffffff;
scrollbar-arrow-color:#000000;
scrollbar-3dlight-color:#000000;
scrollbar-highlight-color:#00000;
scrollbar-shadow-color:#000000;
scrollbar-darkshadow-color:#ffffff; }
a {font-size: 12px;}
a:link {text-decoration: none;}
a:visited {text-decoration: none;}
a:hover {text-decoration: none;}
a:active {text-decoration: none;}
-->
</style>
<style fprolloverstyle>
A:hover {color: #808080; font-size: 12px}
.style2 {font-size: 14}
</style>
</head>
<!--#include file="common.asp"-->
<body alink="#003399" vlink="#003399" link="#003399">
<table cellpadding="0" cellspacing="0" width="768" height="27" align="center">
<tr>
<td height="27" width="167" align="center"><a href="index.asp" class="style2">
<img src="images/1.gif" width="23" height="22" border="0">返回</a> </td>
<td height="27" width="599"><a href="login.asp" class="style2">
<img src="images/1.gif" width="23" height="22" border="0">管理页</a></td>
</tr>
</table>
<div align="center">
<table cellpadding="0" cellspacing="0" width="768" height="354">
<tr>
<td height="295" width="751">
<form name="FORM" method="POST" action="?op=add_msg" onSubmit="return Inputcheck()">
<table cellpadding="0" cellspacing="0" width="748" height="231">
<tr>
<td width="363" height="231">
<div align="right">
<table cellpadding="0" width="309" height="282" style="border-collapse: collapse" border="1" bordercolor="#E6E6E6">
<tr>
<td height="31" width="62" align="center">昵
称<font color="#FF0000">*</font></td>
<td height="31" width="123"> <input type="text" name="nick_name" size="16" style=" border:1px solid #FFFFFF; ; background-color:#E6E6E6"></td>
<td height="124" width="108" rowspan="4">
<p align="center"><img border="0" src="images/touxiang/1.gif" id="faceid" ></td>
</tr>
<tr>
<td height="31" width="62" align="center">OICQ</td>
<td height="31" width="123"> <input type="text" name="oicq" size="16" style=" border:1px solid #FFFFFF; ; background-color:#E6E6E6"></td>
</tr>
<tr>
<td height="31" width="62" align="center">来
自</td>
<td height="31" width="123"> <select name="pvc" tabindex="11" style="width:121; height:18" id="state" size="1">
<option value="未选择" selected>请选择</option>
<option>辽宁</option>
<option>安徽</option>
<option>北京</option>
<option>重庆</option>
<option>福建</option>
<option>甘肃</option>
<option>广东</option>
<option>广西</option>
<option>贵州</option>
<option>海南</option>
<option>河北</option>
<option>黑龙江</option>
<option>河南</option>
<option>湖北</option>
<option>湖南</option>
<option>江苏</option>
<option>江西</option>
<option>吉林</option>
<option>宁夏</option>
<option>内蒙古</option>
<option>青海</option>
<option>上海</option>
<option>山西</option>
<option>山东</option>
<option>四川</option>
<option>陕西</option>
<option>天津</option>
<option>西藏</option>
<option>新疆</option>
<option>云南</option>
<option>浙江</option>
<option>香港</option>
<option>澳门</option>
<option>台湾</option>
</select></td>
</tr>
<tr>
<td height="31" width="62" align="center">头
像</td>
<td height="31" width="123"> <select size="1" name="touxiang" onchange="document.images['faceid'].src=options[selectedIndex].value;" style="width:122; height:19">
<option value="images/touxiang/1.gif" selected>
head-1</option>
<option value="images/touxiang/2.gif">head-2
</option>
<option value="images/touxiang/3.gif">head-3
</option>
<option value="images/touxiang/4.gif">head-4
</option>
<option value="images/touxiang/5.gif">head-5
</option>
<option value="images/touxiang/6.gif">head-6
</option>
<option value="images/touxiang/7.gif">head-7
</option>
<option value="images/touxiang/8.gif">head-8
</option>
<option value="images/touxiang/9.gif">head-9
</option>
<option value="images/touxiang/10.gif">head-10
</option>
<option value="images/touxiang/11.gif">head-11
</option>
<option value="images/touxiang/12.gif">head-12
</option>
<option value="images/touxiang/13.gif">head-13
</option>
<option value="images/touxiang/14.gif">head-14
</option>
<option value="images/touxiang/15.gif">head-15
</option>
<option value="images/touxiang/16.gif">head-16
</option>
<option value="images/touxiang/17.gif">head-17
</option>
<option value="images/touxiang/18.gif">head-18
</option>
<option value="images/touxiang/19.gif">head-19
</option>
<option value="images/touxiang/20.gif">head-20
</option>
</select></td>
</tr>
<tr>
<td height="31" width="62" align="center">
E-mail</td>
<td height="31" colspan="2"> <input type="text" name="e_mail" size="24" style=" border:1px solid #FFFFFF; background-color:#E6E6E6"></td>
</tr>
<tr>
<td height="32" width="62" align="center">
留言主题<font color="#FF0000">*</font></td>
<td height="32" colspan="2"> <input type="text" name="title" size="24" style=" border:1px solid #FFFFFF; background-color:#E6E6E6">[不超30字]</td>
</tr>
</table>
</div>
</td>
<td width="385" height="231">
<div align="center">
<table cellpadding="0" width="337" height="212" style="border-collapse: collapse" border="1" bordercolor="#E6E6E6">
<tr>
<td height="212" width="13" style="font-family: 宋体, Arial; font-size: 12px" rowspan="3" bgcolor="#E6E6E6">
留<br>
言<br>
内<br>
容<font color="#FF0000">*</font></td>
</tr>
<tr>
<td height="146" width="320" style="font-family: 宋体, Arial; font-size: 12px" colspan="2">
<textarea rows="11" name="contents" cols="51"></textarea></td>
</tr>
</table>
</div>
</td>
</tr>
</table>
<p align="center"><br>
<input type="radio" value="1" checked name="msg_type">公开
<input type="radio" name="msg_type" value="2">悄悄话
</p>
<p align="center">
<input type="submit" value="提交" name="B1" style="border: 1px solid #C0C0C0; background-color: #E6E6E6">
<input type="reset" value="重写" name="B3" style="border: 1px solid #C0C0C0; background-color: #E6E6E6"></p>
</form>
</td>
</tr>
<tr>
</table>
</div>
<br>
</body>
</html>
<% End Sub %>
<% Sub add_msg()
nick_name=request.form("nick_name")
oicq=request.form("oicq")
pvc=request.form("pvc")
touxiang=request.form("touxiang")
e_mail=request.form("e_mail")
title=request.form("title")
msg_type=request.form("msg_type")
contents=request.form("contents")
exec="insert into msg_book(nick_name,oicq,pvc,touxiang,e_mail,title,msg_type,contents)values('"+nick_name+"','"+oicq+"','"+pvc+"','"+touxiang+"','"+e_mail+"','"+title+"','"+msg_type+"','"+contents+"')"
conn.execute exec
conn.close
set conn=nothing
response.Redirect "index.asp"
End Sub%>
<%
rs2.close
set rs2=nothing
conn.close
set conn=nothing%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -