?? addgonggao.asp
字號:
<!--#include file=conn.asp-->
<!--#include file=cookies.asp-->
<title>增加公告</title><link href="inc_style.css" rel="stylesheet" type="text/css">
<%
dim sql,rs,biaoti,neirong,tijiao
tijiao=request("tijiao")
if tijiao<>"" then
if request("biaoti")="" then
response.write "<script language='javascript'>alert('請輸入新聞標題!');history.back();</script>"
response.end
else
biaoti=request("biaoti")
end if
if request("neirong")="" then
response.write "<script language='javascript'>alert('請輸入新聞內容!');history.back();</script>"
response.end
else
neirong=request("neirong")
end if
set rs=server.createobject("adodb.recordset")
sql="select * from [gonggao]"
rs.open sql,conn,1,3
rs.addnew
rs("biaoti")=biaoti
rs("neirong")=neirong
rs("data")=now()
rs.update
rs.close
conn.close
set rs=nothing
set conn=nothing
response.write "<SCRIPT language=JavaScript>alert('增加公告成功!')</SCRIPT>"
response.write "<meta http-equiv=refresh content=""1;URL=listgonggao.asp"">"
else
%>
<p align="center">
<img border="0" src="img/list_bo.gif" width="600" height="12"></p>
<div align="center">
<table border="0" cellpadding="0" style="border:1px solid #CCCCCC; border-collapse: collapse" bordercolor="#CCCCCC" height="404" width="590">
<FORM name=theForm method=POST action=addgonggao.asp>
<tr>
<td bgColor="#FEEEBC" height="25" vAlign="bottom" style="border-style: solid; border-width: 1" width="588" colspan="2">
<p style="MARGIN-LEFT: 6px" align="center">
<span style="font-size: 9pt"><b>添加新公告</b></span></td>
</tr>
<tr>
<td bgColor="#f7f7f7" height="43" width="90" align="center">
<span style="FONT-SIZE: 12px">
標題:</span></td>
<td bgColor="#f7f7f7" height="43" width="498">
<p align="center">
<span style="FONT-SIZE: 12px">
<input name="biaoti" size="71" style="BACKGROUND-COLOR: #f9f9f9; COLOR: #384249; FONT-FAMILY: Verdana; FONT-SIZE: 11px; FONT-WEIGHT: bold" tabIndex="1" maxlength="50"></span></td>
</tr>
<tr>
<td bgColor="#f7f7f7" height="299" width="90" align="center">
<span style="FONT-SIZE: 12px">
內容:</span></td>
<td bgColor="#f7f7f7" height="299">
<p align="center">
<span style="FONT-SIZE: 12px">
<textarea rows="21" name="neirong" cols="68"></textarea></span></td>
</tr>
<tr>
<td bgColor="#f7f7f7" height="43" vAlign="top" style="border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1; border-bottom-style: solid; border-bottom-width: 1" colspan="2">
<p align="center">
<button name="tijiao" type="submit" style="width: 74px; height: 25px" value="1">添 加</button></td>
</tr>
</form>
</table></div>
<%end if%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -