<%@ Page CodeBehind="ad_vieworder.aspx.cs" Language="c#" AutoEventWireup="false" Inherits="yn165.admin.ad_vieworder" %>
<%@ Import Namespace="System.Data.SqlClient"%>
<%@ Import Namespace="System.Data"%>
<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 }
	.big { FONT-SIZE: 10.5pt; 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 }
	.big2 { FONT-SIZE: 10.5pt; LINE-HEIGHT: 13pt; FONT-FAMILY: "宋体"; TEXT-DECORATION: none }
	.unnamed1 { FONT-SIZE: 7pt; TEXT-DECORATION: none }
	.unnamed2 { FONT-SIZE: 12pt; TEXT-DECORATION: none }
	</STYLE>
		<!--web design:zheng guiwen E-mail:guiwen@zheng.com.cn -->
		<META content="Microsoft FrontPage 4.0" name="GENERATOR">
		<base target="bottom">
	</HEAD>
	<BODY aLink="#000000" bgColor="#f0f0f0" link="#000000" text="#000000" vLink="#990000" leftmargin="0" topmargin="10" marginwidth="0" marginheight="0" onLoad="">
		<table width="100%" border="0" cellspacing="3" cellpadding="3">
			<tr>
				<td>
					<div align="center" class="unnamed2"><font color="#ff3300">定单管理（查看定单详细情况）</font></div>
				</td>
			</tr>
			<tr align="middle">
				<td>
					<table width="817" border="0" cellspacing="1" cellpadding="5" height="8" bgcolor="#cccccc">
						<tr bgcolor="#ffffff">
							<td width="101">定单号码：</td>
							<td width="691">&nbsp;
								<asp:Label id="order_number" runat="server" Width="588px">Label</asp:Label></td>
						</tr>
						<tr bgcolor="#ffffff">
							<td width="101">提交时间：</td>
							<td width="691">&nbsp;
								<asp:Label id="order_date" runat="server" Width="588px">Label</asp:Label></td>
						</tr>
						<tr bgcolor="#ffffff">
							<td width="101">提交人会员名：</td>
							<td width="691">&nbsp;
								<asp:Label id="account" runat="server" Width="588px">Label</asp:Label></td>
						</tr>
						<tr bgcolor="#ffffff">
							<td width="101"><font color="#ff3300">定单状态：</font></td>
							<td width="691"><font color="#ff3300">&nbsp;
									<asp:Label id="state" runat="server" Width="588px">Label</asp:Label></font></td>
						</tr>
						<tr bgcolor="#ffffff">
							<td width="101">付款方式：</td>
							<td width="691">&nbsp;
								<asp:Label id="way" runat="server" Width="588px">Label</asp:Label></td>
						</tr>
						<tr bgcolor="#ffffff">
							<td width="101">特殊说明：</td>
							<td width="691">&nbsp;
								<asp:Label id="explain" runat="server" Width="588px">Label</asp:Label></td>
						</tr>
						<tr bgcolor="#ffffff">
							<td width="101">捆绑的域名：</td>
							<td width="691">&nbsp;
								<asp:Label id="domain" runat="server" Width="588px">Label</asp:Label></td>
						</tr>
						<tr bgcolor="#ffffff">
							<td width="101">FTP帐号：</td>
							<td width="691">&nbsp;
								<asp:Label id="ftpname" runat="server" Width="588px">Label</asp:Label></td>
						</tr>
						<tr bgcolor="#ffffff">
							<td width="101">FTP密码：</td>
							<td width="691">&nbsp;
								<asp:Label id="ftppass" runat="server" Width="588px">Label</asp:Label></td>
						</tr>
						<tr bgcolor="#ffffff">
							<td width="101">订购内容：</td>
							<td width="691">
								<table border="0" cellspacing="1" bordercolor="#000000" width="693" cellpadding="4" bgcolor="#999999" align="left">
									<tr align="middle">
										<td height="2" width="72" bgcolor="#ffffff">商品编号</td>
										<td height="2" width="116" bgcolor="#ffffff">订购商品
										</td>
										<td height="2" width="229" bgcolor="#ffffff">说明
										</td>
										<td height="2" width="49" bgcolor="#ffffff">
											<div align="center">
												<center>
													单价
												</center>
											</div>
										</td>
										<td height="2" width="51" bgcolor="#ffffff">
											<div align="center">
												<center>
													单位
												</center>
											</div>
										</td>
										<td height="2" width="46" bgcolor="#ffffff">数量
										</td>
										<td height="2" width="53" bgcolor="#ffffff">总价</td>
									</tr>
									<%
int price=0,total=0;
SqlConnection conn = new SqlConnection("server=211.155.254.117;database=yn165;uid=yn165;pwd=159753");
conn.Open();
string sql = "select * from item where order_code='"+ Request["order_number"] + "'";

SqlCommand cmd = new SqlCommand(sql,conn);
SqlDataReader reader;
reader=cmd.ExecuteReader();
int index=0,count=0;
while (reader.Read()) {
count++;
}
reader.Close();
string[] id= new string[count];
string[] sp_code= new string[count];
string[] sum = new string[count];
reader=cmd.ExecuteReader();
count=0;

while (reader.Read()){
id[count]=reader.GetValue(0).ToString();
sp_code[count]=reader.GetValue(2).ToString();
sum[count]=reader.GetValue(3).ToString();
count++;
}
reader.Close();


for ( index=0;index<count;index++)
{
sql="select * from shangping where sp_code='" + sp_code[index] + "'";
cmd = new SqlCommand(sql,conn);
reader = cmd.ExecuteReader();
while (reader.Read()){


%>
									<tr align="middle">
										<td height="2" width="72" bgcolor="#ffffff"><% = reader.GetValue(1).ToString() %></td>
										<td height="2" width="116" bgcolor="#ffffff"><% = reader.GetValue(2).ToString() %>
										</td>
										<td height="2" width="229" bgcolor="#ffffff"><% = reader.GetValue(3).ToString() %></td>
										<td height="2" width="49" bgcolor="#ffffff"><% = reader.GetValue(4).ToString() %></td>
										<td height="2" width="51" bgcolor="#ffffff"><% = reader.GetValue(5).ToString() %>
										</td>
										<td height="2" width="46" bgcolor="#ffffff"><%=sum[index]%></td>
										<td height="2" width="53" bgcolor="#ffffff">
											<% price=Convert.ToInt16(sum[index])*Convert.ToInt16(reader.GetValue(4));
															total += price;
															Response.Write(price.ToString());
															
														%>
										</td>
									</tr>
									<% }
										reader.Close();} %>
									<tr>
										<td align="right" colspan="7" height="22" bgcolor="#ffffff"><font color="#ff3300">商品总价值为:<%=total%>元</font></td>
									</tr>
								</table>
							</td>
						</tr>
						<tr bgcolor="#ffffff">
							<td width="101" height="230">域名注册申请表
							</td>
							<td width="691" height="230">
								<asp:Panel id="Panel1" Width="503px" runat="server" Height="70px" Visible="False">
									<TABLE id="Table1" height="432" cellSpacing="1" cellPadding="3" width="533" bgColor="#cccccc" border="0">
										<TR>
											<TD width="31%" bgColor="#b9d9ff">1. 域名</TD>
											<TD width="69%" bgColor="#b9d9ff">注册年限</TD>
										</TR>
										<% 
							SqlConnection conn = new SqlConnection("server=211.155.254.117;database=yn165;uid=yn165;pwd=159753");
							conn.Open();
							string sql="select * from domain where order_code='" + Request["order_number"]+ "'";
							SqlCommand cmd = new SqlCommand(sql,conn);
							SqlDataReader reader = cmd.ExecuteReader();
							while (reader.Read()){
							%>
										<TR bgColor="#ffffff">
											<TD width="31%">
												<%=reader.GetValue(3)%>
											</TD>
											<TD width="69%">
												<%=reader.GetValue(4)%>
											</TD>
										</TR>
										<%}
							reader.Close();
							cmd.Dispose();
							conn.Close(); %>
										<TR>
											<TD width="31%" bgColor="#b9d9ff">2. 注册单位</TD>
											<TD width="69%" bgColor="#b9d9ff" colSpan="2"></TD>
										</TR>
										<TR bgColor="#ffffff">
											<TD width="31%">2.1 申请目的：
											</TD>
											<TD width="69%" colSpan="2">&nbsp;
												<asp:Label id="goal" Width="273px" runat="server">Label</asp:Label></TD>
										</TR>
										<TR bgColor="#ffffff">
											<TD width="31%">2.2 单位名称：（中文）
											</TD>
											<TD width="69%" colSpan="2">&nbsp;
												<asp:Label id="unit" Width="273px" runat="server">Label</asp:Label></TD>
										</TR>
										<TR bgColor="#ffffff">
											<TD width="31%">2.3 单位名称：（英文）
											</TD>
											<TD width="69%" colSpan="2">&nbsp;
												<asp:Label id="eunit" Width="273px" runat="server">Label</asp:Label></TD>
										</TR>
										<TR bgColor="#ffffff">
											<TD width="31%" height="2">2.4 单位名称：（拼音）</TD>
											<TD width="69%" colSpan="2" height="2">&nbsp;
												<asp:Label id="unit_py" Width="273px" runat="server">Label</asp:Label></TD>
										</TR>
										<TR bgColor="#ffffff">
											<TD width="31%">2.5 单位名称：（缩写）
											</TD>
											<TD width="69%" colSpan="2">&nbsp;
												<asp:Label id="unit_abr" Width="273px" runat="server">Label</asp:Label></TD>
										</TR>
										<TR bgColor="#ffffff">
											<TD width="31%">2.6 单位负责人：（中文）</TD>
											<TD width="69%" colSpan="2">&nbsp;
												<asp:Label id="name" Width="273px" runat="server">Label</asp:Label></TD>
										</TR>
										<TR bgColor="#ffffff">
											<TD width="31%">2.7 单位负责人：（英文）</TD>
											<TD width="69%" colSpan="2">&nbsp;
												<asp:Label id="ename" Width="273px" runat="server">Label</asp:Label></TD>
										</TR>
										<TR bgColor="#ffffff">
											<TD width="31%">2.8 省份：</TD>
											<TD width="69%" colSpan="2">&nbsp;
												<asp:Label id="province" Width="273px" runat="server">Label</asp:Label></TD>
										</TR>
										<TR bgColor="#ffffff">
											<TD width="31%">2.9 城市：（中文）</TD>
											<TD width="69%" colSpan="2">&nbsp;
												<asp:Label id="city" Width="273px" runat="server">Label</asp:Label></TD>
										</TR>
										<TR bgColor="#ffffff">
											<TD width="31%">2.10 城市：（英文）</TD>
											<TD width="69%" colSpan="2">&nbsp;
												<asp:Label id="ecity" Width="273px" runat="server">Label</asp:Label></TD>
										</TR>
										<TR bgColor="#ffffff">
											<TD width="31%">2.11 街道地址：（中文）</TD>
											<TD width="69%" colSpan="2">&nbsp;
												<asp:Label id="street" Width="273px" runat="server">Label</asp:Label></TD>
										</TR>
										<TR bgColor="#ffffff">
											<TD width="31%">2.12 街道地址：（英文）</TD>
											<TD width="69%" colSpan="2">&nbsp;
												<asp:Label id="estreet" Width="273px" runat="server">Label</asp:Label></TD>
										</TR>
										<TR bgColor="#ffffff">
											<TD width="31%">2.13 单位所在地点：</TD>
											<TD width="69%" colSpan="2">&nbsp;
												<asp:Label id="address" Width="273px" runat="server">Label</asp:Label></TD>
										</TR>
										<TR bgColor="#ffffff">
											<TD width="31%">2.14 邮政编码：</TD>
											<TD width="69%" colSpan="2">&nbsp;
												<asp:Label id="post" Width="273px" runat="server">Label</asp:Label></TD>
										</TR>
										<TR bgColor="#ffffff">
											<TD width="31%">2.15 电话：</TD>
											<TD width="69%" colSpan="2">&nbsp;
												<asp:Label id="tel" Width="273px" runat="server">Label</asp:Label></TD>
										</TR>
										<TR bgColor="#ffffff">
											<TD width="31%">2.16 传真：</TD>
											<TD width="69%" colSpan="2">&nbsp;
												<asp:Label id="fax" Width="273px" runat="server">Label</asp:Label></TD>
										</TR>
										<TR bgColor="#ffffff">
											<TD width="31%">2.17 电子邮件：</TD>
											<TD width="69%" colSpan="2">&nbsp;
												<asp:Label id="email" Width="273px" runat="server">Label</asp:Label></TD>
										</TR>
										<TR bgColor="#ffffff">
											<TD width="31%" height="2">&nbsp;</TD>
											<TD align="left" width="69%" colSpan="2" height="2">&nbsp;</TD>
										</TR>
									</TABLE>
								</asp:Panel>
							</td>
						</tr>
					</table>
				</td>
			</tr>
		</table>
	</BODY>
</HTML>
