📄 add.asp
字号:
<%@ codepage ="936" %>
<%
if instr(session("flag_fyadmin"),"51")=0 then
response.redirect "../login.asp"
response.end
end if
%><!--#include file="../../inc/config.asp"-->
<!--#include file="../../conn/dbconn2.asp" -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script LANGUAGE="JavaScript">
function check()
{
if (document.form1.title.value=="")
{
alert("请输入新闻标题!")
document.form1.title.focus()
document.form1.title.select()
return
}
if (document.form1.content.value=="")
{
alert("请输入新闻内容!")
document.form1.content.focus()
document.form1.content.select()
return
}
document.form1.submit()
}
</script>
</head>
<link rel="stylesheet" type="text/css" href="../style.css">
<body bgcolor="#FFFFFF" marginheight=0 marginwidth=0 leftmargin=0>
<SCRIPT language=javascript>
var upfile_obj;
function OnUpFile()
{
upfile_obj.src=upfile_obj.lowsrc;
upfile_obj.src=document.forms["form1"].upfile.value;
}
</SCRIPT>
<form name="form1" method="post" action="savenews.asp">
<INPUT name=upfile onchange=return(OnUpFile()) type=hidden>
<TABLE border="0" cellspacing="0" width="600" cellpadding="4" align=center>
<TR>
<TD bgcolor="#EFEFEF" height=30 colspan=2><b>添加新闻</b></TD>
</TR>
<TR>
<TD width="40%">新闻标题:</TD>
<TD width="60%"><input type="text" name="title" size="52"><font color=#ff6600> *</font></TD>
</TR>
<TR>
<TD>新闻分类:</td>
<TD>
<select name="typeid">
<option value="" selected>--选择类别--</option>
<%dim rs,sql,sel
set rs=server.createobject("adodb.recordset")
sql="select * from hyxxtype"
rs.open sql,conn,1,1
do while not rs.eof
if typeid=cstr(rs("typeid")) then
sel="selected"
else
sel=""
end if
response.write "<option " & sel & " value='"+CStr(rs("typeID"))+"' name=typeid>"+rs("type")+"新闻</option>"+chr(13)+chr(10)
rs.movenext
loop
rs.close
%>
</select>
</TD>
</TR>
<TR>
<TD>推荐新闻:</td>
<TD><INPUT name=tj type=radio value="1">推荐 <INPUT name=tj type=radio value="0" CHECKED>不推荐</TD>
</TR>
<TR>
<TD>新闻内容:</TD>
<TD><textarea rows="10" name="content" cols="50"></textarea><font color=#ff6600> *</font></TD>
</TR>
<TR>
<TD>来源:</TD>
<TD><input type="text" name="nfrom" size="30"></TD>
</TR>
<TR>
<TD>是否包含图片:</td>
<TD><INPUT name=selectpic type=radio value="1">包含 <INPUT name=selectpic type=radio value="0" CHECKED>不包含</TD>
</TR>
<TR>
<TD> 上传文件: </TD>
<TD><iframe name="ad" frameborder=0 width=100% height=30 scrolling=no src=upload.asp></iframe></TD>
</TR>
<TR height="30">
<TD colspan="2" align="center" bgcolor="#EFEFEF" ><input type="button" value=" 提 交" onclick="check()">
<input type="button" name="Submit2" value=" 重 执">
</TR>
</TABLE>
</FORM>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -