<?php   
	define('__ROOT__', dirname(dirname(__FILE__))); 
	require_once(__ROOT__.'\siga\Connections\dbms.class.php');
	require_once(__ROOT__.'\siga\Connections\dbmy.class.php');
	//header("Content-Type:text/html; charset=UTF-8");
	header("Content-Type:text/html; charset=utf-8");

	$turno= $_REQUEST["turno"];
	$sede= $_REQUEST["sede"];		
	$carrera= $_REQUEST["carrera"];		
	$pensum= $_REQUEST["pensum"];		
	$periodo= $_REQUEST["periodo"];		
	$nivel= $_REQUEST["nivel"];
//	$semestre= $_REQUEST["semestre"];
	
	if((!empty($turno)) and (!empty($sede))and (!empty($carrera))and (!empty($pensum))and (!empty($nivel))){
		$bd =new dbms('mysql','no'); 

		$sql = "SELECT `codigo_seccion` as codigo,concat(seccion) as descripcion
				FROM `secciones` where `sede` = $sede and `carrera`= '$carrera' 
				and pensum='$pensum' and  periodo= $periodo  
				and  periodo=$periodo and turno=$turno and nivel='$nivel'";
		$bd->EjecutarQuery($sql);

		$vlLista =$vlLista. "<option value='0' >Seleccionar</option>";

		while ($data=$bd->DataObjeto()){
			 $vlLista =$vlLista. "<option  value='". $data->codigo ."' >".$data->descripcion."</option>";
		}

		echo $vlLista;
	}
?>
