<!--#include file=conn.asp-->
<!--#include file=config.asp-->
<!--#include file=const.asp-->
<!--#include file=char.asp-->
<%
 '=========================================================
' File: showart.asp
' Version:3.0
' Date: 2005-11-4
' Script Written by xmrxw
'=========================================================
' Copyright (C) 2004,2005 Xmrxw.Com All rights reserved.
' Web: http://www.xmrxw.com,http://www.xmzxw.com
' Email: info@mssky.com,super@mssky.com
' QQ：10689579　Msn：zdlmicr@hotmail.com
'=========================================================
dim id
id=checkStr(trim(request("id")))'去除特殊字符
	if id="" or not isInteger(id) then
	errmsg=errmsg+"<br>"+"<li>参数错误。"
	founderr=true
	end if
BoardID=checkStr(trim(request("BoardID")))
	if BoardID="" or not isInteger(BoardID) then
	errmsg=errmsg+"<br>"+"<li>参数错误。"
	founderr=true
	end if
response.buffer=true
stats="文章内容"
call nav()
if founderr then
	call head_var("","")
	call Mslove_error()
else
	call head_var("栏目列表","artlist.asp?boardID="&BoardID&"")
	call main()
	if founderr=true then call Mslove_error()
end if
call activeonline()
call footer()

sub main()
if split(Reflash,"|")(0)=1 then'防刷新点击
		  if not Request.ServerVariables("REMOTE_ADDR")=request.cookies("IP"&id&"") then
		  response.cookies("IP"&id&"")=Request.ServerVariables("REMOTE_ADDR")
		  conn.execute("UPDATE Ms_Article set Hits=Hits+1 WHERE id="&id&"")
		  end if
		  else
		  conn.execute("UPDATE Ms_Article set Hits=Hits+1 WHERE id="&id&"")
	end if
set rs=server.createobject("adodb.recordset")
sql="select a.BoardID,a.Username,a.Editor,a.Title,a.Comefrom,a.Content,a.Locktopic,a.Hits,a.Addtime,a.Ubbs,a.Topic,u.LockUser,u.Usersign,a.Checked from Ms_Article a inner join Ms_user u on A.UserName=u.Username where a.ID="&id&""
	rs.Open sql,conn,1,1
if rs.eof and rs.bof then
	response.write"<tr><td class=tablebody1 align=center valign=middle>没有找到相应文章</td></tr>"
else
if rs(6)=1 then
	errmsg=errmsg+"<br>"+"<li>文章已经被锁定，请联系管理员。"
	founderr=true
	rs.close
	exit sub
elseif rs(6)=2 then
	errmsg=errmsg+"<br>"+"<li>文章已经被屏蔽，请联系管理员。"
	founderr=true
	rs.close
	exit sub
end if
if rs(13)=0 then
	errmsg=errmsg+"<br>"+"<li>对不起，文章未审核，请联系管理员。"
	founderr=true
	rs.close
	exit sub
end if
%>
<script language="JavaScript"> 
<!--
function doZoom(size){
	document.getElementById('zoom').style.fontSize=size+'px'
}
//-->
</script>
  
