<!doctype html>

<html lang="en">

<head>

<meta charset="<?php echo CHARSET ?>">

<title>Document</title>

<meta name="viewport"

	content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">



<style>

body,ul,ol,li,p,h1,h2,h3,h4,h5,h6,form,fieldset,table,td,img,div,dl,dt,dd,div,input

	{

	margin: 0;

	padding: 0;

	border: 0;

}



header,section,footer,aside,nav,article,figure,dialog,menu {

	display: block;

}



body {

	font: 15px/1.5 "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial,

		Verdana, "Hiragino Sans GB", "Microsoft YaHei", sans-serif;

	background: #FFFFFF;

}



li {

	list-style-type: none;

}



a img {

	border: 0

}



a {

	text-decoration: none;

}



a:hover {

	text-decoration: none;

}



h1,h2,h3,h4 {

	font-family: "微软雅黑", "黑体";

}



.clearfix:after {

	visibility: hidden;

	display: block;

	font-size: 0;

	content: " ";

	clear: both;

	height: 0;

}



.clear {

	clear: both;

}



.clearfix {

	display: inline-table;

}

/* Hides from IE-mac \*/

* html .clearfix {

	height: 1%;

}



.clearfix {

	display: block;

}

/* End hide from IE-mac */

.cl {

	font-size: 14px;

	font-family: "微软雅黑";

}



a,p,input {

	-webkit-tap-highlight-color: rgba(0, 0, 0, 0);

}



::-webkit-input-placeholder { /* WebKit browsers */

	line-height: 21px;

}



:-moz-placeholder { /* Mozilla Firefox 4 to 18 */

	line-height: 21px;

}



::-moz-placeholder { /* Mozilla Firefox 19+ */

	line-height: 21px;

}



:-ms-input-placeholder { /* Internet Explorer 10+ */

	line-height: 21px;

}

.integralmain{border-bottom: 1px solid #D9D9D9;margin-bottom: 20px;overflow: hidden;}

.integralmain p{border-bottom: 1px solid #D9D9D9;color: #c2c2c2;padding-top: 8px;padding-bottom: 5px;text-indent: 15px;}

.main {

	border-bottom: 1px solid #D9D9D9;

	margin-bottom: 20px;

}



.main p {

	border-bottom: 1px solid #D9D9D9;

	color: #c2c2c2;

	padding-top: 8px;

	padding-bottom: 5px;

	text-indent: 15px;

}



.mysecond {

	border-left: 1px solid #f4f4f4;

	margin-left: 29px;

	padding: 10px 0px;

}



.mysecond li:last-child {

	margin-bottom: 0px;

}



.mysecond li {

	margin-bottom: 13px;

}



.mysecond li img {

	width: 16px;

	position: relative;

	left: -8px;

	top: 3px;

	float: left;

}



.earn {

	border-top: 1px solid #D9D9D9 !important;

}



.intext {

	margin-left: 10px;

	color: #757575;

	display: inline-block;

	width: 50%;

}



.count {

	color: #fcab53;

	float: right;

	margin-right: 15px;

}



.integral-list li {

	margin-bottom: 20px;

	clear: both;

}



.integral-list li:last-child {

	/* margin-bottom: 0px; */

}



.integral-list {

	border-left: 1px solid #f4f4f4;

	margin-left: 29px;

	padding: 10px 0px;

	display: inline-block;

    width: 90.7%;

    float: right;

}



.integral-list li img {

	width: 35px;

	position: relative;

	left: -18px;

	top: -2px;

	vertical-align: middle;

	z-index: 999;

}



.textday {

	margin-left: -9px;

	color: #757575;

}



.oneday {

	color: #000000;

	opacity: .2;

}



.count1 {

	color: #fcab53;

	margin-right: 15px;

	margin-top: 5px;

	display: block;

}



.rightdiv {

	float: right;

	text-align: right;

	margin-bottom: 20px;

}

</style>

</head>

<body>

	<div class="integralmain">

		<p>我的积分</p>

		<?php

		$creditid = $_G ['setting'] ['creditstrans'];

		$credit = $_G ['setting'] ['extcredits'] [$creditid];

		$credits = $_G ['setting'] ['extcredits'];

		$creditsformulaexp = str_replace ( '*', 'X', $_G ['setting'] ['creditsformulaexp'] );

		function cycletype($num) {

			switch ($num) {

				case 0 :

					$type = '一次';

					break;

				case 1 :

					$type = '每天';

					break;

				case 2 :

					$type = '整点';

					break;

				case 3 :

					$type = '间隔分钟';

					break;

				case 4 :

					$type = '不限';

					break;

				default :

					$type = '周期错误';

			}

			return $type;

		}

		// echo '<pre>';

		// print_r ( $credits );

		?>

	 

		<ul class="mysecond">

			<li><img src="assets/images/credit_draw.png" alt=""><span

				class="intext"><?php echo $credit['title'];?></span><span

				class="count"><?php echo getuserprofile('extcredits'.$creditid); echo $credit['unit']; ?> </span></li>

			

			 <?php

				

				foreach ( $_G ['setting'] ['extcredits'] as $id => $cre ) {

					if ($id != $creditid) {

						

						?>

			<li><img src="assets/images/credit_draw.png" alt=""><span

				class="intext"><?php echo $cre['title'];?></span><span class="count"><?php echo getuserprofile('extcredits'.$id);echo $cre['unit']; ?></span></li>

			<?php

					}

				}

				

				?>		 

		 

		 </ul>

		<p class="earn">赚取积分</p>

		<ul class="integral-list">

		<?php

		

foreach ( $credit_rule as $k => $v ) {

			switch($v['rulename']){

case '每天登录': $img_icon='credit_everyday.png';break;

case '设置头像':$img_icon='credit_sethead.png';break;

case '加精华':$img_icon='credit_essence.png';break;

case '发表回复':$img_icon='credit_reply.png';break;

case '发表主题':$img_icon='credit_subject.png';break;

 

			}

			?>



		<?php

			

			for($i = 1; $i < 9; $i ++) {

				if ($v ['extcredits' . $i] != 0 && $credits[$i] != null) {

					

					?>





			<li><img src="assets/images/<?php echo $img_icon;?>" alt=""><span

				class="textday"><?php echo $v['rulename'];?></span><span

				class="oneday">(<?php

			$cycle_type = cycletype ( $v ['cycletype'] );

			

			echo $cycle_type;

			

			?>)</span>

				<div class="rightdiv">

				

				

				<?php

			

			for($i = 1; $i < 9; $i ++) {

				if ($v ['extcredits' . $i] != 0 && $credits[$i] != null) {

					

					?>

<span class="count1"><?php echo  $credits[$i]['title'].'+'.$v['extcredits'.$i].$credits[$i]['unit']?></span>

				<?php

				}

			}

			?>	

 

				</div></li>

		

		

		<?php

				}

			} 

		}

		?>

		

		

			 

				

				<?php

				

				if ($dsu_mrqd ['mincredit'] == $dsu_mrqd ['maxcredit']) {

					$credit_str = $dsu_mrqd ['credit_type'] . '+' . $dsu_mrqd ['maxcredit'];

				} else {

					$credit_str = $dsu_mrqd ['credit_type'] . '+' . $dsu_mrqd ['mincredit'] . '~' . $dsu_mrqd ['maxcredit'];

				}

				

				loadcache ( 'plugin' );

				$qyts = $_G ['cache'] ['plugin'] ['dsu_paulsign'] ['ifopen'];

				$dsu_status = false;

				if ($dsu_plugin != null && $dsu_plugin ['available'] == 1 && $_G ['cache'] ['plugin'] ['dsu_paulsign'] ['ifopen'] == 1) {

					echo "<li><img src='assets/images/credit_signin.png' ><span

class='textday'>" . $dsu_mrqd ['name'] . "</span><span

				class='oneday'>(" . $dsu_mrqd ['cycletype'] . ")</span>

				<div class='rightdiv'>

				<span class='count1'>" . $credit_str . "	</span>

				</div></li>";

				}

				

				?>

			 

		</ul>

	</div>

</body>

</html>