?? fjlist.asp
字號:
<!--插入html頭部分以及數(shù)據(jù)庫接口-->
<!--#include file="in_conn.asp"-->
<body>
<!--插入網(wǎng)站置頂-->
<% if u_name="" then
Response.Redirect "log_err.asp"
else
%>
<!--#include file="in_topmb.asp"-->
<% end if %>
<%
'判斷用戶權(quán)限
IF u_power=0 THEN
Response.Redirect "resp.asp?cmd=id_wait"
END IF
%>
<!--獲取附件限制-->
<!--#include file="in_sys_share.asp"-->
<table align="center" width="700" height="25" border="0" cellspacing="0" cellpadding="0" class="rdbar"><tr>
<td width="60%" height="100%">
<a href="index.asp">[首頁]</a>-<a href="fjlist.asp">[共享附件]</a>
</td>
<td align="right">
<a href="fjseek.asp"><img src="img/seek.gif" border="0" hspace="0" vspace="0" align="absmiddle" alt="搜索附件"></a>
</td>
</tr></table>
<%
'分頁的統(tǒng)計
dim rdcount,pgcount,pgsize
pgsize=DEF_pg_fj
'獲取傳值
dim curpage,curtype
curpage=Request.QueryString("page")
curtype=Request.QueryString("type")
IF Request.QueryString("type")="" OR isNULL(Request.QueryString("type")) THEN
curtype=5
ELSEIF isNumeric(Request.QueryString("type")) THEN
curtype=CLng(curtype)
if curtype<0 OR curtype>4 then
curtype=5
end if
ELSE
curtype=5
END IF
dim vvvsql,vvvhttp
IF curtype>=0 AND curtype<=4 THEN
vvvhttp="fjlist.asp?type="&CStr(curtype)&"&"
vvvsql="SELECT m.ID,m.name,m.sex,m.power,f.* FROM tblmates AS m INNER JOIN tblfj AS f ON m.name=f.fj_owner WHERE f.fj_type="&curtype&" ORDER BY f.fj_ID DESC"
'統(tǒng)計
rdcount=conn.Execute("SELECT COUNT(fj_ID) FROM tblfj WHERE fj_type="&curtype,0,1)(0)
pgcount=Abs(Int(rdcount/pgsize*(-1)))
ELSE
vvvhttp="fjlist.asp?"
vvvsql="SELECT m.ID,m.name,m.sex,m.power,f.* FROM tblmates AS m INNER JOIN tblfj AS f ON m.name=f.fj_owner ORDER BY f.fj_ID DESC"
'統(tǒng)計
rdcount=conn.Execute("SELECT COUNT(fj_ID) FROM tblfj",0,1)(0)
pgcount=Abs(Int(rdcount/pgsize*(-1)))
END IF
IF isNumeric(Request.QueryString("page")) THEN
curpage=CLng(curpage)
if curpage<1 OR curpage>pgcount then
curpage=1
end if
ELSE
curpage=1
END IF
%>
<%
dim colnum,colmid,pg_i
'定義顯示快捷頁個數(shù)
colnum=5
colmid=colnum\2
'生成快捷頁的函數(shù)
Sub PageQuick()
%>
<% if rdcount>0 then %>
<a href="<% =vvvhttp %>page=1"><font face="webdings" title="頭頁">9</font></a>
<% else %>
<font face="webdings" title="頭頁">9</font>
<% end if %>
<% If curpage>1 Then %>
<a href="<% =vvvhttp %>page=<% =curpage-1 %>"><font face="webdings" title="上頁">7</font></a>
<% Else %>
<font face="webdings" title="上頁">7</font>
<% End if %>
<%
'前省略號的使用
if pgcount>colnum AND curpage-colmid>1 then
Response.Write "…"
end if
IF pgcount<colnum THEN
for pg_i=1 to pgcount
if pg_i<>curpage then
response.write "<a href="&vvvhttp&"page="&pg_i&">["&pg_i&"]</a>"
else
response.Write "["&pg_i&"]"
end if
next
ELSEIF curpage-1>=colmid AND pgcount-curpage>=colmid THEN
for pg_i=curpage-colmid to curpage+colmid
if pg_i<>curpage then
response.write "<a href="&vvvhttp&"page="&pg_i&">["&pg_i&"]</a>"
else
response.Write "["&pg_i&"]"
end if
next
ELSEIF curpage-1>=colmid AND pgcount-curpage<colmid THEN
for pg_i=pgcount-colnum+1 to pgcount
if pg_i<>curpage then
response.write "<a href="&vvvhttp&"page="&pg_i&">["&pg_i&"]</a>"
else
response.Write "["&pg_i&"]"
end if
next
ELSE
for pg_i=1 to 5
if pg_i<>curpage then
response.write "<a href="&vvvhttp&"page="&pg_i&">["&pg_i&"]</a>"
else
response.Write "["&pg_i&"]"
end if
next
END IF
'后省略號的使用
if pgcount>colnum AND curpage+colmid<pgcount then
Response.Write "…"
end if
%>
<% If curpage<pgcount Then %>
<a href="<% =vvvhttp %>page=<% =curpage+1 %>"><font face="webdings" title="下頁">8</font></a>
<% Else %>
<font face="webdings" title="下頁">8</font>
<% End if %>
<% if rdcount>0 then %>
<a href="<% =vvvhttp %>page=<% =pgcount %>"><font face="webdings" title="尾頁">:</font></a>
<% else %>
<font face="webdings" title="尾頁">:</font>
<% end if %>
本類共<font color="<% =cohover %>"><% =rdcount %></font>個 分為<font color="<% =cohover %>"><% =pgcount %></font>頁 每頁<font color="<% =cohover %>"><% =pgsize %></font>個 這是第<font color="<% =cohover %>"><% =curpage %></font>頁
<%
End Sub
%>
<table align="center" width="700" height="50" border="0" cellspacing="0" cellpadding="0">
<tr><td width="100%" height="50">
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0" class="rdbar">
<tr>
<th width="33%" height="25" class="rdr">
<%
if curtype=5 then
%>
<font class="ft1">全 部</font>
<% else %>
<a href="fjlist.asp">全 部</a>
<%
end if
%>
</th>
<th class="rdr">
<%
if curtype=1 then
%>
<font class="ft1">影音視聽</font>
<% else %>
<a href="fjlist.asp?type=1">影音視聽</a>
<%
end if
%>
</th>
<th width="33%">
<%
if curtype=2 then
%>
<font class="ft1">圖片動畫</font>
<% else %>
<a href="fjlist.asp?type=2">圖片動畫</a>
<%
end if
%>
</th>
</tr>
<tr>
<th width="33%" height="25" class="rdr" style="border-top:1px solid #FFFFFF">
<%
if curtype=3 then
%>
<font class="ft1">軟件下載</font>
<% else %>
<a href="fjlist.asp?type=3">軟件下載</a>
<%
end if
%>
</th>
<th class="rdr" style="border-top:1px solid #FFFFFF">
<%
if curtype=4 then
%>
<font class="ft1">學習課件</font>
<% else %>
<a href="fjlist.asp?type=4">學習課件</a>
<%
end if
%>
</th>
<th width="33%" style="border-top:1px solid #FFFFFF">
<%
if curtype=0 then
%>
<font class="ft1">其他類別</font>
<% else %>
<a href="fjlist.asp?type=0">其他類別</a>
<%
end if
%>
</th>
</tr>
</table>
</td></tr>
</table>
<table align="center" width="700" height="25" border="0" cellspacing="0" cellpadding="0" style="background-color:<% =bg3 %>;">
<tr>
<td width="100" height="100%">
<a href="fjup.asp">[↑上傳附件]</a>
</td>
<td align="right">
<% call PageQuick() %>
</td>
</tr>
</table>
<table align="center" width="700" height="25" border="0" cellspacing="0" cellpadding="0">
<%
IF rdcount<1 THEN
%>
<tr><th width="100%" class="rdkuang"><font class="ft1">抱歉,暫無此類附件!</font></th></tr>
<%
ELSE
sqlstr=vvvsql
rs.open sqlstr,conn,1,1
'給分頁所需的中間變量賦值
rs.PageSize=pgsize
'當前頁轉(zhuǎn)到指定的頁碼
rs.AbsolutePage=curpage
'開始讀取數(shù)據(jù)
dim icn_sex,vlastre,vlink,vttype
FOR i=1 to pgsize
If rs.eof Then
EXIT FOR
End If
'判斷身份或者性別
IF rs("power")>1 THEN
icn_sex="img/icn_adm1.gif"
ELSEIF rs("sex")=True THEN
icn_sex="img/icn_gg.gif"
ELSE
icn_sex="img/icn_mm.gif"
END IF
'總管判斷
if DEF_sysadm=rs("name") then
icn_sex="img/icn_admsys.gif"
end if
%>
<tr><td width="100%" height="42">
<table width="100%" height="25" border="0" cellpadding="0" cellspacing="0" class="rde">
<tr>
<td width="150" align="center" class="rdr">
<a href="fjlist.asp?type=<% =rs("fj_type") %>"><% =fjlb(rs("fj_type")) %></a>
</td>
<td width="140" align="center" class="rdr">
<img src="<% =icn_sex %>" border="0" align="absmiddle">
<a href="viewinfo.asp?id=<% =rs("ID") %>" title="點擊查看該同學詳細資料"><% =rs("fj_owner") %></a>
</td>
<td style="padding-left:12px;" class="rdr">
上傳于:<% =rs("fj_date") %>
</td>
<td width="100" align="center" class="rdr">
<% =rs("fj_size") %>KB
</td>
<td width="50" align="center">
<a href="<% =rs("fj_url") %>" target="_blank">[下載]</a>
</td>
</tr>
</table>
<table width="100%" height="55" border="0" cellpadding="0" cellspacing="0" class="rdd" style="border-bottom-width:6px ">
<tr>
<td width="100%" style="padding:4px ">
<font class="ft1">描述:<% =unhtml(rs("fj_tip")) %></font>
<br>相對地址:<% =rs("fj_url") %>
<br>絕對地址:<% =theurl&rs("fj_url") %>
<div align="right">
<a href="fjdel.asp?id=<% =rs("fj_ID") %>">[刪除]</a>
<a href="fjedit.asp?id=<% =rs("fj_ID") %>">[編輯]</a>
</div>
</td>
</tr>
</table>
</td></tr>
<%
rs.MoveNext
Next
rs.close
END IF
%>
</table>
<table align="center" width="700" height="25" border="0" cellspacing="0" cellpadding="0" style="background-color:<% =bg3 %>;">
<tr>
<td width="100" height="100%">
<a href="fjup.asp">[↑上傳附件]</a>
</td>
<td align="right">
<% call PageQuick() %>
</td>
</tr>
</table>
<table align="center" width="700" height="25" border="0" cellspacing="0" cellpadding="2" style="background-color:<% =bg2 %>;">
<tr>
<td width="100%">
<b>班級總的共享空間:<% =DEF_fjall %>KB 當前已用空間:<% =DEF_fjnow %>KB
<%
if DEF_fjall<1 then
Response.Write "班級總使用率:<font color=red>共享空間已禁用</font>"
else %>
班級總使用率:<font color=red><%
if (DEF_fjnow/DEF_fjall)*100<1 then
vooo="0"
else
vooo=""
end if
Response.Write vooo&FormatNumber(((DEF_fjnow/DEF_fjall)*100),2)
%>%</font>
<%
end if
%></b>
<br> 您的附件空間:<font class="ft1"><% =u_fj_max %>kb</font> 已用空間:<% =u_fj %>kb 剩余空間:<font color=red><% =u_fj_left %>kb</font>
<br>
<%
if u_fj_limit=0 then
Response.Write " 上傳的附件大小限制:<font color=red>無限制</font>"
else
Response.Write " 上傳的附件大小限制:<font color=red>"&u_fj_limit&"kb</font>,"
end if
if DEF_fjfen=0 then
%>
(原限制為:無)
<%
else
%>
(原限制為:<% =DEF_fjfen %>kb)
<%
end if
%>
<br> 您的允許格式:<font class="ft1"><% =u_sup %></font>
</td></tr>
</table>
<!--插入在線統(tǒng)計-->
<!--#include file="in_online.asp"-->
<!--插入網(wǎng)站置底-->
<!--#include file="in_bottom.asp"-->
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -