📄 xinwentianjia.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!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">
<title>新闻添加</title>
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
font-family:Arial, Helvetica, sans-serif;
}
.style1 {color: #C60001;font-size:17px;}
.style2 {
color: #669999;
font-size:14px;
}
-->
</style>
<script language="vbscript">
sub add()
if form1.zhuti.value="" and form1.content.value="" then
window.alert("主题或内容不能为空!")
else
yes =window.confirm("是否要添加这个新闻!?")
if yes = true then
form1.submit()
//window.close()
form1.zhuti.value=""
form1.content.value=""
end if
end if
end sub
sub guanbi()
window.close()
end sub
</script>
</head>
<body>
<!--#include file="Connections/auto.asp" -->
<%
zhuti=request.Form("zhuti")
content=request.Form("content")
str="select * from tongzhi order by id desc"
set rs1=CN.execute(str)
maxid=rs1("id")+1
if zhuti<>"" and content<>""then
set RS = server.CreateObject("ADODB.Recordset")
RS.open "xinwen" , CN,1,3
RS.addnew
RS("id")=maxid
RS("biaoti")=zhuti
RS("faburen")=Session("Rname")
RS("fbshj")=Date()&" "&time()
RS("cishu")=0
RS("neirong")=content
if strcomp(request.form("tuijian"),"tuijian")=0 then
RS("tuijian")="true"
else
RS("tuijian")="false"
end if
RS.update
RS.close
set RS = nothing
end if
CN.close
%>
<table width="557" height="231" border="0" cellpadding="-2" cellspacing="1" bgcolor="#336699"">
<tr>
<td width="568" height="229" valign="top"><form name="form1" action="xinwentianjia.asp" method="post">
<table width="101%" height="224" border="0" align="center" cellpadding="-2" cellspacing="1" bgcolor="#336699">
<tr>
<td width="14%" height="29" bgcolor="#FFFFFF"><div align="center"><span class="style1">主题:</span></div></td>
<td width="49%" bgcolor="#FFFFFF"><input name="zhuti" type="text" id="zhuti" size="35">
<span class="style1"> 推荐:</span> <input type="checkbox" name="tuijian" value="tuijian"></td>
</tr>
<tr>
<td height="129" valign="top" bgcolor="#FFFFFF"><div align="center" class="style1">内容:</div></td>
<td bgcolor="#FFFFFF"><textarea name="content" cols="53" rows="8" id="content"></textarea></td>
</tr>
<tr>
<td colspan="2" bgcolor="#FFFFFF"><div align="center">
<input name="xinwenadd" type="button" id="xinwenadd" value="确认添加" onclick="add()">
<input name="myclose" type="button" id="myclose" value="关闭窗口" onClick="guanbi()">
</div></td>
</tr>
</table>
</form></td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -