📄 articlecontent.jsp
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<%@ page import="java.util.*"%>
<!--
┌─ 深度学习之IT学习网 ─────── www.ITstudy.cn ────┐
│
│ 感谢你使用 深度学习之IT学习网
│ 本代码完全公开和免费,你可以任意复制、传播、修改和使用,
│ 但不得公开发表代码 不得用做商业用途,不得向其他使用者收费。
│
│ 使用时,请保留此段信息,谢谢配合
│
│ 作者:吕海鹏 2006/6/18
│
└────────────────── www.DeepTeach.com ───┘
-->
<!--#include file="DT_Inc/SQL_injection.jsp"-->
<%@include file="ConnDB.jsp"%>
<!--#include file="DT_Inc/Function.jsp"-->
<!--#include file = "DT_Inc/Editor/Include/DeCode.asp"-->
<%
//网站配置
//创建语句对象
Statement stmt=conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
String sql = "select * from tSiteConfig";
ResultSet RsSiteConfig = stmt.executeQuery(sql);
RsSiteConfig.next();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta name="keywords" content="<%=RsSiteConfig.getString("fMetaKeywords")%>" />
<meta name="description" content="<%=RsSiteConfig.getString("fMetaDescription")%>" />
<title><%=RsSiteConfig.getString("fSiteTitle")%></title>
<link rel="icon" href="favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<link href="Style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<%@include file="index_Top.jsp"%>
<table width="995" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td width="230" valign="top"><br />
<%@include file="Announce.jsp"%>
<br />
<table width="220" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#FF0000">
<tr>
<td height="36" valign="middle" background="images/index-left2-1.gif" bgcolor="#FFFFFF"><div align="center" class="glow_white">论坛登录入口</div></td>
</tr>
<tr>
<td height="120" align="center" valign="middle" bgcolor="#FFFFFF">
<!--论坛入口 开始-->
<br />
<div align="center">
<form action="http://www.deepteach.com/Forum/login.asp?action=chk" method="post">
用户姓名:<input tyep="text" name="username" size="12" /><br />
用户密码:<input type="password" name="password" size="12" /><br />
验证码:<input type="text" name="codestr" size="4" /><img src="http://www.deepteach.com/Forum/DV_getcode.asp" height="18" alt="验证码,看不清楚?请点击刷新验证码" style="cursor : pointer;" onClick="this.src='http://www.deepteach.com/Forum/DV_getcode.asp'" /><br />
Cookie: <select name="CookieDate">
<option value="0" selected="selected">不保存</option>
<option value="1">保存一天</option>
<option value="2">保存一月</option>
<option value="3">保存一年</option>
</select>
<br />
<input type="submit" name="submit" value="登录" />
<input name="button" type="button" onclick=window.open("http://www.deepteach.com/Forum/reg.asp") value="注册" />
<input name="button" type="button" onclick=window.open("http://www.deepteach.com/Forum/index.asp") value="游客进入" />
</form>
</div>
<!--论坛入口 结束--> </td>
</tr>
</table>
<br />
<table width="220" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#FF0000">
<tr>
<td height="36" valign="middle" background="images/index-left2-1.gif" bgcolor="#FFFFFF"><div align="center" class="glow_white">论坛新贴</div></td>
</tr>
<tr>
<td height="100" bgcolor="#FFFFFF">
<table width="95%" align="center" cellpadding="0" cellspacing="0">
<tr>
<td>
<script src="http://www.deepteach.com/Forum/Dv_News.asp?GetName=deepteach"></script> </td>
</tr>
</table></td>
</tr>
</table>
<br />
<!--本站统计-->
<%@include file="Statistic.jsp"%>
<br />
<table width="220" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#FF0000">
<tr>
<td height="36" valign="middle" background="images/index-left2-1.gif" bgcolor="#FFFFFF"><div align="center" class="glow_white">友情链接</div></td>
</tr>
<tr>
<td bgcolor="#FFFFFF">
<%@include file="FriendSite.jsp"%>
</td>
</tr>
</table>
<p> </p></td>
<td valign="top">
<!---------------->
<%
String ID = new String(request.getParameter("ID").getBytes("iso8859_1"));
//文章内容
//创建语句对象
Statement stmtArticle=conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
String sqlArticle = "Select * from tArticle where fArticleID=" + ID;
ResultSet RsArticle = stmtArticle.executeQuery(sqlArticle);
RsArticle.next();
//阅读次数计数
int Hits = RsArticle.getInt("fHits")+1;
if (session.getAttribute("isHits")==null || ((String)session.getAttribute("isHits")).equals(ID))
{;}else
{
Statement stmtArticle_Hits=conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
stmtArticle_Hits.executeUpdate("Update tArticle Set fHits=fHits+1 where fArticleID="+ID);
stmtArticle_Hits.close(); //关闭语句对象
session.setAttribute("isHits",ID);
}
String ArticleKey=RsArticle.getString("fKey");
String ArticleTitle=RsArticle.getString("fTitle");
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><br />
<td height="21" background="images/t-2-bg2.gif" class="word_White"><img src="images/t-2-2.gif" width="23" height="21" align="absmiddle" /><%=ArticleTitle%></td>
</tr>
<tr bgcolor="#FAFAFA">
<td height="100"><br />
<table width="95%" align="center" cellpadding="0" cellspacing="0">
<tr>
<td>
<div align="center">
<h4><%=ArticleTitle%></h4>
作者:<%=RsArticle.getString("fAuthor")%> 时间:<%=RsArticle.getString("fUpdateTime")%>
阅读次数:<%=Hits%><hr width="95%" />
</div>
<div style="float: right; marging: 0 0 5px 5px; padding: 0px; width: 300px; height: auto; background:#FFFF;">
<br />
<%//Call Advert ("文章内容页广告")%>
</div>
<%=RsArticle.getString("fContent")%>
<p> </p>
<!-----上一篇 下一篇 开始---->
<%
/*Set RsArticleSX=Server.CreateObject("Adodb.Recordset")
SqlArticleSX= "Select * from tArticle where fClassID=" & RsArticle("fClassID")
RsArticleSX.open SqlArticleSX,conn,1,1
do until RsArticleSX("fArticleID")=RsArticle("fArticleID")
RsArticleSX.MoveNext
loop
if not(RsArticleSX.Eof or RsArticleSX.Bof) then
RsArticleSX.MovePrevious
if not(RsArticleSX.Eof or RsArticleSX.Bof) then
Response.Write("上一篇文章:<a href='ArticleContent.jsp?ID="&RsArticleSX("fArticleID")&"'>"&RsArticleSX("fTitle")&"</a><br />")
else
Response.Write("上一篇文章:" &"<br />")
end if
end if
RsArticleSX.MoveNext
if not (RsArticleSX.Eof or RsArticleSX.Bof) then
RsArticleSX.MoveNext
if not (RsArticleSX.Eof or RsArticleSX.Bof) then
Response.Write("下一篇文章:<a href='ArticleContent.jsp?ID="&RsArticleSX("fArticleID")&"'>"&RsArticleSX("fTitle")&"</a>")
else
Response.Write("下一篇文章:")
end if
end if
%>
<%
RsArticleSX.close
Set RsArticleSX=Nothing
*/%>
<!-----上一篇 下一篇 结束---->
</td>
</tr>
</table></td></tr>
</table>
<br />
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#666666">
<tr>
<td bgcolor="#7CB5D3" height="20"><strong> <span class="word_White">相关内容</span></strong></td>
</tr>
<tr>
<td height="40" bgcolor="#ffffff">
<a href="http://click.aliunion.cn.yahoo.com/adclk.php?t=http%3A%2F%2Fsearch.cn.yahoo.com%2Fsearch%3Fei%3Dgbk%26pid%3DC%25WEBID%25_5_%25SID%25%26f%3DC%25WEBID%25_5_%25SID%25%26p%3D<%=RsArticle.getString("fKey")%>&c=CJfxyJUBoCW_6G_RkFlc5lNVmiaPLfI5PIqPfNaZlaxMiyKx3NLrxy9asR7pIyQukCjIDLiQ9ZOl2LE-&k=LyRYQJTBNwPC&sid=" target=_blank>在Yahoo查看更多关于“<%=ArticleTitle%>”的文章</a>
<br />
<a href="http://www.google.com/search?hl=zh-CN&q=<%=ArticleKey%>&btnG=Google+%E6%90%9C%E7%B4%A2&lr=lang_zh-CN" target=_blank>在GooGle查看更多关于“<%=ArticleTitle%>”的文章</a>
<br />
<a href="http://www.baidu.com/s?wd=<%=ArticleKey%>&cl=3&tn=advert" target=_blank>在Baidu查看更多关于“<%=ArticleTitle%>”的文章</a>
<br />
<a href="http://www.baidu.com/s?wd=<%=ArticleKey%>&cl=3&tn=advert" target=_blank>查看更多内容...</a>
<br />
<%
RsArticle.close(); //关闭记录集对象
stmtArticle.close(); //关闭语句对象
%>
</td>
</tr>
</table>
<div align="center">
<iframe id="baiduframe" border="0" vspace="0" hspace="0" marginwidth="0" marginheight="0"
framespacing="0" frameborder="0" scrolling="no" width="400" height="40" src="http://unstat.baidu.com/bdun.bsc?tn=advert&cv=0&cid=136707&csid=108&rkcs=4&bgcr=FFFFFF&ftcr=0000CC&rk=1&bd=0&tbsz=&tbst=&bdas=0"></iframe>
</div>
<table width="95%" border="0" align="center" cellpadding="6" cellspacing="1" bgcolor="#c6d3e7">
<tr bgcolor="#ffffe7">
<td><span class="word_Red">版权申明:</span>除部分特别声明不要转载,或者授权我站独家播发的文章外,大家可以自由转载我站点的原创文章,但原作者和来自我站的链接必须保留(非我站原创的,按照原来自一节,自行链接)。文章版权归我站和作者共有。<br />
<span class="word_Red">转载要求:</span>转载之图片、文件,链接请不要盗链到本站,且不准打上各自站点的水印,亦不能抹去我站点水印。 <br />
<span class="word_Red">特别注意:</span>本站所提供的网友原创作品,如需使用,请与原作者联系,版权归原作者所有。
</td>
</tr>
</table>
</td>
</tr>
</table>
<%@include file="index_Bottom.jsp"%>
</body>
</html>
<%
RsSiteConfig.close(); //关闭记录集对象
stmt.close(); //关闭语句对象
//*********** 数据库关闭代码 ************
conn.close(); //关闭连接对象
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -