📄 admin_modi.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="setting.asp"-->
<%
if request("no")="modi" then
newsid=request("newsid")
ne=request("news")
title=request("title")
color=trim(GernerateHtml(request("color")))
hide=trim(GernerateHtml(request("hide")))
tag=trim(GernerateHtml(request("tag")))
xiangguan=trim(GernerateHtml(request("xiangguan")))
BigClassName=request("BigClassName")
For i = 1 To Request.Form("cnwords").Count
mContent = mContent & Request.Form("cnwords")(i)
Next
mContent = Replace(mContent,"<script","<sscript")
mContent = Replace(mContent,"/script>","/scripts>")
mimageNum = Request.form("imageNum")
firstImageName = trim(Request.form("editFirstImageName"))
smallclassname=trim(GernerateHtml(request("smallclassname")))
user=request("user")
ok=request("ok")
url=request("url")
set rs=server.createobject("adodb.recordset")
sql="select * from NEWS where bh="&newsid
rs.open sql,conn,1,3
rs("title")=title
rs("content")=mcontent
rs("author")=user
rs("BigClassName")=BigClassName
rs("tag")=tag
rs("smallclassname")=smallclassname
rs("infor")=ne
rs("color")=color
rs("hide")=hide
rs("xiangguan")=xiangguan
rs("url")=url
if ok<>"" then rs("ok") = ok
if mimageNum<>"" then rs("imageNum") = mimageNum
if firstImageName<>"" then rs("firstImageName") = firstImageName
rs.update
rs.close
set rs=nothing
if url="" then
set rs1=server.createobject("adodb.recordset")
sql1="select * from NEWS where bh="&newsid
rs1.open sql1,conn,1,3
set rs2=server.createobject("adodb.recordset")
sql2="select * from example where bh=1"
rs2.open sql2,conn,1,3
moban=rs2("example")
moban=replace(moban,"E_title",title)
moban=replace(moban,"E_author",user)
moban=replace(moban,"E_content",mcontent)
moban=replace(moban,"E_fenlei",bigclassname)
moban=replace(moban,"E_now",now)
moban=replace(moban,"E_num",newsid)
Set fso = Server.CreateObject("Scripting.FileSystemObject")
Set fout = fso.CreateTextFile(Server.MapPath("files/"&newsid&".html"))
fout.WriteLine moban
fout.close
response.Redirect("admin_right.asp?url=admin_info.asp&reason=添加修改成功,系统将自动转入管理页面")
else
response.Redirect("admin_right.asp?url=admin_info.asp&reason=添加修改成功,系统将自动转入管理页面")
end if
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>add</title>
<style type="text/css">
<!--
body {
background-image: url();
}
#Layer1 {
position:absolute;
width:467px;
height:545px;
z-index:1;
left: 328px;
top: 49px;
background-color: #FFFFFF;
}
.STYLE1 {
color: #FFFFFF;
font-size: 10px;
font-family: Arial, Helvetica, sans-serif;
}
.STYLE2 {color: #0099CC; font-size: 10px; font-family: Arial, Helvetica, sans-serif; }
-->
</style>
<link href="css/css.css" rel="stylesheet" type="text/css">
</head>
<body>
<%
newsid=request("bh")
kong=""
Set rso=Server.CreateObject("ADODB.RecordSet")
sql="select * from NEWS where bh="&newsid
rso.Open sql,conn,1,1
if rso.eof and rso.bof then
response.Write("没有记录")
else
%>
<div id="Layer1">
<table width="466" height="218" border="0" class="tb1">
<tr>
<td height="27" background="image/item_bg.gif" class="STYLE13" id="new" style="border:#999999 1px solid"><div align="center" class="STYLE2">修改新闻</div></td>
</tr>
<tr>
<td height="15" class="STYLE2"><form name="form1" method="post" action="admin_modi.asp?no=modi">
<p><font color="#FF0000">*</font><span class="STYLE3">新闻标题:
<input name="title" type="text" class="tb1" id="title" value="<%=rso("title")%>">
<label>
<input name="textfield" type="text" class="tb1" readonly value="<%=rso("bh")%>">
<select name="color" size="1" class="tb1" id="color">
<option value="<%=kong%>">无</option>
<option value="red">红色醒目</option>
<option value="green">绿色清新</option>
<option value="gray">灰色端庄</option>
<option value="blue">蓝色讯流</option>
<option value="yellow">黄色高贵</option>
</select>
<select name="hide" class="STYLE3" id="hide">
<option value="<%=kong%>">无</option>
<option value="log">允许登陆查看</option>
</select>
</label>
</span></p>
<p>
<label><span class="STYLE3">新闻连接url:</span>
<input name="url" type="text" class="tb1" id="url" value="<%=rso("url")%>" size="100">
</label>
</p>
<p><font color="#FF0000">*</font><span class="STYLE3">新闻类别</span>
<%
Set rs = Server.CreateObject ("ADODB.Recordset")
sql = "select * from BigClass"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "请先添加栏目!!"
else
%>
<select name="bigclassname" class="tb1" id="bigclassname">
<option value="<%=trim(rs("BigClassName"))%>" selected><%=trim(rs("BigClassName"))%></option>
<%
dim selclass
selclass=rs("BigClassName")
rs.movenext
do while not rs.eof
%>
<option value="<%=trim(rs("BigClassName"))%>"><%=trim(rs("BigClassName"))%></option>
<%
rs.movenext
loop
end if
rs.close
%>
</select>
<%end if%></p>
<p>
<input type="hidden" name="cnWords" value="<%=Server.HTMLEncode(rso("Content"))%>"><iframe ID="eWebEditor1" src="eWebEditor/ewebeditor.asp?id=cnWords&style=standard" frameborder="0" scrolling="no" width="550" HEIGHT="350"></iframe>
</p>
<p><font color="#FF0000">*</font><span class="STYLE3">发布人:</span>
<input name="user" type="text" class="tb1" value="admin" size="30">
</p>
<table width="100%" border="0" class="tb1">
<tr>
<td background="image/item_bg.gif" class="STYLE13" id="new" style="border:#999999 1px solid"><div align="left">|-高级标签</div></td>
<td background="image/item_bg.gif" class="STYLE13" id="new" style="border:#999999 1px solid"><div align="left">|-相关文章</div></td>
</tr>
<tr>
<td><label>
<div align="left"> tag标签:
<input name="tag" type="text" class="tb1" id="tag" value="<%=rso("tag")%>" size="30">
</div>
</label></td>
<td><label>
<div align="left"> 相关文章
<input name="xiangguan" type="text" class="tb1" id="xiangguan" value="<%=rso("xiangguan")%>" size="30">
</div>
</label></td>
</tr>
</table>
<table width="100%" border="0" class="tb1">
<tr>
<td colspan="2" background="image/item_bg.gif" class="STYLE13" id="new" style="border:#999999 1px solid"><div align="left">|-高级设置</div></td>
</tr>
<tr>
<td width="49%"><label>
<label>
<input type="radio" name="news" value="图片">
</label>
图片新闻
<input type="radio" name="news" value="推荐">
推荐新闻
</label>
<input type="radio" name="news" value="特别">
特别关注</td>
<td width="51%"><label>
新闻图片连接:
<input name="smallclassname" type="text" class="STYLE7" id="smallclassname" value="<%=rso("smallclassname")%>" size="50">
</label></td>
</tr>
</table>
<p> </p>
<p align="center">
<input type="submit" name="Submit" value="ok!" class="tb1">
<input type="hidden" name="newsId" value="<%=newsId%>">
<input name="Submit2" type="reset" class="tb1" value="rewrite!">
<input name=cnWords type=hidden ID="cnWords" value=""> <input name=imageNum type=hidden ID="imageNum" value="<%=mImageNum%>">
<input name=editFirstImageName type=hidden ID="editFirstImageName" value=""></p>
</form> </td>
</tr>
<tr>
<td><p> </p></td>
</tr>
</table>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -