add.asp
来自「1、全面展示宾馆的自然情况和服务内容; 2、介绍宾馆信息,帮助客人了解宾馆相」· ASP 代码 · 共 95 行
ASP
95 行
<%
if session("admin_name")="" then
response.redirect "index.asp"
end if
%>
<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
}
document.form1.submit()
}
</script>
<style type="text/css">
<!--
.style2 {color: #FFFFFF}
-->
</style>
</head>
<!--#include file="../inc/adconn.asp"-->
<link rel="stylesheet" type="text/css" href="../style.css">
<body bgcolor="#FFFFFF" marginheight=0 marginwidth=0 leftmargin=5>
<SCRIPT language=javascript>
var upfile_obj;
function OnUpFile()
{
upfile_obj.src=upfile_obj.lowsrc;
upfile_obj.src=document.forms["form1"].upfile.value;
}
</SCRIPT>
<CENTER><form name="form1" method="post" action="savenews.asp">
<INPUT name=upfile onchange=return(OnUpFile()) type=hidden>
<TABLE width="100%" border="0" cellpadding="4" cellspacing="1" bgcolor="#336699">
<TR>
<TD height=30 colspan=2 background="../images/pics/tile_sub.gif" bgcolor="#e8f4ff" class="style2">
添加<%
set rsx=server.createobject("adodb.recordset")
sqlx="select * from newstype where typeid="&request("typeid")
rsx.open sqlx,conn,1,1
if not rsx.eof then
response.write(rsx("type"))
end if
%>
</TD>
</TR>
<TR bgcolor="#FFFFFF">
<TD width="17%">信息标题:</TD>
<TD width="83%">
<input type="text" name="title" size="52"><font color=#ff6600> *</font></TD>
</TR>
<TR bgcolor="#FFFFFF">
<TD>信息分类:</td>
<TD>
<select name="typeid">
<%dim rs,sql,sel,typeid
typeid=request("typeid")
set rs=server.createobject("adodb.recordset")
sql="select * from newstype"
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 bgcolor="#FFFFFF">
<TD>信息内容:</TD>
<TD><input type="hidden" name="content" value=""> <IFRAME ID="eWebEditor1" SRC="../eWebEditor/ewebeditor.asp?id=content" FRAMEBORDER="0" SCROLLING="no" WIDTH="570" HEIGHT="350"></IFRAME><font color=#ff6600> *</font></TD>
</TR>
<TR height="30">
<TD colspan="2" align="center" background="../images/pics/tile_sub.gif" bgcolor="#e8f4ff" >
<input type="button" value=" 提 交" onclick="check()"name="Submit2">
<input type="reset" name="Submit22" value=" 重 置">
</TR>
</TABLE>
</FORM>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?