<?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 ($_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><th>总　分</th><?php if ($groupd_info[$_SESSION['paper']['id']]['count'] > 1): ?><th>实际得分</th><th>折算得分</th><?php else: ?><th>得　分</th><?php endif; ?></tr>
	<?php $s=$s_=$rnum=$r=0; foreach($_SESSION['score']['Child'] 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['total_num']; echo ($hasBsJudge && isset($v['total_num_child']))?"（共".$v['total_num_child']."小题）":""; ?></td>
		<td><?php $rnum = isset($v['right_num_child'])?$v['right_num_child']:$v['right_num']; $r+=$rnum; echo $rnum.(($hasBsJudge && $v['right_num'] !== '--')?"小题":""); ?></td>
		<td><?php echo $v['total_score']; ?></td>
		<td><?php echo $v['get_score']; ?></td>
		
		
			<?php if ($groupd_info[$_SESSION['paper']['id']]['count'] > 1 && $groupd_info[$_SESSION['paper']['id']][$v['conf_id']]): ?>
		<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>
		<?php endif; ?>
	<?php endforeach; ?>
	<tr>
	<th colspan="2">总计</th>
		<td><?php echo $_SESSION['score']['total_num']; echo ($hasBsJudge)?"（共".$_SESSION['score']['total_num_child']."小题）":""; ?></td>
		<td><?php echo ($hasBsJudge)?$r."小题":$r; ?></td>
		<td><?php echo $_SESSION['score']['total_score']; ?></td>
		<td><?php echo $_SESSION['score']['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; ?>