<?
session_start();
if(!isset($_SESSION['usuario']))
{
 	echo "<script languaje='JavaScript'>";       
	echo "parent.location.href='index.php'; ";
	echo "</script>";
}
include ("clases/aviso.class.php"); $obja=new aviso();
include ("clases/autor.class.php");
include ("clases/cabevaluacion.class.php"); $objcabeva = new cabevaluacion();
include ("clases/curso.class.php"); include ("clases/clases.class.php"); $objcla = new clases();
include ("clases/doc_curso.class.php"); $objdc = new doc_curso();
//////////////////////////////
include ("clases/foro.class.php"); $obja=new foro();
/////////////////////////////
$objd = new autor();
$iddoc = $_REQUEST["id"];
if($objd->BuscarPorCodigo($iddoc))
	{
	  $nombre = $objd->getNombres();
	  $apellido = $objd->getApellidos();
	  $email = $objd->getEmail();
	  $foto = $objd->getFoto();
	  $dir = $objd->getDireccion();
	  $iddoc = $objd->getIddoc();
	}
if($objdc->BuscarPorCodigoDoc($iddoc)){
   $iddoc_curso = $objdc->getIddoc_curso();
   //echo $iddoc_curso;
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Pagina Docente</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>
<script language="javascript">
function envia2(id)
	{ 
	  window.open("modificadoc.php?id="+id,"","fullscreen=no, height=270,width=620,left=100,top=200,resizable = yes,scrollbars=yes,toolbar = no,status = no");						
	}
	function envia(id)
	{ 
	  window.open("manclase.php?id="+id,"","fullscreen=no, height=270,width=620,left=100,top=200,resizable = yes,scrollbars=yes,toolbar = no,status = no");						
	}
	function envia3(id)
	{ 
	  window.open("manaviso.php?id="+id,"","fullscreen=no, height=220,width=620,left=100,top=200,resizable = yes,scrollbars=yes,toolbar = no,status = no");						
	}
	
	$(function () {
  $('[data-toggle="tooltip"]').tooltip()
})
	
</script>
<style>
.embed-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}
.embed-container iframe {
    position: absolute;
    top:0;
    left: 0;
    width: 100%;
    height: 1063px;
}

.container_iframe {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding-top: 100%;  /* 16:9 Aspect Ratio (divide 9 by 16 = 0.5625) */
  margin:1px;
}

/* Then style the iframe to fit in the container div with full height and width */
.responsive-iframe {
  position: absolute;
  top: -1px;
  left: 0;
  bottom: 0;
  right: 0;
  width: 100%;
  height: 1916px;
}

.text_docentes{ font-size:11px; font-family:Arial, Helvetica, sans-serif;}
</style>
</head>

<body>
<form id="form1" name="form1" method="post" action="">
  <div class="col-md-12">    
    <div class="panel-heading">
	  <h4><p class="bg-success">
	     <a href="#" target="trabajos" data-title="foto" data-toggle="modal" data-target="#foto"><img src="fotos/<? if($foto==""){echo "student.png";}else{echo $foto;}?>" width="95" height="95" class="img-thumbnail img-circle"></a> DOCENTE: <?=$nombre;?> <?=$apellido;?> / CORREO: <?=$email;?>
		 <a href="listaentradas.php" class="close" data-dismiss="modal" aria-hidden="true"><span class="glyphicon glyphicon-share" aria-hidden="true"></span></a> 
		  
	  </p>		</h4>	
  </div>
  </div>
  <div class="col-md-3">
    <div class="panel panel-danger">
              <div class="panel-heading">LISTA DE  AVISOS
                <input type="hidden" name="text" value="R" />
                  <input type="hidden" name="iddoc" value="<?=$cod;?>" class="inputbox" />
			  </div>
     <table class="table table-hover">
		    
            <? 
			  $obj = new aviso();		  
			 
			  $lista = $obj->ListarPorDoccurso($iddoc_curso);
			  
			  for($i = 0; $i<count($lista); $i++)
			  {
			      
			  ?>
            <tr onMouseOver="this.style.backgroundColor='#f5f5f5'" onMouseOut="this.style.backgroundColor='#FFFFFF'" class="Estilo1">
              <td width="19" height="22"><span class="glyphicon glyphicon-ok"></span></td>
              <td width="225"><?=$lista[$i]["aviso"];?></td>
            </tr>
            <?
			
			  }
			  ?>
      </table>
	  </div>
  </div>
  <div class="col-md-6">
   <div class="panel panel-info">
              <div class="panel-heading">CURSOS
			  QUE DICTA </div>
              <table class="table table-hover">
      
      <? 
			  
			  $objc = new curso();			  
			  $lista=$objdc->ListarPorDocente($iddoc);
			 
			  for($i = 0; $i<count($lista); $i++)
			  {
			    if($objc->BuscarPorCodigo($lista[$i]["idcurso"])){
				      $lista[$i]["curso"]=$objc->getCurso(); 
				 }	
				 
			  ?>
      <tr>
        <td height="22"><?= $lista[$i]["curso"];?></td>
        <td width="22%" align="center"><a href="listaexamen.php?buscar=<?=$lista[$i]["iddoc_curso"];?>&id=<?=$iddoc;?>" target="trabajos" class="btn btn-default" style="visibility:hidden"><span class="glyphicon glyphicon-open-file"></span>Cuestionario</a></td>
      </tr>
      <?  
			  }
			  ?>
    </table>
	</div>
  </div>
  <div class="col-md-3">
    <div class="panel panel-primary">
       <div class="panel-heading">
		            <center>
		                <input type="hidden" name="iddoc2" value="<?=$cod;?>" class="inputbox" />
		                <input type="hidden" name="text2" value="R" />
	                  FOROS:
		            </center>
      </div>
	  <table class="table table-hover">
	    
      			 <? 
			  $obj = new foro();		  
			 
			  $lista = $obj->ListarPorDocenteVisble($iddoc);
			  
			  for($i = 0; $i<count($lista); $i++)
			  {
			     echo "<div class='form-group'>";
			  ?>
			  <tr><td>
			  <div><span class="glyphicon glyphicon-ok"></span> <?=$lista[$i]["concepto"];?>  <?="(Pub:".$lista[$i]["fechapub"].")";?> <a href="rsptaforo.php?id=<?=$lista[$i]["idforo"];?>" target="_self" data-toggle="tooltip" title="Comentar"> <span class="glyphicon glyphicon-retweet"></span></a>
			  </div>
			  </td></tr>
				  <?
				  echo "</div>";
				  }
				  ?>
				  </table>
  </div>
 </div>
</form>

<div class="modal fade" id="foto" tabindex="-1" role="dialog" aria-labelledby="nuevo" aria-hidden="true">
      <div class="modal-dialog">
		<div class="modal-content">
			  <div class="modal-header">
					<button type="button" class="close" data-dismiss="modal" aria-hidden="true"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span></button>
					<h4 class="modal-title custom_align" id="Heading">Gracias por visitarme</h4>
			  </div>
			  <div class="modal-body">
				<div class="form-group">
					<img src="fotos/<?=$foto;?>" class="img-thumbnail" />
				</div>
			  </div>
			  <div class="modal-footer ">
				   <?=$nombre;?> <?=$apellido;?>		
			  </div>
        </div>
    <!-- /.modal-content --> 
       </div>
      <!-- /.modal-dialog --> 
  </div>
</body>

</html>

