<%@ Page Language="C#" AutoEventWireup="true" debug="true" Inherits="WinLibClass.Form.UserInfo.Charge.UI_List" CodePage="65001" GameType="1" PageFileFlag="Charge" PageFileTitle="我的积分兑换记录-会员中心" DataBindingType="0" PageFlagId="1" intPageSize="10" %>

<%@ Register TagPrefix="Site" TagName="Menu" Src="~/WUC/Common/Site_Menu.ascx" %>
<%@ Register TagPrefix="Site" TagName="UserPicNote" Src="~/WUC/Common/Site_UserPicNote.ascx" %>
<%@ Register TagPrefix="Site" TagName="Game1" Src="~/WUC/Common/Site_Game1.ascx" %>

<%@ Register TagPrefix="Site" TagName="Side_UserPicNote" Src="~/WUC/Common/Site_Side_UserPicNote.ascx" %>
<%@ Register TagPrefix="Site" TagName="Side_Future" Src="~/WUC/Common/Site_Side_Future.ascx" %>
<%@ Register TagPrefix="Site" TagName="Side_Main" Src="~/WUC/Common/Site_Side_Menu.ascx" %>



<!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>
<Site:Menu id="menu_headtitle" runat="server" Flag="HeadTitle" CurrentPageTitle = "会员中心 - 我的积分兑换记录" />
<Site:Menu id="menu_headjs" runat="server" Flag="HeadJs"  />

<link href="/css/common.css" type="text/css" rel="stylesheet" />
<link href="/css/common_3.css" type="text/css" rel="stylesheet" />
<link href="/css/article.css" type="text/css" rel="stylesheet" />
<style>

</style>
</head>
<script>
<!--
/*第一种形式 第二种形式 更换显示样式*/
function setTab(name,cursel,n){
    for(i=1;i<=n;i++){
    var menu=document.getElementById(name+i);
    //var con=document.getElementById("con_"+name+"_"+i);
    menu.className=i==cursel?"hover":"";
    con.style.display=i==cursel?"block":"none";
    }
}
//-->
</script>
<body>

<Site:Menu id="menu_topmenu" runat="server" Flag="TopMenu"  CurrentPageFlag="User" />

<div class="clear"></div>
<!--start 内容-->
<div class="ArtContent PageWidth">
	<!-- 左侧菜单 -->
<Site:Side_Main id="Side_Main_art1" runat="server" PageFlagId="100"  CurrentPageFlag="User" DataBindingType="1" />
	<!-- 左侧菜单结束 -->
	<!-- 右侧正文或列表 -->
<!--start 主体内容-->




<div class="Grid-Base PageWidth_Right2">

	<div class="help-box padding0 " >
 		<div class="tit2 H60 LH55">
				酷币充值
		</div>


	</div>

	<div class="help-box">
		<table class="MG10 " >
		<tr ><td><img src="/images/arrow_right.gif" /></td>
		<td class="F14">
		酷币是参与竞拍的消耗性物品，竞拍结束后不可退款。<br />
		购买酷币时请按需购买，量力而行，未消耗的酷币暂不可反现。
		</td>
		</tr>
		
		</table>
		<div class="clear"></div>
	</div>
	
	<div class="help-box"  >
		<DIV CLASS="MG10 F15 FWB">	请选择购买数额：</div>
		<DIV CLASS="MG10 ">
		<table class="TbListColor1  FW100" id="div_banklist" >
		<tbody id="div_chargelist_tbody" >
		
				
		</tbody>
		</table>
		
		</div>
		
		<div class="clear"></div>
	</div>	
	
<!--#include file="/include/paybanklist.aspx"-->
	
	
	<div class="help-box" style="border-bottom:0px;" >
		<div class="MG10 F15 FWB hide">
		支付信息：
		</div>
		<div class="MG10 Tip_Orange TextCenter" id="frm_Div_Info">
		您选择的购买金额为0元，总共可获得 <font class="red" id="frmFont_P1">0</font> 点酷币， 支付方式： <font class="red" id="frmFont_NetBank">0</font>支付。 
		</div>	
		<div class="MG10 TextCenter">	

    <!--info一直到底部-->
    <form id="frmMoney" action="/PayManage/paycenter.aspx?&FlagType=100&issubmit=1&Target=_self" method="post" target="_blank" onclick="return false;" style=" margin-top:15px;">


                <%//11:04 2011-11-04添加 %>
                <input type="hidden" name="Credits" id="Credits" value="0" title="赠送积分">
                <input type="hidden" name="CreditsPrice" id="CreditsPrice" value="0" title="购买积分所花金额，目前为0。">
                <input type="hidden" name="Point1" id="Point1" value="0" title="p1">
                <input type="hidden" name="Point2" id="Point2" value="0" title="p2">
                <input type="hidden" name="Point3" id="Point3" value="0" title="p3">
                <input type="hidden" name="PointPrice" id="PointPrice" value="0" title="购买点所花金额">
                <input type="hidden" name="Pid" id="Pid" value="0" title="购买点配置项编码">
                <input type="hidden" name="OrderFormType" id="OrderFormType" value="<%=Convert.ToInt32(WinLibClass.Entity.Enums.OrderFormType.UserAddPoint1)%>" title="帐单类型:100表示购买拍点,其他表示支付">


                <%//11:04 2011-11-04以前原有 %>
                <input type="hidden" name="GameType" id="GameType" value="0" title="游戏类型,默认0">
                <input type="hidden" name="tid" id="tid" value="0" title="竞拍期号,不用时赋值为0">
                <input type="hidden" name="paytype" id="paytype" value="0" title="网银类型,如果不用,则赋值为0" >
                <input type="hidden" name="productname" id="productname" value="购买拍点" title="产品名称">
                <input type="hidden" name="paypoint_price" id="paypoint_price" value="0" title="金额">
                <input type="hidden" name="paypoint_point" id="paypoint_point" value="0" title="拍点">
                <input type="hidden" name="paypoint_point2" id="paypoint_point2" value="0" title="返点">
                <input type="hidden" name="ordersn" id="ordersn" value="" title="订单编号,不用时设置为空" >
                <input type="hidden" name="oid" id="oid" value="0" title="产品编号,不用时设置为0">
                <input type="hidden" name="uid" id="uid" value="<%=Uid%>" title="会员编号,不用时设置为0,但基本上登陆后就会有值.">
                <input type="hidden" name="type" id="type" value="100" title="帐单类型:100表示购买拍点,其他表示支付">
                <input type="hidden" name="PayTypeString" id="PayTypeString" value="Alipay" title="网银类型">


				<input type="image" src="/images/Recha_ok.jpg"  onclick="CheckSubmit();return false;" />


    </form>


		</div>			
	</div>	
	<br />

  <div class="clear"></div>
</div>


<script type="text/javascript" language="javascript">

function SetTab(mids,focus,blur,cids,curid){
	var mid = jQuery(mids);	var cid = jQuery(cids);	var curObj = jQuery(curid);	
	mid.removeClass(focus).addClass(blur);curObj.removeClass(blur).addClass(focus);cid.addClass("hide");
	jQuery(cids + '[flag="' + curObj.attr("id") + '"]' ).removeClass("hide");
}

//遍历
//_this = ID
function inputSelectGetIndex(list,_this){
	var si = 0;	jQuery(list).each(function(index, domEle){
	if( jQuery(this).children("input:checked").attr("id")==_this || _this==domEle || _this==jQuery(domEle) ) {si=index;return false;}
	});	return si;
}
function inputSelectClick(list,_this,fun){var si = 0;si = inputSelectGetIndex(list,_this);fun(list,si);}
//选中
function inputSelect(list,si){
	var _list = jQuery(list);if(si<0 || si>_list.length) si=0;
	//点击TD
	_list.removeClass("select").removeClass("selectno1").removeClass("selectno2");	
	if(si>0)jQuery(_list[0]).addClass("td1");if(si-1>=0) jQuery(_list[si-1]).addClass("selectno1");	
	if(si+1<_list.length) jQuery(_list[si+1]).addClass("selectno2");		
	jQuery(_list[si]).addClass("select").children(".moneychkbox").children().attr("checked",true);	
	//设置金额
	oSM.Input(oCM.Arr[si]);oSM.Output();
}

//选中-网上银行（样式）
function inputSelect2(list,si){
	var _list = jQuery(list);if(si<0 || si>_list.length) si=0;
	_list.removeClass("select");	
	var o = jQuery(_list[si]).addClass("select").children().attr("checked",true);
	//设置支付银行
	oSM.PayTypeInput(o.attr("BankId"),o.attr("title"));oSM.Output();
}
//选中后初始化隐藏控件

//可复用
function SelectManage(){
	this.Money = 0,
	this.p1 =0,
	this.p2=0,
	this.p3=0,
	this.cMoney=0,
	this.c1=0,
	this.pid =0,
	this.PayTypeString="Alipay",
	this.PayTypeStringCh = "支付宝",
	//
	this.init = function(_pts,_ptsch){
		this.PayTypeInput(_pts,_ptsch);
	}
	,this.Input = function(arr){
		try{
			this.Money = arr.money;
			this.p1 = arr.p1;
			this.p2 = arr.p2;
			this.p3 = arr.p3;
			this.cMoney = arr.cmoney;
			this.c1 = arr.c1;
			this.pid = arr.pid;
		}
		catch(e){}
	}
	,this.PayTypeInput = function(_pts,_ptsch){
		if(typeof(_pts)!="undefined")
		this.PayTypeString = _pts;
		if(typeof(_ptsch)!="undefined")
		this.PayTypeStringCh = _ptsch; 
	
	}
	,this.Output = function(id){
		if (typeof id=="undefined") id="#frm_Div_Info";
		var s = '您选择的购买金额为'
			+ ' <font class="red">' + this.Money +'</font> 元，总共可获得'
			+ ' <font class="red">' + this.p1 +'</font> 点酷币，支付方式：'
			+ ' <font class="red">' + this.PayTypeStringCh +' </font>支付。 ';
		jQuery(id).html(s);	
		this.InputFill();
	}
	,this.InputFill = function()	{
		//ID硬编码//文本框部分
		jQuery("#paypoint_point").val(this.p1);//拍点
		jQuery("#paypoint_point2").val(this.p2);//返点
		jQuery("#paypoint_price").val(this.Money);//总金额

		//12:18 2011-11-04 新加，
		jQuery("#Point1").val(this.p1);//拍点
		jQuery("#Point2").val(this.p2);//返点
		jQuery("#PointPrice").val(this.Money);//总金额	!!!
		
		jQuery("#Credits").val(this.c1);//总金额	
		jQuery("#CreditsPrice").val(this.cMoney);//总金额			

		jQuery("#productname").val("用户充值");
		//12:18 2011-11-04 新加，
		jQuery("#Pid").val(this.pid);	
		
		//支付方式
		jQuery("#PayTypeString").val(this.PayTypeString);
	}
}


//JS：金额初始化：本页专用
function ChargeList(_m,_p1,_p2,_p3,_c1,_cm,_pid){
	//this.id=1,
	this.money= (typeof(_m)=="undefined"?0:_m),
	this.p1=(typeof(_p1)=="undefined"?0:_p1),
	this.p2=(typeof(_p2)=="undefined"?0:_p2),
	this.p3=(typeof(_p3)=="undefined"?0:_p3),
	this.c1=(typeof(_c1)=="undefined"?0:_c1)
	this.cmoney=(typeof(_cm)=="undefined"?0:_cm)
	this.pid=(typeof(_pid)=="undefined"?0:_pid)		
}
function ChargeManage() {
	this.Arr=[],
	this.init=function(){
		var arr = this.Arr;
		arr[0]=new ChargeList(10,10,0,0,0,0);
		arr[1]=new ChargeList(20,20,0,0,0,0);
		arr[2]=new ChargeList(30,30,2,0,20,0);
		arr[3]=new ChargeList(50,50,4,0,40,0);
		arr[4]=new ChargeList(100,100,10,0,100,0);
		arr[5]=new ChargeList(200,200,24,0,240,0);
		arr[6]=new ChargeList(500,500,70,0,700,0);
		arr[7]=new ChargeList(1000,1000,160,0,1600,0);
		arr[8]=new ChargeList(0.01,1,1,0,0,0);
	},
	this.Write=function(id){
	var arr = this.Arr;
		var s = "";
		var i=0;
		var initIndex = 1;
		for(i=0;i<arr.length;i++){
			s +='<tr ><td >\r\n'
				+ '<div class="moneyexp" value="'+ i +'">&nbsp;&nbsp;&nbsp;'
				+ '&yen; '
				+ '<font class="red">'+ arr[i].money +'</font> = '+ arr[i].p1 +' 付费酷币 '
				+ (arr[i].p2 >0? '+ [赠送<font class="red">'+ arr[i].p2 +'</font>个付费酷币] ':'')
				+ (arr[i].c1 >0? '+ [赠送<font class="red">'+ arr[i].c1 +'</font>积分]'	:'')	
				+ '</div>'
				+ '<div class="moneychkbox"><input type="radio" name="chargelist" id="charge_'+ i +'" '+ (i==initIndex?'checked':'') +' /></div>'
				+ '</td></tr>'		
		}
		jQuery(id).html(s);
	}
}

//页面加载:全局变量（请注意：耦合度较高）
var oCM = new ChargeManage();
var oSM = new SelectManage();
//添加事件
jQuery(function(){
	oCM.init();
	oCM.Write("#div_chargelist_tbody");//注意事件的加载次序。
	//购买数额区绑定事件
	jQuery("#div_banklist td").click(function(){inputSelectClick("#div_banklist td",this,inputSelect);});
	//银行区绑定事件
	jQuery("#li_netbanklist1 li").click(function(){inputSelectClick("#li_netbanklist1 li",this,inputSelect2);});		
	//支付方式区绑定事件
	jQuery("#li_netbanklist2 li").click(function(){inputSelectClick("#li_netbanklist2 li",this,inputSelect2);});	
	//选择项初始化
	//支付方式区
	var currpay = jQuery("#li_netbanklist2 li input:checked");
	if(currpay.length<1){currpay = jQuery("#li_netbanklist2 li input").eq(0);}
	if(currpay.length>0){ currpay.click();}
	//购买数额区
	var currChargeId = jQuery("#div_banklist td .moneychkbox input:checked");
	if(currChargeId.length<1){currChargeId = jQuery("#div_banklist td .moneychkbox input");	 }
	if(currChargeId.length>0){currChargeId.click();}

});

//提交
function CheckSubmit ()
{
	var x = parseFloat(jQuery("#paypoint_price").val());
	if(isNaN(x) || x<0.01)
	{
		alert("金额无效,请选择您准备购买的点数.");
		return false;
	}
	else
	{
		jQuery("#frmMoney").submit();
		return false;
	}

	return false;
}									
</script>




<!--end 主体内容结束-->
	<!-- 右侧正文或列表结束 -->

  <div class="clear"></div>

</div>
<!--end 内容-->
<div class=" clear"></div>
<Site:Menu id="menu_foothelper" runat="server" Flag="FootHelper"  />
<div class=" clear"></div>
<Site:Menu id="menu_links" runat="server" Flag="Links"  />
<div class=" clear"></div>
<Site:Menu id="menu_foot" runat="server" Flag="Foot"   />
</body>
</html>
