📄 admin_news_modify.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%option explicit%>
<%
if request.cookies("admin_OK")="" then
response.redirect("admin_login.html")
end if
%>
<%dim db
db=0
%>
<!--#include file="../config/db.asp"-->
<!--#include file="../config/function.inc.asp"-->
<%dim rst,sql,myErrors,rid
set rst=server.CreateObject("adodb.recordset")
rid=request.querystring("id")
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>修改新闻</title>
<style type="text/css">
<!--
.STYLE1 {color: #FF0000}
-->
</style>
</head>
<body>
<div align="center">后台新闻管理</div>
<p>修改新闻管理:</p>
<form action="admin_news_act.asp?act=update&id=<%=request.querystring("id")%>" method="post" enctype="multipart/form-data" name="form1" target="_blank" id="form1">
<%
'缺少ID判断
sql="select * from shop_news where n_id="&request.querystring("id")
rst.open sql,conn,1,1
if rst.eof and rst.bof then
response.write("没有记录或非法参数")
response.end()
end if
%>
<p>修改新闻图片:<%if rst("n_image")<>"" then %><img src="../upfile/<%=rst("n_image")%>"><%end if%>
</p>
<p>
<input name="image1" type="file" id="image1" />
<span class="STYLE1">如果需要修改图片请上传,否则请留空!</span> </p>
<p>修改新闻标题:
<input name="title1" type="text" id="title1" value="<%=rst("n_title")%>" size="80" />
</p>
<p>修改新闻内容:
<textarea name="content1" cols="80" rows="10" id="content1"><%=rst("n_content")%></textarea>
</p>
<p>
<input type="submit" name="Submit" value="提交" />
</p>
</form>
<p> </p>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -