<%@ Import Namespace="System.Data"%>
<%@ Import Namespace="System.Data.SqlClient"%>
<%@ Page CodeBehind="vip04.aspx.cs" Language="c#" AutoEventWireup="false" Inherits="yn165.vip04" %>
<HTML>
	<HEAD>
		<TITLE>创库网络(昆明)</TITLE>
		<META content="text/html; charset=gb2312" http-equiv="Content-Type">
		<META content="no-cache" http-equiv="Pragma">
		<STYLE type="text/css">INPUT { FONT-SIZE: 9pt; FONT-FAMILY: "宋体"; TEXT-DECORATION: none }
	A:hover { COLOR: #ff6666; FONT-FAMILY: "宋体"; TEXT-DECORATION: none }
	A { FONT-FAMILY: "宋体"; TEXT-DECORATION: none }
	TD { FONT-SIZE: 9pt; FONT-FAMILY: "宋体", "Arial", "Times New Roman"; TEXT-DECORATION: none }
	.unnamed1 { FONT-SIZE: 7pt; TEXT-DECORATION: none }
	.unnamed2 { FONT-SIZE: 12pt; TEXT-DECORATION: none }
	.unnamed3 { FONT-SIZE: 10.5pt; TEXT-DECORATION: none }
	</STYLE>
		<!--web design:zheng guiwen E-mail:guiwen@zheng.com.cn -->
		<META content="MSHTML 5.00.2614.3500" name="GENERATOR">
	
<script language="JavaScript">
<!--
function KBAddFavorite(theTit) {
// Copyright (c) 1998 by Kevin Bartz. All rights reserved. This site has been enhanced by one of Kevin Bartz's behaviours! Mail him at kevinbartz@geocities.com! This line must remain in the script.
IE4=(document.all)? 1 : 0
if (IE4) {
theSite=window.location
window.external.AddFavorite(theSite,theTit)
}
}
//-->
</script>
</HEAD>
	<BODY aLink="#000000" bgColor="#ffffff" link="#000000" text="#000000" vLink="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="">
		<span class="big2"></span>
		
<div align="center" class="big"> 
  <table cellspacing="0" cellpadding="0" width="760" border="0">
    <tr> 
      <td valign="bottom" align="left" width="79"><img src="new/top1.gif" width="79" height="65"></td>
      <td valign="bottom" align="left" width="192"><img src="new/top2.gif" width="192" height="65"></td>
      <td valign="bottom" align="left" width="96"><img src="new/top3.gif" width="96" height="65"></td>
      <td valign="bottom" align="left" width="107"><img src="new/top4.gif" width="107" height="65" usemap="#Map" border="0"><map name="Map"><area shape="rect" coords="11,17,104,53" href="vip01d.aspx"></map></td>
      <td valign="bottom" align="left" width="89"><img src="new/top5.gif" width="89" height="65" usemap="#Map3" border="0"><map name="Map3"><area shape="rect" coords="5,20,88,53" href="003.aspx"></map></td>
      <td valign="bottom" align="left" width="58"><img src="new/top6.gif" width="86" height="65" usemap="#Map4" border="0"><map name="Map4"><area shape="rect" coords="3,18,84,53" href="004.aspx"></map></td>
      <td valign="bottom" align="left" width="139"><img src="new/top7.gif" width="111" height="65" usemap="#Map5" border="0"><map name="Map5"><area shape="rect" coords="2,19,99,53" href="8.aspx?class=%D0%E9%C4%E2%D6%F7%BB%FA%B3%A3%CA%B6"></map></td>
    </tr>
  </table>
  <table width="757" border="0" cellspacing="0" cellpadding="0">
    <tr> 
      <td><img src="new/bai.gif" width="4" height="1"></td>
    </tr>
  </table>
  <table width="760" border="0" cellspacing="1" cellpadding="0" bgcolor="#0079de">
				<tr align="middle" valign="center">
					<td><a href="index.aspx"><font color="#ffffff">返回首页</font></a></td>
					<td width="2"><img src="img/l0.gif" width="1" height="21"></td>
					<td><a href="0.aspx"><font color="#ffffff">域名注册</font></a></td>
					<td width="2"><img src="img/l0.gif" width="1" height="21"></td>
					<td><a href="1.htm"><font color="#ffffff">虚拟主机</font></a></td>
					<td width="2"><img src="img/l0.gif" width="1" height="21"></td>
					<td><a href="2.htm"><font color="#ffffff">网页设计</font></a></td>
					<td width="2"><img src="img/l0.gif" width="1" height="21"></td>
					<td><a href="3.htm"><font color="#ffffff">应用开发</font></a></td>
					<td width="2"><img src="img/l0.gif" width="1" height="21"></td>
					<td><a href="4.htm"><font color="#ffffff">企业邮局</font></a></td>
					<td width="2"><img src="img/l0.gif" width="1" height="21"></td>
					<td><a href="5.htm"><font color="#ffffff">维护推广</font></a></td>
					<td width="2"><img src="img/l0.gif" width="1" height="21"></td>
					<td><a href="6.htm"><font color="#ffffff">网站策划</font></a></td>
					<td width="2"><img src="img/l0.gif" width="1" height="21"></td>
					<td><a href="7.aspx"><font color="#ffffff">代理专区</font></a></td>
					<td width="2"><img src="img/l0.gif" width="1" height="21"></td>
					<td><a href="8.aspx?class=域名常见问题"><font color="#ffffff">客户服务</font></a></td>
					<td width="2"><img src="img/l0.gif" width="1" height="21"></td>
					<td><a href="9.htm"><font color="#ffffff">关于我们</font></a></td>
				</tr>
			</table>
			<table width="760" border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td><img src="img/00.gif" width="760" height="1"></td>
				</tr>
			</table>
			<table width="760" border="0" cellspacing="0" cellpadding="0" background="img/3di.gif">
				<tr>
					<td width="67" align="left" valign="top">
						<table width="215" border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td><img src="img/3left1e.gif" width="215" height="53"></td>
							</tr>
						</table>
						<table width="215" border="0" cellspacing="3" cellpadding="3" background="img/3leftdi.gif">
							<tr>
								<td width="21">&nbsp;</td>
								<td width="171">
									<asp:Label id="Label1" runat="server">Label</asp:Label>
								</td>
							</tr>
						</table>
						<table width="215" border="0" cellspacing="3" cellpadding="3" background="img/3left2.gif" height="28">
							<tr>
								<td height="24" width="26">&nbsp;</td>
								<td height="24" width="166"><font color="#ffffff">自 助 管 理</font></td>
							</tr>
						</table>
						<table width="215" border="0" cellspacing="1" cellpadding="4" background="img/3leftdi.gif">
							<tr>
								<td width="28">&nbsp;</td>
								<td width="151" bgcolor="#a2c5ee" align="middle" class="unnamed3"><a href="vip01.aspx">[ 
										修 改 资 料 ]</a></td>
								<td width="5">&nbsp;</td>
							</tr>
							<tr>
								<td width="28">&nbsp;</td>
								<td width="151" bgcolor="#a2c5ee" align="middle" class="unnamed3">
									<a href="vip02.aspx">[ 修 改 密 码 ]</a></td>
								<td width="5">&nbsp;</td>
							</tr>
							<tr>
								<td width="28">&nbsp;</td>
								<td width="151" bgcolor="#a2c5ee" align="middle" class="unnamed3"><a href="vip03.aspx">[ 
										订 单 管 理 ]</a></td>
								<td width="5">&nbsp;</td>
							</tr>
							<tr>
								<td width="28">&nbsp;</td>
								<td width="151" bgcolor="#a2c5ee" align="middle" class="unnamed3">
									<a href="vip04.aspx">[ 财 务 管 理 ]</a></td>
								<td width="5">&nbsp;</td>
							</tr>
							<tr>
								<td width="28">&nbsp;</td>
								<td width="151" bgcolor="#a2c5ee" align="middle" class="unnamed3">
									<a href="vip05.aspx">[ 进 度 管 理 ]</a></td>
								<td width="5">&nbsp;</td>
							</tr>
							<tr>
								<td width="28">&nbsp;</td>
								<td width="151" bgcolor="#a2c5ee" align="middle" class="unnamed3"><a href="vip06.aspx">[ 
										意 见 反 馈 ]</a></td>
								<td width="5">&nbsp;</td>
							</tr>
							<tr>
								<td width="28">&nbsp;</td>
								<td width="151" bgcolor="#a2c5ee" align="middle" class="unnamed3"><a href="vip07.aspx">[ 
										域 名 管 理 ]</a></td>
								<td width="5">&nbsp;</td>
							</tr>
							<tr>
								<td width="28" height="20">&nbsp;</td>
								<td width="151" bgcolor="#a2c5ee" align="middle" height="20" class="unnamed3"><a href="vip08.aspx">[ 
										故 障 受 理 ]</a></td>
								<td width="5" height="20">&nbsp;</td>
							</tr>
							<tr>
								<td width="28">&nbsp;</td>
								<td width="151" bgcolor="#a2c5ee" align="middle" class="unnamed3"><a href="vip09.aspx">[ 
										交 费 确 认 ]</a></td>
								<td width="5">&nbsp;</td>
							</tr>
							<tr>
								<td width="28">&nbsp;</td>
								<td width="151" bgcolor="#a2c5ee" align="middle" class="unnamed3">
									<a href="vip10.aspx">[ 操 作 手 册 ]</a></td>
								<td width="5">&nbsp;</td>
							</tr>
							<tr>
								<td width="28">&nbsp;</td>
								<td width="151" bgcolor="#a2c5ee" align="middle" class="unnamed3"><a href="index.aspx">[ 
										退 出 管 理 ]</a></td>
								<td width="5">&nbsp;</td>
							</tr>
						</table>
						<table width="100%" border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td><img src="img/3left3.gif" width="215" height="36"></td>
							</tr>
						</table>
					</td>
					<td width="693" align="left" valign="top">
						<table width="100%" border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td><img src="img/4top.gif" width="542" height="27"></td>
							</tr>
						</table>
						<table width="520" border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td height="18" width="18">&nbsp;</td>
								<td height="18" width="515">
									<table width="100%" border="0" cellspacing="1" cellpadding="4">
										<tr align="middle">
											<td class="unnamed2">
												<a href="vip1.aspx">财务管理</a></td>
										</tr>
									</table>
									<table width="100%" border="0" cellspacing="10" cellpadding="0">
										<tr align="left">
											<td>以下是每笔您到帐资金：</td>
										</tr>
									</table>
									
              <TABLE id="Table2" cellSpacing="1" cellPadding="4" width="100%" bgColor="#cccccc" border="0">
                <TR bgColor="#E4E4E4"> 
                  <TD width="26%"> 
                    <DIV align="center">时间</DIV>
											</TD>
											
                  <TD width="32%"> 
                    <DIV align="center">用途</DIV>
											</TD>
											
                  <TD width="19%"> 
                    <DIV align="center">汇款方式</DIV>
											</TD>
											
                  <TD width="23%"> 
                    <DIV align="center">到帐金额 （元）</DIV>
											</TD>
										</TR>
										<%
string account,temp;
int get_price=0,pay_price=0;
SqlConnection conn = new SqlConnection("server=211.155.254.117;database=yn165;uid=yn165;pwd=159753");
conn.Open();
//先取出account
string sql = "select * from user_reg where id = " + this.Session["id"];
SqlCommand cmd = new SqlCommand(sql,conn);
SqlDataReader reader = cmd.ExecuteReader();
reader.Read();
account=reader.GetValue(1).ToString();
cmd.Dispose();
reader.Close();
//根据account得出该用户订单
sql="select * from money_get where account='" + account + "'";
cmd = new SqlCommand(sql,conn);
reader = cmd.ExecuteReader();
while (reader.Read()) {
%>
										<TR bgColor="#ffffff">
											
                  <TD width="26%"> 
                    <DIV align="center"><%=reader.GetValue(2).ToString()%></DIV>
											</TD>
											
                  <TD width="32%"> 
                    <DIV align="center"><%=reader.GetValue(5).ToString()%></DIV>
											</TD>
											
                  <TD width="19%"> 
                    <DIV align="center"><%=reader.GetValue(4).ToString()%></DIV>
											</TD>
											
                  <TD width="23%"> 
                    <DIV align="center"><%=reader.GetValue(3).ToString()%></DIV>
											</TD>
										</TR>
										<%
										get_price=get_price+Convert.ToInt16(reader.GetValue(3)); 
										} 
										reader.Close();
										cmd.Dispose();
										%>
									</TABLE>
									<TABLE id="Table3" cellSpacing="10" cellPadding="0" width="100%" border="0">
										<TR align="left">
											
                  <TD><font color="#CC0000">以下是您花销(已用)的资金列表：</font></TD>
										</TR>
									</TABLE>
									
              <TABLE id="Table4" cellSpacing="1" cellPadding="4" width="100%" bgColor="#cccccc" border="0">
                <TR bgColor="#E4E4E4"> 
                  <TD width="26%"> 
                    <DIV align="center">时间</DIV>
                  </TD>
                  <TD width="32%"> 
                    <DIV align="center">定单号码</DIV>
                  </TD>
                  <TD width="19%" align="center">详细情况</TD>
                  <TD width="23%" align="center">定单金额（元）</TD>
                </TR>
                <%//取订单号
int count=0,index;
//为取item数量定义
int count_item=0;
int index_item=0;
int order_price=0;

//
sql="select * from ordersheet where account='"+ account + "'";
cmd = new SqlCommand(sql,conn);
reader = cmd.ExecuteReader();
while (reader.Read()) {
count++;
}
reader.Close();
string[] ord_number= new string[count];
string[] ord_date=new string[count];
reader=cmd.ExecuteReader();
count=0;

while (reader.Read()){
ord_number[count]=reader.GetValue(1).ToString();
ord_date[count]=reader.GetValue(3).ToString();
count++;
}
reader.Close();
cmd.Dispose();
for (index=0;index<count;index++)
{
%> 
                <TR bgColor="#ffffff"> 
                  <TD width="26%"> 
                    <DIV align="center"><%=ord_date[index]%></DIV>
                  </TD>
                  <TD width="32%"> 
                    <DIV align="center"><%=ord_number[index]%></DIV>
                  </TD>
                  <TD width="19%" align="center"><a href="ord_view.aspx?order_number=<%=ord_number[index]%>">查看订单</a></TD>
                  <TD width="23%" align="center"><% sql="select * from item where order_code='" + ord_number[index] + "'";
												cmd = new SqlCommand(sql,conn);
												reader = cmd.ExecuteReader();
                                                
												while (reader.Read()) {
                                               												
                                                count_item++;
                                                
												}
												reader.Close();
                                                
												//定义变量存取sp_code;
												string[] sp_code=new string[count_item];
                                                int[] num=new int[count_item];
												count_item=0;
												reader=cmd.ExecuteReader();
												while (reader.Read())
												{   num[count_item]=Convert.ToInt16(reader.GetValue(3).ToString());
													sp_code[count_item]=reader.GetValue(2).ToString();
													count_item++;
												}
												reader.Close();
												cmd.Dispose();
												//从商品表中取金额
                                               
												for (index_item=0;index_item<count_item;index_item++)
												{
													sql="select * from shangping where sp_code='" + sp_code[index_item] + "'";
													cmd = new SqlCommand(sql,conn);
													reader = cmd.ExecuteReader();
													
                                                    if (reader.Read())
													{
														order_price =order_price+ Convert.ToInt16(reader.GetValue(4))*num[index_item];
													}
													reader.Close();
													cmd.Dispose();
												}	
												pay_price += order_price;
												Response.Write(order_price.ToString());
												order_price=0;
												%></TD>
                </TR>
                <% } %> 
              </TABLE>
									
              <table width="100%" border="0" cellspacing="5" cellpadding="5">
                <tr> 
                  <td><font color="#ff3333"><b>以下是你的财务状况:</b></font></td>
                </tr>
              </table>
              <table id="Table1" cellspacing="1" cellpadding="4" width="100%" bgcolor="#cccccc" border="0">
                <tr bgcolor="#EDEDDA"> 
                  <td width="11%" height="23"> 
                    <div align="center">总交费金额（元）</div>
                  </td>
                  <td width="14%" height="23"> 
                    <div align="center">已用金额（元）</div>
                  </td>
                  <td width="14%" height="23"> 
                    <div align="center"><b>拖欠金额 （元）</b></div>
                  </td>
                  <td width="14%" height="23"> 
                    <div align="center">余额（元）</div>
                  </td>
                </tr>
                <tr bgcolor="#ffffff"> 
                  <td width="11%"> 
                    <div align="center"><%=get_price%></div>
                  </td>
                  <td width="14%"> 
                    <div align="center"><%=pay_price%></div>
                  </td>
                  <td width="14%"> 
                    <div align="center"> <font color="#FF0000"><% if (get_price>=pay_price)
													{
														Response.Write("0");
													}
													else
													{
														Response.Write(Convert.ToString(pay_price-get_price));
													}
													
												%></font></div>
                  </td>
                  <td width="14%"> 
                    <div align="center"> <% if (get_price<=pay_price)
													{
														Response.Write("0");
													}
													else
													{
														Response.Write(Convert.ToString(get_price-pay_price));
													}
													
												%> </div>
                  </td>
                </tr>
              </table>
									<table width="100%" border="0" cellspacing="5" cellpadding="5">
										<tr>
											
                  <td>如果您觉得您的资金有任何问题，请致电：0871- 5326265 5326078 转808</td>
										</tr>
										<tr>
											<td>请交费后及时进行<a href="vip09.aspx">交费确认</a>！</td>
										</tr>
									</table>
								</td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
			
  <table cellspacing="1" cellpadding="0" width="760" bgcolor="#0079de" border="0">
    <tr valign="center" align="center"> 
      <td height="20"><a href="001.aspx"><font color="#FFFFFF">个性订购</font></a> 
        <font color="#FFFFFF">|</font> <a href="006b.htm"><font color="#FFFFFF">售后服务</font></a> 
        <font color="#FFFFFF">|</font> <a href="rmb.htm"><font color="#FFFFFF">付款说明</font></a> 
        <font color="#FFFFFF">| </font><a href="006g.htm"><font color="#FFFFFF">法律申明</font></a> 
        <font color="#FFFFFF">|</font> <font color="#FFFFFF">隐私政策</font> <font color="#FFFFFF">|</font> 
        <a href="9.htm"><font color="#FFFFFF">关于我们</font></a> <font color="#FFFFFF">|</font> 
        <a href="7.aspx"><font color="#FFFFFF">代理合作</font></a> <font color="#FFFFFF">|</font> 
        <a href="#" onClick="KBAddFavorite('创库网络')"><font color="#FFFFFF">自动访问本网站</font></a></td>
    </tr>
  </table>
  <table width="760" border="0" cellspacing="0" cellpadding="0">
    <tr> 
      <td><img src="new/hui.gif" width="760" height="3"></td>
    </tr>
  </table>
  <table width="760" border="0" cellspacing="0" cellpadding="0" bgcolor="FAFAFA">
    <tr align="center"> 
      <td height="57"> 
        <table width="422" border="0" cellspacing="0" cellpadding="0">
          <tr align="center" valign="middle"> 
            <td height="22">服务热线：<font face="Arial, Helvetica, sans-serif">86-871-5326265 
              5326078 转分机 802、803、808</font></td>
          </tr>
          <tr align="center" valign="middle" bgcolor="#E0E0E0"> 
            <td height="22">中国云南.昆明创库网络科技有限公司<font face="Verdana, Arial, Helvetica, sans-serif">&reg; 
              </font>版权所有</td>
          </tr>
          <tr align="center" valign="middle"> 
            <td height="22"><font face="Arial, Helvetica, sans-serif" class="unnamed1">Copyright 
              &copy; 2002 Kunming Cacool Network Technical Co.LTD, All rights 
              reserved</font></td>
          </tr>
          <tr align="center" valign="middle"> 
            <td height="2"><img src="new/xia.gif" width="420" height="6"></td>
          </tr>
          <tr align="center" valign="middle"> 
            <td height="2"><img src="new/utf-8.gif" width="359" height="17"></td>
          </tr>
        </table>
      </td>
    </tr>
    <tr align="center"> 
      <td height="57"><img src="new/315.gif" width="761" height="60" usemap="#Map2Map" border="0"><map name="Map2Map"><area shape="rect" coords="333,1,429,60" href="315.htm" alt="验证企业营业执照" title="验证企业营业执照"></map></td>
    </tr>
  </table>
</div>
	</BODY>
</HTML>
