www.gusucode.com > 深度梦想整站系统(asp) 1.14.02源码程序 > admin/article/article_Manage.asp
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%> <% projectRootPath = "../../" '相对当前应用程序根的位置 %> <!-- #include file="../web.config.asp"--> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta name="robots" content="noindex,nofollow" /> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>管理</title> <link href="../themes/<%=theme_Path%>/main.css" rel="stylesheet" type="text/css" /> <script type="text/javascript"> //文章审核 function articleView(){ //alert(document.getElementsByName("articleView").length); var oCheckbox=document.getElementsByName("articleView"); var boolCheck=false; for(i=0;i<oCheckbox.length ;i++){ if(oCheckbox[i].checked==true){ boolCheck=true; break; } } if(boolCheck==false){ alert("没有选择审核文章!!"); }else{ if(confirm('你确定审核么?')){ document.form1.method="post"; document.form1.action="article_isView.asp"; document.form1.submit(); } } } //文章删除 function articleDel(){ //alert(document.form1.articleDel.length); var oCheckbox=document.getElementsByName("articleDel"); var boolCheck=false; for(i=0;i<oCheckbox.length ;i++){ if(oCheckbox[i].checked==true){ boolCheck=true; break; } } if(boolCheck==false){ alert("没有选择删除文章!!"); }else{ if(confirm('你确定删除么?')){ document.form1.method="post"; document.form1.action="article_Del.asp"; document.form1.submit(); } } } </script> </head> <body id="bodyBg1"> <br /> <a href="article_Manage.asp">文章管理</a> | <a href="article_Add.asp">添加文章</a> <hr class="Nav-hr" /> <br /> <dl class="manageContent"> <dt>文章管理</dt> <dd> <br /> <% '--- 1 分页初始化 ----- Dim oPageMsSQL Set oPageMsSQL=new Deep_Page oPageMsSQL.pageSize=50 '定义每页显示记录数 默认10条 oPageMsSQL.getConnection(conn) '当前页 if (Request.QueryString("page") <>"") then oPageMsSQL.currentPage=CInt(Request.QueryString("page")) End if 'sql="select * from tArticle" 'PageSQL( tableName, dataKeyField, wordField, whereCondition, orderByField) '-----1 end------ classID=request.QueryString("classID") if (classID="")then 'sql="select * from deep_Article order by fUpdateTime desc" sql=oPageMsSQL.PageSQL( "deep_Article", "fid", "*","" ,"fUpdateTime desc,fid") else 'sql="select * from deep_Article where fclass_ID="&classID&" order by fUpdateTime desc" sql=oPageMsSQL.PageSQL( "deep_Article", "fid", "*","fclass_ID="&classID ,"fUpdateTime desc,fid") end if set rsArticle=conn.execute(sql) if(rsArticle.eof and rsArticle.bof)then Response.Write("没有记录!!") else %> <form id="form1" name="form1" method="post" action=""> <table width="95%" class="tableBoder01"> <tr> <th scope="col">序号</th> <th scope="col">文章名称</th> <th scope="col">栏目</th> <th scope="col">更新时间</th> <th scope="col"><a href="javascript:articleView()">审核</a></th> <th scope="col"><a href="javascript:articleDel();">删除</a></th> <th scope="col">编辑</th> </tr> <% iNum=0 do while (not rsArticle.eof) iNum=iNum+1 %> <tr> <td><%=(iNum+(oPageMsSQL.currentPage-1)*oPageMsSQL.pageSize)%></td> <td><%=rsArticle("fTitle")%></td> <td><% sql="select fclassName from deep_ArticleClass where fclass_ID=" & rsArticle("fclass_ID") set rsArticleClass=conn.execute(sql) if(rsArticleClass.eof and rsArticleClass.bof)then response.Write("没有对应分类") else Response.Write( "<a href=""article_Manage.asp?classID="&rsArticle("fclass_ID")&""" title=""点击查看 ["&rsArticleClass("fclassName")&"] 栏目下文章"">"&rsArticleClass("fclassName")&"</a>" ) end if %></td> <td><%=rsArticle("fUpdateTime")%></td> <td><%if(rsArticle("fisView")=0)then%> <input name="articleView" type="checkbox" value="<%=rsArticle("fid")%>" /> <%end if%></td> <td><input name="articleDel" type="checkbox" value="<%=rsArticle("fid")%>" /></td> <td><a href="article_Update.asp?id=<%=rsArticle("fid")%>">编辑</a></td> </tr> <% rsArticle.moveNext loop %> </table> </form> <% end if rsArticle.close set rsArticle=nothing '--- 2 分页导航 显示 ----- response.write( oPageMsSQL.PageNavigateUrl() ) Set oPageMsSQL=Nothing '-----2 end------ %> <br /> </dd> </dl> <br /> </body> </html> <% call closeConnDB() %>