File: /home/asjudine/www/callcenter/validar_acciones_constitucionales.php
<?php
//if(isset($_POST['iniciarRevistas']))
if(isset($_POST['Submit']))
{
$enviado=1;
require_once("../Conectarse.php");
if($_POST["Login"] != "" and $_POST["Password"] != "")
{
$Logo = $_POST["Login"];
$Pass = $_POST["Password"];
$result = mysql_query('SELECT Login, Password, Cedula, Nombre_Completo, nivel, codigo, cargo, cargo_callcenter FROM Usuarios WHERE Login = "' . $Logo . '"');
if (!$result)
{
die('Invalid query: ' . mysql_error());
}
$row = mysql_fetch_row($result);
$Ced = $row[2];
$Nom = $row[3];
$Cod = $row[5];
$Cargo = $row[6];
$Cargo_callcenter = $row[7];
if($row[0] == $Logo)
{
if($row[1] == $Pass)
{
/*if($row[5] == "001" || $row[5] == "980" || $row[6] == 'ABOGADO')*/
if($row[5]== "001" || $row[5]== "980" || $row[5] == "709"|| $row[5] == "894"|| $row[5] == "2124" )
{
echo "<SCRIPT LANGUAGE='javascript'>window.location.href='menu_acciones_constitucionales.php?ced=$Ced&nom=$Nom'</SCRIPT>";
}
else
{
echo "<script>alert('Usted no tiene autorización para revisar solicitudes')</script>";
echo "<SCRIPT LANGUAGE='javascript'>window.location.href='validar_acciones_constitucionales.php?ced=$Ced&nom=$Nom'</SCRIPT>";
}
}
else
{
echo "<script>alert('Password incorrecto, por favor verifique')</script>";
echo "<SCRIPT LANGUAGE='javascript'>window.location.href='validar_acciones_constitucionales.php?ced=$Ced&nom=$Nom'</SCRIPT>";
}
}
else
{
echo "<script>alert('El usuario no existe en la base de datos')</script>";
echo "<SCRIPT LANGUAGE='javascript'>window.location.href='validar_acciones_constitucionales.php?ced=$Ced&nom=$Nom'</SCRIPT>";
}
} // post login
} // post submit
?>
<!DOCTYPE html>
<html>
<head>
<title>Login Callcenter Acciones Constitucionales</title>
<meta http-equiv="X-UA-Compatible" content="IE=8; IE=9; IE=edge" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="../css/bootstrap.min.css">
<style type="text/css">
*{margin: 0;padding: 0;}
body{margin: 0 auto; background-color:#EAEAEA; text-align:center;}
header {background-color: #B7271F; text-align: center;}
header img{width:700px; height:70px;}
.titulo{width: 100%;text-align: center;background-color: #dbd8c9;color: #b20606;padding: 6px 0;font-size: 18px;}
table{margin: 0 auto;border: 8px solid #bebebe;}
.main{margin: 0 auto; }
.contain{width:100%; margin: 0 auto; opacity: 1; }
.form-container {
margin: 0 auto;
border: 0px solid #ff4a4a;
/*background: #5c0a0a;*/
background: #B7271F;
background: -webkit-gradient(linear, left top, left bottom, from(#B7271F), to(#820003));
background: -webkit-linear-gradient(top, #B7271F, #820003);
background: -moz-linear-gradient(top, #B7271F, #820003);
background: -ms-linear-gradient(top, #B7271F, #820003);
background: -o-linear-gradient(top, #B7271F, #820003);
background-image: -ms-linear-gradient(top, #B7271F 0%, #820003 100%);
-webkit-border-radius: 8px;
-moz-border-radius: 8px;
border-radius: 8px;
-webkit-box-shadow: rgba(000,000,000,0.9) 0 1px 2px, inset rgba(255,255,255,0.4) 0 1px 0;
-moz-box-shadow: rgba(000,000,000,0.9) 0 1px 2px, inset rgba(255,255,255,0.4) 0 1px 0;
box-shadow: rgba(000,000,000,0.9) 0 1px 2px, inset rgba(255,255,255,0.4) 0 1px 0;
font-family: 'Helvetica Neue',Helvetica,sans-serif;
text-decoration: none;
vertical-align: middle;
min-width:300px;
padding:20px;
width:25%;
}
.form-field {
border: 1px solid #c9b7a2;
background: #e4d5c3;
-webkit-border-radius: 1px;
-moz-border-radius: 1px;
border-radius: 1px;
/*color: #c9b7a2;*/
color: #5C5C5C;
-webkit-box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(000,000,000,0.7) 0 0px 0px;
-moz-box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(000,000,000,0.7) 0 0px 0px;
box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(000,000,000,0.7) 0 0px 0px;
padding:5px;
margin-bottom:5px;
width:100%;
}
.form-field:focus {
background: #ffffff;
color: #725129;
}
.form-container h2 {
text-shadow: #ffffff 0 1px 0;
font-size:16px;
margin: 0 0 20px 0;
font-weight:bold;
text-align:center;
}
.form-title {
text-align:left;
margin-bottom:5px;
color: #ffffff;
text-shadow: #ffffff 0 1px 0;
}
.submit-container {
margin: 4px 0;
text-align:right;
}
.submit-button {
width: 100%;
border: 1px solid #ffffff;
background: #4d0000;
background: -webkit-gradient(linear, left top, left bottom, from(#ff0000), to(#4d0000));
background: -webkit-linear-gradient(top, #ff0000, #4d0000);
background: -moz-linear-gradient(top, #ff0000, #4d0000);
background: -ms-linear-gradient(top, #ff0000, #4d0000);
background: -o-linear-gradient(top, #ff0000, #4d0000);
background-image: -ms-linear-gradient(top, #ff0000 0%, #4d0000 100%);
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
-webkit-box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(255,255,255,0.4) 0 1px 0;
-moz-box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(255,255,255,0.4) 0 1px 0;
box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(255,255,255,0.4) 0 1px 0;
text-shadow: #000000 0 1px 0;
color: #ffffff;
font-family: helvetica, serif;
padding: 8px 8px;
font-size: 12px;
text-decoration: none;
vertical-align: middle;
margin-bottom:10px;
}
.submit-button:hover {
border: 1px solid #000000;
text-shadow: #ff0000 0 1px 0;
background: #ff0000;
background: -webkit-gradient(linear, left top, left bottom, from(#880003), to(#BF0026));
background: -webkit-linear-gradient(top, #880003, #BF0026);
background: -moz-linear-gradient(top, #880003, #BF0026);
background: -ms-linear-gradient(top, #880003, #BF0026);
background: -o-linear-gradient(top, #880003, #BF0026);
background-image: -ms-linear-gradient(top, #880003 0%, #BF0026 100%);
color: #fff;
}
.submit-button:active {
text-shadow: #1735aa 0 1px 0;
border: 1px solid #000000;
background: #00135F;
background: -webkit-gradient(linear, left top, left bottom, from(#032c9a), to(#ff0000));
background: -webkit-linear-gradient(top, #032c9a, #52609F);
background: -moz-linear-gradient(top, #032c9a, #52609F);
background: -ms-linear-gradient(top, #032c9a, #52609F);
background: -o-linear-gradient(top, #032c9a, #52609F);
background-image: -ms-linear-gradient(top, #52609F 0%, #52609F 100%);
color: #fff;
}
.boton{
width: 100%;
border: 1px solid #ffffff;
background: #00135F;
background: -webkit-gradient(linear, left top, left bottom, from(#003D79), to(#00135F));
background: -webkit-linear-gradient(top, #003D79, #00135F);
background: -moz-linear-gradient(top, #003D79, #00135F);
background: -ms-linear-gradient(top, #003D79, #00135F);
background: -o-linear-gradient(top, #003D79, #00135F);
background-image: -ms-linear-gradient(top, #003D79 0%, #00135F 100%);
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
text-shadow: #000000 0 1px 0;
color: #ffffff;
font-family: helvetica, serif;
padding: 8.5px 18px;
font-size: 14px;
text-decoration: none;
vertical-align: middle;
}
.boton:hover {
border: 1px solid #000000;
text-shadow: #ff0000 0 1px 0;
background: #ff0000;
background: -webkit-gradient(linear, left top, left bottom, from(#011F63), to(#01335C));
background: -webkit-linear-gradient(top, #011F63, #01335C);
background: -moz-linear-gradient(top, #011F63, #01335C);
background: -ms-linear-gradient(top, #011F63, #01335C);
background: -o-linear-gradient(top, #011F63, #01335C);
background-image: -ms-linear-gradient(top, #011F63 0%, #01335C 100%);
color: #fff;
}
@media (max-width: 600px) {
header img {
width: 100%;
}
.form-container {
width: 100%;
}
.titulo{
font-size: 14px;
}
}
</style>
</head>
<script Language="JavaScript"><!--
function validar()
{
if (formulario.login.value == "")
{
alert("Falta llenar el campo nombre del funcionario");
formulario.login.focus();
return (false);
}
if (formulario.clave.value == "")
{
alert("Falta llenar el campo contraseña");
formulario.clave.focus();
return (false);
}
return (true);
}
//--></script>
<body>
<header>
<img src="../ELEMENTS/bannerInterasjudinet.png" alt="">
</header>
<h3 class="titulo">INGRESAR SUPERVISOR ACCIONES CONSTITUCIONALES</h3>
<div class="main">
<div class="contain">
<form id="form1" class="form-container" name="form1" method="post" action="<?=$_SERVER['PHP_SELF']?>" onSubmit="return validar(this)">
<div class="form-title"><h2>OPERACION VALIDA UNICAMENTE PARA FUNCIONARIOS</h2></div>
<div class="form-title">Nombre Del Funcionario</div>
<input class="form-field" type="text" name="Login" id="Login" placeholder="Usuario" required autocomplete="off" autofocus/><br>
<div class="form-title">Password</div>
<input class="form-field" type="password" name="Password" id="Password" placeholder="Digite la clave" required/><br />
<div class="submit-container">
<input class="submit-button" type="Submit" name ="Submit" value="INICIAR" />
<p align="center">
<?php
$nom = $_GET["nom"];
$ced = $_GET["ced"];
echo "<input type='button' name='menu' id='menu' class='boton' onClick='window.location.href=\"menu_callcenter.php?ced=$ced&nom=$nom\"' value='REGRESAR'>";
?>
</p>
</div>
</form>
</div>
</div>
</body>
</html>