📄 showinfo.asp
字号:
<!-- #include file="conn.asp" -->
<%
username=trim(Request.Form("username"))
userpass=trim(Request.Form("userpass"))
if username<>"" and userpass<>"" then
exec_index="select * from [user] where user_name='"&username&"' and user_pass='"&userpass&"'"
set rs=server.createobject("adodb.recordset")
rs.open exec_index,conn,1,3
if not rs.eof then
userip = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
If userip = "" Then userip = Request.ServerVariables("REMOTE_ADDR")
rs("user_ip")=userip
rs("user_lastlogintime")=now()
rs.update
session("user")=username
else
%>
<SCRIPT Language=javascript>
<!--
window.alert("用户名或密码错误!!");
-->
</SCRIPT>
<%
end if
rs.close
end if
%>
<html>
<head>
<TITLE>中国人民大学二手交易网-信息详情</TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<link rel="stylesheet" href="css.css">
<body leftMargin=0 topMargin=0 marginwidth="0" marginheight="0">
<table width="760" border="1" align="center" cellpadding="0" cellspacing="0">
<tr>
<td colspan="3"><!-- #include file="head.asp" --></td>
</tr>
<tr>
<td height="25" colspan="3"><!-- #include file="menu.asp" --></td>
</tr>
<tr valign="top">
<%
if session("user")="" then
%>
<td width="192" height="150">
<!-- #include file="left.asp" --></td>
<%
else
%>
<td width="192" height="150">
<!-- #include file="left_user.asp" --></td>
<%
end if
%>
<td height="570" width="570" rowspan="2" colspan="2">
<%
infoid=request.QueryString("id")
if infoid<>"" then
exec_show="select * from info,bclass,sclass where info_id="&infoid&" and info_sclass=sclass_id and info_bclass=bclass_id"
set rs=server.createobject("adodb.recordset")
rs.open exec_show,conn,1,1
if not rs.eof then
%>
<table width="570" border="0" cellpadding="0" cellspacing="0" bordercolor="#999999">
<tr>
<td height="25" align="right"> </td>
<td> </td>
</tr>
<tr>
<td align="right">信息种类: </td>
<td>
<%
if rs("info_kind")="求" then
%>
求购
<%
else
%>
出售
<%
end if
%>
</td>
</tr>
<tr>
<td height="25" align="right">信息分类: </td>
<td><%=rs("bclass_name")%> ---- <%=rs("sclass_name")%></td>
</tr>
<tr>
<td height="25" align="right">价格: </td>
<%
if rs("info_price")<>0 then
%>
<td><%=rs("info_price")%> 元</td>
<%
else
%>
<td>-</td>
<%
end if
%>
</tr>
<tr>
<td height="25" align="right">发布人: </td>
<td><%if session("user")<>"" then%><a href='p_write.asp?action=reply&sender=<%=rs("info_user")%>'><%=rs("info_user")%></a><%else response.write rs("info_user") end if%></td>
</tr>
<tr>
<td height="25" align="right">信息标题: </td>
<td><%=rs("info_title")%></td>
</tr>
<tr valign="top">
<td height="25" align="right">信息内容: </td>
<td><textarea name="textarea" cols="60" rows="10" readonly="readonly"><%=rs("info_intro")%></textarea></td>
</tr>
<tr>
<td height="25" align="right">起始日期: </td>
<td><%=rs("info_date")%></td>
</tr>
<tr>
<td height="25" align="right">有效期: </td>
<td><%=rs("info_expiredays")%> 天</td>
</tr>
<tr>
<td height="25" align="right">剩余天数: </td>
<td><%=rs("info_expiredays")-datediff("d",rs("info_date"),date())%> 天</td>
</tr>
<tr>
<td height="25" align="right">手机/电话: </td>
<td><%=rs("info_phone")%></td>
</tr>
<tr>
<td height="25" align="right">信息状态: </td>
<td><%=rs("info_status")%></td>
</tr>
<tr>
<td height="25" align="right">查看图片: </td>
<td>
<%if rs("info_pic")<>"" then%>
<a href="<%=rs("info_pic")%>" target=blank><font color="#FF0000">点击查看图片</font></a>
<%else%>
此信息无图片
<%end if%>
</td>
</tr>
<tr>
<td height="25" align="right">提示:</td>
<td> </td>
</tr>
<tr>
<td height="25" align="right">1.</td>
<td> 点击用户名可以发小纸条,不过只有注册用户登录后才能使用</td>
</tr>
<tr>
<td height="25" align="right"> </td>
<td> </td>
</tr>
<tr>
<td height="25" align="right"> </td>
<td> </td>
</tr>
</table>
<%
else
%>
<table width="500" border="1" cellpadding="0" cellspacing="0" bordercolor="#999999">
<tr>
<td>错误</td>
<td>不存在这个id</td>
</tr>
</table>
<%
end if
else
%>
<table width="500" border="1" cellpadding="0" cellspacing="0" bordercolor="#999999">
<tr>
<td>错误</td>
<td>不存在这个id</td>
</tr>
</table>
<%
end if
rs.close
%>
</td>
</tr>
<tr>
<td valign="top">
<!-- #include file="left_bottom.asp" -->
</td>
</tr>
<tr>
<td height="55" colspan="3"><!-- #include file="foot.asp" --></td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -