<?
session_start();
if(!isset($_SESSION['usuario']))
{
 	echo "<script languaje='JavaScript'>";       
	echo "parent.location.href='index.html'; ";
	echo "</script>";
}
include ("clases/alumno.class.php");
include ("clases/autor.class.php"); $objau = new autor(); $objdo = new autor();
include ("clases/curso.class.php"); $objcur = new curso();
include ("clases/blog.class.php"); $objb = new blog();
include ("clases/matricula.class.php");
include ("clases/doc_curso.class.php"); $objdc = new doc_curso();
include ("clases/carrera.class.php"); $objcar = new carrera();
 $obja = new alumno();
$objd = new alumno();
if($objdo->BuscarPorNombre($_SESSION['usuario']))
	{
	  $nombre = $objdo->getNombres();
	  $apellido = $objdo->getApellidos();
	  $email = $objdo->getEmail();
	  $foto = $objdo->getFoto();
	  $dir = $objdo->getDireccion();
	  $iddoc = $objdo->getIddoc();
	  $tel = $objdo->getTelefono();
	  $dni=$objdo->getDni();
	  $doc = $objdo->getIddocente();
	   $v="A";
	   
	   ///////////////////
	   if($objdo->BuscarEnAgenda($doc))
	   {
	     $start = $objdo->getStart();
		// if($start<date("Y-m-d")){echo "";}else{echo $start;}
	   }
   }
?>
<!DOCTYPE html>
<html lang="es">
<head>
    <title>CAV</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>
	function guardar(f)
	{
	 if(f.nombre.value=="")
	  {
		 f.nombre.focus();
		 return false;
	  }
	  if(f.apellido.value=="")
	  {
		 f.apellido.focus();
		 return false;
	  }  
	  if(f.telefono.value=="")
	  {
		 f.telefono.focus();
		 return false;
	  }
  
  f.action='controladores/procesa.php';
  f.submit();
  return true;
}	


function clave(f)
{
    if(f.claveactual.value=="")
  	{
     f.claveactual.focus();
	 return false;
  	}
	
	 if(f.clavenueva.value=="")
  	{
     f.clavenueva.focus();
	 return false;
  	}
	
	f.action='controladores/procesa.php';
  	f.submit();
  	return true;
}	



	</script>
	
	<style>
	
.embed-container iframe {
    position: absolute;
    top:0;
    left: 0;
    width: 100%;
    height: 100%;
}



/* Then style the iframe to fit in the container div with full height and width */

	</style>
</head>
<body>
    <div class="navbar-lateral full-reset">
        <div class="visible-xs font-movile-menu mobile-menu-button"></div>
        <div class="full-reset container-menu-movile nav-lateral-scroll">
            <div class="logo full-reset all-tittles">
                <i class="visible-xs zmdi zmdi-close pull-left mobile-menu-button" style="line-height: 55px; cursor: pointer; padding: 0 10px; margin-left: 7px;">				  
				</i> 
                <span class="all-tittles"><a href="docente.php" style="padding: 10px 0; color:#fff;">CAV-UNU</a></span>
            </div>
            <div class="nav-lateral-divider full-reset"></div>
            <div class="full-reset" style="padding: 10px 0; color:#fff;">
                <figure>
                    <img src="fotos/<?=$foto;?>" alt="Biblioteca" class="img-responsive img-circle center-box" style="width:55%;">
                </figure>
                <p class="text-center" style="padding-top: 15px;"><?=$nombre;?> <?=$apellido;?></p>
            </div>
            <div class="nav-lateral-divider full-reset"></div>
            <div class="full-reset nav-lateral-list-menu">
                <ul class="list-unstyled">
                    <li><a href="pagdocente.php?id=<?=$iddoc;?>" target="clases"><i class="zmdi zmdi-home zmdi-hc-fw"></i>&nbsp;&nbsp; Mi pagina</a></li>
                    <li>
                        <div class="dropdown-menu-button"><i class="zmdi zmdi-case zmdi-hc-fw"></i>&nbsp;&nbsp; Mis Cursos <i class="zmdi zmdi-chevron-down pull-right zmdi-hc-fw icon-sub-menu"></i></div>
                        <ul class="list-unstyled">
						 <? 			  
						  $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(); 
							 }	 
						  ?>
                            <li><a href="datoscargalectiva.php?dc=<?=$lista[$i]["iddoc_curso"];?>" target="clases"><i class="zmdi zmdi-assignment-o zmdi-hc-fw"></i><?= $lista[$i]["curso"];?></a></li>
							<?
							  }
							?>
                        </ul>
                    </li>  
					 <li><a href="adminexamen.php?id=<?=$iddoc;?>" target="clases"><i class="zmdi zmdi-wrench zmdi-hc-fw"></i>&nbsp;&nbsp; Administrar Cuestionarios</a></li> 
					 
					 <li><a href="consultaestudiante.php" target="clases"><i class="zmdi zmdi-male-female zmdi-hc-fw"></i>&nbsp;&nbsp; Consultar Estudiante </a></li>
					 
                    <li> 
                        <div class="dropdown-menu-button"><i class="zmdi zmdi-bookmark-outline zmdi-hc-fw"></i>&nbsp;&nbsp; De Interes <i class="zmdi zmdi-chevron-down pull-right zmdi-hc-fw icon-sub-menu"></i></div>
                        <ul class="list-unstyled">
						    
                            <li><a href="listablog.php?id=<?php echo $doc;?>" target="clases"><i class="zmdi zmdi-book zmdi-hc-fw"></i>&nbsp;&nbsp; Mi Blog</a></li>
                            <li><a href="agenda/calendario.php?idalu=<?php echo $doc;?>" target="clases"><i class="zmdi zmdi-calendar zmdi-hc-fw"></i>&nbsp;&nbsp; Mi Agenda</a></li>
							<li><a href="listaenlace.php?id=<?=$doc;?>" target="clases"><i class="zmdi zmdi-trending-up zmdi-hc-fw"></i>&nbsp;&nbsp; Mis Enlaces</a></li>
                        </ul>
                    </li>
                   
					
                </ul>
            </div>
        </div>
    </div>
	<div class="content-page-container full-reset custom-scroll-containers">
        <nav class="navbar-user-top full-reset">
            <ul class="list-unstyled full-reset">
                <figure>
                   <img src="fotos/<?=$foto;?>" alt="user-picture" class="img-responsive img-circle center-box">
                </figure>
                <li style="color:#fff; cursor:default;">
                    <span class="all-tittles"><a href="#" target="trabajos" data-id="<?=$idalu;?>" data-title="Editar" data-toggle="modal" data-target="#nuevo" style="padding: 10px 0; color:#fff;" class="tooltips-general" data-placement="bottom" title="Actualizar mis datos">Mis Datos</a></span>
                </li>
                <li  class="tooltips-general exit-system-button" data-href="session_invalida.php?id=<?=$idalu;?>" data-placement="bottom" title="Salir del sistema">
                    <i class="zmdi zmdi-power"></i>
                </li>
                
                <li  class="tooltips-general btn-help" data-placement="bottom" title="Actualizar Contraseña">
                    <i class="zmdi zmdi-accounts zmdi-hc-fw"></i>
                </li>
                <?php if($start==date("Y-m-d")){				            
							echo "<li data-placement='bottom' title='Revise su Agenda'>";
							echo "<a href='agenda/calendario.php?idalu=$doc' target='clases'><img src='assets/img/info.gif'></a>";	
							echo "</li>";
					}else{  echo "";
						 }
				 ?>
                <li class="mobile-menu-button visible-xs" style="float: left !important;">
                    <i class="zmdi zmdi-menu"></i>
                </li>
                <li class="desktop-menu-button hidden-xs" style="float: left !important;">
                    <i class="zmdi zmdi-swap"></i>
                </li>
            </ul>
        </nav>
