<div class="jx_navcon">
	<div class="jx_ltitle1 nav"><h2>答题解析</h2></div>
	<div class="jx_navcc">
	
	<?php $bank_num=0; foreach ($_SESSION['paper']['Child'] as $k=>$v): ?>
	
	
		<?php if ($v['Child']): ?>
		<div class="jx_ltitle2 nav_" key="<?php echo $k; ?>"><h3><?php echo $v['title']; ?>（
		<?php
			$num=0;
			foreach($v['Child'] as $cv)
			{
				$num+=$cv['num'];
			}
			echo $num;
		?>题）</h3></div>
	
		<ul class="sec_nav_<?php echo $k; ?>">
		<?php foreach ($v['Child'] as $cv): ?>
		<?php foreach ($cv['banks'] as $bank): $bank_num++; ?>
		<a href="#bank_<?php echo $bank_num; ?>">
			<?php if (in_array($_SESSION['details'][$bank['id']]['result'],array(1,2,3,5))): ?>
			<li class="yizuo bank_num" bank_num="<?php echo $bank_num; ?>"><span><?php echo $bank_num; ?></span>已做<?php echo ($_SESSION['details'][$bank['id']]['result'] == 1 || $_SESSION['details'][$bank['id']]['result'] == 5)?"<font color=green>[对]</font>":(($_SESSION['details'][$bank['id']]['result'] == 2)?"<font color=red>[错]</font>":""); ?><!--<img src="__PUBLIC__/bjacc/images/dh.jpg" width="13" height="13" />--></li>
			<?php else: ?>
			<li class="weizuo bank_num" bank_num="<?php echo $bank_num; ?>"><span><?php echo $bank_num; ?></span>未做<!--<img src="__PUBLIC__/bjacc/images/th.jpg" width="14" height="13" />--></li>
			<?php endif; ?>
		</a>
		<?php endforeach; ?>
		<?php endforeach; ?>
		</ul>
	
	
		<?php else: ?>
		
			<?php if ($v['num']): ?>
		<div class="jx_ltitle2 nav_" key="<?php echo $k; ?>"><h3><?php echo $v['title']; ?>（<?php echo $v['num']; ?>题）</h3></div>
		<ul class="sec_nav_<?php echo $k; ?>">
		
		
		<?php foreach ($v['banks'] as $bk=>$bank): $bank_num++; ?>
		
			<?php if($bank['BSChild']):$bank_num--;?>
				<?php 
					foreach($bank['BSChild'] as $bbk=>$bbs):

						if(!isset($_SESSION['details'][$bbs['id']]))
						{
							unset($_SESSION['paper']['Child'][$k]['banks'][$bk]['BSChild'][$bbk]);
							continue;
						}
						$bank_num++;
				?>
						
					<a href="#bank_<?php echo $bank_num; ?>">
						<?php if (in_array($_SESSION['details'][$bbs['id']]['result'],array(1,2,3,5))): ?>
						<li class="yizuo bank_num" bank_num="<?php echo $bank_num; ?>"><span><?php echo $bank_num; ?></span>已做<?php echo ($_SESSION['details'][$bbs['id']]['result'] == 1 || $_SESSION['details'][$bbs['id']]['result'] == 5)?"<font color=green>[对]</font>":(($_SESSION['details'][$bbs['id']]['result'] == 2)?"<font color=red>[错]</font>":""); ?><!--<img src="__PUBLIC__/bjacc/images/dh.jpg" width="13" height="13" />--></li>
						<?php else: ?>
						<li class="weizuo bank_num" bank_num="<?php echo $bank_num; ?>"><span><?php echo $bank_num; ?></span>未做<!--<img src="__PUBLIC__/bjacc/images/th.jpg" width="14" height="13" />--></li>
						<?php endif; ?>
					</a>
				<?php endforeach;?>
				
				
				<?php else:?>
				<a href="#bank_<?php echo $bank_num; ?>">
					<?php if (in_array($_SESSION['details'][$bank['id']]['result'],array(1,2,3,5))): ?>
					<li class="yizuo bank_num" bank_num="<?php echo $bank_num; ?>"><span><?php echo $bank_num; ?></span>已做<?php echo ($_SESSION['details'][$bank['id']]['result'] == 1 || $_SESSION['details'][$bank['id']]['result'] == 5)?"<font color=green>[对]</font>":(($_SESSION['details'][$bank['id']]['result'] == 2)?"<font color=red>[错]</font>":""); ?><!--<img src="__PUBLIC__/bjacc/images/dh.jpg" width="13" height="13" />--></li>
					<?php else: ?>
					<li class="weizuo bank_num" bank_num="<?php echo $bank_num; ?>"><span><?php echo $bank_num; ?></span>未做<!--<img src="__PUBLIC__/bjacc/images/th.jpg" width="14" height="13" />--></li>
					<?php endif; ?>
				</a>
				
				<?php endif;?>
			<?php endforeach; ?>
			<?php endif; ?>
		</ul>
		<?php endif; ?>
	
	<?php endforeach; ?>
</div>