<table width="750" align=center cellpadding=3 cellspacing=0 style="BORDER-LEFT: #999999 1px solid;border-right:#999999 1px solid">
  <tr align="center"> 
    <td height="72" colspan="2" align="center" bgcolor="#FFFFFF"><b><%=rs(3)%></b></td>
  </tr>
  <tr align="center"> 
    <td height="28" colspan="2" bgcolor="#f7f7f7">[ <%=Homeurl%> 更新日期：<%=rs(8)%> 被阅览数：<%=rs(7)%> 次 责任编辑：<a href=dispuser.asp?username=<%=rs(1)%>><%=rs(1)%></a> 字号：<a href="javascript:doZoom(16)" ><font color="#999999">大</font></a> 
      <a href="javascript:doZoom(12)"><font color="#999999">小</font></a>]</td>
  </tr>
  <TR> 
    <TD height=3 colspan="2" background=images/title_line.gif bgcolor="#FFFFFF"></TD>
  </TR>
  <tr align="center"> 
    <td colspan="2" align="center" bgcolor="#FFFFFF"> <br> <table width="98%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td><font id="zoom" class="font1"> 
            <%if rs(11)=2 then
				response.Write("================================<br><font color=#00008B>该用户发言已被管理员屏蔽</font><br>================================")
				elseif rs(11)=1 then
				response.Write("================================<br><font color=#00008B>此用户已经锁定不显示该用户发言</font><br>================================")
				else%>
            <img src=<%=rs(10)%> width=20 border=0 align="absmiddle">&nbsp;&nbsp;<b><%=rs(3)%></b><br>
            <br>
            <%=rs(5)%> 
            <%end if%>
            </font></td>
        </tr>
      </table>
      <br> </td>
  </tr>
    <TR> 
    <TD height=3 colspan="2" background=images/title_line.gif bgcolor="#FFFFFF"></TD>
  </TR>
  <tr align="center">
    <td height="39" colspan="2" align="center" bgcolor="#FFFFFF"><table width="96%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
                <td width="3%" height="20" align="right"><img src="Skins/Default/qianming1.gif" width="20" height="18"></td>
                <td width="97%"><img src="Skins/Default/qianming.gif" width="420" height="20"></td>
              </tr>
			  <tr>
          <td colspan="2"><p><br>
              <%=rs(12)%></p>
            <p>&nbsp;</p></td>
        </tr>
			  </table>
			  </td>
  </tr>
  <tr align="center"> 
    <td colspan="2" align="right" bgcolor="#f7f7f7"> 作者：<%=rs(2)%> 出处：<%=rs(4)%> </td>
  </tr>
  <TR> 
    <TD height=3 colspan="2" background=images/title_line.gif bgcolor="#FFFFFF"></TD>
  </TR>
  <tr align="center"> 
    <td height="39" colspan="2" align="left" bgcolor="#FFFFFF"> <%dim rsp
	set rsp=conn.execute("select top 1 id,Title from Ms_Article where BoardID="&BoardID&" and id>"&id&" and Checked=1 order by Addtime")
	if rsp.eof and rsp.bof then
		response.write "<li>上一篇文章：没有了"
	else
		response.write "<li>上一篇文章：<a href=showart.asp?BoardID="&BoardID&"&ID="&rsp(0)&">"&rsp(1)&"</a>"
	end if
	rsp.close
	set rsp=conn.execute("select top 1 id,Title from Ms_Article where BoardID="&BoardID&" and id<"&id&" and Checked=1 order by Addtime")
	if rsp.eof and rsp.bof then
		response.write "<li>下一篇文章：没有了"
	else
		response.write "<li>下一篇文章：<a href=showart.asp?BoardID="&BoardID&"&ID="&rsp(0)&">"&rsp(1)&"</a>"
	end if
	rsp.close
%></td>
  </tr>
  <tr align="center"> 
    <td width="83%" align="right" bgcolor="#f7f7f7">[发给好友]&nbsp;&nbsp;[<A href="javascript:window.print()">打印本页</A>]&nbsp;&nbsp;[<A  href="javascript:window.close()">关闭窗口</A>]&nbsp; 
    </td>
    <td width="17%" align="right" bgcolor="#f7f7f7"><a class="ImgOnclick" onMouseOver="showmenu(event,'<div class=menuitems><a style=font-size:9pt;line-height:12pt; href=artpost.asp?action=edit&Boardid=<%=Boardid%>&id=<%=id%>><u>编辑文章</u></a></div><div class=menuitems><a style=font-size:9pt;line-height:12pt; href=postcomp.asp?Typeid=3&page=showart.asp?Boardid=<%=Boardid%>&id=<%=id%>><u>举报文章</u></a></div><div class=menuitems><a style=font-size:9pt;line-height:12pt; href=art_admin.asp?action=isbest&Boardid=<%=Boardid%>&id=<%=id%>><u>加为精华</u></a></div><div class=menuitems><a style=font-size:9pt;line-height:12pt; href=art_admin.asp?action=istop&Boardid=<%=Boardid%>&id=<%=id%>><u>文章固顶</u></a></div><div class=menuitems><a style=font-size:9pt;line-height:12pt; href=art_admin.asp?action=islock&Boardid=<%=Boardid%>&id=<%=id%>><u>文章屏蔽</u></a></div><div class=menuitems><a style=font-size:9pt;line-height:12pt; href=art_admin.asp?action=isdele&Boardid=<%=Boardid%>&id=<%=id%>><u>永久删除</u></a></div><div class=menuitems><a style=font-size:9pt;line-height:12pt; href=art_admin.asp?action=lockuser&Boardid=<%=Boardid%>&id=<%=id%>><u>锁定用户</u></a></div><div class=menuitems><a style=font-size:9pt;line-height:12pt; href=art_admin.asp?action=ismoney&Boardid=<%=Boardid%>&id=<%=id%>><u>文章评价</u></a></div>');"><img src="images/topicmanage.gif" width="70" height="18" border="0" align="absmiddle"></a> 
      <a href="showArt.asp?Boardid=<%=Boardid%>&id=<%=id%>#top"><img src="images/p_up.gif" width="19" height="17" border="0"></a></td>
  </tr>
  <TR> 
    <TD height=3 colspan="2" background=images/title_line.gif bgcolor="#FFFFFF"></TD>
  </TR>
  <tr> 
    <td height="23" colspan="2" align="center"><a href=Artbbs.asp?id=<%=id%>&boardid=<%=boardid%> target="_blank">本文共有评论 
      <font color=red><b><%=rs(9)%></b></font> 条</a></td>
  </tr>