<table width="100%" height="920px">
   <tr>
      <td valign="top">
        <iframe name="clases" frameborder="0" width="100%" height="910" src="listaentradas.php"></iframe>
</td>
</tr>
</table>
<form name="form2" action="" method="post" enctype="multipart/form-data">
<div class="modal fade" id="nuevo" 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">Editar datos de Perfil</h4>
      </div>
          <div class="modal-body">
          <div class="form-group">
        <input name="nombre" type="text" value="<?=$nombre;?>" size="40" class="form-control" placeholder="Nombres"/>
		</div>
		<div class="form-group">
		<input class="form-control " type="text" value="<?=$apellido;?>" name="apellido" id="apellido" placeholder="Apellidos">
		</div>		
		<input type="hidden" name="email" value="<?=$email;?>">
		<input type="hidden" name="dn" value="<?=$dni;?>">
			
		<div class="form-group">
		<input class="form-control " name="telefono" type="text" value="<?=$tel;?>" size="40" placeholder="Telefono"/>
		</div>		
		<div class="form-group">Foto:
		<input type="file" name="file">
		<input type="hidden" name="MAX_FILE_SIZE" value="4000000">
		<input type="hidden" name="text" value="<?=$v;?>">
		<input type="hidden" name="id" value="<?=$iddoc;?>">
        </div>
       
      </div>
          <div class="modal-footer ">
        <button type="button" class="btn btn-success btn-lg" style="width: 100%;" onClick="guardar(this.form);"><span class="glyphicon glyphicon-ok-sign"></span>Guardar</button>		
      </div>
        </div>
    <!-- /.modal-content --> 
  </div>
      <!-- /.modal-dialog --> 
  </div>
</form>  


<form name="form3" action="" method="post">
<div class="modal fade" tabindex="-1" role="dialog" id="ModalHelp">
          <div class="modal-dialog ">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title text-center all-tittles">Actualizar Clave</h4>
                </div>
                <div class="modal-body">
        
          </div>
          <div class="modal-body">
		  <div class="form-group">		
		<input class="form-control " type="password" name="claveactual" id="claveactual" placeholder="Password Actual">		
		</div>
        <div class="form-group">		
		<input class="form-control " type="password" name="clavenueva" id="clavenueva" placeholder="Nuevo Password">		
		</div>  
		<div class="form-group">
		<input name="iddoc" type="hidden" value="<?php echo $iddoc;?>">
		<input type="hidden" name="text" value="AC" />
        </div>  		    
      </div>
          <div class="modal-footer ">
               <button type="button" class="btn btn-success btn-lg" style="width: 100%;" onClick="clave(this.form);"><i class="zmdi zmdi-thumb-up"></i> &nbsp;Guardar</button>		
          </div>
            </div>
          </div>
    </div>
 </form> 
</div>
        
    </div>
	
	
	
</body>
</html>