⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 addbbs.asp

📁 this a program about talent web database used asp and VB.
💻 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 tblbbs (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="addbbs.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>密 &nbsp;码:</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()"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <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=addbbs.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>主 &nbsp;题:</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>表 &nbsp;情: </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()"> 
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <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 + -