首页/技术开发/内容

用文本+ASP打造新闻公布系统(5)新闻更改

技术开发2024-02-19 阅读()
") '#########读取记录并以#分割成listarray数组
dim count,sf,i,title,src
count=ubound(listarray)
for i=0 to count '###########根据ID找到该新闻并用变量存储给新闻的标题
sf=split(listarray(i),",")
if right(sf(0),7)=right(myid,7) then
title=sf(1)
src=sf(3)
exit for
end if
next


%>

<head>
<style>
td {font-size:9pt}
INPUT.buttonface {
BACKGROUND-COLOR: #0079F2; BORDER-BOTTOM: #333333 1px outset; BORDER-LEFT: #333333 1px outset; BORDER-RIGHT: #ffffff 1px outset; BORDER-TOP: #ffffff 1px inset; COLOR: black; FONT-SIZE: 9pta { color: #000000; text-decoration: none}

.text {font-size:11pt}
INPUT.buttonface2 {
BACKGROUND-COLOR: #EDF0F5; COLOR: black; FONT-SIZE: 9pta { color: #000000; text-decoration: none}
a:hover { color: white; text-decoration: underline overline; background: #007EBB}
.text {font-size:11pt}

</style>
</head>

<body bgcolor=#EDF0F5 topmargin=10 marginheight=5 leftmargin=4 marginwidth=0>

<form method="POST" action="news_updateing.asp" name="form1" enctype="multipart/form-data" onsubmit="return form1_onsubmit()">
<div align="left">

<table border="1" width="752" height="240" cellspacing="0" cellpadding="0">
<tr>
<td colspan="2" height="12" align="center" width="800" style="font-size:12pt"><strong>新闻发布系统后台管理--新闻修改</strong></td>
</tr>
<tr>
<td width="119" height="12" style="font-size:9pt">新闻标题</td>
<td width="675" height="12">
<input type="text" name="newtitle" size="94" value="<%=title%>" class="buttonface2 ">
</td>
</tr>
<tr>
<td width="119" height="213" style="font-size:9pt">
新<br>
闻<br>
内<br>
容</td>
<td width="675" height="213">
<textarea rows="14" name="newcontent" cols="93" style="BACKGROUND-COLOR: #EDF0F5"><%=newscontent%></textarea>
<br>
</td>
</tr>
<tr>
<td width="119" height="4" style="font-size:9pt">新闻来源</td>
<td width="675" height="4">
<input type=text name="newssrc" value="<%=src%>" size="93" class="buttonface2 ">
</td>
</tr>
<tr>
<td width="119" height="5" style="font-size:9pt">图片上传</td>
<td width="675" height="5"> <input type="file" name="client1" size="20" readonly LANGUAGE=javascript onblur="return client_onblur(1)" ></td>
</tr>
</table>
</div>
<p>
<input type="submit" value="确认" name="B1" style="font-size: 10pt; color: #000000; " class="buttonface">
<input type="reset" value="全部重写" name="B2" style="font-size:10pt;color:#000000;" class="buttonface">
<input type="button" value="帐号修改" onclick="location.href='admin/news_chadmin.asp'" name="B2" style="font-size:10pt;color:#000000;" class="buttonface">
<input type="button" value="新闻添加" onclick="location.href='news_add.asp'" name="B2" style="font-size:10pt;color:#000000;" class="buttonface"></p>
<input type=hidden name="myid" value="<%=myid%>">
<INPUT type="hidden" name="server1">
<input type="hidden" name="mysession" value="mysession">
</form>

##########
news_updating.asp
<!--#include file="news_session.asp"-->
<!--#include file="upload.inc"-->
<%
'Fields("xxx").Name 取得Form中xxx(Form Object)的名字
'Fields("xxx").FilePath 如果是file Object 取得文件的完整路径
'Fields("xxx").FileName 如果是file Object 取得文件名
'Fields("xxx").ContentType 如果是file Object 取得文件的类型
'Fields("xxx").Length 取得Form中xxx(Form Object)的数据长度
'Fields("xxx").Value 取得Form中xxx(Form Object)的数据内容
Dim FormData,FormSize,gnote,bnote,notes,binlen,binstr
FormSize=Request.TotalBytes
FormData=Request.BinaryRead(FormSize)
Set Fields = GetUpload(FormData)

'############判断输入错误
dim mytitle,content,src,id,mysession
mysession=Fields("newtitle").value
if len(mysession)=0 then
Response.Write "非法登陆或超时间,请重新登陆"
Response.End
end if

mytitle=Fields("newtitle").value
mytitle=replace(mytitle,"(北联网教程,专业提供视频软件下载)

第1页  第2页  第3页  第4页  第5页  第6页  第7页  第8页 

……

相关阅读