<?php
    include ("clases/clases.class.php");
include ("clases/doc_curso.class.php");
include ("clases/curso.class.php");
include ("clases/autor.class.php");
include ("clases/curso_info.class.php");$objci = new curso_info();
include ("clases/matricula.class.php"); $objmat = new matricula();
$objdc = new doc_curso(); $objc = new curso(); $objd = new autor();
$cod=$_REQUEST['curso'];
if($objdc->BuscarPorCodigo($cod)){
     $idcurso =  $objdc->getIdcurso();
	 if($objc->BuscarPorCodigo($idcurso))
	    {$nombrecurso = $objc->getCurso();
		$bv = $objc->getBienvenida();
		 $ic = $objc->getCursoinfo();
		}
	 $iddoc =  $objdc->getIddoc();
	 if($objd->BuscarPorCodigo($iddoc))
	    {$nom = $objd->getNombres()." ".$objd->getApellidos();
		 $foto = $objd->getFoto();
		}
   }
  
  if($objmat->BuscarPorDocCur($cod))
  {
    $idmatricula = $objmat->getIdmatricula();
  }
?>
<!DOCTYPE html>
<html>
<head>
<title>EL CURSO</title>

    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="Shortcut Icon" type="image/x-icon" href="assets/icons/book.ico" />
    <script src="js/sweet-alert.min.js"></script>
    <link rel="stylesheet" href="css/sweet-alert.css">
    <link rel="stylesheet" href="css/material-design-iconic-font.min.css">
    <link rel="stylesheet" href="css/normalize.css">
    <link rel="stylesheet" href="css/bootstrap.min.css">
    <link rel="stylesheet" href="css/jquery.mCustomScrollbar.css">
    <link rel="stylesheet" href="css/timeline.css">
    <link rel="stylesheet" href="css/style.css">
    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
    <script>window.jQuery || document.write('<script src="js/jquery-1.11.2.min.js"><\/script>')</script>
    <script src="js/modernizr.js"></script>
    <script src="js/bootstrap.min.js"></script>
    <script src="js/jquery.mCustomScrollbar.concat.min.js"></script>
    <script src="js/main.js"></script>

</head>

<body>
<div class="container">
<form name="form1" method="post" action="">
<div class="panel-heading">
    <h1>     Curso de: <?=$nombrecurso;?>  
        <a href="listaentradas.php" class="close" data-dismiss="modal" aria-hidden="true"><span class="glyphicon glyphicon-share" aria-hidden="true"></span></a>
	</h1>	
</div>
<table width="100%" border="0">
  <tr>
    <td colspan="2" valign="top" scope="col">
	<section class="full-reset text-center" style="padding: 20px 0;">              
            <article class="tile"><a href="listaclases.php?id=<?=$cod;?>">
                <div class="tile-icon full-reset"><i class="zmdi zmdi-book"></i></div>
                <div class="tile-name all-tittles">Temas/Clases</div>
                <div class="tile-num full-reset">01</div></a>            </article>
            <article class="tile"><a href="mantrabajo.php?id=<?=$idmatricula;?>">
                <div class="tile-icon full-reset"><i class="zmdi zmdi-bookmark-outline"></i></div>
                <div class="tile-name all-tittles">Subir Trabajos</div>
                <div class="tile-num full-reset">02</div></a>            </article>
            <article class="tile"><a href="salon.php?id=<?=$cod;?>">
                <div class="tile-icon full-reset"><i class="zmdi zmdi-assignment-account"></i></div>
                <div class="tile-name all-tittles">Sal&oacute;n</div>
                <div class="tile-num full-reset">03</div></a>           
			</article>
			<article class="tile"><a href="listaaviso.php?iddc=<?=$cod;?>">
                <div class="tile-icon full-reset"><i class="zmdi zmdi-assignment"></i></div>
                <div class="tile-name all-tittles">Avisos</div>
                <div class="tile-num full-reset">04</div>
			</a>            
			</article>	
			<article class="tile"><a href="foros.php?iddc=<?=$cod;?>">
                <div class="tile-icon full-reset"><i class="zmdi zmdi-comment"></i></div>
                <div class="tile-name all-tittles">Foros</div>
                <div class="tile-num full-reset">05</div>
			</a>            
			</article>	
	      </section>	
	</td>
    </tr>
  <tr>
    <th width="103" rowspan="2" valign="top" scope="col"><img src="fotos/<? if($foto==""){echo "student.png";}else{echo $foto;}?>" width="95" height="95" class="img-thumbnail img-circle"></th>
    <th scope="col" valign="top">Presentacion del Docente </th>
  </tr>
  <tr>
    <td width="871" valign="top"><p>
      <?=$bv;?>
    </p>
      </td>
  </tr>
  <tr>
    <th colspan="2" valign="top" scope="col"><hr></th>
    </tr>
  <tr>
    <td colspan="2" valign="top" scope="col">
	<div class="form-group">
		  <div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
		  <div class="panel panel-default">
              <div class="panel-heading" role="tab" id="headingTwo">
			  		<h4 class="panel-title">
        				<a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo">
			 		 		Informacion del Curso <span class="glyphicon glyphicon-search"></span>			       		</a>				   </h4>
			  </div>
			  <div id="collapseTwo" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingTwo">
					<table border="0">			    
					<tr>
					  <td>
						<table border="0"  class="table table-responsive">
						  
						  <? 
				  
				  $lista=$objci->ListarPorDoccur($cod);			  
				  for($i = 0; $i<count($lista); $i++)
				  {
				  ?>
						  <tr>
							<td><span class="glyphicon glyphicon-ok"></span></td>
							<td><?= $lista[$i]["recurso"];?></td>							
							<td><a href="recursos/<?= $lista[$i]["archivo"];?>" data-toggle="tooltip" title="Descargar Clase"><span class="glyphicon glyphicon-download-alt"></span></a></td>
						  </tr>
                      
                      <?
			  }
			  ?>
                    </table></td>
      			</tr>
		      </table>
		  		</div>	
		</div>
	 </div>
  </div>	</td>
    </tr>
	<tr>
	   <td colspan="2">
	         </td>
	</tr>
</table>

</form>
</div>
</body>
</html>
