<?php
require ('Conexion/Conexion.php');
require ('lib/lib.php');
$url="http://".$_SERVER['HTTP_HOST'].":".$_SERVER['SERVER_PORT'].$_SERVER['REQUEST_URI'];
if(!isset($_SESSION['WEB2']) || extension($url) == 'php'){
	echo "<script language='JavaScript'>location.href = 'index.php'</script>";
	die();
} else{
	Inactividad();
	$Autorizacion=$_GET['UsuarioWebID'];
	
?>
<script type="text/javascript" src="JQuery/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="JQuery/jquery.blockUI.js"></script>
<link type="text/css" href="JQuery/css/custom-theme/jquery-ui-1.8.17.custom.css" rel="Stylesheet" />
<script type="text/javascript" src="JQuery/jquery-ui-1.8.17.custom.min.js"></script>
<script type="text/javascript" src="JQuery/development-bundle/ui/jquery.ui.dialog.js"></script>

<style type="text/css">
<!--
body {
    background-color: #edffe2;
	font-family:Arial, Helvetica, sans-serif;
	font-size:11px;
	background-image:url("images/Form.png");
	background-repeat: no-repeat;
	background-position: top;
}

body,td,th {
	font-size: 11px;
	color: #000;
}
b{
	font-size:13px;
	color: #004000;
}
.requisites{  
    padding: 0 2px 0 2px;  
}  
.requisites.error2{  
    text-decoration: underline;
	font-size:11px;  
    color: #FF0000;
}  
.success {
	color: #060;
	font-size: 12px;
}
.error {
	color: red;
	font-size: 12px;
}
#Titulo {
	font-family: Georgia, "Times New Roman", Times, serif;
	font-size: 16px;
	font-weight: bold;
	color: #0054A8;
}
input.txt{
	width: 150px;
	padding: 5px;
	padding-left: 25px;
	background-repeat: no-repeat;
	background-position: 0% 50%;
}
input:focus{
	background-color:#d9f0a3;
}
input.error2{
	border-color: #F00;
}
input.text.active{
	background: #343434 url(img/search.png) no-repeat scroll right -43px;
	border-color: #000;
	color: #fff;
}
#edtUsuarioWebID{
	background-image: url(images/No.png);
}
#edtPassword1, #edtPassword2{
	background-image: url(images/Password.png);
}
#edtNombre{
	background-image: url(images/Nombre.png);
}
#edtUsuario{
	background-image: url(images/Usuario.png);
}
#edtDepartamento, #edtGrupo{
	background-image: url(images/Departamento.png);
}
#edtCorreo{
	background-image: url(images/email.png);
}
.submit {
   border-top: 1px solid #02822f;
   background: #74d665;
   background: -webkit-gradient(linear, left top, left bottom, from(#64bf52), to(#74d665));
   background: -webkit-linear-gradient(top, #64bf52, #74d665);
   background: -moz-linear-gradient(top, #64bf52, #74d665);
   background: -ms-linear-gradient(top, #64bf52, #74d665);
   background: -o-linear-gradient(top, #64bf52, #74d665);
   padding: 5px 10px;
   -webkit-border-radius: 8px;
   -moz-border-radius: 8px;
   border-radius: 8px;
   -webkit-box-shadow: rgba(0,0,0,1) 0 1px 0;
   -moz-box-shadow: rgba(0,0,0,1) 0 1px 0;
   box-shadow: rgba(0,0,0,1) 0 1px 0;
   text-shadow: rgba(0,0,0,.4) 0 1px 0;
   color: #ffffff;
   font-size: 14px;
   font-family: Georgia, serif;
   text-decoration: none;
   vertical-align: middle;
   }
.submit:hover {
   border-top-color: #357828;
   background: #357828;
   color: #fafafa;
   }
.submit:active {
   border-top-color: #07ab38;
   background: #07ab38;
}
.submit1 {   border-top: 1px solid #02822f;
   background: #74d665;
   background: -webkit-gradient(linear, left top, left bottom, from(#64bf52), to(#74d665));
   background: -webkit-linear-gradient(top, #64bf52, #74d665);
   background: -moz-linear-gradient(top, #64bf52, #74d665);
   background: -ms-linear-gradient(top, #64bf52, #74d665);
   background: -o-linear-gradient(top, #64bf52, #74d665);
   padding: 5px 10px;
   -webkit-border-radius: 8px;
   -moz-border-radius: 8px;
   border-radius: 8px;
   -webkit-box-shadow: rgba(0,0,0,1) 0 1px 0;
   -moz-box-shadow: rgba(0,0,0,1) 0 1px 0;
   box-shadow: rgba(0,0,0,1) 0 1px 0;
   text-shadow: rgba(0,0,0,.4) 0 1px 0;
   color: #ffffff;
   font-size: 14px;
   font-family: Georgia, serif;
   text-decoration: none;
   vertical-align: middle;
}
select{
	width:150px;
	height:28px;
	padding: 5px;
}
</style>
<form id="ModUsuario" name="ModUsuario" action= "" method="post">
<br />
<? 	$QueryCatalogo = mssql_query("select ConsumoImagenID, AutorizacionID, ClienteID, VehiculoID, Tipo, Imagen, Ruta
 from ConsumoImagen
where AutorizacionID='$Autorizacion' and Tipo=2"); 
	while ($EvaluarCatalogo = mssql_fetch_array($QueryCatalogo)) {
		
		
				 
				   $QuitarDiogonal ="\\";  
 $RutaBuena = str_replace($QuitarDiogonal, '/', $EvaluarCatalogo['Ruta']);
//echo "../CistemFlotillas/".$RutaBuena;
//$ruta1 = "Z:/Cistem/Flotillas/";
//$ruta3 = $ruta1.$RutaBuena;
$ruta3 = "CistemFlotillas/".$RutaBuena;
 
				  
				  echo "<img src='$ruta3' width='530px' height='490px'>"; 
				  echo "\n", '<br />';
				  echo "\n", '<br />';
				  echo "\n", '<br />';
		}
?>
</form>
<? } ?>