HEX
Server: Apache
System: Linux iad1-shared-e1-19 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
User: austral3d (14892361)
PHP: 5.6.40
Disabled: NONE
Upload Files
File: /home/austral3d/fourdplan.com/php/atrasos.php
<?php 
session_start();
require('conexion.php');

if ($_SESSION == NULL ){
	session_destroy();
	echo'<script>
	alert("Acceso denegado.")
	self.location = "../index.php"
	</script>';	
}

if(empty($_GET['lenguaje'])){
	$lenguaje = false;
}else{
	$lenguaje = $_GET['lenguaje'];
}


if(empty($_POST['assembly'])){
	$assembly = "n";
}else{
	$assembly = $_POST['assembly'];
}

$proyecto_id = $_GET['pid'];

if(@$assembly  == "n"){
	$numero_filas = 0;
}

if(@$assembly != "n"){
	$consulta_data = mysql_query("SELECT A.nombre, A.id , E.nombre as elemento, I.assembly_mark, I.fecha_pintura, I.fecha_pintura_programado from Assembly A join Descripcion D on A.id = D.assembly_id JOIN Elemento E on D.id = E.descripcion_id JOIN Instancia I on E.id = I.elemento_id where A.proyecto_id = '$proyecto_id' and A.id = '$assembly' and I.fecha_pintura = 0000-00-00 and I.fecha_pintura_programado <= NOW()");
	$numero_filas = mysql_num_rows($consulta_data);	
}

?>

<!DOCTYPE html>
<html>
	<head>
		<title>Fourdplan</title>
		<meta charset="UTF-8">
		 <link href="../css/bootstrap.min.css" rel="stylesheet">	
		 <link href="../css/sti.css" rel="stylesheet">
		 <link rel="icon" href="../img/fdp.ico">
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
		<style type="text/css">		
			.scrollable-menu {
			height: auto;
			max-height: 200px;
			overflow-x: hidden;
			}
		</style>	
	</head>
	
	<body>	
		<center>
			<nav class="navbar navbar-inverse navbar-fixed-top">
					  <div class="container-fluid">
						<!-- Brand and toggle get grouped for better mobile display -->
						<div class="navbar-header">
						  <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
							<span class="sr-only">Toggle navigation</span>
							<span class="icon-bar"></span>
							<span class="icon-bar"></span>
							<span class="icon-bar"></span>
						  </button>
						  <a class="navbar-brand" ><img src="../img/Planlogo.png" class="img"  width=90px /></a>
						</div>

						<!-- Collect the nav links, forms, and other content for toggling -->
						<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
						  
						  <ul class="nav navbar-nav">
						  
							<!-- menu Proyecto -->
							<?php 
							if($lenguaje){
								?>
									<li><a href="assembly.php?proy=<?php echo $proyecto_id;?>&lenguaje=true">Assembly</a></li>
							<?php		
								} else{
							?>
									<li><a href="assembly.php?proy=<?php echo $proyecto_id;?>">Assembly</a></li>
							<?php
								}
							?>	
							
							<li class="active"><a><span class="glyphicon glyphicon-hand-right" aria-hidden="true"></span> <?php if($lenguaje){ echo "Atrasos";}else{ echo "Delayed";}?><span class="sr-only">(current)</span></a></li>						
						  </ul>
						  
						  <!--Derecha barra-->
						  
						  <ul class="nav navbar-nav navbar-right">
							<?php require("barrasuperior.php");?>
							<li role="presentation"><a><span class="glyphicon glyphicon-user" aria-hidden="true"></span> <?php if($_SESSION){echo $_SESSION['nombre'];}?></a></li>							
							<li class="dropdown">
							  <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><span class="glyphicon glyphicon-list" aria-hidden="true"></span><span class="caret"></span></a>
							  <ul class="dropdown-menu">	
								<li><a href="cerrar_session.php"><?php if($lenguaje){ echo "Cerrar sesion";}else{ echo "Log Out";}?></a></li>
								<?php 
								if($lenguaje){
								?>
									<li><a href="atrasos.php?pid=<?php echo $proyecto_id;?>">Ingles</a></li>
								<?php		
									} else{
								?>
									<li><a href="atrasos.php?pid=<?php echo $proyecto_id;?>&lenguaje=true">Spanish</a></li>
								<?php
									}
								?>	
							  </ul>
							</li>
							
						  </ul>							
						</div><!-- /.container-fluid -->
						
						
			</nav>
		</center>
		<div class="content">	
			
				<br><br><br><br>
				<br><br><br><br>
				<div class="col-md-offset-5">
					<form method="POST" action="atrasos.php?pid=<?php echo $proyecto_id;?>">					
												
						<div class="col-md-3">
							<select class="form-control" name="assembly" >
							  <option value="">Assembly</option>
							  <option value="">------------</option>
							  <option value="1">1500TK012</option>
							  <option value="2">1500TK042</option>
							  <option value="3">1500TK019</option>
							  <option value="4">1400-S-DW-201</option>
							  <option value="5">1400-S-DW-202</option>
							  <option value="6">1500-SX-GRT</option>
							</select>
						</div>			
						
						<div class="col-md-2">
							<input type="submit" class="btn btn-default" value="Search"/>
						</div>
					</form>
				</div>
				<br><br>			
				
		<?php 
			if($numero_filas != 0){
				?>
				<center>
					<h3>La consulta obtuvo "<?php echo $numero_filas;?>" Elementos atrasados.</h3>
				</center>	
								
				<div class="container-fluid">
				<br>
					<table class="table table">
						<tr bgcolor="#363636">
							<th><font color="#fff">
								Assembly</font>
							</th>
							<th><font color="#fff">
								Elemento</font>
							</th>							
							<th><font color="#fff">
								Assembly Mark</font>
							</th>
						</tr>
						<?php
							while($array = mysql_fetch_array($consulta_data)){
							if($array){
						?>
						<tr bgcolor="#e6e6e6">
							<td>
								<?php echo $array[0];?>
							</td>
							<td>
								<?php echo $array[2];?>
							</td>
							<td>
								<?php echo $array[3];?>
							</td>							
							
							
						</tr>				
							<?php
								}					
							}
						?>
					</table>
				</div>
				
							
				<?php 
				} else {echo "<center><h3>No se encontraron datos.</h3></center>";}
				?>
		</div>				
		<div><?php require("pie.php");?><div>
		<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
		<script src="../js/bootstrap.min.js"></script>
		<!--<script type="text/javascript" src="../js/functions.js"></script>-->
		<!--<script type="text/javascript" src="../js/jquery.js"></script>-->
	</body>
</html>