<?php
include("../bd/sql_variables.php");
$con= mysqli_connect("$sql_host", "$sql_usuario", "$sql_pass","$sql_db") or die(header ("No Disponible Servidor de Base de Datos"));


$idj=$_GET['idj'];
$ids=$_GET['ids'];
$idtp=$_GET['idtp'];
$idga=$_GET['idga'];

//nombre de grupo area
$sqlserv = "SELECT a.a_id as ida, (select a_desc from tb_area where a_id=a.a_id and ga_id=a.ga_id) as descripcion FROM tb_areaservicio a ";
$sqlserv = $sqlserv." where a.s_id='$ids' and a.j_id='$idj' and a.tp_id='$idtp' and a.ga_id='$idga'";

//echo $sqlserv;
$cadenagarea = "";
$cadenagarea = $cadenagarea."<select id='cbarea' onChange='mostrarhorario();mostrarhorarionew()'>";
$cadenagarea = $cadenagarea."<option value='0'>Seleccione Grupo Area </option>";
$resultserv = mysqli_query($con,$sqlserv);
while ($rows= mysqli_fetch_array($resultserv)){
$cadenagarea = $cadenagarea."<option value='".$rows['ida']."'>".$rows['descripcion']."</option>";
}
$cadenagarea = $cadenagarea."</select>";

echo $cadenagarea;
?>