viewinfo.asp

来自「网站代码」· ASP 代码 · 共 416 行 · 第 1/2 页

ASP
416
字号
                    <TD></TD>
                  </TR>
                </TBODY>
              </TABLE></TD>
            <TD vAlign=top align=left width=580 id="Right_width" style="width:580px">
<%
set rs=server.createobject("adodb.recordset")
sqltext="select top 1 * from Info where Id="&request("id")&""
rs.open sqltext,conn,1,1
do while not rs.eof 
InfoID=rs("Id")
Discussion=rs("Discussion")
Title=rs("Title")
%>
                    <TABLE cellSpacing=0 cellPadding=0 width="100%" align=center border=0>
                      <TBODY>
                        <TR> 
                          <TD> <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
                              <TBODY>
                                <TR> 
                                  <TD> <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
                                      <TBODY>
                                        <TR> 
                                          <TD width="9%" background=Img/homedhbg.gif 
                            height=34><img src="Img/tp.gif" width="55" height="34"></TD>
                                          <TD width="79%" 
                            background=Img/homedhbg.gif><div align="center"><b><%=Title%></b></div></TD>
                                          
                                    <TD width="150" 
                            background=Img/homedhbg.gif>&nbsp;&nbsp;<span style="cursor:hand" Id="ShowHiddenHtmlEdit" Title="显示/隐藏" onClick="if(trNewsContent.style.display==''){trNewsContent.style.display='none';Right_width.style.width='778Px';ShowHiddenHtmlEdit.innerHTML='显示左栏'}else{trNewsContent.style.display='';ShowHiddenHtmlEdit.innerHTML='隐藏左栏'}">隐藏左栏</span></TD>
                                        </TR>
                                      </TBODY>
                                    </TABLE></TD>
                                </TR>
                                <TR> 
                                  <TD height="161"> <TABLE style="WORD-BREAK: break-all" cellSpacing=0 
                        cellPadding=0 width="100%" border=0>
                                      <TBODY>
                                        <TR> 
                                          <TD height="10" vAlign=top></TD>
                                        </TR>
                                        <TR> 
                                          <TD height="91" vAlign=top> 
                                            <%
if Session("Grade")="" then 
Grade=0
else 
Grade=Session("Grade")+1
end if
if Grade>=RS("ReadGrade") then 
Call ReadContent()
Call Discu()
else
Call ReadErro()
end if %>
                                          </TD>
                                        </TR>
                                      </TBODY>
                                    </TABLE></TD>
                                </TR>
                              </TBODY>
                            </TABLE></TD>
                        </TR>
                      </TBODY>
                    </TABLE>
                    <%       
rs.movenext             
loop
%>
                    <TABLE cellSpacing=0 cellPadding=0 width="100%" align=center border=0>
                      <TBODY>
                        <TR> 
                          <TD width="54%" height=34 align="right" background=Img/homedhbg.gif>&nbsp;</TD>
                          <TD width="46%" align="right" background=Img/homedhbg.gif><a href='javascript:history.back()'>&lt;&lt; 
                            后退</a>&nbsp;&nbsp;<a href="javascript:window.scroll(0,-360)">返回顶部</a>&nbsp;&nbsp;<a href="javascript:window.close()">关闭窗口</a>&nbsp;&nbsp;</TD>
                        </TR>
                      </TBODY>
                    </TABLE>
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                      <tr> 
                        <td height="8"> </td>
                      </tr>
                    </table>
			</TD>
          </TR>
        </TBODY>
      </TABLE></td>
  </tr>
</table>
<!--#include file="Bottom.asp" -->
</body></html>

<% sub ReadContent()%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
 <tr> 
<td><div align="center"> 添加时间:<%=rs("date")%>&nbsp;&nbsp; 作者: 
<%if not isnull(rs("writer")) then%>
<%=rs("writer")%> 
<%else%>
未知 
<%end if%>
&nbsp;&nbsp;来源: 
<%if not isnull(rs("writefrom")) then%>
<%=rs("writefrom")%> 
<%else%>
未知 
<%end if%>
&nbsp;&nbsp;录入:<font color="#FF0000"><%=rs("author")%></font> 阅读次数:<font color="#FF0000"><%=rs("hits")%></font> </div></td>
 </tr>
