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/assemblym.php
<?php
 //INICIO VARIABLE SESION0 
session_start();
if ($_SESSION == NULL ){
	session_destroy();
	echo'<script>
	alert("Acceso denegado.")
	self.location="../index.php"
	</script>';		
}	
$proyecto_id = $_GET['proy'];
require('conexion.php');
$consulta_proyecto = mysql_query("select nombre from Proyecto where id = '".$proyecto_id."'");
$proyecto_nombre = mysql_result($consulta_proyecto,0,"nombre");
$consulta_rol = mysql_query("select usuario_id, proyecto_id, rol_id from Permisos where usuario_id = '".$_SESSION['id']."'");

$array_rol = mysql_fetch_array($consulta_rol);

//consula para obtener id de usuario segun el nombre de la sesion iniciada
$con_id_usu = mysql_query("select empresa_id from Usuario where id= '".$array_rol['usuario_id']."'");
$emid = mysql_fetch_array($con_id_usu);
$decimales = 2;
$consul = mysql_query("Select * from Proyecto where id = '".$proyecto_id."'");
$consula = mysql_query("Select * from Proyecto where id = '".$proyecto_id."'");
$array = mysql_fetch_array($consul);	
$consulta_id_proy = mysql_query("Select * from Proyecto where id = '".$proyecto_id."'");	
$array_id = mysql_fetch_array($consulta_id_proy);	
$consulta_assembly = mysql_query("select * from Assembly where proyecto_id = '".$proyecto_id."'");	
if(empty($_GET['lenguaje'])){
	$lenguaje = false;
}else{
	$lenguaje = $_GET['lenguaje'];
}//---------
$consulta_curva_proyecto = true;

$planificado = array(62.2,87.5,125.5,181.5,258.7,312.7,365.9,392.2,410.2,427.4,444.6,453.6,473.0,492.4,511.8,531.1,549.7,575.7,591.2,606.8,622.4);
$real = array(0,0,13.7,25.8,35.3,41.7,56.6,67.7,74.4,89.0,99.2,99.2,99.2,99.2,99.2,99.2,99.2,99.2,99.2,99.2,99.2);

echo implode($real);
?>



<!DOCTYPE html>
<html>
	<head>
		<title>Fourdplan</title>
		 <link href="../css/bootstrap.min.css" rel="stylesheet">
		 <meta charset="UTF-8">
		 <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">
		 <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>		
		<script type="text/javascript">		
		    function actualizar(){
			   window.location="actualiza_datos.php?p=<?php echo $array_id['id']?>";//pagina donde tienes tus consultas para borrar 
			}
		</script>
			<?php	
			require('conexion2.php');			
			if($consulta_curva_proyecto){
			?>		
		<script type="text/javascript">
			//curva s Proyecto
			$(function () {
				$('#curvaproyecto').highcharts({
					chart: {
						type: 'line'
					},
					title: {
						text: '<?php if($lenguaje){echo "Curva S Planificado vs Real Proyecto";}else{echo "Curve Graph Planned VS Actual Project";}?>'
					},	
					xAxis: {
						categories: ['16-06-2017','23-06-2017','30-06-2017','07-07-2017','14-07-2017','21-07-2017','28-07-2017','04-08-2017','11-08-2017','18-08-2017','25-08-2017','01-09-2017','08-09-2017','15-09-2017','22-09-2017','29-09-2017','06-10-2017','13-10-2017','20-10-2017','27-10-2017','03-11-2017']
					},				
					yAxis: {
						title: {
							text: '<?php if($lenguaje){echo "Toneladas";}else{echo "Tons";}?>'
						}
					},
					plotOptions: {
						line: {
							dataLabels: {
								enabled: true
							},
							enableMouseTracking: true
						}
					},
					tooltip: {
						valueSuffix: ' T'
					},					
					series: [{
						name: '<?php if($lenguaje){echo "Planificado";}else{echo "Planned";}?>',
						data: [62.2,87.5,125.5,181.5,258.7,312.7,365.9,392.2,410.2,427.4,444.6,453.6,473.0,492.4,511.8,531.1,549.7,575.7,591.2,606.8,622.4]
					}, {
						name: '<?php if($lenguaje){echo "Real";}else{echo "Actual";}?>',
						data: [0,0,13.7,25.8,35.3,41.7,56.6,67.7,74.4,89.0,99.2,99.2,99.2,99.2,99.2,99.2,99.2,99.2,99.2,99.2,99.2]
					}]					
				});
			});		
		</script>		
		<?php
			}	$consulta_curva_negro=false;	
			if($consulta_curva_negro){
		?>		
		<script type="text/javascript">
			//curva s Soldadura
			$(function () {
				$('#curvasoldadura').highcharts({
					chart: {
						type: 'line'
					},
					title: {
						text: '<?php if($lenguaje){echo "Curva S Planificado vs Real Soldadura";}else{echo "Curve Graph Planned VS Actual Welding";}?>'
					},					
					yAxis: {
						title: {
							text: '<?php if($lenguaje){echo "Toneladas";}else{echo "Tons";}?>'
						}
					},
					plotOptions: {
						line: {
							dataLabels: {
								enabled: true
							},
							enableMouseTracking: true
						}
					},						
					xAxis: {
						categories: [
						<?php echo implode($variablefechas);?>						
						]
					},
					series: [{
						name: '<?php if($lenguaje){echo "Planificado";}else{echo "Planned";}?>',
						data: [
						<?php echo implode($variabletonpros);?>
						]
					}, {
						name: '<?php if($lenguaje){echo "Real";}else{echo "Actual";}?>',
						data: [										
						<?php echo implode($variabletonreas);?>
						]
					}]					
				});
			});			
		</script>
		<?php
			}		
			$consulta_curva_pintura=false;
			if($consulta_curva_pintura){
		?>			
		<script type="text/javascript">		
			//curva s Pintura
			$(function () {
				$('#curvapintura').highcharts({
					chart: {
						type: 'line'
					},
					title: {
						text: '<?php if($lenguaje){echo "Curva S Planificado vs Real Pintura";}else{echo "Curve Graph Planned VS Actual Painting";}?>'
					},					
					yAxis: {
						title: {
							text: '<?php if($lenguaje){echo "Toneladas";}else{echo "Tons";}?>'
						}
					},
					plotOptions: {
						line: {
							dataLabels: {
								enabled: true
							},
							enableMouseTracking: true
						}
					},						
					xAxis: {
						categories: [						
						<?php echo implode($variablefechap);?>						
						]
					},
					series: [{
						name: '<?php if($lenguaje){echo "Planificado";}else{echo "Planned";}?>',
						data: [
						<?php echo implode($variabletonprop);?>
						]
					}, {
						name: '<?php if($lenguaje){echo "Real";}else{echo "Actual";}?>',
						data: [
						<?php echo implode($variabletonreap);?>						
						]
					}]					
				});
			});			
		</script>				
			<?php 
			}
			?>		
		<script type="text/javascript">
		//Tabla comparativa	
			$(function () {
				$('#container').highcharts({
					chart: {
						type: 'column'
					},
					title: {
						text: '<?php if($lenguaje){echo "Ton Comparativa Planificado VS Real";}else{echo "Comparison Between Planned VS Real";}?>'
					},
					xAxis: {
						categories: [						
							'Documentos',
							'Preparacion',
							'Armado',
							'Soldadura',
							'Subcontrato',
							'Inspeccion',
							'Negro',
							'Pintura',
							'Recepcion',
							'Despacho'
						],
						crosshair: true
					},
					yAxis: {
						min: 0,
						title: {
							text: '<?php if($lenguaje){echo "Toneladas";}else{echo "Tons";}?>'
						}
					},
					tooltip: {
						headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
						pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
							'<td style="padding:0"><b>{point.y:.1f} TON</b></td></tr>',
						footerFormat: '</table>',
						shared: true,
						useHTML: true
					},
					plotOptions: {
						column: {
							pointPadding: 0.2,
							borderWidth: 0
						}
					},
					series: [{
						name: 'Planificado',
						data: [ 
						72.35,
						180,
						0,
						0,
						0,
						0,
						0,
						0,
						0,
						0
						]

					}, {
						name: 'Real',
						color: '#6adf72',
						data: [
						0,
						0,
						0,
						0,
						0,
						0,
						0,
						0,
						0,
						0
						]
					}]
				});
			});			
		</script>		
	</head>
    <body>    
		<div class="content">
				<!-- menu barra negra superior -->
			<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/logo90x19.png" class="img" /></a>
				</div>
				<!-- Collect the nav links, forms, and other content for toggling -->				
				<?php 
					if($lenguaje){					
				?>
				<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">				  
				    <ul class="nav navbar-nav">
					    <li><a href="../index.php?lenguaje=true"><span class="glyphicon glyphicon-home" aria-hidden="true"></span> Inicio</a></li>					
					    <li><a href="filtros.php?pid=<?php echo $proyecto_id;?>&lenguaje=true"><span class="glyphicon glyphicon-search" aria-hidden="true"></span> Buscar</a></li>					
				    </ul>				  
				  <!--Derecha barra-->				  
				    <ul class="nav navbar-nav navbar-right">
					    <?php require("barrasuperior.php");?>	
						<!--li role="presentation"><a href="#"> <span class="label label-primary">(0) <img src="../img/correo.png" /></span></a></li-->						
					    <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">Cerrar sesion</a></li>
								<li><a href="assembly.php?proy=<?php echo $proyecto_id;?>">Ingles</a></li>
							</ul>
						</li>							
					</ul>
				</div><!-- /.navbar-collapse -->
				<?php
					}else{
				?>
				<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">				  
				    <ul class="nav navbar-nav">
					    <li><a href="../index.php"><span class="glyphicon glyphicon-home" aria-hidden="true"></span> Home</a></li>					
					    <li><a href="filtros.php?pid=<?php echo $proyecto_id;?>"><span class="glyphicon glyphicon-search" aria-hidden="true"></span> Search</a></li>						
				    </ul>				  
				  <!--Derecha barra-->				  
				    <ul class="nav navbar-nav navbar-right">
					    <?php require("barrasuperior.php");?>	
						<!--li role="presentation"><a href="#"> <span class="label label-primary">(0) <img src="../img/correo.png" /></span></a></li-->
					    <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">Log Out</a></li>
								<li><a href="assembly.php?proy=<?php echo $proyecto_id;?>&lenguaje=true">Spanish</a></li>
							</ul>
						</li>							
					</ul>
				</div>					
				<?php
					}
				?>
			  </div><!-- /.container-fluid -->
			</nav>			
			<br><br><br><br>				
			<div class="container">
				<ol class="breadcrumb">							
					<?php 
					if($lenguaje){						
					?>					
					<li><a href="proyecto.php?lenguaje=true"> Proyecto</a></li>					
					<?php 
					}else{
					?> 
					<li><a href="proyecto.php"> Project</a></li>
					<?php 
					}				
					if($lenguaje){						
					?>					
					<li><a href="modulos.php?lenguaje=true&proy=<?php echo $proyecto_id;?>"> Modulos</a></li>					
					<?php 
					}else{
					?> 
					<li><a href="modulos.php?proy=<?php echo $proyecto_id;?>"> Modules</a></li>
					<?php 
					}
					?>
					<li class="active"><a><span class="glyphicon glyphicon-hand-right" aria-hidden="true"></span> <?php if($lenguaje){echo "Fabricación";}else{echo "Fabrication";}?><span class="sr-only">(current)</span></a></li>
				</ol>
			</div>				
	<div class="container-fluid">
				<div class="container">
					<center><h3><b><?php if($lenguaje){echo "PROYECTO - ".$proyecto_nombre;}else{echo "PROJECT - ".$proyecto_nombre;}?></b></h3></center>
					<center><h2><b><?php if($lenguaje){echo "Fabricación";}else{echo "Fabrication";}?></b></h2></center>
					<BR>
				</div>				
				<?php 					
				require('conexion.php');
				if(empty($array)){
					if($lenguaje){echo "No se encontraron datos.";}else{echo "No data found.";}				
				}else{
					while($arraya = mysql_fetch_array($consula)){					
				?>				
		<div class="container-fluid" style="background-color: #c7c7c7; border-radius: 5px 5px 5px 5px;">
			<div class="container-fluid" style="background-color: #c7c7c7; border-radius: 5px 5px 5px 5px;">					
			<center><h4><img src="../img/avanceicon24.png"/> <b>  Fabrication process</b></h4></center>				
			<div class="col-xs-12 col-md-12">
				<?php
				require_once('carga_datos.php');
				echo $tabla;
				?>				
				<br>
			</div>
						<br>
						<div></div>	
						<div id="curvaproyecto" class="col-md-6 col-sm-6 col-md-offset-3"></div>				
						<div class="col-md-8 col-sm-8">
							<br>
						</div>						
						<div id="curvasoldadura" class="col-md-6 col-sm-6"></div>												
						<div id="curvapintura" class="col-md-6 col-sm-6"></div>						
						<div class="col-md-10 col-sm-5 col-md-offset-1">
							<br>
							<table id="datatable" class="table table">
								<thead>
									<tr bgcolor="#363636">
										<th><font color="#fff">11-05-2017</font></th>
										<th><font color="#fff">Toneladas</font></th>
										<th><font color="#fff">Documentos</font></th>
										<th><font color="#fff">Preparacion</font></th>
										<th><font color="#fff">Armado</font></th>
										<th><font color="#fff">Soldadura</font></th>
										<th><font color="#fff">Subcontrato</font></th>
										<th><font color="#fff">Inspeccion</font></th>
										<th><font color="#fff">Negro</font></th>										
										<th><font color="#fff">Pintura</font></th>										
										<th><font color="#fff">Recepcion</font></th>										
										<th><font color="#fff">Despacho</font></th>										
									</tr>
								</thead>
								<tbody>
									<tr bgcolor="#e6e6e6">
										<th>Planificado</th>
										<th>622.35</th>									
										<th>72.35</th>									
										<th>180</th>									
										<th>0</th>									
										<th>0</th>									
										<th>0</th>									
										<th>0</th>									
										<th>0</th>									
										<th>0</th>									
										<th>0</th>									
										<th>0</th>								
									</tr>
									<tr bgcolor="#e6e6e6">
										<th>Realizado</th>
										<th>99,22</th>
										<th>0</th>
										<th>0</th>
										<th>0</th>
										<th>0</th>
										<th>0</th>
										<th>0</th>
										<th>0</th>
										<th>0</th>
										<th>0</th>
										<th>0</th>											
									</tr>
									<tr bgcolor="#e6e6e6">
										<th></th>
										<th>15.9%</th>
										<th>0%</th>
										<th>0%</th>
										<th>0%</th>
										<th>0%</th>
										<th>0%</th>
										<th>0%</th>
										<th>0%</th>
										<th>0%</th>
										<th>0%</th>
										<th>0%</th>
									</tr>
								</tbody>
							</table>
						</div>
						<div id="container" class="col-md-12 col-sm-5"></div>		
				</br>						
				<div>						
				</br>						
				</div>
				<?php						
					}									
				}				
				?>	
				</div>
				<br>
		</div>			
		<br>			
	</div>						
		<!-- pie de pagina-->
		<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 src="../js/highcharts.js"></script>
		<script src="../js/modules/exporting.js"></script>
		<script src="../js/modules/data.js"></script>
	</body>
</html>