Пример #1
0
 public function estatus_user()
 {
     parent::conexion();
     $sql = sprintf("update usuarios set\r\n                status=%s\r\n                where\r\n                cve_usu=%s\r\n                ", parent::comillas_inteligentes($_POST["es"]), parent::comillas_inteligentes($_POST["cve"]));
     mysql_query($sql);
     header("Location: " . Conectar::ruta() . "c-secretaria/");
     exit;
 }
Пример #2
0
 public function actualizar_maes()
 {
     parent::conexion();
     $sql = sprintf("update maestros set\r\n                direccion_maes=%s,\r\n                telefono_maes=%s,\r\n                correo_maes=%s\r\n                where\r\n                cve_maes=%s\r\n                ", parent::comillas_inteligentes($_POST["dire"]), parent::comillas_inteligentes($_POST["tel"]), parent::comillas_inteligentes($_POST["correo"]), parent::comillas_inteligentes($_POST["cve"]));
     mysql_query($sql);
     header("Location: " . Conectar::ruta() . "c-maestros/e-1/v-" . $_POST["cve"] . "/");
     exit;
 }
Пример #3
0
 public function add_reservacion()
 {
     if (isset($_POST["dst"]) && isset($_POST["nombre"]) && isset($_POST["apellido"])) {
         parent::con();
         $sql = "CALL PA_DDRVN('" . $_POST["apellido"] . "','" . $_POST["dst"] . "','" . $_POST["nombre"] . "')";
         $res = mysql_query($sql) or die(mysql_error());
         if ($res) {
         } else {
             echo '<script type="text/javascript">window.location="' . Conectar::ruta() . '?verreservacion; </script>';
         }
     }
 }
Пример #4
0
 public function add_unidad()
 {
     if (isset($_POST["c1"]) && isset($_POST["c2"]) && isset($_POST["c3"]) && isset($_POST["c4"]) && isset($_POST["c5"])) {
         parent::con();
         $sql = "INSERT INTO unidad(placa,disponibilidad,id_tipo_unidad,matricula,tarjeta_circulacion) values('" . $_POST["c1"] . "','" . $_POST["c2"] . "','1','" . $_POST["c4"] . "','" . $_POST["c5"] . "')";
         $res = mysql_query($sql) or die(mysql_error());
         if ($res) {
             echo "<script type='text/javascript'>window.location='view/menu.phtml'</script>";
         } else {
             echo '<script type="text/javascript">window.location="' . Conectar::ruta() . '?verunidad&m=3"; </script>';
         }
     }
 }
Пример #5
0
 public function add_mpasajero()
 {
     $i = 1;
     $j = 0;
     if (isset($_POST["nom" . $i]) && isset($_POST["ape" . $i]) && isset($_POST["fec" . $i]) && isset($_POST["sx" . $i])) {
         parent::con();
         while (isset($_POST["nom" . $i]) && isset($_POST["ape" . $i]) && isset($_POST["fec" . $i]) && isset($_POST["sx" . $i])) {
             $sql = "INSERT INTO pasajeros(nombre,apellido,sexo,fec_nac) values('" . $_POST["nom" . $i] . "','" . $_POST["ape" . $i] . "','" . $_POST["sx" . $i] . "','" . $_POST["fec" . $i] . "')";
             $res = mysql_query($sql) or die(mysql_error());
             $i++;
             $j++;
         }
         $sql2 = "UPDATE reservacion_transporte SET costo = (SELECT F_COSTO_RES({$j})),num_personas={$j} WHERE id_reservacion = (SELECT F_ID_RES())";
         $res2 = mysql_query($sql2) or die(mysql_error());
         if ($res2) {
             $sql3 = "SELECT F_ID_RES()";
             $res3 = mysql_query($sql3) or die(mysql_error());
             $req = mysql_fetch_array($res3);
             echo '<script type="text/javascript">window.location="' . Conectar::ruta() . '?addreservacion&idres="' . $req["F_ID_RES"] . '"; </script>';
         } else {
             echo '<script type="text/javascript">window.location="' . Conectar::ruta() . '?addreservacion"; </script>';
         }
     }
 }
Пример #6
0
 public function npractica()
 {
     parent::conexion();
     $query = sprintf("insert into practicas \r\n                        values\r\n                        (null,%s,%s,0,%s,%s,%s,1);\r\n                        ", parent::comillas_inteligentes($_POST["cv_m"]), parent::comillas_inteligentes($_POST["img"]), parent::comillas_inteligentes($_POST["fcha"]), parent::comillas_inteligentes($_POST["des"]), parent::comillas_inteligentes($_POST["gpo"]));
     mysql_query($query);
     header("Location: " . Conectar::ruta() . "c-mini/e-3/");
     exit;
 }
Пример #7
0
 public function actualizar_alumnos()
 {
     parent::conexion();
     echo $sql = sprintf("update alumnos set\r\n                tel_al=%s,\r\n                obser_al=%s,\r\n\t\tcalle_al=%s,\r\n\t\tnum_al=%s,\r\n\t\tcol_al=%s,\r\n                estado_al=%s,\r\n\t\tmuni_al=%s\r\n                where\r\n                cve_alum=%s\r\n                ", parent::comillas_inteligentes($_POST["tele"]), parent::comillas_inteligentes($_POST["obser"]), parent::comillas_inteligentes($_POST["calle"]), parent::comillas_inteligentes($_POST["numero"]), parent::comillas_inteligentes($_POST["colo"]), parent::comillas_inteligentes($_POST["estado"]), parent::comillas_inteligentes($_POST["muni"]), parent::comillas_inteligentes($_POST["cve_a"]));
     mysql_query($sql);
     header("Location: " . Conectar::ruta() . "c-aini/v-6/");
     exit;
 }
Пример #8
0
 public function alta_grupo()
 {
     parent::conexion();
     $query = sprintf("insert into grupo \r\n                        values\r\n                        (null,%s,%s,%s,%s,%s,%s,%s,1);\r\n                        ", parent::comillas_inteligentes($_POST["nom_gpo"]), parent::comillas_inteligentes($_POST["maestro"]), parent::comillas_inteligentes($_POST["horario"]), parent::comillas_inteligentes($_POST["aula"]), parent::comillas_inteligentes($_POST["Laboratorio"]), parent::comillas_inteligentes($_POST["hl"]), parent::comillas_inteligentes($_POST["dia"]));
     mysql_query($query);
     header("Location: " . Conectar::ruta() . "c-grupos/");
     exit;
 }
Пример #9
0
<?php

session_start();
session_destroy();
header("location:" . Conectar::ruta() . "c-home/");
Пример #10
0
 public function login()
 {
     if (!empty($_POST["user"]) and !empty($_POST["pass"])) {
         parent::conexion();
         $sql = sprintf("select * from admin where login_dire='%s' and pass_dire='%s'", parent::comillas_inteligentes($_POST["user"]), parent::comillas_inteligentes($_POST["pass"]));
         $res = mysql_query($sql);
         if (mysql_num_rows($res) != 0) {
             while ($reg = mysql_fetch_array($res)) {
                 $_SESSION["admin"] = $reg["nombre_dire"] . " " . $reg["apellidos_dire"];
                 header("Location: " . Conectar::ruta() . "c-admin/");
                 exit;
             }
         } else {
             /////////////////////////
             parent::conexion();
             $sql = sprintf("select * from alumnos where login_al='%s' and pass_al='%s' and status_al!=0", parent::comillas_inteligentes($_POST["user"]), parent::comillas_inteligentes($_POST["pass"]));
             $res = mysql_query($sql);
             if (mysql_num_rows($res) != 0) {
                 while ($reg = mysql_fetch_array($res)) {
                     $_SESSION["nom_alumn"] = $reg["nombre_alum"] . " " . $reg["apellidos_al"];
                     $_SESSION["cve_alum"] = $reg["cve_alum"];
                     header("Location: " . Conectar::ruta() . "c-aini/");
                     exit;
                 }
             } else {
                 /////////////////////////
                 parent::conexion();
                 $sql = sprintf("select * from maestros where login_maes='%s' and pass_maes='%s' and status_maes!=0", parent::comillas_inteligentes($_POST["user"]), parent::comillas_inteligentes($_POST["pass"]));
                 $res = mysql_query($sql);
                 if (mysql_num_rows($res) != 0) {
                     while ($reg = mysql_fetch_array($res)) {
                         $_SESSION["nom_maes"] = $reg["nombre_maes"] . " " . $reg["apellido_maes"];
                         $_SESSION["cve_maes"] = $reg["cve_maes"];
                         header("Location: " . Conectar::ruta() . "c-mini/");
                         exit;
                     }
                 } else {
                     /////////////////////////
                     parent::conexion();
                     $sql = sprintf("select * from usuarios where login_usu='%s' and pass_usu='%s' and cve_cat_user=1 and status!=0", parent::comillas_inteligentes($_POST["user"]), parent::comillas_inteligentes($_POST["pass"]));
                     $res = mysql_query($sql);
                     if (mysql_num_rows($res) != 0) {
                         while ($reg = mysql_fetch_array($res)) {
                             $_SESSION["nom_se"] = $reg["nombre_usu"] . " " . $reg["apellidos_usu"];
                             $_SESSION["cve_se"] = $reg["cve_usu"];
                             header("Location: " . Conectar::ruta() . "c-sini/");
                             exit;
                         }
                     } else {
                         header("Location: " . Conectar::ruta() . "c-login/v-2/");
                         exit;
                     }
                     ////////////////////////
                 }
                 ////////////////////////
             }
             ////////////////////////
         }
     } else {
         header("Location: " . Conectar::ruta() . "c-login/v-1/");
         exit;
     }
 }
Пример #11
0
 public function desactivar_gpo()
 {
     if ($_POST["dia"] == "Lunes") {
         $d = 1;
     }
     if ($_POST["dia"] == "Martes") {
         $d = 2;
     }
     if ($_POST["dia"] == "Miercoles") {
         $d = 3;
     }
     if ($_POST["dia"] == "Jueves") {
         $d = 4;
     }
     if ($_POST["dia"] == "Viernes") {
         $d = 5;
     }
     if ($_POST["dia"] == "Sabado") {
         $d = 6;
     }
     if ($_POST["dia"] == "Domingo") {
         $d = 7;
     }
     parent::conexion();
     $sql = sprintf("update grupo set\r\n                    status_gpo=%s\r\n                    where\r\n                    cve_grupo=%s\r\n                    ", parent::comillas_inteligentes($_POST["es"]), parent::comillas_inteligentes($_POST["cve_grupo"]));
     mysql_query($sql);
     header("Location: " . Conectar::ruta() . "c-grupos/d2-{$d}/");
     exit;
 }