Exemple #1
0
function consultaCarrera()
{
    $respuesta = false;
    $nControl = GetSQLValueString($_POST["nControl"], "text");
    $CARNOM = "";
    $CALNPE = "";
    $conexion = conectaBDSIE();
    $consulta = sprintf("select DCARRE.CARNOM, DCALUM.CALNPE from DCARRE INNER JOIN DCALUM ON DCALUM.CARCVE=DCARRE.CARCVE WHERE DCALUM.ALUCTR=%s limit 1", $nControl);
    $res = mysql_query($consulta);
    if ($row = mysql_fetch_array($res)) {
        $respuesta = true;
        $CARNOM = $row['CARNOM'];
        $CALNPE = $row['CALNPE'];
    }
    $arrayJSON = array('respuesta' => $respuesta, 'CARNOM' => $CARNOM, 'CALNPE' => $CALNPE);
    print json_encode($arrayJSON);
}
Exemple #2
0
<div id="solNuevaMaestro">
		<?php 
require_once '../data/conexion.php';
?>
		<div class="row" id="nuevaMaestro">
			<h5>Nueva solicitud</h5>
			<div class="col s12">
				<div class="row">
					<div class="input-field col s8">
						<select id="cmbMateria">
							<option value="" disabled selected>Seleccione la materia</option>
							<?php 
$conexion = conectaBDSIE();
$consulta = sprintf("select m.MATCVE, m.MATNCO from DMATER m inner join DGRUPO g on m.MATCVE = g.MATCVE where g.PERCVE = 920 and g.PDOCVE ='2161' and g.GRUBAS = ' ' and g.INSNUM > 0");
$res = mysql_query($consulta);
while ($row = mysql_fetch_array($res)) {
    echo '<option value="' . $row["MATCVE"] . '">' . $row["MATNCO"] . '</option>';
}
?>
						</select>
						<label>Materia</label>
					</div>
					<div class="input-field col s2">
						<select id="cmbHoraMat">
							<option value="" disabled selected>Seleccione la hora</option>
							<option value="1">10:00</option>
							<option value="2">01:00</option>
							<option value="3">15:00</option>
						</select>
						<label>Hora de la materia</label>
					</div>
Exemple #3
0
function grupo($mat, $per, $pdo, $hor)
{
    $matcve = $mat;
    $clave = $per;
    $maestro = claveMaestro($clave);
    $periodo = $pdo;
    $n = $hor;
    $n2 = (string) ($n + 1);
    $n = (string) $n;
    $hora = $n . "00" . $n2 . "00";
    $conexion = conectaBDSIE();
    $consulta = sprintf("select GPOCVE from DGRUPO where MATCVE =%s AND PERCVE=%d AND PDOCVE =%s AND (LUNHRA =%s OR MARHRA =%s OR MIEHRA =%s OR JUEHRA =%s OR VIEHRA =%s)", $matcve, $maestro, $periodo, $hora, $hora, $hora, $hora, $hora);
    $res = mysql_query($consulta);
    if ($row = mysql_fetch_array($res)) {
        return $row["GPOCVE"];
    } else {
        return "";
    }
}