管理文件
<!--
/*---------------------------------------------------- */
/* 作者:谌忠辉 */
/* 时间:2004-04-28 */
/* 功能:软件管理 */
/* ----------------------------------------------------*/
-->
<!--#include file="../PassYz.asp"-->
<!--#include file="../Connection.asp"-->
<!--#include file="../inc/Md5encrypt.asp"-->
<!--#include file="../Inc/FunPublic.asp"-->
<html><head>
<link rel="stylesheet" type="text/css" href="../css/Forum.css">
</head>
<body bgcolor="#F7F7FF" topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0">
<%dim sql
dim admin_flag
admin_flag="42E"
yh=request.Cookies("login")("yh")
yhqx=request.Cookies("login")("qx")
if (yh="" or instr(yhqx,admin_flag)=0) then
Errmsg=Errmsg+"您没有管理本页面的权限或者登陆超时,请向管理员申请权限或者重新登陆!!"
call Error(Errmsg,"",0)
else
%>
<table height="100%" cellspacing="0" cellpadding="0" width="100%" bgcolor="#f1f4f9" border="1" id="table1" bordercolor="#7C88B6" style="border-collapse: collapse">
<tr align="middle">
<td valign="top">
<table border="1" width="100%" id="table4" height="30" class="table">
<form method="POST" action="">
<tr>
<td width="90">
<img border="0" src="../Images/t_but.jpg" width="12" height="12">
模块名称:</td>
<td width="140">
<input type="text" name="SoftName" size="20" class="input"></td>
<td width="72">
<input type="submit" value="查 询" name="B1" class="button"></td>
<td> </td>
</tr></form>
</table>
<table class="xpTable" id="table2" cellspacing="0" cellpadding="2" width="764" bgcolor="#e4e9f3" altrowcolor="oldlace" borderstyle="0">
<thead>
<tr align="middle">
<td width="49" height="23">编号</td>
<td width="167">模块名称</td>
<td width="88">录入员</td>
<td width="93">录入时间</td>
<td width="147" colspan="2">操 作</td>
</tr>
</thead>
<% Sql="select SoftName,SoftInName,SoftInTime,ID,SoftUrl,SoftFile from SoftName where (1=1) and SoftLx=0"
Name=checkStr(Request.Form("SoftName"))
If trim(Name)<>"" then sql=sql & "and SoftName like '%" & trim(Name) & "%'"
sql=sql & " order by SoftInTime asc"
Set Rs=Conn.doexecute(Sql)
If (Rs.RecordCount=0) Then
%>
<tr align="middle">
<td class="boder" height="26" colspan="6" width="756">该栏目还没有信息!!</td>
</tr>
<%
else
Rs.pagesize=14 '每页显示的行数
total=Rs.pagecount '总页数
dim currentpage
currentpage=Request("page")
if currentpage="" then currentpage=1
if not isNumeric(currentpage) then '判断是否为数字
currentpage=1
elseif CInt(currentpage)>total then
currentpage=total '大于总页数时,将总页数勿给变量
end if
currentpage=CInt(currentpage) '字符转换为数字
Rs.AbsolutePage =currentpage '指标相对於第一笔的位置
RowCount =Rs.pagesize
If Not Rs.Eof AND RowCount>0 Then
Do While Not Rs.Eof AND RowCount>0
%>
<tr align="middle">
<td class="boder1" height="25"><%=trim(Rs("Id"))%></td>
<td class="boder" width="168"><%=Rs("SoftName")%></td>
<td class="boder" width="89"><%=Rs("SoftInName")%> </td>
<td class="boder" width="94"><%=datevalue(Rs("SoftInTime"))%></td>
<td class="boder" width="71"> <a href="SoftOption.asp?id=<%=trim(Rs("Id"))%>&action=DelSoft&url=<%=Rs("SoftUrl")%>&FileUrl=<%=Rs("SoftFile")%>">删 除</a></td>
<td class="boder" width="41"><a href="SoftOption.asp?id=<%=trim(Rs("Id"))%>&action=EditSoft">修 改</a></td>
</tr>
<%
Rs.MoveNext
RowCount=RowCount-1
Loop
end if
end if
%>
</table>
</td>
</tr>
<tr>
<td bgcolor="#e4e9f3" height="26"><%
if total<>1 then
if currentpage=0 then currentpage=1 %>
<table cellspacing="0" cellpadding="0" align="center" border="0" id="table3">
<form method="post" action="SoftGl.asp">
<tr>
<td valign="bottom" align="middle" width="170">
<div align="left">
页数:<strong><font color="#3b445f"><%=currentpage%></font>/<%=total%></strong> 记录总数:<%=rs.recordcount%></div>
</td>
<td width="2"><img height="18" src="Images/line.png" width="2"></td>
<td valign="bottom" align="middle" width="220"><% if currentpage=1 or total=0 then
Response.Write "[首页] [前页] "
else
Response.Write "[<b><a href=?page=1" &"&SoftName =" & trim(Name) &">首页</a></b>] [<b><a href=?page="¤tpage-1& "&SoftName =" & trim(Name) &">前页</a></b>] "
end if
if currentpage=total or total=0 then
Response.Write "[后页] [尾页]"
else
Response.Write "[<b><a href=?page="¤tpage+1& "&SoftName =" & trim(Name) &">后页</a></b>] [<b><a href=?page="&total& "&SoftName =" & trim(Name) &">尾页</a></b>]"
end if
%> </td>
<td width="2"><img height="18" src="Images/line.png" width="2"></td>
<td valign="bottom" align="right" width="60">转到: </td>
<td width="100">
<div class="box">
<div class="box2">
<select onchange="javascript:submit()" size="1" name="page" selected><% for i=0 to total %>
<option value="<%=i%>"> 第 <%=i%> 页</option>
<% next%></select> </div>
</div>
</td>
</tr>
</form>
</table>
<%end if%> </td>
</tr>
</table>
<%
Rs.close
set Rs=nothing
end if
%>
</body>
</html>