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/partes.php
<?php
 //INICIO VARIABLE SESION
session_start();

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

$wpid = $_GET['wpid'];
$rol = $_GET['rol'];

$con = mysql_query("select id, nombre, planificacion, preparacion_material, armado_y_soldado,granullado, pintura, liberacion, despacho_fabrica, logistica, en_bodega, despacho_bodega from Parte where workpackage_id = '".$wpid."' ");
$cona = mysql_query("select id, nombre, planificacion, preparacion_material, armado_y_soldado, pintura, liberacion, despacho_fabrica, logistica, en_bodega, despacho_bodega  from Parte where workpackage_id = '".$wpid."' ");

$con_parte = mysql_query("select nombre from WorkPackage where id = '$wpid'");
$resu = mysql_fetch_array($con_parte);

?>

<html>
	<head>
		<title>Austral 3D</title>
		 <link href="../css/bootstrap.min.css" rel="stylesheet">
		
	</head>
	<body>
	
		<center>
				<nav class="navbar navbar-inverse navbar-fixed-top">
				  <div class="container">
					<!-- 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" href="">4D Plant</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">
					  <li><a href="formulario.php">PROYECTOS </a></li>
					  <li><a href="javascript:history.go(-2);">ASSEMBLIES </a></li>
					  <li><a href="javascript:history.go(-1);">WORKPACKAGE </a></li>
						<li class="active"><a href="javascript:history.go();">PARTES <span class="sr-only">(current)</span></a></li>
					  </ul>
					  
					  <!--Derecha barra-->
					  
					  <ul class="nav navbar-nav navbar-right">
						<li class="dropdown">
						  <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Usuario: <?php	if($_SESSION){echo $_SESSION['nombre'];}?><span class="caret"></span></a>
						  <ul class="dropdown-menu">
							<li><a href="cerrar_session.php">Cerrar sesion</a></li>
						  </ul>
						</li>
					  </ul>
					</div><!-- /.navbar-collapse -->
				  </div><!-- /.container-fluid -->
				</nav>		
		</center>
		
			<br>
			<br>
			<br>
			<br>
			<div class="container">
				<center>
				
				<img src="../img/logo.jpg" class="img"/>
				
				</center>
			</div>
			<br>
			<br>
		<div>
		
		
			
			<form method="POST" action="actualizar_ptsckb.php" >	
			
					<center>
						<div class="container">
							<div class="container-fluid">
					  <!-- Default panel contents -->
							<h3><b>PARTES: <?php echo $resu[0]?></b></h3>
							<br>
							<!-- Table -->

								<table class="table table-bordered">
								

									
									<?php 
									$array = mysql_fetch_array($cona);
										
										if($array != 0){
								
									//bucle de carga de la tabla
											if($rol == 1){
										
									?>
									
													<tr class="active">
										
														<th></th>
														<th>Nombre</th>
														<th>Planificacion</th>
														<th>Preparacion material</th>									
														<th>Armado y soldado</th>									
														<th>Granullado</th>									
														<th>Pintura</th>									
														<th>Liberacion</th>									
														<th>Despacho fabrica</th>
														<th>Logistica</th>
														<th>En bodega</th>
														<th>Despacho bodega</th>
														
														
													</tr>
													
													<?php
													while($array = mysql_fetch_array($con))
														{
													
													?>
													
													<tr>
													
														<td><label class="checkbox-inline">
														  <input type="checkbox" name="checkbox[]" value="<?php echo $array[0]?>"/> 
														</label></td>
														<td><a href="actualizar_pts.php?idpt=<?php echo $array['id'];?>"> <?php echo $array[1];?><a/></td>
														<td><?php echo $array[2];?></td>
														<td><?php echo $array[3];?></td>
														<td><?php echo $array[4];?></td>
														<td><?php echo $array[5];?></td>
														<td><?php echo $array[6];?></td>
														<td><?php echo $array[7];?></td>
														<td><?php echo $array[8];?></td>
														<td><?php echo $array[9];?></td>
														<td><?php echo $array[10];?></td>
														<td><?php echo $array[11];?></td>
														
									
													</tr>
													
									
									<?php
									
														}
														
												}else if($rol == 2)
												
													{
									?>
												
												
													<tr>
														
														
														<th>Nombre</th>
														<th>Planificacion</th>
														<th>Preparacion material</th>									
														<th>Armado y soldado</th>									
														<th>Granullado</th>									
														<th>Pintura</th>									
														<th>Liberacion</th>									
														<th>Despacho fabrica</th>
														<th>Logistica</th>
														<th>En bodega</th>
														<th>Despacho bodega</th>
														
													</tr>
													
													<?php
													while($array = mysql_fetch_array($con))
														{
													?>
													
													<tr>
									
														<td><?php echo $array[1];?></td>
														<td><?php echo $array[2];?></td>
														<td><?php echo $array[3];?></td>
														<td><?php echo $array[4];?></td>
														<td><?php echo $array[5];?></td>
														<td><?php echo $array[6];?></td>
														<td><?php echo $array[7];?></td>
														<td><?php echo $array[8];?></td>
														<td><?php echo $array[9];?></td>
														<td><?php echo $array[10];?></td>
														<td><?php echo $array[11];?></td>
													
													</tr>
												
												
												<?php
														}
												
													}	
													
											}else
													{
												echo '<center>
														<div class="container">
															<p><h3><b>No se encontraron datos</b></h3></p>
														</div>					
													</center>';	
												}
									?>
								</table>
					</div>		
					</div>		
							<input type="submit" value="Aceptar" class="btn btn-primary"/>
				</center>
			</form>
			<?

			?>
			
		</div>
		
		<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
		<script src="../js/bootstrap.min.js"></script>
	</body>
</html>