<% Option Explicit %>
<!--#include file="../Inc/Cls_DB.asp" -->
<!--#include file="../Inc/Const.asp" -->
<%
Dim DBC,Conn
Set DBC = New DataBaseClass
Set Conn = DBC.OpenConnection()
Set DBC = Nothing
%>
<!--#include file="../Inc/MemberCheck.asp" -->
<%
dim Password,RsmessageObj,Messages
MemName = Session("MemName")
PassWord = Session("MemPassWord")
MemID = Session("MemID")
if Session("MemName")="" or Session("MemPassWord")="" then 
	response.Redirect("UserLogin.asp")
	response.end
end if
set RsMemObj = Server.CreateObject ("ADODB.RecordSet")
RsMemObj.Source="select * from Members where MemName='"& MemName &"' and password='"&PassWord&"'"
RsMemObj.Open RsMemObj.Source,Conn,1,1

set RsMessageObj = Server.CreateObject ("ADODB.RecordSet")
RsMessageObj.Source="select * from Message where MeRead='"& MemName &"' and ReadTF=false"
RsMessageObj.Open RsMessageObj.Source,Conn,1,1
if RsMessageObj.RecordCount=0 then
	Messages="<a href=Message.asp?MemName="&MemName&">您没有新短信</a>"
else
	Messages="<a href=Message.asp?MemName="&MemName&">您有新短信</a>(<font color=red>"&RsMessageObj.RecordCount&"</font>)"
end if
%>
<html>
<head>
<link href="../CSS/css.css" rel="stylesheet" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>登陆成功_会员中心</title>
</head>

<body>
<table width="700" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#999999">
  <tr>
    <td><table width="700" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr bgcolor="#EFEFEF"> 
          <td width="26" height="32">&nbsp;</td>
          <td width="445"><b><font color="#000000"><b>登陆成功！</b></font></b></td>
          <td width="96"><div align="center"><a href="Usermain.asp">会员中心首页 </a></div></td>
          <td width="52"><div align="center"><font color="#FF0000"><a href="../Help/">帮助</a></font></div></td>
          <td width="72"><div align="center"><a href="Logout.asp"><font color="#FF0000">安全退出</font></a></div></td>
          <td width="9"></td>
        </tr>
      </table></td>
  </tr>
</table>
<br>
<table width="700" border="0" align="center" cellpadding="8" cellspacing="1" bgcolor="#CACACA">
  <tr> 
    <td height="130" bgcolor="#FFFFFF" > 
      <table width="86%" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#E6E6E6">
        <tr bgcolor="#FFFFFF"> 
          <td width="100%" > <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td><font color="#FF0000"><%=session("memname")%>：</font>欢迎您！　　<%=Messages%> &nbsp;&nbsp;&nbsp;</td>
                <td>&nbsp;</td>
                <td><div align="center"><a href="News_ManuAdd.asp">投稿</a></div></td>
              </tr>
            </table></td>
        </tr>
      </table>
      
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td height="3"></td>
        </tr>
      </table>
      <table width="86%" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#E6E6E6">
        <tr bgcolor="#FFFFFF">
          <td ><a href="Mycon.asp">没有审核的投稿</a>　｜　<a href="Mycon_check.asp"><font color="#FF0000">审核通过的投稿</font></a></td>
        </tr>
        <tr bgcolor="#FFFFFF"> 
          <td width="100%" > <%
dim RsCon,strpage,select_count,select_pagecount,i
	strpage=request.querystring("page")
		if len(strpage)=0 then
		strpage="1"
		end if
Dim Rsconfig
set Rsconfig=conn.execute("select * from config")
set RsCon = Server.CreateObject ("ADODB.RecordSet")
RsCon.Source="select * from News where Author='"& session("memname") &"' order by adddate desc"
RsCon.Open RsCon.Source,Conn,1,1
if RsCon.eof then
		       RsCon.close
			   set RsCon=nothing
			   response.Write"没有记录。"
			  
else
		RsCon.pagesize=20
		RsCon.absolutepage=cint(strpage)
		select_count=RsCon.recordcount
		select_pagecount=RsCon.pagecount
        for i=1 to RsCon.pagesize
		if RsCon.eof then
		exit for
		end if
		dim rsclass
		set rsclass=conn.execute("select * from Newsclass where Classid='"& Rscon("Classid") &"'")
		response.Write("·[<font color=#666666>"&year(Rscon("AddDate"))&"-"&month(Rscon("AddDate"))&"-"&day(Rscon("AddDate"))&"</font>]&nbsp;<a href="&Rsconfig("Domain")&rsclass("SaveFilePath")&"/"&rsclass("classename")&"/"&rscon("FileName")&"."&rscon("FileExtName")&" target=_blank>"&Left(Rscon("title"),25)&"</a><table width=""100%"" border=""0"" cellspacing=""0"" cellpadding=""0""> <tr><td height=""3""></td></tr></table>")
	RsCon.movenext
next
%>
          <br>
            <br>
            <%  response.write"&nbsp;共<b>"& select_pagecount &"</b>页<b>" & select_count &"</b>条记录，本页是第<b>"& strpage &"</b>页。"
		if int(strpage)>1 then
		    response.Write"&nbsp;<a href=?page=1&leixing="&request("leixing")&"&keywords="&request("keywords")&"&stype="&request("stype")&">第一页</a>&nbsp;"
		    response.Write"&nbsp;<a href=?page="&cstr(cint(strpage)-1)&"&leixing="&request("leixing")&"&keywords="&request("keywords")&"&stype="&request("stype")&">上一页</a>&nbsp;"
			end if
			if int(strpage)<select_pagecount then
			response.Write"&nbsp;<a href=?page="&cstr(cint(strpage)+1)&"&leixing="&request("leixing")&"&keywords="&request("keywords")&"&stype="&request("stype")&">下一页</a>"
			response.Write"&nbsp;<a href=?page="& select_pagecount &"&leixing="&request("leixing")&"&keywords="&request("keywords")&"&stype="&request("stype")&">最后一页</a>&nbsp;"
			end if
			response.Write"<br>"
			Rscon.close
			set rscon=nothing
end if
%> </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td bgcolor="#DFDFDF">
<div align="center">
        <p >
		<%
		Response.Write(""&Rsconfig("Copyright")&"")
		Rsconfig.close
		set Rsconfig=nothing
		%></p>
      </div></td>
  </tr>
</table>
</body>
</html>
<%
RsmemObj.close
set RsmemObj=nothing 
%>
