新闻发布系统开发与实现 - 样稿(7)

2019-01-19 12:27

四川理工学院毕业设计(论文)

.......

String s = Fun.CheckDate (sa1, sa2); if (!s.equals(\ }

if (BigClassID == 0) { }

if (OK) {

String sql2 = \* from SmallClass where SmallClassName='\+ SClassName + \ResultSet rs2 = stmt1.executeQuery (sql2); if (rs2.next ()) {

OK = false;

sError += \该小类标题 [ \已经存在,不能重复!\

OK = false;

sError = \所属大类参数传递错误,请重试!\OK = false; sError = s;

大类存在的错误提示信息 }

}

if (OK) {//如果不存在,则向数据库中写入该大类

String sql = \sql += \?????????

sql += \stmt.executeUpdate (sql); ................... return \}

} else

return sError;

27

冯文华:新闻发布系统开发与实现

3.3.5 新闻审核管理功能模块(Admin_wzCheck.asp)界面图及主要代码

新闻审核功能模块界面只有拥有超级管理员权限的才能进入该功能界面,对于来自网友的新闻评论,管理员有权进行相应的删除,特别是对于有些触犯我们法律法规的评论,管理员有权进行删除。如图3.9所示:

图 3.9 新闻审核管理模块界面效果图

主要代码如下: <%

sql=\

A.ArticleID,A.ClassID,C.ClassName,A.Title,A.Key,A.Author,A.CopyFrom,A.UpdateTime,A.Editor,\sql=sql

&

\onType,A.ReadLevel,A.ReadPoint from caifuw A\

sql=sql & \inner join caifuwClass C on A.ClassID=C.ClassID where A.Deleted=False and Passed=\if ClassID>0 then

if Child>0 then

ChildID=\

set tClass=conn.execute(\ClassID from caifuwClass where

ParentID=\& ClassID & \or ParentPath like '\& ParentPath & \& ClassID & \

do while not tClass.eof

if ChildID=\

ChildID=tClass(0)

28

四川理工学院毕业设计(论文)

else

ChildID=ChildID & \

end if

tClass.movenext

loop

sql=sql & \

else

sql=sql & \

end if

end if

if strField<>\ if keyword<>\ select case strField case \

sql=sql & \

case \

sql=sql & \

case \

sql=sql & \

case \

sql=sql & \

case else

sql=sql & \

end select

end if

end if

sql=sql & \

Set rsArticleList= Server.CreateObject(\rsArticleList.open sql,conn,1,1

29

冯文华:新闻发布系统开发与实现

if rsArticleList.eof and rsArticleList.bof then

totalPut=0 if Child=0 then

if Passed=\

response.write \没有任何已审核的文章!


\

else

response.write \没有任何待审核的文章!


\

end if

else

if Passed=\

response.write \此栏目的下一级子栏目中

没有任何已审核的文章!

\

else

response.write \此栏目的下一级子栏目中

没有任何待审核的文章!

\

end if

end if

else

totalPut=rsArticleList.recordcount

if currentpage<1 then

currentpage=1

end if

if (currentpage-1)*MaxPerPage>totalput then

if (totalPut mod MaxPerPage)=0 then

currentpage= totalPut \\ MaxPerPage

else

currentpage= totalPut \\ MaxPerPage + 1

end if

end if

30

四川理工学院毕业设计(论文)

if currentPage=1 then else

if (currentPage-1)*MaxPerPage

rsArticleList.move (currentPage-1)*MaxPerPage

dim bookmark

bookmark=rsArticleList.bookmark showContent

showpage strFileName,totalput,MaxPerPage,true,true,\篇文章\

showContent

showpage strFileName,totalput,MaxPerPage,true,true,\篇文章\

else

currentPage=1

showContent

showpage strFileName,totalput,MaxPerPage,true,true,\篇文章\

end if end if

end if

rsArticleList.close

set rsArticleList=nothing sub showContent dim ArticleNum ArticleNum=0 %>

3.3.6 用户管理功能模块主要代码

本功能模块只对拥有超级管理权限的管理员开放,本功能模块不但可以查看所有管理员信息, 发布的新闻数等,还可以对本系统的管理员进行添加、修改与删除,其中修改可以对管理员的资料进行修改,包括用户的密码。

主要代码如下:

public String SaveAdd(String[] s, String s1, String s2) throws Exception {

31


新闻发布系统开发与实现 - 样稿(7).doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:2010届黑龙江哈六中高三一模(数学理)

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: