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

📄 newtopic.asp

📁 这是我个人用ASP制作 的一个动态网页,也是我的主页,谢谢大家的使用~~~`
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT"%> 
<!--#include file="conn/conn.asp" -->
<%
if request.Form("title")<>"" then
	title=request.Form("title")
	Author=request.Form("Author")
	Oicq=request.Form("Oicq")
	HomePage=request.Form("HomePage")
	email=request.Form("email")
	Face=request.Form("Face")
	content=request.Form("content")
	INS="Insert into Topic (Title,Author,Oicq,HomePage,Email,Face,Content) values('"&title&_
	"','"&Author&"','"&Oicq&"','"&HomePage&"','"&Email&"','"&Face&"','"&Content&"')"
	conn.execute(INS)%>
	<script language="javascript">
	alert("祝贺您,您的贴子已成功上传!");
	window.location.href="index.asp"
	</script>
<%end if%>
<html>
<head>
<title>发表主题信息</title>
 
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="style.css" rel="stylesheet">
<style type="text/css">
<!--
.style1 {
	font-size: 16pt;
	color: #0099CC;
}
-->
</style>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<script language="javascript">
function check()
{
if (form1.title.value=="")
{ alert("您没有输入主题!");form1.title.focus();
return;}
if (form1.author.value=="")
{alert("请输入您的姓名!");form1.author.focus();return;}
if(form1.email.value!="")
  {if(form1.email.value.indexOf('@',0)==-1|| 
    form1.email.value.indexOf('.',0)==-1)
    {alert("您输入的E-mail地址无效!");form1.User_email.focus();return;}
}
if (form1.content.value=="")
{alert("请输入主题内容!");form1.content.focus();return;}
form1.submit();}
</script>
<table width="777" height="329" border="0" align="center" cellpadding="-2" cellspacing="-2">
  <tr> 
  <td><table width="770" height="89" border="0" align="center" cellpadding="-2" cellspacing="-2" background="images/banner/bbs_1.gif">
    <tr>
      <td background="images/mbg.gif"><span class="style1"><marquee>欢迎光临,希望多多留言!有你的支持,我们会做得更好!</marquee></span></td>
    </tr>
  </table>
    <table width="777" height="35" cellpadding="-2"  cellspacing="-2">
      <tr>
        <td width="570" background="images/banner/bbs_2.gif"><table width="469" border="0" cellspacing="-2" cellpadding="-2" height="27">
            <tr>
              <td width="143"><font color="#666699">
                <script language="JavaScript">
   var today=new Date();                                                                                                                                                                          
      var month=today.getMonth()+1                                                                                                                                                                          
      if (today.getDay()==1)                                                                                                                                                                          
      {document.write("&nbsp;"+today.getYear()+"年"+month+"月"+today.getDate()+"日 星期一");}                                                                                                                                                                            
      if (today.getDay()==2)                                                                                                                                                                          
      {document.write("&nbsp;"+today.getYear()+"年"+month+"月"+today.getDate()+"日 星期二");}                                                                                                                                                                          
      if (today.getDay()==3)                                                                                                                                                                          
      {document.write("&nbsp;"+today.getYear()+"年"+month+"月"+today.getDate()+"日 星期三");}                                                                                                                                                                          
      if (today.getDay()==4)                                                                                                                                                                          
      {document.write("&nbsp;"+today.getYear()+"年"+month+"月"+today.getDate()+"日 星期四");}                                                                                                                                                                          
      if (today.getDay()==5)                                                                                                                                                                          
      {document.write("&nbsp;"+today.getYear()+"年"+month+"月"+today.getDate()+"日 星期五");}                                                                                                                                                                          
      if (today.getDay()==6)                                                                                                                                                                          
      {document.write("&nbsp;"+today.getYear()+"年"+month+"月"+today.getDate()+"日 星期六");}                                                                                                                                                                          
      if (today.getDay()==0)                                                                                                                                                                          
      {document.write("&nbsp;"+today.getYear()+"年"+month+"月"+today.getDate()+"日 星期日");}         
          </script>
              </font></td>
              <td width="111"><font color="#666699">
                <div id="bgclock"></div>
              </font></td>
              <td width="27" align="center" valign="top"><img src="images/Face/icon_smile.gif" width="15" height="15"></td>
              <td height="27" valign="top" width="188"> <a href="./post.asp"><font size="2"></font></a> [ <%=session("UserName")%> ] 
                  <script language="JavaScript">
var today=new Date()
if (today.getHours()>=7&&today.getHours()<13)
{document.write ("上午好!")}
else
{if (today.getHours()>=13 &&today.getHours()<18)
{document.write("下午好!")}
else
{document.write("晚上好!")}
}
            </script>
              </td>
            </tr>
        </table></td>
        <td width="205"><img src="images/banner/bbs_3.gif" width="200" height="35" border="0" usemap="#Map" href="./newtopic.asp"></td>
      </tr>
    </table>
    <map name="Map">
      <area shape="rect" coords="56,7,155,26" href="newtopic.asp">
    </map></td></tr><tr>
    <td height="345" width="230" valign="top"> 
      <div align="center"> 
        <table width="725" border="0" cellspacing="-2" cellpadding="-2" height="35" align="center">
          <tr> 
            <td> 
              <form name="form1" method="POST" action="newtopic.asp">
                <div align="center"> 
                  <table width="669">
                    <tr>
                      <td width="155">
                        <div align="center"><img src="images/fbxzt.gif" width="107" height="249"> 
                        </div>
                      </td>
                      <td width="502"> 
                        <table width="502" height="189" background="images/guestaddbg.gif">
                    <tr> 
                      <td colspan="5" height="10">&nbsp; </td>
                    </tr>
                    <tr> 
                      <td width="84" height="35"> 
                        <div align="right"><b><font color="#336699">主题:</font></b></div>
                      </td>
                      <td colspan="4" height="37"> 
                        <input type="text" name="title" size="44" maxlength="50">
                        <font color="#666666"> <font color="#00CCFF">*</font></font></td>
                    </tr>
                    <tr> 
                      <td width="84" height="10"> 
                        <div align="right"><b><font color="#336699">用户名:</font></b></div>
                      </td>
                      <td width="193" height="37"> 
                        <input name="author" type="text" value="<%=session("UserName")%>" readonly="yes" size="24" maxlength="50">
                        <font color="#00CCFF">*</font> </td>
                      <td width="51" height="37"> 
                        <div align="center"><font color="#336699"><b>OICQ:</b></font></div>
                      </td>
                            <td colspan="2" width="154" height="37"> 
                              <input type="text" name="oicq" size="13" maxlength="10">
                        <input type="hidden" name="homepage" value="#">
                            </td>
                    </tr>
                    <tr> 
                      <td width="84" height="10"> 
                        <div align="right"><b><font color="#336699">Email:</font></b></div>
                      </td>
                      <td height="37" width="193"> 
                        <input type="text" name="email" size="24" maxlength="50">
                      </td>
                      <td height="37" width="51"> 
                        <div align="center"><font color="#336699"><b>表情:</b></font></div>
                      </td>
                      <td colspan="2" height="37" width="154"> 
                        <select name="face">
                          <option value="00.gif">正常</option>
                          <option value="01.gif">微笑</option>
                          <option value="02.gif">愤慨</option>
                          <option value="03.gif">伤心</option>
                          <option value="04.gif">唱歌</option>
                          <option value="05.gif">大哭</option>
                          <option value="06.gif">OK!</option>
                          <option value="07.gif">惊喜</option>
                          <option value="08.gif">发火</option>
                          <option value="09.gif">害怕</option>
                          <option value="10.gif">不屑一顾</option>
                          <option value="11.gif">伤脑筋</option>
                          <option value="12.gif">气得说不出话</option>
                        </select>
                      </td>
                    </tr>
                    <tr> 
                      <td width="84" height="18"> 
                        <div align="right"><b><font color="#336699">内容:</font></b></div>
                      </td>
                      <td colspan="4"> 
                        <textarea name="content" cols="48" rows="5"></textarea>
                        <font color="#336699"> <font color="#00CCFF">*</font></font> 
                      </td>
                    </tr>
                    <tr> 
                      <td height="33"> 
                        <div align="center"></div>
                      </td>
                      <td colspan="4" height="33"> 
                              <input type="button" name="Button" value="发表主题" 
							  style="background-color:RGB(252,252,252)" onClick=check()>
                              <input type="reset" name="Submit2"
						 style="background-color:RGB(252,252,252)" value="清除重填">
                              <input type="button" name="Submit22"
						 style="background-color:RGB(252,252,252)" value="返回" onClick="JScript:history.back();">
                      </td>
                    </tr>
                    <tr> 
                      <td colspan="5" height="10">&nbsp;</td>
                    </tr>
                  </table>
                      </td></tr></table>
                  <br>
                </div>
              </form>
            </td>
          </tr>
        </table>
      </div>
    </td>
  </tr>
</table>
<table width="777" border="0" align="center" cellpadding="-2" cellspacing="-2">
  <tr>
    <td background="images/BACK.GIF">      <div align="center">本站请用IE5.0或以上版本浏览,800*600为最佳效果 <br>
</div>    </td>
  </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -