<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!--#include file="../Include/conn.asp" -->
<!--#include file="../Include/ConnDatabase.asp" -->
<!--#include file="../Include/NoHackSql.Asp" -->
<%
'=====================================
'天天企业网站管理系统  TianTianCMS
'天天网络科技工作室版权所有
'官方网站http://www.ip126.com
'QQ:530051328 mail:bbfhq@163.com
'=====================================
%>
<%call SiteInfo
headid=7
Seotitle="The member information"
%>
<!--#include file="Head.Asp" -->
<%
if not (session("MemName")<>"" and session("MemLogin")="Succeed") then
  response.Write "<script language=javascript>alert('Please login first！');location.href='Index.asp';</script>"
  response.end
end if
%>
<link rel="stylesheet" href="../admin/Images/Admin.css">
<TABLE width="960" border=0 align="center" cellPadding=0 cellSpacing=0 bgcolor="#FFFFFF">
  <TR>
    <TD height="5"></TD>
  </TR>
  <TR> 
    <TD height="172" ><table width="960" height="100%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr> 
          <td class="tdbg_left"  width="190" height="179" valign="top" > <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td height="34" class="title_left">&nbsp;&nbsp;&nbsp;<img src="../images/smallbook.jpg" width="10" height="10">&nbsp;&nbsp;The user login 
                </td>
              </tr>
              <tr> 
                <td height="5"></td>
              </tr>
              <tr> 
                <td height="10"><table width="88%" border="0" align="center" cellpadding="0" cellspacing="0">
                    <tr> 
                      <td> 
                       
	<iframe src="login.asp"  frameborder="0" border="0px" scrolling="no" class="frame" height="120px" width="160px"></iframe>
                      </td>
                    </tr>
                  </table></td>
              </tr>
              <tr> 
                <td height="5"></td>
              </tr>
            </table>
            <table width="100%" border="0" cellpadding="0" cellspacing="0">
              <tr> 
                <td height="34" class="title_left">&nbsp;&nbsp;&nbsp;<img src="../images/smallbook.jpg" width="10" height="10">&nbsp;&nbsp;The member center</td>
              </tr>
     
 	<%=WebMenu()%>

            </table></td>
          <td width="6"></td>
          <td valign="top"><table Class=border width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
              <tr> 
                <td height="206" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr> 
                      <td class="
title_right" height="32">&nbsp;&nbsp;&nbsp;<img src="../images/smallbook.jpg" width="10" height="10">&nbsp;The member center</td>
                    </tr>
					            <TR> 
              <TD    
                  height=1> 
				  
 
 
 <table width="100%" height="19" border="0" align="center" cellpadding="0" cellspacing="0">
                  <tr> 
                            <td width="80%" height="18" bgcolor="#eeeeee"><%=WebLocation()%>Member of the purse</td>
                        <td width="79%" bgcolor="#eeeeee">&nbsp; </td>
                  </tr>
                  <tr> 
                    <td height="1" colspan="2" bgcolor="#999999"></td>
                  </tr>
                </table>
                <table width="100%" border="0" align="center" cellpadding="0" cellspacing="3" bgcolor="#FBFEFF">
                  <tr> 
                    <td height="8"></td>
                  </tr>
                 
                  <tr> 
                        <td>
<script language="javascript">
<!--
function myform_onsubmit() {
if(document.myform.total.value=="") 
	{
	    alert("Top-up amount can't be empty!");
		document.myform.total.focus()
	    return false;
	}
}
// --></script>
<%dim rs,sql,wallet
  set rs = server.createobject("adodb.recordset")
  sql="select * from TianTianCMS_Members where MemName='"&session("MemName")&"'"
  rs.open sql,conn,1,1
  if rs.eof then
    response.write "<center>"&title12&"</center>"
  else%>
		<table width="95%" border="0" align="center" cellpadding="3" cellspacing="5">
		  <form action="Pay.asp?MemberID=<%=rs("id")%>" method="post" name="myform" id="myform" onSubmit="return myform_onsubmit()">
              <tr>
                <td width="200" align="right">Member login ID：</td>
                <td><% =session("MemName")%></td>
              </tr>
              <tr>
                <td align="right">The wallet balance：</td>
                <td><%=rs("wallet")%> yuan</td>
              </tr>
              <tr>
                <td width="200" align="right" colspan="2"><b>The purse online top-up</b></td>
              </tr>
              <tr>
                <td align="right">Top-up amount：</td>
                <td><input name="total" type="text" id="total" value="" size="10" maxlength="10" onKeyUp="if(isNaN(value)){alert('Amount only allow you to enter the Numbers');value='';}"   onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d|^\.]/g,''))"/> yuan <font color="red">*</font></td>
              </tr>

              <tr>
                <td align="right">&nbsp;</td>
                <td><input name="Submit" type="submit" value="I'd like to top-up" /></td>
              </tr>
<input type="hidden" name="username" value="<% =session("MemName")%>" />
<input type="hidden" name="OrderName" value="Member<% =session("MemName")%>top-up" />
<input type="hidden" name="RealName" value="<%=rs("RealName")%>" />
<input type="hidden" name="Address" value="<%=rs("Address")%>" />
<input type="hidden" name="ZipCodee" value="<%=rs("ZipCode")%>" />
<input type="hidden" name="Telephone" value="<%=rs("Telephone")%>" />
<input type="hidden" name="Mobile" value="<%=rs("Mobile")%>" />
<input type="hidden" name="paymentType" value="cz" />				      
			  </form>
            </table>
<%end If
rs.close
set rs=Nothing %>
<table class="tableborder" width="99%" border="0" align="center" cellpadding="3" cellspacing="1">
    <td align="center" colspan="8"><b>The financial revenues and expenditures subsidiary</b></td>
</table>
<table class="tableborder" width="99%" border="0" align="center" cellpadding="3" cellspacing="1">
<tr>
    <td align="center" width="20">ID</td>
    <td align="center" width="100">The order number</td>
	<td align="center" width="50">project </td>
	<td align="center" width="60">income</td>
	<td align="center" width="60">spending </td>
	<td align="center" width="80">Operation of</td>
	<td align="center" width="150">Operating time</td>
	<td align="center" width="50">audit</td>
	<td align="center" width="150">Audit time</td>
</tr>
<% MemList() %>
</table>
						 </td>
                  </tr>             
                  <tr> 
                    <td height="8"><div align="right"></div></td>
                  </tr>
                </table> 
                      </TD>
            </TR>
                  </table>
                  
                </td>
              </tr>
			  
            </table></td>
        </tr>
      </table></td>
  </tr>
</table>
<!--#include file="Foot.Asp"-->
<%
function MemList()
  dim idCount
  dim pages
      pages=10
  dim pagec
  dim page
      page=clng(request("Page"))
  dim pagenc
      pagenc=2
  dim pagenmax
  dim pagenmin
  dim datafrom
      datafrom="TianTianCMS_financiallog"
  dim datawhere
	  datawhere="where members='"&session("MemName")&"'"
  dim sqlid
  dim Myself,PATH_INFO,QUERY_STRING
      PATH_INFO = request.servervariables("PATH_INFO")
	  QUERY_STRING = request.ServerVariables("QUERY_STRING")'
      if QUERY_STRING = "" or Instr(PATH_INFO & "?" & QUERY_STRING,"Page=")=0 then
	    Myself = PATH_INFO & "?"
	  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
  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 "<tr>" & vbCrLf
      Response.Write "<td nowrap class=""forumRow"">"&rs("ID")&"</td>" & vbCrLf
      Response.Write "<td nowrap class=""forumRow"">"&rs("ddhm")&"</td>" & vbCrLf
      Response.Write "<td nowrap class=""forumRow"">"&rs("OrderName")&"</td>" & vbCrLf
      Response.Write "<td nowrap class=""forumRow"">"&rs("income")&"</td>" & vbCrLf
      Response.Write "<td nowrap class=""forumRow"">"&rs("spending")&"</td>" & vbCrLf
      Response.Write "<td nowrap class=""forumRow"">"&rs("operator")&"</td>" & vbCrLf
      Response.Write "<td nowrap class=""forumRow"">"&rs("Operatingtime")&"</td>" & vbCrLf
      if rs("audit") then
        Response.Write "<td nowrap align='center' class=""forumRow""><font color='green'>√</font></td>" & vbCrLf
      else
        Response.Write "<td nowrap align='center' class=""forumRow""><font color='red'>×</font></td>" & vbCrLf
	  end If
      Response.Write "<td nowrap class=""forumRow"">"&rs("Operatingtime")&"</td>" & vbCrLf
      Response.Write "</tr>" & vbCrLf
	  rs.movenext
    wend
  else
    response.write "<tr><td nowrap align='center' colspan='12' class=""forumRow"">No record </td></tr>"
  end if
  Response.Write "<tr>" & vbCrLf
  Response.Write "<td colspan='13' nowrap class=""forumRow"">" & vbCrLf
  Response.Write "<table width='100%' border='0' align='center' cellpadding='0' cellspacing='0'>" & vbCrLf
  Response.Write "<tr>" & vbCrLf
  Response.Write "<td class=""forumRow"">A total of：<font color='red'>"&idcount&"</font>records Page one：<font color='red'>"&page&"</font></strong>/"&pagec&" Each page：<font color='red'>"&pages&"</font>a</td>" & vbCrLf
  Response.Write "<td align='right'>" & vbCrLf
  pagenmin=page-pagenc
  pagenmax=page+pagenc
  if(pagenmin<1) then pagenmin=1
  if(page>1) then response.write ("<a href='"& myself &"Page=1'><font style='font-size: 14px; font-family: Webdings'>9</font></a> ")
  if(pagenmin>1) then response.write ("<a href='"& myself &"Page="& page-(pagenc*2+1) &"'><font style='font-size: 14px; font-family: Webdings'>7</font></a> ")
  if(pagenmax>pagec) then pagenmax=pagec
  for i = pagenmin to pagenmax
	if(i=page) then
	  response.write (" <font color='red'>"& i &"</font> ")
	else
	  response.write ("[<a href="& myself &"Page="& i &">"& i &"</a>]")
	end if
  next
  if(pagenmax<pagec) then response.write (" <a href='"& myself &"Page="& page+(pagenc*2+1) &"'><font style='font-size: 14px; font-family: Webdings'>8</font></a> ")
  if(page<pagec) then response.write ("<a href='"& myself &"Page="& pagec &"'><font style='font-size: 14px; font-family: Webdings'>:</font></a> ")
  Response.Write "The first<input name='SkipPage' onKeyDown='if(event.keyCode==13)event.returnValue=false' onchange=""if(/\D/.test(this.value)){alert('Please enter the need to jump to the number of pages and must be an integer！');this.value='"&Page&"';}"" style='width: 28px;' type='text' value='"&Page&"'>Page" & vbCrLf
  Response.Write "<input name='submitSkip' type='button' onClick='GoPage("""&Myself&""")' value='Go to the'>" & vbCrLf
  Response.Write "</td>" & vbCrLf
  Response.Write "</tr>" & vbCrLf
  Response.Write "</table>" & vbCrLf
  rs.close
  set rs=nothing
  Response.Write "</td>" & vbCrLf
  Response.Write "</tr>" & vbCrLf
end Function
%>