📄 fjseek_result.asp
字号:
<!--插入html头部分以及数据库接口-->
<!--#include file="in_conn.asp"-->
<body>
<!--插入网站置顶-->
<% if u_name="" then
Response.Redirect "log_err.asp"
else
%>
<!--#include file="in_topmb.asp"-->
<% 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>
<%
'分页的统计
dim rdcount,pgcount,pgsize
pgsize=10
'获取传值
dim curpage
dim curowner,fndtip,fndowner
fndtip=""
fndowner=""
curpage=Request.QueryString("page")
curowner=trim(CStr(Request.QueryString("owner")))
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,tipseek,vvvand
IF curowner<>"" THEN
vvvhttp="fjseek_result.asp?owner="&curowner&"&"
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_owner='"&stryin(curowner)&"' ORDER BY f.fj_ID DESC"
'统计
rdcount=conn.Execute("SELECT COUNT(fj_ID) FROM tblfj WHERE fj_owner='"&curowner&"'",0,1)(0)
pgcount=Abs(Int(rdcount/pgsize*(-1)))
tipseek="以下列出:<b>"&curowner&"</b>的所有附件,共有<font color=red>"&rdcount&"</font>个"
ELSE
if trim(Request.QueryString("fjer"))="" AND trim(Request.QueryString("fjtip"))="" then
fndtip=trim(Request.Form("txttip"))
fndowner=trim(Request.Form("txtowner"))
else
fndtip=trim(Request.QueryString("fjtip"))
fndowner=trim(Request.QueryString("fjer"))
end if
if fndtip="" AND fndowner="" then
Response.Redirect("resp.asp?cmd=seeknotkey")
elseif Len(fndtip)>0 AND Len(fndowner)>0 then
vvvand=" f.fj_owner LIKE '%"&stryin(fndowner)&"%' AND f.fj_tip LIKE '%"&stryin(fndtip)&"%' "
elseif Len(fndtip)>0 then
vvvand=" f.fj_tip LIKE '%"&stryin(fndtip)&"%' "
elseif Len(fndowner)>0 then
vvvand=" f.fj_owner LIKE '%"&stryin(fndowner)&"%' "
end if
vvvhttp="fjseek_result.asp?fjer="&fndowner&"&fjtip="&fndtip&"&"
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 "&vvvand&" ORDER BY f.fj_ID DESC"
'统计
rdcount=conn.Execute("SELECT COUNT(fj_ID) FROM tblfj AS f WHERE "&vvvand,0,1)(0)
pgcount=Abs(Int(rdcount/pgsize*(-1)))
tipseek="以下列出:描述关键字'<b>"&fndtip&"</b>'、上传者关键字'<b>"&fndowner&"</b>' 的所有相关附件,共有<font color=red>"&rdcount&"</font>个"
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
'定义显示快捷页个数
colnum=5
colmid=colnum\2
'生成快捷页的函数
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="25" border="0" cellspacing="0" cellpadding="0">
<tr><td width="100%">
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0" class="rde">
<tr>
<td width="100%" height="25">
<% =tipseek %>
</td>
</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>
<br><a href='javascript:history.go(-1);'>[点击这里<Font color=red>返回</Font>]</a><br>
</th></tr>
<%
ELSE
sqlstr=vvvsql
rs.open sqlstr,conn,1,1
'给分页所需的中间变量赋值
rs.PageSize=pgsize
'当前页转到指定的页码
rs.AbsolutePage=curpage
'开始读取数据
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>
<!--插入在线统计-->
<!--#include file="in_online.asp"-->
<!--插入网站置底-->
<!--#include file="in_bottom.asp"-->
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -