<?php
 
session_start();
include("DMMYSQLG.php");
include("DSA1000.php");
$dbuser = "root";
$dbpass = "castillejos";
$dbhost = "localhost";
$con = mysqli_connect($dbhost,$dbuser,$dbpass);
if (!$con){
	die('Error N:' . mysqli_errno($con$con) . ": " . mysqli_error($con));
}
$ccrosti = mysqli_select_db($_SESSION['base']); 

//echo 'Empresa'.$_SESSION['emp_ord'];
//exit();
include("DF30000.inc");
?>
<html>
<link rel="stylesheet" href="css/estilo1.css" type="text/css"/>
<script type="text/javascript" language="JavaScript1.2" src="DSSCRIPT.js"></script>
<body>
<div align="center">
  <form name="frm1" id="frm1" method="post" action="" >

    <table width="914"   align="center">
      <tr>
        <th colspan="7">
          <div align="center"></div></th></tr>
      <tr>
        <th colspan="7">Concepto - Orden de Servicio </th>
      </tr>
      <tr>
		<th><div align="center">Sel</div></th>
        <th><div align="center">No. Orden</div></th>
		<th><div align="center">Fecha</div></th>
        <th><div align="center">Empresa</div></th>
		<th><div align="center">Solicitante</div></th>
        <th><div align="center">Descripcion</div></th>
        <th><div align="center">Status</div></th>
      </tr>
<?php


$sq_ordenes=mysqli_query($con ,"select * from ddordenes where status='0'");
while(@$reg = mysqli_fetch_array($sq_ordenes))
{
	echo '<tr>';
	echo '<td> <div align="center"><input name="bot" type="radio" value="'. $reg["no_ord"].'"></div></td>';
	echo "<td> <div align='center'>" . $reg["no_ord"]. "&nbsp;</div></td>";
	$fec1=$reg["fecha_alta"];
	include('DF20000.php');
	echo '<td><center>'.$f_f.'&nbsp;</center></td>';
	//include("DMMYSQLG.php");
	@$result=mysqli_query($con ,"select * from dxbascps where codigo = '".$reg['empresa']."'");
	@$row = mysqli_fetch_array($result);
	echo "<td> <div align='center'>" . $row["nombre"] . ' ' . $row["ap_paterno"] .  ' ' . $row["ap_materno"] .  "&nbsp;</div></td>";
	//include("DMMYSQLG.php");
	@$bus = mysqli_query($con ,"SELECT * FROM geoyos_jc.dxopemaex where oper = '".$reg['usuario']."'");
	@$re = mysqli_fetch_array($bus);
	echo "<td> <div align='center'>" . $re['nomb'] . " " .  $re['apa'] . " " .  $re['ama'] . "&nbsp;</div></td>";
	echo "<td> <div align='center'>" . $reg["descripcion"] . "&nbsp;</div></td>";
		if($reg["status"]==0){
		$S = "PENDIENTE POR REVISAR";
	}elseif($reg["status"]==1){
		$S = "REVISADA";
	}elseif($reg["status"]==2){
		$S = "INACTIVA X REFACCION";
	}elseif($reg["status"]==3){
		$S = "INACTIVA X EL CLIENTE";
	}elseif($reg["status"]==4){
		$S = "EN PROCESO";
	}elseif($reg["status"]==5){
		$S = "CANCELADA";
	}else{
		$S = "FINALIZADA";
	}
	echo '<td><center>'.$S.'&nbsp;</center></td>';
	echo "</tr>";
}

mysqli_close($con);
?>
</table>
</form>
</div>
</body>
</html>