' ###### #news_update. asp
<!--#include file= "news_session.asp"-->
<script Id=clienteventhandlersjs language=javascript>
<!--
function Client_onblur (ii) {
Server=eval ("Form1.server" +ii)
if (server.value== "") {
Client=eval ("Form1.client" +ii)
Clientvalue=client.value+ ""
Varlen=clientvalue.length
A=clientvalue.lastindexof (' \ \ ')
Clientvalue=clientvalue.substring (a+1)
alert (Clientvalue);
Server.value=clientvalue
}
}
function Form1_onsubmit () {
for (i=1;i<1;i++) {
Client=eval ("Form1.client" +i)
Server=eval ("Form1.server" +i)
if (client.value!= "" && server.value== "") {alert ("The file name after the upload cannot be empty!") "); Server.focus (); return false}
}
}
-->
</SCRIPT>
<% Dim myID
Myid=request.querystring ("id")
If Len (myID) =0 Then
Response.Write "No Such news"
Response.End
End If
Dim myfso,myread,mytext,newscontent
' ###### #打开对应的新闻内容文件, and read with variable storage
Set Myfso=createobject ("Scripting.FileSystemObject")
If Myfso. FileExists (Server.MapPath ("./news_content/" &myid& "TXT")) Then
Set Myread=myfso.opentextfile (Server.MapPath ("./news_content/" &myid& "TXT"), 1,0)
Newscontent=myread.readall
Myread.close
Newscontent=replace (newscontent, "<br>", Chr (13))
Newscontent=replace (Newscontent, "", "")
Newscontent=replace (Newscontent, "", Chr (32))
Newscontent=replace (Newscontent, "" ", Chr (34))
Else
Response.Write "This news has been deleted"
Response.End
End If
Dim mytext2,myread2 ' ###### #打开新闻列表文件
Set Myread2=myfso.opentextfile (Server.MapPath ("./new_list.asp"), 1,0)
If Myread2.atendofstream Then
Response.Write "No news content"
Response.End
End If
Mytext2=myread2.readall
Dim Listarray
Listarray=split (mytext2, "|") ' ######## #读取记录并以 # split into Listarray arrays
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
%>
<style>
td {FONT-SIZE:9PT}
Input.buttonface {
Background-color: #0079F2; Border-bottom: #333333 1px outset; Border-left: #333333 1px outset; Border-right: