📄 edi_news.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="conn.asp"-->
<!--#include file ="session.asp"-->
<% if request.form("sub")="sub" then
y_id=trim(request.form("id"))
y_title=trim(request.form("y_title"))
y_content=trim(request.form("y_content"))
set rs=server.CreateObject("adodb.recordset")
sql="select * from y_news where y_id="&y_id
rs.open sql,conn,3,3
rs("y_title")=y_title
rs("y_content")=y_content
rs.update
response.Redirect("list.asp")
response.End()
end if
%>
<%id=cint(request.QueryString("id"))
if id<>"" then
set edi=server.CreateObject("adodb.recordset")
sql_edi="select * from y_news where y_id="&id
edi.open sql_edi,conn,1,1
%>
<!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;
margin-right: 0px;
margin-bottom: 0px;
}
td { font-family: "Arial", "Helvetica", "sans-serif"; font-size: 12px; font-style: normal; line-height: 20px; font-weight: normal; font-variant: normal}
a:link {
font-family: Arial, Helvetica, sans-serif;
color: #336699;
}
a:visited {
font-family: Arial, Helvetica, sans-serif;
color: #336699;
}
a:hover {
font-family: Arial, Helvetica, sans-serif;
color: #FF6600;
text-decoration: underline;
}
-->
</style>
<link href="img/style.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style1 {color: #336600}
.style2 {color: #006600}
-->
</style>
</head>
<SCRIPT language=JavaScript>
<!--
function form1_onsubmit()
{
if (document.form1.y_title.value=="")
{
alert("新闻标题一定要填写")
document.form1.y_title.focus()
return false
}
}
-->
</SCRIPT>
<body><center>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="293" align="center" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="left"> </td>
</tr>
</table>
<br>
<br>
<form name="form1" method="post" action="edi_news.asp" onSubmit="return form1_onsubmit()">
<table width="66%" height="279" border="0" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<tr align="center">
<td height="22" colspan="2"><span class="b">编辑新闻‖<a href="list.asp">返回</a></span></td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="11%" height="27" align="right" class="b">新闻主题:</td>
<td width="89%" align="left"><input name="y_title" type="text" id="y_title" size="30" value="<%=edi("y_title")%>"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td align="right" class="b">新闻内容:</td>
<td align="left"><input type="hidden" name="y_content" value="<%=Server.HTMLEncode(edi("y_content"))%>">
<iframe ID="eWebEditor1" src="ewebeditor/ewebeditor.asp?id=y_content&style=standard" frameborder="0" scrolling="no" width="500" HEIGHT="350"></iframe> </td>
</tr>
<tr align="center" bgcolor="#FFFFFF">
<td colspan="2"><input type="submit" name="Submit" value="提交">
<input type="reset" name="Submit2" value="取消">
<input type="hidden" name="sub" value="sub">
<input type="hidden" name="id" value="<%=id%>"></td>
</tr>
</table>
</form>
<%edi.close
set edi=nothing
end if
%></td>
</tr>
</table>
</center>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -