<!--#include file="../Include/Const.asp" -->
<!--#include file="../Include/NoHackSql.Asp" -->
<!--#include file="../Include/ConnSiteData.asp" -->
<%call SiteInfo%>
<!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=gbk" />
<title>我的留言 - <% =SiteTitle %></title>
<meta name="keywords" content="<% =Keywords %>" />
<meta name="description" content="<% =Descriptions %>" />
<link href="newimages/default_style.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="css/setCss.js"></script>
<script src="../Script/AC_RunActiveContent.js" type="text/javascript"></script>
<script language="javascript" src="../Script/Html.js"></script>
</head>
<!--#include file="Head.Asp" -->
<%
if not (session("MemName")<>"" and session("MemLogin")="Succeed") then
  response.Write "<script language=javascript>alert('请先登录！');location.href='Index.asp';</script>"
  response.end
end if
%>
<DIV class=f_r><IMG 
            src="newimages/nav-right.jpg"></DIV>
            <DIV style="CLEAR: both"></DIV></DIV></DIV>
            <DIV class=wraper>
            <DIV class=sidebar>
            <DIV><IMG 
            src="newimages/sidebar-top.jpg"></DIV>
            <DIV 
            style="PADDING-RIGHT: 9px; PADDING-LEFT: 9px; PADDING-BOTTOM: 0px; WIDTH: 217px; PADDING-TOP: 0px">
            <DIV id=UserLogin1_RegisterDIV><A 
            href="MemberRegister.asp"><IMG height=60 
            src="newimages/reg.jpg" width=216 
            border=0></A> </DIV><!--登录窗口-->
         <Iframe src="login.asp" frameborder="0" width="100%"></Iframe>
		   <DIV class=news align=left>
            <H2> 会员中心&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</H2></DIV><DIV class=newsb align=left style="line-height:25px">
              <div class="modulebody_center">
<ul>
<%=WebMenu()%>
</Ul>
 
</div>
           
          </DIV>
		  
            <DIV class=news align=left>
            <H2>最热产品&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</H2></DIV><DIV class=newsb align=left style="list-style-type:none">
                <UL style="list-style-type:none">
              
									<%call Producthot(10)%></UL>
           
          </DIV>
           
            
			</DIV>
            <DIV><IMG height=6 
            src="../newimages/sidebar-bottom.jpg" 
            width=236></DIV></DIV>
            <DIV class=content>
            <DIV><IMG height=7 
            src="../newimages/content-top.jpg" 
            width=758></DIV>
      
           
            <DIV style="CLEAR: both"></DIV>
           
           <DIV class=incontent>
            <DIV 
style="BACKGROUND: url(../newimages/content-titile-bg.jpg) repeat-x">
            <DIV class=f_l><IMG 
            src="../newimages/content-titile.jpg"></DIV>
            <H2><%=WebLocation()%></H2>
            <DIV class=f_r><IMG 
            src="../newimages/content-titile-r.jpg"></DIV>
            <DIV style="CLEAR: both"></DIV>
            <DIV 
            style="BORDER-RIGHT: #b1d3ee 1px solid; PADDING-RIGHT: 5px; PADDING-LEFT: 5px; BACKGROUND: #fff; PADDING-BOTTOM: 5px; BORDER-LEFT: #b1d3ee 1px solid; WIDTH: 734px; PADDING-TOP: 5px; " 
            align=left>

          
 <DIV class="DivBorder OrderDiv1">          
<DIV class=Fs_All_Bottom1>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
        <tr>
          <td height="20"><%=WebContent()%></td>
        </tr>
        <tr>
          <td height="20">&nbsp;</td>
        </tr>
      </table><DIV class=Fs_C_Center></DIV>
</DIV></DIV>
           
      
           
            <DIV style="CLEAR: both"></DIV></DIV>           
            <DIV 
style="BACKGROUND: url(../newimages/content-bottom-bg.jpg) repeat-x">
            <DIV class=f_l><IMG 
            src="../newimages/content-bottom-l.jpg"></DIV>
            <DIV class=f_r><IMG 
            src="../newimages/content-bottom-r.jpg"></DIV>
            <DIV style="CLEAR: both"></DIV></DIV></DIV>
            <DIV style="CLEAR: both"></DIV>
            <DIV style="HEIGHT: 6px"><IMG 
            src="../newimages/hr.jpg"></DIV></DIV>
            <DIV><IMG 
            src="../newimages/content-bottom.jpg"></DIV>
            <DIV style="CLEAR: both"></DIV></DIV></DIV>
            <DIV style="CLEAR: both"></DIV>
<!--#include file="Foot.Asp"-->
<%
Function WebMenu()
If session("MemName")="" Or session("GroupID")="" Or session("MemLogin")<>"Succeed" Then  
response.write "<Li><img src=""image/Tx_Ar3.gif"" style=""margin-left:5px;"" /><a href="""&AutoLink&""" target=""_blank"" style=""margin-left:15px;""><a href=""MemberRegister.asp"">注册会员</a></li>"
Else
  response.write "<Li><img src=""image/Tx_Ar3.gif"" style=""margin-left:5px;"" /><a href="""&AutoLink&""" target=""_blank"" style=""margin-left:15px;""><a href=""MemberInfo.asp"">修改注册资料</a></li>"
  response.write "<Li><img src=""image/Tx_Ar3.gif"" style=""margin-left:5px;"" /><a href="""&AutoLink&""" target=""_blank"" style=""margin-left:15px;""><a href=""MemberMessage.asp"">我的留言</a></li>"
  response.write "<Li><img src=""image/Tx_Ar3.gif"" style=""margin-left:5px;"" /><a href="""&AutoLink&""" target=""_blank"" style=""margin-left:15px;""><a href=""MemberOrder.asp"">我的订单</a></li>"
  response.write "<Li><img src=""image/Tx_Ar3.gif"" style=""margin-left:5px;"" /><a href="""&AutoLink&""" target=""_blank"" style=""margin-left:15px;""><a href=""MemberTalent.asp"">我的应聘</a></li>"
  response.write "<Li><img src=""image/Tx_Ar3.gif"" style=""margin-left:5px;"" /><a href="""&AutoLink&""" target=""_blank"" style=""margin-left:15px;""><a href=""MemberLogin.asp?Action=Out"">退出登录</a></li>"
End If
End Function


function WebLocation()
  WebLocation="&nbsp;当前位置：<a href=""index.asp"" class=""agray"">首页</a> - <a href=""MemberCenter.asp"" class=""agray"">会员中心</a> - 我的留言"&VbCrLf
end Function

function WebContent()
  dim idCount
  dim pages
      pages=8
  dim pagec
  dim page
      page=clng(request("Page"))
  dim pagenc
      pagenc=5
  dim pagenmax
  dim pagenmin
  dim pageprevious
  dim pagenext
  dim datafrom
      datafrom="wygkcndiv_Message "
  dim datawhere
	  datawhere="where MemID="&conn.execute("select * from wygkcndiv_Members where MemName='"&session("MemName")&"'")("ID")&" "
  dim sqlid
  dim Myself,PATH_INFO,QUERY_STRING
      PATH_INFO = request.servervariables("PATH_INFO")
	  QUERY_STRING = request.ServerVariables("QUERY_STRING")'
      if QUERY_STRING = "" then
	    Myself = PATH_INFO & "?"
	  elseif Instr(PATH_INFO & "?" & QUERY_STRING,"Page=")=0 then
	    Myself= PATH_INFO & "?" & QUERY_STRING & "&"
	  else
	    Myself = Left(PATH_INFO & "?" & QUERY_STRING,Instr(PATH_INFO & "?" & QUERY_STRING,"Page=")-1)
	  end if
  dim taxis
      taxis="order by id desc "
  dim i
  dim rs,sql
  set rs = server.createobject("adodb.recordset")
  sql="select count(ID) as idCount from ["& datafrom &"]" & datawhere
  set rs=server.createobject("adodb.recordset")
  rs.open sql,conn,0,1
  idCount=rs("idCount")
  if(idcount>0) then
    if(idcount mod pages=0)then
	  pagec=int(idcount/pages)
   	else
      pagec=int(idcount/pages)+1
    end if
    sql="select id from ["& datafrom &"] " & datawhere & taxis
    set rs=server.createobject("adodb.recordset")
    rs.open sql,conn,1,1
    rs.pagesize = pages
    if page < 1 then page = 1
    if page > pagec then page = pagec
    if pagec > 0 then rs.absolutepage = page
    for i=1 to rs.pagesize
	  if rs.eof then exit for
	  if(i=1)then
	    sqlid=rs("id")
	  else
	    sqlid=sqlid &","&rs("id")
	  end if
	  rs.movenext
    next
  end if
  if(idcount>0 and sqlid<>"") then
    sql="select * from ["& datafrom &"] where id in("& sqlid &") "&taxis
    set rs=server.createobject("adodb.recordset")
    rs.open sql,conn,0,1
    while not rs.eof
	Response.Write "<table width=""100%"" border=""0"" cellspacing=""0"" cellpadding=""0"">"&VbCrLf
	Response.Write "  <tr>"&VbCrLf
	Response.Write "    <td width=""5%"" height=""25"" bgcolor=""#EDEEEF"" align=""center""><font color=""#333333""><b>"&rs("ID")&"</b></font></td>"&VbCrLf
	Response.Write "    <td width=""50%"" height=""25"" bgcolor=""#EDEEEF"" align=""left"" style=""padding-left: 8px""><font color=""#333333""><b>"&rs("Company")&"</b></font>("&rs("Linkman")&""&rs("Sex")&")</td>"&VbCrLf
	Response.Write "    <td width=""45%"" height=""25"" bgcolor=""#EDEEEF"" align=""right"" style=""padding-right: 8px""><font color=""#808080"">留言时间：</font>"&rs("Addtime")&"</td>"&VbCrLf
	Response.Write "  </tr>"&VbCrLf
	Response.Write "</table>"&VbCrLf
	Response.Write "<table width=""100%"" border=""0"" cellspacing=""0"" cellpadding=""1"">"&VbCrLf
	Response.Write "  <tr align=""left"">"&VbCrLf
	Response.Write "    <td width=""15%"" height=""20"" align=""right"" style=""padding-right: 8px"">咨询主题：</td>"&VbCrLf
	Response.Write "    <td><b>"&rs("MesName")&"</b></td>"&VbCrLf
	Response.Write "  </tr>"&VbCrLf
	Response.Write "  <tr align=""left"">"&VbCrLf
	Response.Write "    <td height=""20"" align=""right"" style=""padding-right: 8px"">咨询内容：</td>"&VbCrLf
	Response.Write "    <td style=""padding-right: 5px"">"&MessageContent(rs("MemID"),rs("SecretFlag"),HtmlStrReplace(rs("Content")))&"</td>"&VbCrLf
	Response.Write "  </tr>"&VbCrLf
	If rs("ReplyContent") <> "" Then
	Response.Write "  <tr>"&VbCrLf
	Response.Write "    <td>&nbsp;</td>"&VbCrLf
	Response.Write "    <td bgcolor=""#F7F7F7"" style=""line-height: 200%""><font color=""#333333""><b>管理员回复：</b></font><br />"&MessageReply (rs("MemID"),rs("MesName"),rs("SecretFlag"),rs("ReplyContent"))&"</td>"&VbCrLf
	Response.Write "  </tr>"&VbCrLf
	End If
	Response.Write "  <tr>"&VbCrLf
	Response.Write "    <td colspan=""2"" height=""5""></td>"&VbCrLf
	Response.Write "  </tr>"&VbCrLf
	Response.Write "</table>"&VbCrLf
	rs.movenext
    wend
  else
    response.write "<center>暂无相关信息</center>"
	exit function
  end if
  Response.Write "<table width=""98%"" border=""0"" cellspacing=""0"" cellpadding=""0"">"&VbCrLf
  Response.Write "  <tr height=""35"">"&VbCrLf
  Response.Write "    <td align=""center"">"&VbCrLf
  Response.Write "共<strong style=""color:red"">"&idcount&"</strong>条记录 页次：<strong style=""color:red"">"&page&"</strong>/"&pagec&" 每页：<strong style=""color:red"">"&pages&"</strong>条记录" & vbCrLf
  pagenmin=page-pagenc
  pagenmax=page+pagenc
  if(pagenmin<1) then pagenmin=1
  if(page>1) then response.write ("<a href="""& myself &"Page=1"" title=""回到第一页""><font face=""webdings"" color=""#000000"">9</font></a> ")
  if page-(pagenc*2+1)<=0 then
	pageprevious=1
  else
	pageprevious=page-(pagenc*2+1)
  end if
  if(pagenmin>1) then response.write ("<a href="""& myself &"Page="& pageprevious &""" title=""第"& pageprevious &"页""><font face=""webdings"" color=""#000000"">3</font></a> ")
  if(pagenmax>pagec) then pagenmax=pagec
  for i = pagenmin to pagenmax
	if(i=page) then
	  response.write ("&nbsp;<strong style=""color:red"">"& i &"</strong>&nbsp;")
	else
	  response.write ("[<a href="""& myself &"Page="& i &""">"& i &"</a>]")
	end if
  next
  if page+(pagenc*2+1)>=pagec then
    pagenext=pagec
  else
    pagenext=page+(pagenc*2+1)
  end if
  if(pagenmax<pagec) then response.write (" <a href="""& myself &"Page="& pagenext &""" title=""跳转到第"&pagenext&"页""><font face=""webdings"" color=""#999999"">:</font></a> ")
  if(page<pagec) then response.write (" <a href="""& myself &"Page="& pagec &""" title=""跳转到第"&pagec&"页""><font face=""webdings"" color=""#000000"">:</font></a>")
  Response.Write "    </td>"&VbCrLf
  Response.Write "  </tr>"&VbCrLf
  Response.Write "</table>"&VbCrLf
  rs.close
  set rs=nothing
end function

function MessageContent(MemID,SecretFlag,Content)
  if SecretFlag then
    dim rs,sql
    set rs = server.createobject("adodb.recordset")
    sql="select * from wygkcndiv_Members where ID="&MemID
    rs.open sql,conn,1,1
    if rs("MemName")=session("MemName") and session("MemLogin")="Succeed" then
	  MessageContent= Content
	else
	  MessageContent="隐秘内容"
	end if
    rs.close
    set rs=nothing
  else
    MessageContent=Content
  end if
end function

function MessageReply(MemID,MesName,SecretFlag,ReplyContent)
  if ReplyContent<>"" then
    if SecretFlag then
      dim rs,sql
      set rs = server.createobject("adodb.recordset")
      sql="select * from wygkcndiv_Members where ID="&MemID
      rs.open sql,conn,1,1
      if rs("MemName")=session("MemName") and session("MemLogin")="Succeed" then
        MessageReply=MessageReply&HtmlStrReplace(ReplyContent)
	  else
        MessageReply=MessageReply&"<font color=""#CC0000"">回复已隐藏，请登录后查看。</font>"
	  end if
      rs.close
      set rs=nothing
    else
        MessageReply=MessageReply&HtmlStrReplace(ReplyContent)
    end if
  end if
end function
%>