<?php if (!defined('THINK_PATH')) exit();?>
<?php $bank_view = $_SESSION['info']['childs']['bank_view'];?>
<?php if ($result == 'wrong'): ?>

	<?php if ($_SESSION['score']): ?>
	<div style="margin-left:0px; margin-top:10px; line-height:30px; font-family:'微软雅黑';font-size:16px;">试卷得分</div>
	<table cellpadding="0" cellspacing="0">
	<tr><th colspan="2">题　型</th><th>总题数</th><th>答对题数----</th></tr>
	<?php foreach($_SESSION['score']['Child'] as $v): ?>
		<?php if ($v['Child']): ?>
		
	<tr>
	<td rowspan="<?php echo count($v['Child']); ?>"><?php echo $v['title']; ?></td>
		<?php foreach ($v['Child'] as $cv):  ?>
	<td><?php echo $cv['title']; ?></td>
	<td><?php echo $cv['total_num']; echo ($hasBsJudge && isset($cv['total_num_child']))?"（共".$cv['total_num_child']."小题）":""; ?></td>
	<td><?php echo (isset($cv['right_num_child'])?$cv['right_num_child']:$cv['right_num']).($hasBsJudge?"小题":""); ?></td>
	</tr><tr>
		<?php endforeach; ?>
		<?php else: ?>
	<?php if ($v['total_num']): ?>
	<tr>
	<td colspan="2"><?php echo $v['title']; ?></td>
	<td><?php echo $v['total_num']; echo ($hasBsJudge && isset($v['total_num_child']))?"（共".$v['total_num_child']."小题）":""; ?></td>
	<td><?php echo (isset($v['right_num_child'])?$v['right_num_child']:$v['right_num']).($hasBsJudge?"小题":""); ?></td>
	</tr>
	<?php endif; ?>
		<?php endif; ?>
	<?php endforeach; ?>
	<tr>
	</table>
	
	<?php endif; ?>
<?php else: ?>
	
	
	
	<?php if ($bank_view): ?>
	<div style="margin-left:0px; margin-top:10px; line-height:30px; font-family:'微软雅黑';font-size:16px;">试卷得分</div>
	<table cellpadding="0" cellspacing="0">
	<tr><th colspan="2">题　型</th><th>总题数</th><th>答对题数</th><th>总　分</th><?php if ($groupd_info[$_SESSION['paper']['id']]['count'] > 1): ?><th>实际得分</th><th>折算得分</th><?php else: ?><th>得　分</th><?php endif; ?></tr>
	<?php $all_num=0;$s=$s_=$rnum=$r=0; foreach($bank_view as $k=>$v): ?>
		
	
		<?php if ($v['Child']): ?>
	<tr>
		<td rowspan="<?php echo count($v['Child']); ?>"><?php echo $v['title']; ?></td>
		<?php foreach ($v['Child'] as $ck=>$cv):  ?>
		<td><?php echo $cv['title']; ?></td>
		<td><?php echo $cv['total_num']; echo ($hasBsJudge && isset($cv['total_num_child']))?"（共".$cv['total_num_child']."小题）":""; ?></td>
		<td><?php $rnum = isset($cv['right_num_child'])?$cv['right_num_child']:$cv['right_num']; $r+=$rnum; echo $rnum.(($hasBsJudge && $cv['right_num'] !== '--')?"小题":""); ?></td>
		<td><?php echo $cv['total_score']; ?></td>
		<td><?php echo $cv['get_score']; ?></td>
		
		
			<?php if ($groupd_info[$_SESSION['paper']['id']]['count'] > 1 && $groupd_info[$_SESSION['paper']['id']][$v['conf_id']] && $ck == 0): ?>
		<td rowspan="<?php echo $groupd_info[$_SESSION['paper']['id']][$v['conf_id']]; ?>">
		<?php echo $s_=($_SESSION['score']['group_get_score'][$v['groupd']]?number_format(($_SESSION['score']['group_get_score'][$v['groupd']]*$v['percent']),1,'.',''):0);$s+=$s_; ?></td>
			<?php endif; ?>
	
	
	</tr><tr>
		<?php endforeach; ?>
		<?php else: ?>
		
		
	<tr>
		<td colspan="2"><?php echo $v['title']; ?></td>
		<td><?php echo $v['score_info']['total_num']; echo ($v['score_info']['total_num_child']!=$v['score_info']['total_num'])?"（共".$v['score_info']['total_num_child']."小题）":""; ?></td>
		<td><?php $rnum = isset($v['right_num_child'])?$v['right_num_child']:$v['score_info']['right_num']; $r+=$rnum; echo $rnum.((($v['score_info']['total_num_child']!=$v['score_info']['total_num']) && $rnum!=0)?"（小题）":""); ?></td>

		<td><?php echo $v['score_info']['total_score']; ?></td>
		<td>
		<?php
			if($v['score_info']['get_score']<0)
			{
				$v['score_info']['get_score'] = 0;
			} 
			echo $v['score_info']['get_score'];
		 ?>
		</td>
		
		
			
		
		
	</tr>
		<?php $all_num +=$v['score_info']['total_num'];?>
		<?php $all_score +=$v['score_info']['total_score'];?>
		<?php $all_get_score +=$v['score_info']['get_score'];?>
		<?php $all_right +=$v['score_info']['right_num'];?>
		<?php $total_num_child +=$v['score_info']['total_num_child'];?>
		<?php endif; ?>
	<?php endforeach; ?>
	<tr>
	<th colspan="2">总计</th>
		<td><?php echo $all_num; echo ($total_num_child)?"（共".$total_num_child."小题）":""; ?></td>
		<td><?php echo ($r)?$r."（小题）":$r; ?></td>
		<td><?php echo $all_score ?></td>
		<td><?php echo $all_get_score; ?></td>
		
			<?php if($groupd_info[$_SESSION['paper']['id']]['count'] > 1): ?>
		<td><?php echo $s; ?></td>
			<?php endif; ?>
	</tr>
	</table>
	<?php endif; ?>

<?php endif; ?>