<!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>
<!--#include file="include/conn.asp"-->
<!--#include file="include/config.asp"-->
<!--#include file="include/ContentAutoPage.asp"-->

<%
owen=clng(request.querystring("id"))
a=request.servervariables("server_name")
b=request.servervariables("script_name")
if request("action")="save" then
id=clng(request.querystring("id"))
	if id="" then
	response.write "<script language='javascript'>alert('对不起，参数不正确！');history.back();</script>" 
	response.end
end if
if cstr(Session("GetCode"))<>cstr(Trim(Request("yanzheng"))) then
	   response.write"<script>alert('你输入的验证码有误!请重新输入');history.back();</script>"
	   response.end
end if
if len(request.form("pingluncontent"))>100 then
	   response.write"<script>alert('对不起，评论的内容不能超过100个字符!请重新输入');history.back();</script>"
	   response.end
end if
action=request.querystring("action")
if action="save" then
	pinglunname=Replace(Request.Form("pinglunname"),"'","＇") 
	pingluncontent=Replace(Request.Form("pingluncontent"),"'","＇") 
	set rs=server.createobject("adodb.recordset")
	rs.open "select * from shop_pinglun",conn,1,3
	rs.addnew
	rs("id")=id
	rs("pinglunname")=replace(replace(replace(replace(pinglunname,"'","‘"),"<","&lt;"),">","&gt;")," ","&nbsp;")
	rs("pingluncontent")=replace(replace(replace(replace(pingluncontent,"'","‘"),"<","&lt;"),">","&gt;")," ","&nbsp;")
	rs.update
	rs.close
	set rs=nothing
	response.write "<script language='javascript'>alert('恭喜您，您的评论已成功提交！');</script>"
	response.Redirect("http://"&a&b&"?id="&owen)
	response.end
end if
end if
%>
<script language="javascript" type="text/javascript">

