📄 bbs01.asp
字号:
<!--#include file="../global/inc/global.inc.asp"-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../style.css" rel="stylesheet" type="text/css">
<title>在线留言</title>
<script LANGUAGE="JavaScript">
<!--
function regInput(obj, reg, inputStr)
{
var docSel = document.selection.createRange()
if (docSel.parentElement().tagName != "INPUT") return false
oSel = docSel.duplicate()
oSel.text = ""
var srcRange = obj.createTextRange()
oSel.setEndPoint("StartToStart", srcRange)
var str = oSel.text + inputStr + srcRange.text.substr(oSel.text.length)
return reg.test(str)
}
function CheckForm()
{
if(document.form1.username.value=="") {
document.form1.username.focus();
alert("请输入姓名!");
return false;
}
if(document.form1.Tel.value=="") {
document.form1.Tel.focus();
alert("请输入联系电话!");
return false;
}
if(document.form1.title.value=="") {
document.form1.title.focus();
alert("请输入留言主题!");
return false;
}
if(document.form1.content.value=="") {
document.form1.content.focus();
alert("请输入留言内容!");
return false;
}
}
function CheckAll(form) {
for (var i=0;i<form.elements.length;i++)
{
var e = form.elements[i];
if (e.name == 'bbscheck') e.checked = form.chkall.checked;
}
}
//-->
</script>
<style type="text/css">
<!--
.style1 {color: #FF3300}
-->
</style>
</head>
<body>
<%
sub displaybbsform
oConn_Start
set rss=server.CreateObject("adodb.recordset")
sqll="select * from displaybbs where bbsid=1"
rss.open sqll,oconn,1,1
'response.write cint(rss("displaybbs"))
if cint(rss("displaybbs"))=0 then
%>
<table width="778" border="0" align="center" cellpadding="0" cellspacing="0">
<TR>
<TD width="100%" bgColor=#e4e4e4 height=22>发布留言 </TD></TR>
<TR>
<tr>
<td><form action="?mode=1" onsubmit="return CheckForm()" method="post" enctype="application/x-www-form-urlencoded" name="form1" target="_self">
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="778">
<!--DWLayoutTable-->
<tr>
<td colspan="2" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0" bordercolorlight="#000080" bordercolordark="#FFFFFF">
<tr>
<td width="18%" align="right" bgcolor="#e9eef8">姓名:</td>
<td height="26" colspan="2" bgcolor="#FFFFFF">
<div align="left">
<input name="username" type="text" id="username" onKeyPress="return keysubmit()" value="<%if request.QueryString("username")<>"" then response.Write request.QueryString("username")%>" size="11" maxlength="50">
<span class="style1">*</span></div></td>
</tr>
<tr>
<td width="18%" align="right" bgcolor="#e9eef8">单位:</td>
<td height="25" colspan="2" bgcolor="#FFFFFF">
<div align="left">
<input name="units" type="text" id="units" value="<%if request.QueryString("units")<>"" then response.Write request.QueryString("units")%>" size="35" maxlength="80">
</div></td>
</tr>
<tr>
<td width="18%" align="right" bgcolor="#e9eef8">E-mail:</td>
<td width="53%" height="25" bgcolor="#FFFFFF"><div align="left">
<input name="E-mail" value="<%if request.QueryString("mail")<>"" then response.Write request.QueryString("mail")%>" type="text" id="E-mail" size="27" maxlength="50">
</div></td>
<td width="29%" rowspan="4" bgcolor="#FFFFFF"><div align="left"> <img
src="face/1.gif" alt="请选择个人形象代表" width="63" height="70" border="0" align="absbottom" id=face></div></td>
</tr>
<tr>
<td width="18%" align="right" bgcolor="#e9eef8">QQ:</td>
<td height="20" bgcolor="#FFFFFF"><div align="left">
<input name="qq" type="text" value="<%if request.QueryString("qq")<>"" then response.Write request.QueryString("qq")%>" size="27" maxlength="50" onKeyPress = "return regInput(this, /^[0-9]*$/, String.fromCharCode(event.keyCode))"
onpaste = "return regInput(this, /^[0-9]*$/, window.clipboardData.getData('Text'))"
ondrop = "return regInput(this, /^[0-9]*$/, event.dataTransfer.getData('Text'))">
</div></td>
</tr>
<tr>
<td width="18%" align="right" bgcolor="#e9eef8">联系电话:</td>
<td bgcolor="#FFFFFF"><div align="left">
<input name="Tel" type="text" value="<%if request.QueryString("Tel")<>"" then response.Write request.QueryString("Tel")%>" id="Tel" size="27" maxlength="50" onKeyPress = "return regInput(this, /^\d{1,5}([-\/](\d{1,8}?)?)?$/, String.fromCharCode(event.keyCode))"
onpaste = "return regInput(this, /^\d{1,5}([-\/](\d{1,8}?)?)?$/, window.clipboardData.getData('Text'))"
ondrop = "return regInput(this, /^\d{1,5}([-\/](\d{1,8}?)?)?$/, event.dataTransfer.getData('Text'))">
<span class="style1">*</span></div></td>
</tr>
<tr>
<td width="18%" align="right" bgcolor="#e9eef8">头像:</td>
<td height="22" bgcolor="#FFFFFF"><div align="left">
<select name="face" size="1" id="face" onChange="document.images['face'].src='face/'+options[selectedIndex].value;">
<option selected value="1.gif">头像1</option>
<option value="2.gif">头像2</option>
<option value="3.gif">头像3</option>
<option value="4.gif">头像4</option>
<option value="5.gif">头像5</option>
<option value="6.gif">头像6</option>
<option value="7.gif">头像7</option>
<option value="8.gif">头像8</option>
<option value="9.gif">头像9</option>
<option value="10.gif">头像10</option>
<option value="11.gif">头像11</option>
<option value="12.gif">头像12</option>
<option value="13.gif">头像13</option>
<option value="14.gif">头像14</option>
<option value="15.gif">头像15</option>
<option value="16.gif">头像16</option>
<option value="17.gif">头像17</option>
<option value="18.gif">头像18</option>
<option value="19.gif">头像19</option>
<option value="20.gif">头像20</option>
<option value="21.gif">头像21</option>
<option value="22.gif">头像22</option>
<option value="23.gif">头像23</option>
</select>
</div></td>
</tr>
<tr>
<td width="18%" align="right" bgcolor="#e9eef8">表情:</td>
<td height="22" bgcolor="#FFFFFF"><div align="left">
<select name="portrait" size="1" id="portrait" onChange="document.images['portrait'].src='portrait/'+options[selectedIndex].value;">
<option value="1.gif" selected>表情1</option>
<option value="2.gif">表情2</option>
<option value="3.gif">表情3</option>
<option value="4.gif">表情4</option>
<option value="5.gif">表情5</option>
<option value="6.gif">表情6</option>
<option value="7.gif">表情7</option>
<option value="8.gif">表情8</option>
<option value="9.gif">表情9</option>
<option value="10.gif">表情10</option>
<option value="11.gif">表情11</option>
<option value="12.gif">表情12</option>
<option value="13.gif">表情13</option>
<option value="14.gif">表情14</option>
<option value="15.gif">表情15</option>
<option value="16.gif">表情16</option>
<option value="17.gif">表情17</option>
<option value="18.gif">表情18</option>
<option value="19.gif">表情19</option>
<option value="20.gif">表情20</option>
</select>
</div></td>
<td rowspan="2" bgcolor="#FFFFFF"><div align="left"> <img src="portrait/1.gif" name="portrait" width="20" height="20" id="portrait"></div></td>
</tr>
<tr>
<td align="right" bgcolor="#e9eef8">验证功能:</td>
<td height="22" bgcolor="#FFFFFF"><div align="left">
<input name="passcode" type="text" id="passcode" value="<%If GetCode=9999 Then Response.Write "9999"%>" maxLength=4 size=4 onKeyPress = "return regInput(this, /^\d*\.?\d{0,2}$/, String.fromCharCode(event.keyCode))"
onpaste = "return regInput(this, /^\d*\.?\d{0,2}$/, window.clipboardData.getData('Text'))"
ondrop = "return regInput(this, /^\d*\.?\d{0,2}$/, event.dataTransfer.getData('Text'))">
<img src="md5/getcode.asp"> <span class="style1">*('打*为必选项')</span></div></td>
</tr>
</table></td>
<td width="377" valign="top" height="100%">
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0" bordercolorlight="#000080" bordercolordark="#FFFFFF" bgcolor="#e9eef8">
<tr>
<td width="23%" align="right">主题:</td>
<td width="77%" height="40"> <div align="left">
<input name="title" type="text" size="34" maxlength="100" value="<%if request.QueryString("title")<>"" then response.Write request.QueryString("title")%>">
<span class="style1">*</span></div></td>
</tr>
<tr>
<td width="23%" align="right">内容:</td>
<td width="77%" height="150" valign="middle"><div align="left">
<textarea rows="9" name="content" cols="39"><%if request.QueryString("content")<>"" then response.Write request.QueryString("content")%></textarea>
<span class="style1">*</span></div></td>
</tr>
</table></td>
</tr>
<tr>
<td valign="middle" colspan="3" bgcolor="#E4E4E4" height="5"><div align="center"><span class="style1">
<input type="submit" name="Button" value="确 定">
</span></div></td>
</tr>
</table>
</div>
</form></td>
</tr>
</table>
<%
'displaybbsradio=rss("displaybbs")
end if
oConn_close
end sub
%>
<%
formmode=cint(request.QueryString("mode"))
'response.write formmode
select case formmode
case 1
oConn_Start
username=request.Form("username")
units=request.Form("units")
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -