<!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=utf-8" /> 
<title>www.mymps.com.cn</title> 
<link href="<?=$mymps_global['SiteUrl']?>/template/global/button.css" rel="stylesheet" type="text/css" />
<style type="text/css"> 
body {
	padding: 0px 0 20px 0;
	background:white;
	background-color:white;
}
#center {
	width: auto;
	margin-top: 0px;
	margin-right: auto;
	margin-bottom: 0px;
	margin-left: auto;
}
.content {
}
.content_1 {
	float: left;
	width: auto;
	line-height: 24px;
	color: #a7a7aa;
}
.content_1 .hj {
	padding-top: 5px;
	padding-bottom: 5px;
}
.content_1 strong {
	color: #006acd;
}
.content_1 b {
	color: #006acd;
}
.content_2 {
	line-height: 24px;
	float: right;
	width: 170px;
	padding-right: 15px;
	color: #006acd;
	margin-top: 20px;
}
.content_2 span {
	color: #e91116;
}
.clear {clear:both; height:10px; visibility:hidden; overflow: hidden}
a:hover {
	color: #FF0000;
}
.content_11 {	float: left;
	width: auto;
	line-height: 24px;
	color: #a7a7aa;
}
.cont {
	padding-top:10px;
}
.cont_1 {
	width: auto;
	line-height: 24px;
	color: #a7a7aa;
}
.nr {
	height:auto;
	overflow:auto;
	margin-top:10px;
}

.nr span.l{ display:block; width:350px; }
.nr span.r{ display:block; width:350px; }
 
.nr em {
	font-style: normal;
	color: #FF0000;
}
.nr b {
	color: #006acd;
}
.input0 {
	border: 1px solid #b9cde3;
	height: 18px;
	vertical-align: middle;
	width: 150px;
	line-height: 18px;
	padding-left:5px;
	padding-right:5px;
}
textarea {
	border: 1px solid #b9cde3;
	height: 40px;
	width: 436px;
	vertical-align: middle;
	padding-left:5px;
	padding-right:5px;
}

input.submit{border:1px solid;cursor:pointer;border-color:#fff #848484 #848484 #fff !important;background:#1B72AF !important;color:#FFFFFF !important; line-height:20px;}

.cont {
	padding:10px 10px 0 10px;
}
.cont_1 {
	width: auto;
	line-height: 24px;
	color: #a7a7aa;
}
.nr {
	margin-bottom:10px; color:#2a2a2a;
	height:auto;
	overflow:auto
}

.nr span.l{ display:block; width:350px; }
.nr span.r{ display:block; width:350px; }
 
.nr em {
	font-style: normal;
	color: #FF0000;
}
.nr b {
	color: #006acd;
}
.input0 {
	border: 1px solid #b9cde3;
	height: 18px;
	vertical-align: middle;
	width: 150px;
	line-height: 18px;
	padding-left:5px;
	padding-right:5px;
}
textarea {
	border: 1px solid #b9cde3;
	height: 40px;
	width: 436px;
	vertical-align: middle;
	padding-left:5px;
	padding-right:5px;
}

input.submit{border:1px solid;cursor:pointer;border-color:#fff #848484 #848484 #fff !important;background:#1B72AF !important;color:#FFFFFF !important; line-height:20px;}

.table{ width:100%}
.table td{ border-top:1px #eee solid; text-align:center; padding:5px 0;}
.current td{color:#090;border-color:#abdc97;background-color:#f5fff1;}
.current td.icon{background:#f5fff1 url(../member/template/images/valid.gif) no-repeat 5px 4px;}
</style> 
<script type="text/javascript">
	function $(id) {
		return document.getElementById(id);
	}
</script>
</head> 

<body> 
<div id="center"> 
	<form action="box.php" method="post">
	<input name="part" value="score_coin" type="hidden">
	<input name="action" value="post" type="hidden">
	<div class="cont"> 
	
		<div class="cont_1"> 
		
			<div class="nr">您当前拥有积分 <font color="red" id="scorenow"><?=$row['score']?></font> 分，可兑换 <font color="red" id="cancoin"></font>金币</div> 
			<div class="nr">
				<span class="r">我要使用<input name="score" id="score" type="text" value="<?=$row['score']?>" class="txt" style="width:50px" onKeyUp="if(value><?=$row[score]?>)value=<?=$row[score]?>;javascript:can_coin();"/>个积分来兑换 <font id="coin"></font> 金币</span>
			</div> 
			
		</div>  
	
		<div class="clear" style="height:20px;"></div> 
		<div style="width:100%;text-align:center;"><input type="submit" class="mymps large" value="确认兑换" <?php if(empty($row['score'])) echo 'disabled';?>/>
		</div> 
	</div> 
	
	</form>
<script type="text/javascript">
	$('coin').innerHTML = $('cancoin').innerHTML = Math.floor($('scorenow').innerHTML/<?php echo $mymps_global["cfg_score_fee"];?>);
	function can_coin(){
		$('coin').innerHTML = Math.floor($('score').value/<?php echo $mymps_global["cfg_score_fee"];?>);
	}
</script>
</div>

<div class="cont"> 
	
		<div class="cont_1"> 
		
			<div class="nr"></div> 
			<div>
				<table border="0" cellspacing="0" cellpadding="0" class="table">
				<tr bgcolor="#f5f8ff"><td>操作事件</td><td>积分变化</td></tr> 
				<?php foreach($array as $k => $v){?>
				<tr align="center" bgcolor="white">
				<td class="icon"><?php echo $k; ?></td>
				<td style="color:<?php if($score_change['score'][rank][$v] <= 0){echo 'red';}else{echo 'green';}?>"><?php echo $score_change['score'][rank][$v]?></td> 
				</tr>
				<?php }?>
				<?php if($mymps_global['cfg_if_affiliate'] == 1){?>
				<tr align="center" bgcolor="white">
				<td class="icon">注册推广</td>
				<td style="color:green">一个会员增加积分<?php echo $mymps_global['cfg_affiliate_score']?></td> 
				</tr>
				<?php }?>
				</table>
			</div>
			
		</div>  
	
		<div class="clear"></div> 
		
	</div>
</body> 
</html> 