⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 admin_manalist.asp

📁 庐江二中
💻 ASP
字号:
<%
founderr=false

if not isempty(request("page")) and request("page")<>"" then
	currentPage=cint(request("page"))
else
	currentPage=1
end if

if request("bigclassname")<>"" then
	bigclassname=request("bigclassname")
	bigtitle=bigclassname
else
	if Session("KEY")="inter" or Session("KEY")="check" then
		errmsg=errmsg+"<li>没有选择大类!"
		founderr=true	
	end if
	bigclassname=""
	bigtitle="所有"
end if

if request("SmallClassName")<>"" then
	SmallClassName="and SmallClassName='"&request("SmallClassName")&"'"
	smalltitle="-"&request("SmallClassName")
else
	if bigclassname<>"" and Session("KEY")="check" then
		errmsg=errmsg+"<li>没有选择小类!"
		founderr=true
	end if
	
	sql="select BigClassmaster from bigclass where BigClassName='"&BigClassName&"'"
	rs.open sql,conn,1,1
	if not rs.eof then BigClassmaster=rs("BigClassmaster")
	rs.close
	if Session("KEY")="inter" and instr(bigClassMaster,Session("UserName"))=0 then
		errmsg=errmsg+"<li>没有选择小类!"
		founderr=true
	end if
	'smallclassname=""
	'smalltitle=""
	'Sand=""
end if

if founderr=true then
	call error()
else	
thisselect="select NewsID,model,Title,UserName,LoginIP,UpdateTime,BigClassName,SmallClassName,SpecialName,OnTop,checked,image from News "
if Session("KEY")="super" or session("KEY")="senior" then
	if bigclassname="" then
		sql=thisselect& checked2& " order by NewsID desc"
	else
		sql=thisselect&" where BigClassName='" & BigClassName & "'" & SmallClassName & checked1&" order by NewsID desc"
	end if
else	
	if Session("KEY")="inter"  then
		'if instr(bigClassMaster,UserName)<>0 then 
			sql=thisselect&" where BigClassName='" & Request("BigClassName") & "'" & SmallClassName &checked1&" order by NewsID desc"
		'else
			'sql=thisselect&" where BigClassName='" & Request("BigClassName") & "' and UserName='"&Session("UserName") & "'"&checked1&" order by NewsID desc"
		'end if
	else
		if Session("KEY")="check" then 
			if bigclassname<>"" then
				sql=thisselect&" where BigClassName='" & BigClassName & "'" & SmallClassName & checked1&" order by NewsID desc"
			else
				sql=thisselect&checked1&" order by NewsID desc"
			end if
		else
			if Session("KEY")="input" then
				if bigclassname<>"" then
					sql=thisselect&" where BigClassName='" & BigClassName & "' and UserName='"&Session("UserName") & "'" & SmallClassName & checked1&" order by NewsID desc"
				else
					sql=thisselect&" where UserName='"&Session("UserName") & "'"&checked1&" order by NewsID desc"
				end if
			end if
		end if
	end if
end if

rs.Open sql,conn,1,1
if rs.eof and rs.bof then
	response.write "<p align='center'><br><br>没有找到符合条件的文章!</p><br>"
else
	MaxPerPage=20
	totalPut=rs.recordcount
	if currentpage<1 then currentpage=1
	if (currentpage-1)*MaxPerPage>totalput then
		if (totalPut mod MaxPerPage)=0 then
			currentpage= totalPut \ MaxPerPage
		else
			currentpage= totalPut \ MaxPerPage + 1
		end if
	end if
	if currentPage=1 then
'		showpage totalput,MaxPerPage,PageUrl
		showContent
		showpage totalput,MaxPerPage,PageUrl
	else
		if (currentPage-1)*MaxPerPage<totalPut then
			rs.move  (currentPage-1)*MaxPerPage
			dim bookmark
			bookmark=rs.bookmark
'			showpage totalput,MaxPerPage,PageUrl
			showContent
			showpage totalput,MaxPerPage,PageUrl
		else
			currentPage=1
'			showpage totalput,MaxPerPage,PageUrl
			showContent
			showpage totalput,MaxPerPage,PageUrl
		end if
	end if
end if
rs.close
end if
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -