<?php

$xml=simplexml_load_file("config/config.xml");
include('config/controller.php');
include('config/config.php');
include_once('jcart/jcart.php');
include('include/head.php');
session_start();

?>
<body>
<div id="wrapper-outer" >
    <div id="wrapper">
        <div id="wrapper-inner">
		<?php
			include('include/header.php');
			include('include/menu.php');
		?>
		
		<?php
			$c = new Control();
			$arr = $c->Controle_venda($_GET['id'], ID);
			for ($i = 0; $i < count($arr); $i++){
		?>		
		
        <div id="content">
        	<div class="container">
    			<div id="main">
        			<div class="row">
            			<div class="span9">
                		<h1 class="page-header"><a href="index.php">Home</a> << <?=$arr[$i]->nome['nome']?></h1>
                		<div class="property-detail">
                    		<div class="pull-left overview">
                        		<div class="row">
                            		<div class="span3">
										<img src="<?=$arr[$i]->capa['capa']?>">
                            		</div>
                            	<!-- /.span2 -->
                        		</div>
                        	<!-- /.row -->
                    		</div>
                    		<h2 style="margin-bottom:30px">Informações</h2>
                            <table width="25%">
                            	<tr>
                            		<th align="left" style="font-size:16px">Investimento:</th>
                            		<td>R$ <?=$arr[$i]->valor['valor']?></td>
                            	</tr>
                            	<tr>
                            		<td colspan="2" height="17px"></td>
                            	</tr>                            
                            	<tr>
                            		<th align="left" style="font-size:16px">Inicio:</th>
                            		<td><?=implode("/",array_reverse(explode("-",$arr[$i]->date_in['date_in'])));?></td>
                            	</tr>
                            	<tr>
                            		<td colspan="2" height="17px"></td>
                            	</tr>                            	
                            	<tr>
                            		<th align="left" style="font-size:16px">Acesso até:</th>
                            		<td><?=implode("/",array_reverse(explode("-",$arr[$i]->date_out['date_out'])));?></td>
                            	</tr>
                            	<tr>
                            		<td colspan="2" height="17px"></td>
                            	</tr>                            	 
                            	<tr>
                            		<th align="left" style="font-size:16px">Material PDF:</th>
                            		<td>Sim</td>
                            	</tr>
                            	<tr>
                            		<td colspan="2" height="17px">
                            		
                            		</td>
                            	</tr>                             	                            	                           	                            	
                            </table>
                            <?php
								include('include/add.php');
							?>  
	                        <h2>Disciplinas</h2>
		                    <div class="row">
								<?php
									$arre = $c->Venda_many($arr[$i]->id['id']);
									for ($j = 0; $j < count($arre); $j++){
								?>		                    
		                        <ul class="span2">
		                            <li class="checked">
		                                <?=$arre[$j]->cursoNome['cursoNome']." - <strong>".$arre[$j]->concursoNome['concursoNome']."</strong>"?>
		                            </li>
		                        </ul>
								<?php		
									}
								?>		                        
		                    </div>                                                                   
                            <h2>Descrição</h2>        		
                    		<p><?=$arr[$i]->descricao['descricao']?></p>
	                        <h2>Informação adicional</h2> 
                    		<p><strong><?=$arr[$i]->adicional['adicional']?></strong></p>
                    		<div style="height:30px">
                            <?php
								include('include/add.php');
							?>   
							</div>                   		                        	                        
                		</div>
            		</div>
            		<div class="sidebar span3">
            			<?php
							include('include/cart.php');
						?>   
           		               	
						<div class="hidden-tablet">
						<?php
							include('include/novo.php');
						?>
			            </div>
            		</div>
        		</div>
    		</div>
		</div>
    </div><!-- /#content -->
	<?php
			}
	?>    
</div><!-- /#wrapper-inner -->
<?php
	include('include/footer.php');
	include('include/configuracao.php');
?>
<script type="text/javascript" src="assets/js/jquery.js"></script>
<script type="text/javascript" src="assets/js/jquery.ezmark.js"></script>
<script type="text/javascript" src="assets/js/jquery.currency.js"></script>
<script type="text/javascript" src="assets/js/jquery.cookie.js"></script>
<script type="text/javascript" src="assets/js/retina.js"></script>
<script type="text/javascript" src="assets/js/bootstrap.min.js"></script>
<script type="text/javascript" src="assets/js/carousel.js"></script>
<script type="text/javascript" src="assets/libraries/jquery-ui-1.10.2.custom/js/jquery-ui-1.10.2.custom.min.js"></script>
<script type="text/javascript" src="assets/libraries/chosen/chosen.jquery.min.js"></script>
<script type="text/javascript" src="assets/libraries/iosslider/_src/jquery.iosslider.min.js"></script>
<script type="text/javascript" src="assets/libraries/bootstrap-fileupload/bootstrap-fileupload.js"></script>
<script type="text/javascript" src="assets/js/realia.js"></script>
</body>
</html>