function ReImgSize(){
	for (i=0;i<document.images.length;i++) {
		if (document.images[i].width>450) { //图片尺寸最大不能超过的值
			document.images[i].width="450"  //调整尺寸
		}
	}
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>浙江林学院院报</title>
<style type="text/css">
<!--
body {
	background-image: url(images/bg.gif);
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
-->
</style>
<link href="css.css" rel="stylesheet" type="text/css" />
<% 
set rsnews=server.createobject("adodb.recordset") 
sql="update news2 set hits=hits+1 where id="&owen
conn.execute sql
sql="select * from news2 where id="&owen
rsnews.open sql,conn,1,1
title=rsnews("title")
bigname=rsnews("bigclassname")
if rsnews.eof and rsnews.bof then
response.write("数据库出错")
else
%>
<style type="text/css">
<!--
-->
</style>
</head>

<body onload="ReImgSize()">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td valign="top"><table width="976" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td width="336" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td height="48">&nbsp;</td>
            </tr>
            <tr>
              <td><table width="320" border="0" cellpadding="0" cellspacing="0" class="k1">
                  <tr>
                    <td><%call imgnews()%></td>
                  </tr>
              </table></td>
            </tr>
                  <tr> <form action="search.asp" method="get" name="form1" id="form1">
              <td height="53" valign="middle">　　<span class="a3">文字检索</span>
                 <input name="key" type="text" class="input" id="key" size="19" />
                 <input type="image" src="images/go.gif" width="30" height="23" align="absbottom" /></td></form>
            </tr>
            <tr>
              <td><table width="322" height="104" border="0" cellpadding="0" cellspacing="0" class="k2">

<tr><td align="left" style="text-align:center; line-height:220%"><%=getlinks()%></td>
</tr>
</table></td>
            </tr>
        </table></td>
        <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td height="96" colspan="2" valign="bottom"> 　　　<img src="images/shuda.gif" width="340" height="67" /> <img src="images/shuda1.gif" width="241" height="21" /></td>
            </tr>
            <tr>
              <td height="34" colspan="2">　　　　<span class="a4"><a href="index.asp" class="a4">首页</a> </span><span class="a8">|</span><span class="a4"> <a href="bjblist.asp?classid=1" class="a4">校报编辑部</a> </span><span class="a8">|</span><span class="a4"> <a href="lqhf.asp" class="a4">历期回放</a> </span><span class="a8">|</span><span class="a4"> <a href="txlist.asp" class="a4">学生通讯社</a> </span><span class="a8">|</span><span class="a4"> <a href="piclist.asp" class="a4">活动剪影</a> </span><span class="a8">|</span><span class="a4"> <a href="xblink.asp" class="a4">友情链接</a></span></td>
            </tr>
             <tr>
              <td height="75" colspan="2" valign="bottom"><table width="100%" border="0" cellpadding="0" cellspacing="0" class="k2">
                  <tr>
                    <td width="61%" height="56">　　　　 <span class="a6">版面导航</span>　　<span class="a9">总第<%call gettotalsum()%>期</span> 　<span class="a9"><%call gettotalname()%></span></td>
                  <form method="get" action="xbindex.asp?classid=classid" name="search">       <td width="39%">　　<img src="images/s1.jpg" width="26" height="32" align="absbottom" /><span class="a1"> 第</span>
			<input name="classid" type="text" value="..." onFocus="this.value=''" onBlur="if (value ==''){value=' '}" size="6" /><span class="a1">期</span> <input type="image" src="images/go.gif" width="30" height="23" align="absbottom" /></td></form>
                  </tr>
              </table></td>
            </tr>
            <tr>
              <td colspan="2">&nbsp;</td>
            </tr>
            <tr>
              <td colspan="2"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td width="18%" height="27" background="images/bg-4.jpg">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="a5">&nbsp;&nbsp;</span><span class="a6">新闻正文</span></td>
                  <td width="82%" background="images/bg-1.gif" style=" text-align:center;font-size:14px; padding-right:100px;"><b><%=left(rsnews("title"),30) %></b></td>
                </tr>
              </table></td>
            </tr>
            <tr >
              <td width="5%" class="list_1" height="400">&nbsp;</td>
              <td width="95%" valign="top" style="padding-top:5px;"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td>
				  <table width="96%" height="28" border="0" cellpadding="0" cellspacing="0">  <tr> 
			<td  align="center" >发布时间：<%= rsnews("time") %> &nbsp; 阅读：<font color="#ff0000"><%= rsnews("hits") %></font>次</td>
			</tr>
			
						<tr> 
			<td  align="center" class="content_1"><%=ContentPagination(rsnews("content"))%></td>
			</tr>
                      </tr>
                  </table></td>
                </tr>

              </table></td>
            </tr>
            <tr>
              <td>&nbsp;</td>
              <td><table width="90%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td height="40" valign="bottom"><table width="100%" height="27" border="0" cellpadding="0" cellspacing="0">
                      <tr>
                        <td background="images/bg-5.gif" height="27"><%
set rs1=Server.CreateObject("ADODB.Recordset")
sql1="select top 1 id,title,oColor,oStyle,top,hits,infotime from news2 where id="&owen-1
rs1.open sql1,conn,1,1
if rs1.eof and rs1.bof then
%>
<div align="left">&nbsp;上一篇文章：暂时没有</div>
<%else%>
	 <div align="left">&nbsp;上一篇文章：<a title="<%=rs1("title")%>" href="news.asp?id=<%=rs1("id")%>"><%=rs1("title")%></a></div>
<%end if%></td>
                        </tr><tr><td height="24">
						
<%
set rs2=Server.CreateObject("ADODB.Recordset")
sql2="select top 1 id,title,oColor,oStyle,top,hits,infotime from news2 where id>"&owen
rs2.open sql2,conn,1,1
if rs2.eof and rs2.bof then
%>
<div align="left">&nbsp;下一篇文章：暂时没有</div>
<%else%>
	 <div align="left">&nbsp;下一篇文章：<a title="<%=rs2("title")%>" href="news.asp?id=<%=rs2("id")%>"><%=rs2("title")%></a></div>
 <%end if%></td></tr>
                  </table></td>
                </tr>
<% 
end if
rsnews.close
set rsnews=nothing
%>          
              </table></td>
            </tr>
            
        </table></td>
      </tr>
      <tr>
        <td height="13" colspan="2" valign="bottom">&nbsp;</td>
      </tr>
      
      
    </table></td>
  </tr>
  <tr>
    <td height="50" bgcolor="#478015"><div align="center" class="a10">CopyRight &copy; 2009 浙江林学院版权所有</div></td>
  </tr>
</table>
</body>
</html>