</table>
<%
if Cint(GroupSetting(26))=0 then
exit sub
end if%>
<script language = 'JavaScript'>
function selectPaginationType(){
  document.theForm.PaginationType.value=2;
}
function CheckForm(){
  var CurrentMode=editor.CurrentMode;
  if (CurrentMode==0){
    document.theForm.Content.value=editor.HtmlEdit.document.body.innerHTML; 
  }
  else if(CurrentMode==1){
   document.theForm.Content.value=editor.HtmlEdit.document.body.innerText;
  }
  else{
    alert('预览状态不能保存！请先回到编辑状态后再保存');
    editor.HtmlEdit.focus();
     return false;
  }
  if (document.theForm.Title.value==''){
     alert('日记评论标题不能为空！');
     document.theForm.Title.focus();
     return false;
  }

    if (document.theForm.Content.value==''){
      alert('日记评论内容不能为空！');
      editor.HtmlEdit.focus();
      return false;
    }
}
</script>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class=tableborder1>
  <form method='POST' name='theForm' onSubmit='return CheckForm();' action='artsavepost.asp' target='_self'>
  <tr> 
    <th height="25" colspan="2" align="left">*快速评论：<%=rs(3)%></th>
  </tr><input name="action" type="hidden" id="action" value="re">
  <tr>
      <td width="29%" height="36" align="center" class=tablebody2><strong>评论表情</strong></td>
    <td width="71%" height="36"  class="tablebody2"><strong>评论标题</strong>： 
      <input name="Title" type="text" id="Title" size="35" maxlength="200" value="Re:<%=rs(3)%>">
	  <%if Cint(Codeshow(6))=1 then%>
        检验码： 
        <input type="text" name="codestr" maxlength="4" size="4"> &nbsp;<%=GetCode()%>&nbsp; <%end if%>
      </td>
  </tr>
  <input name="Boardid" type="hidden" id="Boardid" value="<%=Boardid%>">
  <input name="id" type="hidden" value="<%=ID%>"> 
  <tr>
    <td width="29%" height="89" align="center" valign="top" class=tablebody2>
<table border="0" cellpadding=3 cellspacing=1 style="width:98%" class=tableborder2>
        <tr> 
          <td height="61" class="tablebody1"> <%dim e
		  for e=1 to 18%> <input type="radio" value="images/topicface/<%=e%>.gif" name="Topics" <%if e=1 then response.write "checked"%>> 
            <img src="images/topicface/<%=e%>.gif" >&nbsp; 
            <%if e>0 and (e mod 3=0) then response.write "<br>"%> <%next%> </td>
        </tr>
      </table>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td height="24"><strong>评论内容：
            </strong>
		<li>评论篇幅长度 <b><font color=red>
		<%if GroupSetting(27)=0 then
		response.Write("不限")
		else
		response.Write(GroupSetting(27))
		end if%></font></b> 字符</li>
		<li>回复文章金钱/篇 <b><%=GroupSetting(30)%> <%=GroupSetting(31)%></b> 元</li>
		<li>回复文章魅力/篇 <b><%=GroupSetting(32)%> <%=GroupSetting(33)%></b> 点</li>
		<li>回复文章经验/篇 <b><%=GroupSetting(34)%> <%=GroupSetting(35)%></b> 点</li>
		<li>发布文章及回复可上传 <b><%if GroupSetting(36)=1 then
		response.Write("<font color=red>是</font>")
		else
		response.Write("否")
		end if%></b></li>
              </td>
        </tr>
      </table></td>
    <td height="89" valign="top"  class="tablebody1"> <textarea name='Content' style='display:none'></textarea> 
      <iframe id='editor' src='qeditor.asp' frameborder=0 scrolling=no width='540' height='300'></iframe></td>
  </tr>
  <tr align="center"> 
    <td height="31" colspan="2"  class="tablebody2"><input type="submit" name="Submit" value="提交评论">
      　
<input type="reset" name="Submit2" value="清空所有"></td>
  </tr>
  </form>
</table>
<%
end if
rs.close
end sub
%>