</table>
<hr size="1" width="98%">
<table width="100%" border="0" align="center" cellpadding="5" cellspacing="4" style="word-break:break-all" oncopy="return false;" oncut="return false;">
<tr> 
<td width="100%" height="54" style="word-break:break-all"><%=RS("content")%></td>
</tr>
</table>
<% end sub %>
<% sub ReadErro()%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="32">
<div align="center"><font color="#FF0000">您的浏览权限不够!</font><br>
        这条信息要
<font color=red><%if rs("ReadGrade")=1 then%> 
注册用户
<%end if%>
<%if rs("ReadGrade")=2 then%> 
 VIP 用户
<%end if%>
</font>
才能游览!
</div></td>
</tr>
</table>
<% end sub %>

<%
sub Discu()
if Discussion=true  then
%>

                  <TABLE cellSpacing=0 cellPadding=0 width="100%" align=center border=0>
                  <TBODY>
                    <TR> 
                      <TD width="34" height=34 align="right" background=Img/homedhbg.gif><img src="Img/tp.gif" width="55" height="34"></TD>
                      <TD width="80%" align="right" background=Img/homedhbg.gif><div align="left">相关评论</div></TD>
                      <TD width="11%" align="right" background=Img/homedhbg.gif><a href="Review.asp?InfoID=<%=InfoID%>">More...</a></TD>
                    </TR>
                  </TBODY>
                </TABLE>
                  
                <table width="100%" border="0" cellspacing="0" cellpadding="5">
                  <form name="form1" method="post" action="Review.asp?Action=save"><tr>
                      <td width="45%" height="91" Valign="top">
<%
sqld="select top 3 * from Review where InfoID="&InfoID&" ORDER BY ReTime DESC"
Set rs2=Conn.execute(sqld)
if rs2.bof and rs2.eof then 
response.Write("暂无评论!")
end if 
do while not rs2.eof    
%>
<table width="100%" border="0" cellspacing="1" cellpadding="0">
                          <tr> 
                            <td height="21" colspan="2">网友:<%=rs2("Reply")%>&nbsp;&nbsp;Email:<a href="mailto:<%=rs2("UserEmail")%>"><%=rs2("UserEmail")%></a> </td>
                          </tr>
                          <tr> 
                            <td height="21" colspan="2">评论:<%=rs2("Content")%></td>
                          </tr>
                          <tr>
                            <td height="1" colspan="2" bgcolor="#CCCCCC"></td>
                          </tr>
                        </table>
<%       
rs2.movenext             
loop
%>
</td>
<td width="55%" Valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
                          <tr> 
                            <td height="21" colspan="3">
							
<div align="center">欢迎大家发表自己的高见!(<font color="#FF0000">不支持HTML</font>)<input name="InfoID" type="Hidden" value="<%=InfoID%>"><input name="Title" type="Hidden" value="<%=Title%>">
                              </div></td>
                          </tr>
                          <tr> 
                            <td width="14%" height="23"> <div align="right">网名: 
                              </div></td>
                            <td width="27%" height="23"> <input name="Reply" type="text" id="Reply" value="<%=Session("Pw_Sys_User")%>" size="8" style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; COLOR: rgb(0,0,0); BORDER-BOTTOM: rgb(0,0,0) 1px solid"></td>
                            <td width="59%">邮件: 
                              <input name="UserEmail" type="text" id="UserEmail" value="<%=Session("UserEmail")%>" size="18" style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; COLOR: rgb(0,0,0); BORDER-BOTTOM: rgb(0,0,0) 1px solid"></td>
                          </tr>
                          <tr> 
                            <td height="23"> <div align="right">评论:</div></td>
                            <td height="23" colspan="2"> <textarea name="Content" cols="35" rows="4" id="Content"></textarea></td>
                          </tr>
                          <tr> 
                            <td height="23"> <div align="right">发表:</div></td>
                            <td height="23" colspan="2"> <input type="submit" name="Submit" value=" 提交 "> 
                              &nbsp;&nbsp; <input name="Reset" type="reset" id="Reset" value=" 重来 ">
                            </td>
                          </tr>
                        </table></td>
                    </tr> </form>
                  </table>
<% end if %>
<% end sub %>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?