文章分类 | 推荐文章 | 最新文章 | 热点文章 | 最新软件 | 精品软件 | 下载排行 | 推荐下载 | 免费看大片 | WPS | 杀毒软件
清风网络
首 页 软件下载 网络学院 数码学院
QQ 电脑入门 游戏 操作系统 图形处理 办公软件 媒体动画 精文荟萃 工具软件 网络编程 程序开发 网络技术 认证考试 网站建设 文章专栏
当前位置:清风网络学院网络编程ASP用文本+ASP打造新闻发布系统
精品推荐
特别推荐
·如何解密加密的ASP源代码
·PHP+MySQL 购物车程序实例
·ASP网站漏洞及入侵防范方法
·ASP网络安全
·1小时ASP入门
·初学ASP动态网页制作常用错误处理
·ASP实现网页打开任何类型文件都保存
·ASP技巧:使用FSO自动创建多级文件夹的函数
·轻松建站 主流ASP内容管理系统
·ASP教程:透彻掌握ASP分页技术
热点TOP10
·了解MSMQ,控制ASP进程 (一)
·用ASP对网页进行限制性的访问
·实现session登陆时间的验证,验证用户登录页面的一个监听器
·Java基础:常用的匹配正则表达式和实例
·smarty实例教程
·ASP基础教程之ASP程序对Cookie的处理
·实例详细讲解ASP教程之ASP中使用变量的方法
·ASP入门:认识ASP程序所使用的几种脚本语言
·ASP入门知识:简单介绍ASP的基础知识
·ASP技巧:ASP中三个常用语句的使用技巧

用文本+ASP打造新闻发布系统

日期:2008年3月4日 作者: 查看:[大字体 中字体 小字体]


end if
next

'########把记录反排序存储在新的数组实现按时间反排序
dim c(100)
n=0
for i=recordcount to 0 step -1
c(n)=b(i)
n=n+1
next


dim currentrecord
currentrecord=pagesize*(topage-1)+1 '#########显示每一页
for k=1 to pagesize
if len(c(currentrecord))=0 then
exit for
end if
Response.Write c(currentrecord)&"〈br〉"
currentrecord=currentrecord+1
next
Response.Write "〈body bgcolor=#EDF0F5 topmargin=10 marginheight=5 leftmargin=4 marginwidth=0〉"
for m=1 to pagenum
response.write "〈span style=font-size:10pt〉〈a href=news_list.asp?topage="&m&"〉"&m&"〈/a〉〈/span〉 "
next

end if%>
//新闻删除
〈!--#include file="news_session.asp"--〉
〈%
dim id
id=Request.QueryString ("id")
dim myfso
set myfso=createobject("scripting.filesystemobject")
if myfso.FileExists(server.mappath("./news_content/"&id&".txt"))then
myfso.DeleteFile (server.mappath("./news_content/"&id&".txt"))'#############删除新闻内容
end if

dim mytext2,myread2
set myread2=myfso.opentextfile(server.mappath("./new_list.asp"),1,0)
if myread2.atendofstream then
Response.Write "没有新闻内容"
myread2.close
Response.End
end if
mytext2=myread2.readall
myread2.close
dim listarray,i,h,count,sf,title
listarray=split(mytext2,"") '#########读取记录并以#分割成listarray数组
count=ubound(listarray)
for i=0 to count '###########根据ID找到该新闻实现删除功能
sf=split(listarray(i),",")
if right(sf(0),7)=right(id,7) then
dim thisid
thisid=i

'#######为6说明上传了图片,删除新闻图片和该列表记录
if ubound(sf)=6 then
myfso.deletefile(server.MapPath ("./images/"&sf(6)))
end if
exit for
end if
next

dim mytext,mappath
mappath=server.mappath("./")
set mytext=myfso.createtextfile(mappath&"\new_list.asp",-1,0)
for i=0 to thisid-1' ##########把所有数据重新写入文件
mytext.write listarray(i)&""
next

for i=thisid+1 to ubound(listarray)
if i=ubound(listarray) then
mytext.write listarray(i)
exit for
else
mytext.write listarray(i)&""
end if
next
mytext.close
%〉
〈script language="javascript"〉
alert("删除成功");
location.href =("news_admin1.asp");
〈/script〉
---------------
news_view.asp
〈% Response.Expires=0
dim myid,myfso,myread,mytext1
myid=request.querystring("id")

if len(myid)=0 then
Response.Write "没有该新闻"
Response.End
end if

set myfso=createobject("scripting.filesystemobject")
set myread=myfso.opentextfile(server.mappath("./news_content/"&myid&".txt"),1,0)

上一页 [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] 下一页 




上一篇:在ASP中实现购物小车

下一篇:通过表单创建word的一个例子

相关文章:
·Windows系统漏洞修复软件大比拼
·将系统装到U盘中 如何自制XP@USB启动盘
·不用重装XP系统就可以解决全部故障
·微软.NET战略延深 蓄谋打造下一代网络门户
·XP系统运行慢?小编自用7招解决
·Win2000/XP/2003:系统万能Ghost全攻略
·提高运行速度 教你一步一步优化XP系统
·网友倾情打造:XP
·Windows系统进程列表完全解析
·Vista系统使用技巧总结
相关软件:
·学校源码管理系统超靓版V2008
·如何安装双系统
·工作流管理系统 V1.1
·电脑装机、系统维护工具盘 2003版
·GHOST全自动备份还原系统光盘V3.0
·高桦医院门诊收费系统报价器版V12.83
·卡丽来相片VCD制作系统 2003
·深入理解计算机系统电子杂志 PDF
·远潮自我形象设计系统
·公司企业网站管理系统模板功能强大版

特别声明:本站除部分特别声明禁止转载的专稿外的其他文章可以自由转载,但请务必注明出处和原始作者。文章版权归文章原始作者所有。对于被本站转载文章的个人和网站,我们表示深深的谢意。如果本站转载的文章有版权问题请联系编辑人员,我们尽快予以更正。
[打印本页] [关闭窗口] 转载请注明来源:http://www.viphot.com
| 帮助(?) | 版权声明 | 友情连接 | 关于我们 | 信息发布
Copyright 2007 www.viphot.com All Rights Reserved. 鄂ICP备05000083号Powered by:viphot