📄 read.asp
字号:
<%
Option Explicit
dim conn,connpic,DBPath
dim rs_lar,rspic,rs_apply,rs_friend
dim user_id,sql,willstr
dim picid,cur,pics
'叛断Session变量是否超时
if isempty(session("user_id")) or session("user_id")="" then
response.redirect "timeout.htm"
end if
user_id=request("user_id")
'-----------------------------------------------------------------
Set conn = Server.CreateObject("ADODB.Connection")
DBPath = Server.MapPath("friend.mdb")
conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DBPath
'-----------------------------------------------------------------
Set rs_lar = Server.CreateObject("ADODB.Recordset")
sql="select * from larchives where user_id=" & user_id
rs_lar.open sql,conn,3,2
Set connpic = Server.CreateObject("ADODB.Connection")
DBPath = Server.MapPath("pic.mdb")
connpic.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DBPath
Set rspic = Server.CreateObject("ADODB.Recordset")
sql="select * from pic where user_id=" & user_id
rspic.open sql,connpic,1,1
set rs_apply=server.createobject("adodb.recordset")
sql="select * from apply where for_id=" & user_id & " and user_id=" & session("user_id")
rs_apply.open sql,conn,1,1
if not(rs_apply.eof and rs_apply.bof) then
willstr=rs_lar("netname") & "已向您发出交友请求"
end if
rs_apply.close
set rs_apply=nothing
set rs_friend=server.createobject("adodb.recordset")
sql="select * from friend where (for_id=" & session("user_id") & " and user_id=" & user_id & ") or (for_id=" & user_id & " and user_id=" & session("user_id") & ")"
rs_friend.open sql,conn,1,1
if not(rs_friend.eof and rs_friend.bof) then
willstr=rs_lar("netname") & "是您的好友"
end if
rs_friend.close
set rs_friend=nothing
set rs_apply=server.createobject("adodb.recordset")
sql="select * from apply where user_id =" & session("user_id") & " and for_id=" & user_id
rs_apply.open sql,conn,1,1
if not(rs_apply.eof and rs_apply.bof) then
willstr="您已向" & rs_lar("netname") & "发出交友请求"
end if
rs_apply.close
set rs_apply=nothing
if rspic.eof and rspic.bof then
picid=1
cur=1
else
rspic.pagesize=1
cur=request("cur")
if cur="" or clng(cur)<1 then cur=1
if clng(cur)>rspic.pagecount then cur=rspic.pagecount
rspic.absolutepage=cur
picid=rspic("id")
end if
pics=rspic.recordcount
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Namo WebEditor v4.0(Trial)">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>蓝芒工作室-个人档案</title>
<style>
<!--
.x:link { color: white; text-decoration: none }
.x:visited { color: white; text-decoration: none }
.x:active { color: red; text-decoration: none }
.x:hover { color: red;text-decoration:nome}
tr { font-size: 10pt }
body { font-size: 10pt }
a:link { color: blue; text-decoration: none }
a:visited { color: blue; text-decoration: none }
a:active { color: red; text-decoration: none }
a:hover { color: red; text-decoration: none }
-->
</style>
<script language="JavaScript">
<!--
function MM_findObj(n, d) { //v3.0
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}
function MM_showHideLayers() { //v3.0
var i,p,v,obj,args=MM_showHideLayers.arguments;
for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
obj.visibility=v; }
}
//-->
</script>
</head>
<body>
<table border="0" width="100%">
<tr>
<td width="738" height="88"><div align="center"><table border="0" cellpadding="0" cellspacing="0" width="100%"
height="13" bgcolor="black" scrolling="no">
<tr>
<td width="281"><p><font color="white"><marquee>天翔网 </font><a href="http://www.wzsky.com"
target="_blank"><font color="yellow">http://www.wzsky.com</font></a><font
color="white"> </font><a href="http://"><font
color="white">欢迎您的光临!</font></a></marquee></td>
</tr>
</table></div>
<table border="0" cellpadding="0" cellspacing="0" width="100%"
height="80" bgcolor="#A5EF00">
<tr>
<td width="253" height="88" bgcolor="#99CC00"><p align="center"> <img src="image/TOP.jpg" width="186"
height="73" border="0" alt="天翔网"></td>
<td width="506" height="88" bgcolor="#99CC00"><p align="left"><a href="http://www.wzsky.com" target="_blank"><img src="images/sky.jpg"
width="468" height="60" border="0"></a></td>
<td width="17" height="88" bgcolor="#99CC00"><p> </td>
</tr>
</table><div align="center"><table border="0" cellpadding="0" cellspacing="0" width="100%"
height="19" bgcolor="#A5EF00">
<tr>
<td width="240" bgcolor="#99CC00"><p><img src="images/top_left_a.gif"
width="240" height="19" border="0"></td>
<td width="532" bgcolor="#99CC00"><p align="right"><span style="BACKGROUND-COLOR: #99cc00"><img src="images/top_left_z.gif"
border="0" usemap="#FPMap1"></span></td>
</tr>
</table><table border="0" cellpadding="0" cellspacing="0" width="100%"
height="21" background="images/top_bg.gif">
<tr>
<td width="401" height="5"></td>
<td width="374" height="5"><p><img src="images/nav.gif" width="370" height="21"
border="0" usemap="#FPMap2"></td>
</tr>
</table></div>
</td>
</tr>
</table>
<p><div id="layer1" style="width:40px; height:372px; position:absolute; left:10px; top:164px; z-index:2; visibility:visible;">
<img border="0" src="image/gif/ooooooo.gif" width="28" height="372">
</div>
<!--------------------->
<div id="layer2" style="width:765px; height:216px; position:absolute; left:14px; top:3px; z-index:1; visibility:hidden;">
<table border="0" width="761" height="216" cellspacing="0" cellpadding="0">
<tr bordercolor="#FFFFFF">
<td width="624" valign="top" align="left">
<div align="center">
<center>
<table border="0" width="122%" height="181" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" height="151" valign="top" align="center"><a href="" onclick="return false" ><img name="big" src="display.asp?id=<%=picid%>" onclick="MM_showHideLayers('layer2','','hide');MM_showHideLayers('layer','','show');MM_showHideLayers('layer1','','show');return false;" border="0"></a>
</td>
</tr>
<tr>
<td width="100%" height="12" valign="top" align="center"> </td>
</tr>
</table>
</center>
</div>
</td>
</tr>
</table>
</div>
<div id="layer" style="width:765px; height:531px; position:absolute; left:11px; top:163px; z-index:0; visibility:visible;">
<!------------------------------------------------------------------------------------------------------------------------------>
<!--------------------------------------------------------------------------------------------->
<table border="0" width="750" height="216" cellspacing="0" cellpadding="0" align="left">
<tr>
<td width="6" height="210" valign="middle"> </td>
<td width="28" height="210" valign="top" bgcolor="#FFCC99"> <font size="2"> </font>
</td>
<td width="712" height="216" valign="top" bgcolor="#F1F1F1" style="border-right-style: solid; border-right-width: 1; border-bottom-style: solid; border-bottom-width: 1" bordercolor="#F4F4F4">
<!------------------------------------------------------------------------------------------>
<table border="0" width="706" height="15" cellspacing="0" cellpadding="0">
<tr>
<td width="21" height="8"> </td>
<td width="678" height="8" colspan="5"></td>
<td></td>
</tr>
<tr>
<td width="21" height="6"></td>
<td width="678" height="6" colspan="5"><%=rs_lar("name")%><font color="#1FC41F"><b>个人档案</b></font></td>
<td></td>
</tr>
<tr>
<td width="21" height="223" valign="top">___</td>
<td width="39" height="212" valign="top"> <!--------------------------------------------------------------------------------------------->
<table border="0" width="74%" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" bgcolor="#F1F1F1" valign="bottom" align="center">
<%if pics<>0 then%><a href="read.asp?user_id=<%=user_id%>&cur=<%=cur-1%>" title="查看上一张相片">←</a><%end if%>
<%if cur=1 then%> <%if pics=0 then%> <font color="#FF9900">还没有上传相片</font>
<%else%> <font color="#FF9900">有相片<font color="red"><%=pics%></font>张</font>
<%end if%> <%else%> <font color="#FF9900">第<font color="red"><%=cur%></font>张</font>
<%end if%> <%if pics<>0 then%><a href="read.asp?user_id=<%=user_id%>&cur=<%=cur+1%>" title="查看下一张相片">→</a><%end if%>
</td>
</tr>
<tr>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -