📄 addfbbs.asp
字号:
<!--#include file="tools.asp"-->
<script language="JavaScript">
<!--
function closeWindow()
{window.close()}
function B1_onclick() {
if(window.form1.topic.value=="")
{window.alert("发言主题不能为空!");
window.form1.topic.focus();
return false;
}
}
//-->
</script>
<%
if Request.Form("b1")="登陆" then
uid=trim(Request.Form("uid"))
pwd=trim(Request.Form("pwd"))
strsql="select * from tblids where uid=" & sqlstr(uid) & " and pwd=" & sqlstr(pwd)
set rsd=conn.execute(strsql)
if rsd.eof and rsd.bof then
err_des="用户名或密码错误,请重新登陆!"
else
Response.Cookies("uid")=uid
end if
set rsd=nothing
elseif Request.Form("b1")="提交" then
uid=Request.Cookies("uid")
topic=trim(Request.Form("topic"))
face=trim(Request.Form("face"))
body=left(trim(Request.Form("body")),7900)
url=trim(Request.Form("url"))
img=trim(Request.Form("img"))
father=trim(Request.Form("father"))
if father="" then father=0
strsql="insert tblfbbs (uid,topic,face,body,url,img,father) values(" & sqlstr(uid) & "," & sqlstr(topic) &"," &sqlstr(face) & _
"," & sqlstr(body) & "," & sqlstr(url) & "," & sqlstr(img) & "," & father & ")"
conn.execute(strsql)
%>
<body onload="closeWindow()">
<%end if
uid=Request.Cookies("uid")
if uid="" then
father=trim(Request.QueryString("father"))
%>
<html><head><title>用户登录</title>
<link href="images/zzz.css" type="text/css" rel="stylesheet">
<meta content="MSHTML 6.00.2600.0" name="GENERATOR">
<script ID="clientEventHandlersJS" LANGUAGE="javascript">
<!--
function reg_onclick() {
window.location='register.asp'
}
//-->
</script>
</head>
<body leftMargin="0" topMargin="0">
<table height="100%" cellSpacing="0" cellPadding="5" width="90%" align="center" bgColor="#333333" border="0">
<tbody>
<tr>
<td bgColor="#ffcc00" height="20"><div class="zzz" align="center"><b><p>用户登录</b></p>
</div></td>
</tr>
<tr>
<td vAlign="top" bgColor="#eeeeee"><form name="form" action="addfbbs.asp" method="post">
<div align="center"><center><table class="box1" cellSpacing="0" cellPadding="4" width="450" align="center" border="0">
<tbody>
<%if err_des<>"" then%>
<tr>
<td class="zzz" width="100%" height="28" colspan="2"><div align="left"><p><font color="red"><%=err_des%></font></td>
</tr>
<%end if%>
<tr>
<td class="zzz" width="40%" height="28"><div align="right"><p>用户名:</td>
<td class="zzz" width="60%" height="28"><input class="box1" maxLength="15" size="15" name="uid"> </td>
</tr>
<tr>
<td class="zzz" width="40%"><div align="right"><p>密 码:</td>
<td class="zzz" width="60%"><input class="box1" type="password" maxLength="15" size="15" name="pwd"> </td>
</tr>
</tbody>
</table>
</center></div><p><br>
</p>
<dd align="center"><div align="center"><center><p><input class="box1" type="submit" value="登陆" name="B1" LANGUAGE="javascript" onclick="return B1_onclick()" onclick="return B1_onclick()" onblur="return B1_onblur()"> <input class="box1" type="button" value="注册" name="B2" id="reg" LANGUAGE="javascript" onclick="return reg_onclick()"> </p>
</center></div></dd><input type="hidden" name="father" value="<%=father%>">
</form>
</td>
</tr>
</tbody>
</table>
</body></html>
<%else%>
<%
father=trim(Request("father"))
if father="" then
%>
<html><head><title>发表新文章</title>
<%else%>
<html><head><title>回复文章</title>
<%end if%>
<link href="images/zzz.css" type="text/css" rel="stylesheet">
<meta content="MSHTML 6.00.2600.0" name="GENERATOR">
</head>
<body leftMargin="0" topMargin="0">
<table height="80%" cellSpacing="0" cellPadding="5" width="90%" align="center" bgColor="#333333" border="0">
<tbody>
<tr>
<td bgColor="#ffcc00" height="20">
<%if father="" then%>
<div class="zzz" align="center"><b>发表新文章</b></div></td></tr>
<%else%>
<div class="zzz" align="center"><b>回复文章</b></div></td></tr>
<%end if%>
<tr>
<td vAlign="top" bgColor="#eeeeee">
<form action="addfbbs.asp" method="post" id="form1">
<table class="box1" cellSpacing="0" cellPadding="4" width="450" align="center" border="0">
<tbody>
<tr>
<td class="zzz" width="20%">
</td>
<td class="zzz" width="24%"></td>
<td class="zzz" width="17%"></td>
<td class="zzz" width="39%"></td></tr>
<tr>
<td class="zzz" width="20%">
<div align="right">主 题:</div></td>
<td class="zzz" colSpan="3"><input class="box1" maxLength="200" size="50" name="topic"> </td></tr>
<tr vAlign="top">
<td class="zzz" height="9">
<div align="right">表 情: </div></td>
<td class="zzz" colSpan="3" height="9">
<input type="radio" CHECKED value="b01" name="face"> <img src="images/bbsimages/b01.gif" border="0">
<input type="radio" value="b02" name="face"> <img src="images/bbsimages/b02.gif" border="0">
<input type="radio" value="b03" name="face"> <img src="images/bbsimages/b03.gif" border="0">
<input type="radio" value="b04" name="face"> <img src="images/bbsimages/b04.gif" border="0">
<input type="radio" value="b05" name="face"> <img src="images/bbsimages/b05.gif" border="0">
<input type="radio" value="b06" name="face"> <img src="images/bbsimages/b06.gif" border="0">
<input type="radio" value="b07" name="face"> <img src="images/bbsimages/b07.gif" border="0"><br>
<input type="radio" value="b08" name="face"> <img src="images/bbsimages/b08.gif" border="0">
<input type="radio" value="b09" name="face"> <img src="images/bbsimages/b09.gif" border="0">
<input type="radio" value="b10" name="face"> <img src="images/bbsimages/b10.gif" border="0">
<input type="radio" value="b11" name="face"> <img src="images/bbsimages/b11.gif" border="0">
<input type="radio" value="b12" name="face"> <img src="images/bbsimages/b12.gif" border="0">
<input type="radio" value="b13" name="face"> <img src="images/bbsimages/b13.gif" border="0">
<input type="radio" value="b14" name="face"> <img src="images/bbsimages/b14.gif" border="0"><br>
<input type="radio" value="b15" name="face"> <img src="images/bbsimages/b15.gif" border="0">
<input type="radio" value="b16" name="face"> <img src="images/bbsimages/b16.gif" border="0">
<input type="radio" value="b17" name="face"> <img src="images/bbsimages/b17.gif" border="0">
<input type="radio" value="b18" name="face"> <img src="images/bbsimages/b18.gif" border="0">
<input type="radio" value="b19" name="face"> <img src="images/bbsimages/b19.gif" border="0">
<input type="radio" value="b20" name="face"> <img src="images/bbsimages/b20.gif" border="0">
<input type="radio" value="b21" name="face"> <img src="images/bbsimages/b21.gif" border="0">
</td></tr>
<tr>
<td class="zzz" vAlign="top" width="20%">
<div align="right">文章内容 </div></td>
<td class="zzz" vAlign="top" align="middle" colSpan="3">
<div align="left"><textarea class="box1" name="body" rows="15" cols="50" maxlength="8000"></textarea>
</div></td></tr>
<tr>
<td class="zzz" vAlign="top" width="20%">
<div align="right">相关链接 </div></td>
<td class="zzz" vAlign="top" align="middle" colSpan="3">
<div align="left">
<input type="text" name="url" size="50" class="box1" value="http://" maxlength="200">
</div></td></tr>
<tr>
<td class="zzz" vAlign="top" width="20%">
<div align="right">链接图片 </div></td>
<td class="zzz" vAlign="top" align="middle" colSpan="3">
<div align="left">
<input type="text" name="img" size="50" class="box1" value="http://" maxlength="200">
</div></td></tr>
</tbody></table><br>
<div align="center"><input class="box1" type="submit" value="提交" name="B1" id="B1" LANGUAGE="javascript" onclick="return B1_onclick()">
<input class="box1" type="reset" value="重置" name="B2">
</div><input type="hidden" name="father" value="<%=father%>"></form>
</td></tr></tbody></table></body></html>
<%end if%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -