📄 admin_publish.asp
字号:
<!-- #include file="conn.asp" -->
<!-- #include file="inc/const.asp" -->
<!-- #include file="inc/function.asp" -->
<HTML><HEAD><TITLE>后台管理 </TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<LINK href="admin.css" type=text/css rel=stylesheet>
</HEAD>
<BODY leftMargin=0 topMargin=0>
<!-- #include file="admin_header.asp" -->
<table width="100%" border="0" cellspacing="2">
<tr>
<td width="20%" align="center" valign="top" class="tdbgleft"><!-- #include file="Admin_Left.asp" --></td>
<td class="b1" valign="top">
<%
const MaxPerPage=30
if cUserName="" then
msgtitle="非法操作"
msginfo="<li>你没有登录系统。<li><a href=""User.Asp"">点此登录系统</a></li>"
call Sysmsg(msgtitle,msginfo)
else
if chkMaster(cUserName) then
set rs=server.createobject("adodb.recordset")
dim isMaster,selSoftID
isMaster=false
selSoftID=Trim(Request.Form("selSoftID"))
if chkMaster(cUserName) then isMaster=true
select case Trim(Request("action"))
case "batch_isDel"
call batch_isDel()
case else
call main()
end select
set rs=nothing
else
msgtitle="非法操作"
msginfo="<li>操作错误,你不是系统管理员,没有权限进行此项操作!</li>"
call Sysmsg(msgtitle,msginfo)
end if
end if
sub batch_isDel()
msgtitle="批量删除"
if selSoftID<>"" then
conn.execute("delete from SoftDown_updata where SoftID in ("&selSoftID&")")
msginfo="操作成功!"
else
msginfo="没有选择任何记录,本次操作取消!"
end if
call Sysmsg(msgtitle,msginfo)
end sub
sub main()
dim currentpage,page_count,Pcount
dim totalrec,endpage
if not isempty(request("page")) then
currentPage=cint(request("page"))
else
currentPage=1
end if
sql="select SoftID,SoftName,SoftVer,CatalogID,CatalogName,SoftTime,isActive from SoftDown_updata order by SoftID desc"
%>
<table width="100%" border="0" cellspacing="1" cellpadding="3">
<COLGROUP>
<COL width=24>
<COL width=*>
<COL width=65>
<COL width=30>
<COL width=50>
<tr>
<td align="center" class="tdbg1"><a href="javascript:SelectAll()">选择</a></td>
<td class="tdbg1">软件分类和名称</td>
<td align="center" class="tdbg1">日期</td>
<td align="center" class="tdbg1">入库</td>
<td align="center" class="tdbg1">操作</td>
</tr>
<SCRIPT language = "JavaScript">
function OpenWin(url, width, height){
var Win = window.open(url,"openScript",'width=' + width + ',height=' + height + ',resizable=1,scrollbars=yes,menubar=no,status=yes' );
}
function SelectAll() {
for (var i=0;i<document.myform.selSoftID.length;i++) {
var e=document.myform.selSoftID[i];
e.checked=!e.checked;
}
}
</script>
<form name="myform" method="post" action="Admin_Publish.asp">
<% rs.open sql,conn,1,1
if rs.eof and rs.bof then
Response.Write "<tr bgcolor=""#FCFCFC""> <td colspan=""5"">Sorry!没有找到任何记录。</td></tr>"
else
totalrec=rs.recordcount
if (totalrec mod MaxPerPage)=0 then
Pcount= totalrec \ MaxPerPage
else
Pcount= totalrec \ MaxPerPage + 1
end if
RS.MoveFirst
if currentpage > Pcount then currentpage = Pcount
if currentpage<1 then currentpage=1
RS.Move (currentpage-1) * MaxPerPage
page_count=0
do while not rs.eof and page_count < MaxPerPage
%>
<tr>
<td align="center" class="tdbg2">
<% Response.Write "<input name=""selSoftID"" type=""checkbox"" value="""&rs("SoftID")&""">"%>
</td>
<td class="tdbg2">·<% Response.Write("["&rs("CatalogName")&"] "&rs("SoftName")&" "&rs("SoftVer")&"") %>
</td>
<td align="center" class="tdbg2"><%= FormatDateTime(rs("SoftTime"),2) %></td>
<td align="center" class="tdbg2"><% if rs("isActive")=0 then
Response.Write("未入")
else
Response.Write("已入")
end if
%></td>
<td align="center" class="tdbg2">
<% Response.Write("<a href=""Publish.asp?action=edit&SoftID="&rs("SoftID")&""" target=""_blank"">软件入库</a>")%>
</td>
</tr>
<% page_count=page_count+1
rs.movenext:loop %>
<tr>
<td class="tdbg2" colspan="5"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<%Response.Write "搜到:<b><font color=""red"">"&totalrec&"</font></b> 条"
Response.Write " 页次:<b>"¤tpage&"</b>/<b>"&Pcount&"</b>页"
Response.Write " 每页<b>"&MaxPerPage&"</b>" %>
</td>
<td align="right">分页:
<%
if currentpage > 4 then
response.write "<a href=""?page=1"&q&""">[1]</a>..."
end if
if Pcount>currentpage+3 then
endpage=currentpage+3
else
endpage=Pcount
end if
for i=currentpage-3 to endpage
if not i<1 then
if i = clng(currentpage) then
response.write " <font color=""red"">["&i&"]</font>"
else
response.write " <a href=""?page="&i&""&q&""">["&i&"]</a>"
end if
end if
next
if currentpage+3 < Pcount then
response.write "...<a href=""?page="&Pcount&""&q&""">["&Pcount&"]</a>"
end if %>
</td>
</tr>
</table></td>
</tr>
<% end if:rs.close %>
<tr>
<td class="tdbg2" >管理</td>
<td class="tdbg2" colspan="4"><input type="radio" name="action" value="batch_isDel">
批量删除
<input type="submit" name="Submit3" value="执行操作" onclick="{if(confirm('您确定执行的操作吗?')){this.document.myform.submit();return true;}return false;}">
</td>
</tr>
</form>
</table>
<% end sub %>
</td>
</tr>
</table>
<!-- #include file="admin_footer.asp" -->
</BODY></HTML>
<% CloseDatabase %>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -