📄 l_user.asp
字号:
<!--#include file="top.asp"-->
<%
if session("uid")="" then
response.Redirect"error.asp"
end if
pname=request("pname")
set rs2=server.CreateObject("adodb.recordset")
sql2="select * from puser where uid='"& pname &"'"
rs2.open sql2,conn,1,3
if rs2.bof and rs2.eof then
response.Write"<div align=""center""><font color=""#FF0000"" size=""3""><strong>对不起!本站无此用户</strong></font></div>"
else
%>
<SCRIPT language="javascript">
<!--
function del_space(s)
{
for(i=0;i<s.length;++i)
{
if(s.charAt(i)!=" ")
break;
}
for(j=s.length-1;j>=0;--j)
{
if(s.charAt(j)!=" ")
break;
}
return s.substring(i,++j);
}
function VerifySubmit()
{
jsr = del_space(document.all("jsr").value);
if (jsr.length == 0)
{
alert("你忘了填写接收人姓名");
return false;
}
fbr = del_space(document.all("fbr").value);
if (fbr==jsr)
{
alert("不允许自己给自己发信件");
return false;
}
bt = del_space(document.all("bt").value);
if (bt.length == 0)
{
alert("您忘了填写信件标题");
return false;
}
nr = del_space(document.all("nr").value);
if (nr.length == 0)
{
alert("您忘了填写信件内容");
return false;
}
nr = del_space(document.all("nr").value);
if (nr.length > 300)
{
alert("内容不能大于300字");
return false;
}
return true;
}
//-->
</SCRIPT>
<TABLE cellSpacing=0 cellPadding=0 width=760 align=center bgColor=#ffffff border=0>
<TBODY>
<TR vAlign=top>
<TD width=180>
<TABLE height=62 cellSpacing=0 cellPadding=0 width="100%" border=0>
<TR>
<TD><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="3%"><img src="images/left_01.gif" width="27" height="23"></td>
<td width="94%" background="images/left_02.gif">热门房源</td>
<td width="3%"><img src="images/left_03.gif" width="58" height="23"></td>
</tr>
</table></TD>
</TR>
<TR>
<TD align=middle width="180" background=images/m-b.gif bgColor=#ffffff height=20><table width="100%" border="0" cellspacing="0" cellpadding="3">
<% set rsHTOP=server.createobject("adodb.recordset")
sqlHTOP="select top 10 * from house order by FW_lls desc"
rsHTOP.open sqlHTOP,conn,3,3
for i=1 to 10 %>
<tr>
<td width="10%"><div align="center"><img src="images/dian04.gif" width="11" height="11"></div></td>
<td width="90%"><font size="2"> <a href="h_open.asp?id=<% =rsHTOP("id") %>">
<% =left(rsHTOP("fw_dizhi"),10)%>
<% if len(rsHTOP("fw_dizhi")) > 10 then
response.Write"..."
end if%>
</a></font></td>
</tr>
<% rsHTOP.movenext
if rsHTOP.eof then exit for
next
rsHTOP.close %>
</table></TD>
</TR>
<TR>
<TD height=19 vAlign=center background="images/left_04.gif" bgColor=#ffffff> </TD>
</TR>
</TABLE>
<TABLE height=62 cellSpacing=0 cellPadding=0 width="100%" border=0>
<TR>
<TD><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="3%"><img src="images/left_01.gif" width="27" height="23"></td>
<td width="94%" background="images/left_02.gif">热点新闻</td>
<td width="3%"><img src="images/left_03.gif" width="58" height="23"></td>
</tr>
</table></TD>
</TR>
<TR>
<TD align=middle width="180" background=images/m-b.gif bgColor=#ffffff height=20>
<table width="100%" border="0" cellspacing="0" cellpadding="3">
<% set rsTOP=server.createobject("adodb.recordset")
sqlTOP="select top 10 * from news order by lls desc"
rsTOP.open sqlTOP,conn,3,3
for i=1 to 10 %>
<tr>
<td width="10%"><div align="center"><img src="images/dian04.gif" width="11" height="11"></div></td>
<td width="90%"><a title="内容介绍:<% =left(rsTOP("nr"),15) %>..." href=open.asp?xiangxi=<% =rsTOP("id") %>>
<% =left(rsTOP("bt"),9) %>
</a> </td>
</tr>
<% rsTOP.movenext
if rsTOP.eof then exit for
next
rsTOP.close %>
</table></TD>
</TR>
<TR>
<TD height=19 vAlign=center background="images/left_04.gif" bgColor=#ffffff> </TD>
</TR>
</TABLE>
</TD>
<TD width=6 bgColor=#ffffff> </TD>
<TD><TABLE width="100%" border=0 cellPadding=0 cellSpacing=0 borderColor=#111111 style="BORDER-COLLAPSE: collapse">
<TBODY>
<TR>
<TD width="100%"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="1%"><img src="images/cent_01.gif" width="37" height="20"></td>
<td width="95%" valign="bottom" background="images/cent_02.gif"><font color="#3366CC">
<% =rs2("uid") %>
</font> 的个人资料</td>
<td width="4%"><img src="images/cent_03.gif" width="51" height="20"></td>
</tr>
</table></TD>
</TR>
<TR>
<TD height="210" valign="top">
<DIV align=center>
<table width="100%" border="1" cellpadding="0" cellspacing="1" bordercolor="#FFA805">
<tr>
<td height="23" align="right" bgcolor="#FFF1D4"><div align="center">真实姓名:</div></td>
<td height="23" bgcolor="#FFF1D4">
<% =rs2("uname") %>
</td>
</tr>
<tr>
<td width="23%" height="23" align="right" bgcolor="#FFA805"><div align="center">性
别: </div></td>
<td width="77%" height="23" bgcolor="#FFA805">
<% =rs2("xb") %>
</td>
</tr>
<tr>
<td height="23" align="right" bgcolor="#FFF1D4"><div align="center">Email:</div></td>
<td height="23" bgcolor="#FFF1D4">
<a href="mailto:<% =rs2("email") %>"><% =rs2("email") %></a>
</td>
</tr>
<tr>
<td height="23" align="right" bgcolor="#FFA805"><div align="center">联系电话:</div></td>
<td height="23" bgcolor="#FFA805">
<% if session("VIP")< 888 or session("VIP")="" then
response.Write"<font color=""#FF0000"">对不起!您的权限不够</font>"
else%>
<% =rs2("tel") %>
<% end if %>
</td>
</tr>
<tr>
<td height="23" align="right" bgcolor="#FFF1D4"><div align="center">发布信息数量:</div></td>
<td height="23" bgcolor="#FFF1D4">
<% set uhouse=conn.execute("Select count(*) as uhouse1 From house where fw_uid='"&pname&"'") %>
<font color="#FF9933">
<% =uhouse("uhouse1") %>
</font> 条</td>
</tr>
</table>
<TABLE width="100%" border=1 align="center" cellPadding=2 cellSpacing=1 borderColor=#ffffff bgColor=ff9900>
<form name="regform" onSubmit="return VerifySubmit()" method="post" action="user_messageWR.asp">
<TR align=middle borderColor=ff9900 bgColor=a3e0a3>
<TD colspan="2"><b><font color="#FFFFFF">给
<% =rs2("uid") %>
发送站内信件 </font></b></TD>
</TR>
<TR bgcolor="#FFFFFF">
<TD width="15%" height=30 align=middle class=htd><div align="left">接
收 人:</div></TD>
<TD width="88%" align=middle class=htd><div align="left">
<input name="jsr" type="text" id="jsr" value="<% =rs2("uid") %>">
<font color="#FF0000">*</font></div></TD>
</TR>
<TR bgcolor="#FFFFFF">
<TD height=30 align=middle class=htd><div align="left">信件主题:</div></TD>
<TD height=30 align=middle class=htd><div align="left">
<input name="bt" type="text" id="bt2">
<font color="#FF0000">*</font></div></TD>
</TR>
<TR bgcolor="#FFFFFF">
<TD height=30 align=middle class=htd><div align="left">信件内容:
<br>
<br>
≤300 </div></TD>
<TD height=30 align=middle class=htd><div align="left">
<textarea name="nr" cols="70" rows="8" id="textarea"></textarea>
<font color="#FF0000">*</font> </div></TD>
</TR>
<TR>
<TD height=30 colspan="2" align=middle bgColor=#ededed class=htd><div align="center">
<input type="submit" name="Submit" value="发送信件">
<input name="fbr" type="hidden" id="fbr" value="<% =session("uid") %>">
</div></TD>
</TR>
</form>
</TABLE>
<br>
<TABLE width="100%" border=0 cellPadding=0 cellSpacing=0 borderColor=#111111 background="images/c-b.gif" style="BORDER-COLLAPSE: collapse">
<TR>
<TD><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="1%"><img src="images/cent_01.gif" width="37" height="20"></td>
<td width="95%" valign="bottom" background="images/cent_02.gif"><font color="#3366CC">该用户所发布的信息</font></td>
<td width="4%"><img src="images/cent_03.gif" width="51" height="20"></td>
</tr>
</table></TD>
</TR>
<TR>
<TD><DIV align=center>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<% ppname=request("pname")
set rs=server.createobject("adodb.recordset")
sql="select * from house where fw_uid='"& ppname &"' order by id desc"
rs.open sql,conn,1
rs.pagesize=15 '每页显示多少条
pagecount=rs.pagecount '总页数
if rs.bof and rs.eof then
response.write "此用户暂无发布任何信息"
else
page=clng(request.querystring("page"))
if page<1 then page=1
if page>rs.pagecount then page=rs.pagecount
rs.absolutepage=page '跳到多少页
for i=1 to rs.pagesize
%>
<TR>
<TD width="11%"> <img src="images/006.gif" width="8" height="10"><font size="2">
<% =rs("mytype")%>
</font></TD>
<TD align=right width="13%"><div align="center"><font size="2">
<% =rs("fw_quyu")%>
</font></div></TD>
<TD align=left width="16%"><div align="center"><font size="2">
<% =rs("fw_jiegou")%>
</font></div></TD>
<TD align=middle width="20%"> <div align="center"><font size="2">
<% =rs("fw_jiage") %><% =rs("fw_jiageLX") %>
</font></div></TD>
<TD align=left width="10%"><div align="center"><font color="#666666" size="2">
<% =rs("fw_lls") %>
</font></div></TD>
<TD align=left width="18%"><div align="center"><font color="#666666" size="2">
<% =rs("fw_fbri") %>
</font></div></TD>
<TD align=left width="12%"><div align="center"><a href="h_open.asp?id=<%=rs("id")%>">查看</a>
</div></TD>
</TR>
<%
rs.movenext
if rs.eof then exit for
next
end if
%>
</TABLE>
</DIV></TD>
</TR>
<TR>
<TD><div align="right"><img src="images/more_01.gif" width="29" height="9">
<%
r=7
'总页数
zys=round(clng(rs.pagecount)/r+0.5)
'当前页数
dqys=request.QueryString("dqys")
'开始页
ksy=request.QueryString("ksy")
if dqys="" then dqys=1
if ksy="" then ksy=1
js=clng(dqys) * r '一个FOR语句结束
if js > clng(rs.pagecount) then js=clng(rs.pagecount)
newksy= clng(dqys)*r-(r-1) '一个FOR语句开始
if clng(dqys) >1 then response.write "<a href=?dqys="& dqys-1 &"&pname="&ppname&">" &"上一页" &"</a>"
for t=newksy to js
response.write "<a href=?page=" &t&"&dqys="&dqys&"&pname="&ppname&">" &t& "</a> "
next
if cdbl(dqys)< zys then response.write "<a href=?dqys="& dqys+1 &"&pname="&ppname&">" &"下一页" &"</a>"
%>
</div></TD>
</TR>
<TR>
<TD width="100%" height=0 align=right background="images/c-dl.gif"></TD>
</TR>
</TABLE>
</DIV></TD>
</TR>
</TBODY>
</TABLE>
</TD>
</TR>
</TBODY>
</TABLE>
<!--#include file="let.asp"--><%end if%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -