Fix page materias.php
This commit is contained in:
33
materias.php
33
materias.php
@@ -45,14 +45,14 @@ if ($user->admin) {
|
||||
$sql = "SELECT * FROM fs_materias(:nombre, :carrera, :facultad)";
|
||||
if (isset($_POST["desc"])) {
|
||||
$desc = $_POST["desc"];
|
||||
$filter_desc = trim(filter_input(INPUT_POST, "desc", FILTER_SANITIZE_STRING, array('flags' => FILTER_FLAG_STRIP_LOW)));
|
||||
$filter_desc = htmlspecialchars($desc, ENT_QUOTES, 'UTF-8');
|
||||
} else {
|
||||
$desc = null;
|
||||
}
|
||||
|
||||
if (isset($_POST["carrera"])) {
|
||||
$pcarrera = $_POST["carrera"];
|
||||
$filter_carrera = trim(filter_input(INPUT_POST, "carrera", FILTER_SANITIZE_STRING, array('flags' => FILTER_FLAG_STRIP_LOW)));
|
||||
$filter_carrera = htmlspecialchars($pcarrera, ENT_QUOTES, 'UTF-8');
|
||||
} else {
|
||||
$pcarrera = null;
|
||||
}
|
||||
@@ -104,11 +104,15 @@ if ($user->admin) {
|
||||
if ($nivel_ac != $carrera["nivel_id"]) {
|
||||
$nivel_ac = $carrera["nivel_id"];
|
||||
?>
|
||||
<li data-id="" class="not-selectable"><?php echo $carrera["nivel_nombre"]; ?></li>
|
||||
<li data-id="" class="not-selectable">
|
||||
<?php echo $carrera["nivel_nombre"]; ?>
|
||||
</li>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<li data-id="<?php echo $carrera["carrera_nombre"]; ?>" class="pl-4 <?= !(isset($filter_carrera) && $carrera["carrera_nombre"] == $filter_carrera) ?: 'selected'; ?>"><?= $carrera["carrera_nombre"] ?></li>
|
||||
<li data-id="<?php echo $carrera["carrera_nombre"]; ?>"
|
||||
class="pl-4 <?= !(isset($filter_carrera) && $carrera["carrera_nombre"] == $filter_carrera) ?: 'selected'; ?>">
|
||||
<?= $carrera["carrera_nombre"] ?></li>
|
||||
<?php
|
||||
|
||||
}
|
||||
@@ -141,16 +145,15 @@ if ($user->admin) {
|
||||
<?php
|
||||
if ($pcarrera == "") {
|
||||
?>
|
||||
<p> Se muestran los primeros <strong><?php echo $max_count; ?></strong> resultados. Utiliza los filtros para encontrar la materia que buscas.</p>
|
||||
<p> Se muestran los primeros <strong>
|
||||
<?php echo $max_count; ?>
|
||||
</strong> resultados. Utiliza los filtros para encontrar la materia que buscas.</p>
|
||||
<?php } ?>
|
||||
<table class="table table-sm table-striped table-white">
|
||||
<thead class="thead-dark">
|
||||
<tr>
|
||||
<th>Nombre</th>
|
||||
<th>Carrera</th>
|
||||
<?php if ($user->acceso == 'w') { ?>
|
||||
<th>Acciones</th>
|
||||
<?php } ?>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -160,13 +163,12 @@ if ($user->admin) {
|
||||
|
||||
?>
|
||||
<tr data-id="<?php echo $materia["materia_id"]; ?>" id="<?php echo $materia["materia_id"]; ?>">
|
||||
<td class="text-primary"><?php echo $materia["materia_nombre"]; ?></td>
|
||||
<td class="text-primary"><?php echo $materia["carrera_nombre"]; ?></td>
|
||||
<?php if ($user->acceso == 'w') { ?>
|
||||
<td class="text-center icono-acciones">
|
||||
<a href="#" data-toggle="modal" data-target="#modal" data-tipo="3" title="Editar"><span class="ing-editar ing-fw"></span></a>
|
||||
<td class="text-primary">
|
||||
<?php echo $materia["materia_nombre"]; ?>
|
||||
</td>
|
||||
<td class="text-primary">
|
||||
<?php echo $materia["carrera_nombre"]; ?>
|
||||
</td>
|
||||
<?php } ?>
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
@@ -198,7 +200,8 @@ if ($user->admin) {
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form action="./action/action_materias_update.php" method="post" id="formaModal" onsubmit="return valida_campos()">
|
||||
<form action="./action/action_materias_update.php" method="post" id="formaModal"
|
||||
onsubmit="return valida_campos()">
|
||||
<input type="hidden" name="id" id="id">
|
||||
<div class="form-box">
|
||||
<div class="form-group row">
|
||||
|
||||
Reference in New Issue
Block a user