<?php

//if(session_start()){session_destroy();}
//session_destroy();
include '../conector.php';
session_start();
if(isset($_SESSION["user"]) && ($_SESSION["tipo"]=='P')){

if($_SESSION["tipo"]=='P'){$cuenta="select 
estudiante.estudiante_id,
estudiante.curso_id,
estudiante.nombre,
(select nombre_archivo from upload where upload.codigo=estudiante.estudiante_id and clase='F') 
from estudiante,acudiente 
where estudiante.acud_id=acudiente.id
and acudiente.usuario_acud='".$_SESSION["user"]."'
and estado_est='A' ";}

$res_cuenta=mysql_query($cuenta);
//$rs_cta=mysql_fetch_array($res_cuenta);










echo "
<!DOCTYPE html>
<html lang='en'>
  <head>
    <meta charset=\"utf-8\">
    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">
    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">
    <meta name=\"description\" content=\"\">
    <meta name=\"author\" content=\"\">
    <link rel=\"shortcut icon\" href=\"../assets/ico/favicon.ico\">
    <title>Seleccione estudiante</title>

    <!-- Bootstrap core CSS -->
    <link href=\"../dist/css/bootstrap.min.css\" rel=\"stylesheet\">

    <!-- Custom styles for this template -->";
	 include 'fuente.php'; 
echo " 
    <link href=\"../signin.css\" rel=\"stylesheet\">

    <!-- Just for debugging purposes. Don't actually copy this line! -->
    <!--[if lt IE 9]><script src=\"../assets/js/ie8-responsive-file-warning.js\"></script><![endif]-->

    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
      <script src=\"https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js\"></script>
      <script src=\"https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js\"></script>
    <![endif]-->
    <script>
  function sel_estudiante(e,c){
  //alert(e);  alert(c);
  document.getElementById('est').value=e;
  document.getElementById('curso').value=c;
  document.getElementById('val').value=1;  
  document.forms['ingreso'].submit();
  }
    </script>
    
  </head>

  <body>

    <div class=\"container\">
<div class=\"panel panel-default well \" align='center'>
<div class='table-responsive' align='center' style='margin:5px auto'>
<div align=center><img id='imagen'  style='-moz-transition: all 1s ease-in-out;
						  -webkit-transition: all 1s ease-in-out;
						  -o-transition: all 1s ease-in-out;
						  transition: all 1s ease-in-out;
						border-radius: 50%;
						-moz-border-radius: 50%;
						-webkit-border-radius: 50%;
						-khtml-border-radius: 50%;
						border: 2px solid #cee6fb;

						 overflow: hidden;'  src='../img/foto/estudiante.jpg' width='60px' height='60px' ></div>

<h3>Seleccione Estudiante</h3>
</div>
      <form class=\"form-signin\" role=\"form\" name='ingreso' method='post' action='general.php' target='_self'>
      <input type='hidden' name='val' id='val' value=''>
      <input type='hidden' name='est' id='est' value=''>      
      <input type='hidden' name='curso' id='curso' value=''>            
    

     
      
      
     ";

while($rs_cta=mysql_fetch_array($res_cuenta)){

if(!empty($rs_cta[3])&&isset($rs_cta[3])){$foto="
						<div align=left>
							<div align=center><img style='
							border-radius: 50%;
							-moz-border-radius: 50%;
							-webkit-border-radius: 50%;
							-khtml-border-radius: 50%;
							border: 2px solid #cee6fb;
							
							 overflow: hidden;'  src='../img/foto/".$rs_cta[3]."' width='40' height='40' >
							</div>
							 
						 </div>
						 ";}
					else{$foto="<div align=left>
							<div align=center><img style='
							border-radius: 50%;
							-moz-border-radius: 50%;
							-webkit-border-radius: 50%;
							-khtml-border-radius: 50%;
							border: 2px solid #cee6fb;
							
							 overflow: hidden;'  src='../img/foto/anon.png' width='40' height='40' >
							</div>
					 </div>						 ";}

//echo $rs_cta[0]."  -  ";echo $rs_cta[1]."  -  ";echo $rs_cta[2]."  -  ";echo $foto."<br>";
//echo $foto."<br>";



echo	"<div class='input-group'>
  	<span class='input-group-addon'>$foto</span>
        <input disabled style='height:55px;font-size:12px' name='usuario' id='usuario' type=\"text\" class=\"form-control\" placeholder=\"email\" value='$rs_cta[2]'>
       <span class='input-group-btn'>
        <button style='height:55px;font-size:12px;background-color:#eeeeee' class='btn btn-default btn-sm' type='button' onclick='sel_estudiante(".$rs_cta[0].",".$rs_cta[1].")'><span class='glyphicon glyphicon-play'></span></button>
      </span>
        </div>";

}

echo "
      
      </form>
</div>
    </div> <!-- /container -->


    <!-- Bootstrap core JavaScript
    ================================================== -->
    
     <script src=\"https://code.jquery.com/jquery-1.10.2.min.js\"></script>
    <script src=\"../dist/js/bootstrap.min.js\"></script>
    <script src=\"../offcanvas.js\"></script>

    
    
    <!-- Placed at the end of the document so the pages load faster -->
  </body>
</html>";
}

//session_destroy();
?>
