<?php
 
session_start();
include("DMMYSQLG.php");
include("DF80000.php");
if(isset($_POST["m1"])){
	include("DSA2000.php");
}
?>
<?php
 
if($_POST['ra_reg']==""){ 
	echo 'SELECCIONE REGISTRO';
	echo '<meta content="1; url=DZ30000_PR.php"  HTTP-EQUIV="REFRESH">';
	exit();
}
$dt_empres=mysqli_fetch_array(mysqli_query($con ,"select * from dxempres where cla_emp=$_POST['ra_reg']"));
$cvdm = intval($dt_empres['cve_delmun']);
$cves = intval($dt_empres['cve_estado']);
$cvep = intval($dt_empres['cve_pais']);
//Consulta Datos Del/Mun
$dt_delmun = mysqli_fetch_array(mysqli_query($con ,"SELECT * FROM dxdelmun where cve_delmun = $cvdm"));
//Consulta Datos Estado 
$dt_estado = mysqli_fetch_array(mysqli_query($con ,"SELECT * FROM dxestado where cve_estado = $cves"));
$dt_paises = mysqli_fetch_array(mysqli_query($con ,"SELECT * FROM dxpaises where cve_pais = $cvep"));
?>
<html>
<link rel="stylesheet" href="css/estilo1.css" type="text/css"/>
<script type="text/javascript" language="JavaScript1.2" src="DSSCRIPT.js"></script> 
<body>
<form name="frm1" action="" method="post" >
<table width="818"  align="center">
  <tr>
    <th align = center colspan=6 class=\"titulo\">CONSULTA CATALOGO DE EMPRESAS</th>
  </tr>
  <tr class=tragre>
    <td width="167" class="thcons"><div align="left">Siglas:</div></td>
    <td colspan="5" class="thcons">
      <div align="left">
        <input name="tsiglas" type="text" id="tsiglas" value="<?php
 echo $dt_empres["siglas"];?>" size="100" readonly />
        </div></td>
  </tr>
  <tr class=tragre>
    <td class="thcons"><div align="left">Razon Social:</div></td>
    <td colspan="5" class="thcons">
      <div align="left">
        <input name="tnom_emp" type="text" id="tnom_emp" value="<?php
 echo $dt_empres["nom_emp"];?>" size="100" readonly />
        </div></td>
  </tr>
  <tr class=tragre>
    <td class="thcons"><div align="left">Giro Comercial: </div></td>
    <td colspan="5" class="thcons">
      <div align="left">
        <input name="tgiro" type="text" id="tgiro" value="<?php
 echo $dt_empres["giro"];?>" size="100" readonly />
        </div></td>
  </tr>
  <tr class=tragre>
    <td class="thcons"><div align="left">Calle:</div></td>
    <td width="149" class="thcons">
      <div align="left">
        <input name="tcalle" type="text" id="tcalle" readonly value="<?php
 echo $dt_empres["calle"];?>" />
        </div></td>
    <td width="131" class="thcons"><div align="left">No.Ext:</div></td>
    <td width="144" class="thcons"><div align="left">
      <input name="tno_ext" type="text" id="tno_ext" readonly value="<?php
 echo $dt_empres["no_ext"];?>" />
    </div></td>
    <td width="43" class="thcons"><div align="left">No.Int:</div></td>
    <td width="144" class="thcons"><div align="left">
      <input name="tno_int" type="text" id="tno_int" readonly value="<?php
 echo $dt_empres["no_int"];?>" />
    </div></td>
  </tr>
  <tr class=tragre>
    <td class="thcons"><div align="left">Entre Calle:</div></td>
    <td class="thcons">
      <div align="left">
        <input name="tentre_call" type="text" id="tentre_call" readonly value="<?php
 echo $dt_empres["entre_call"];?>" />
        </div></td>
    <td class="thcons"><div align="left">Y:</div></td>
    <td colspan="3" class="thcons"><div align="left">
      <input name="ty_calle" type="text" id="ty_calle" readonly value="<?php
 echo $dt_empres["y_calle"];?>" />
    </div></td>
  </tr>
  <tr class=tragre>
    <td class="thcons"><div align="left">Telefono:</div></td>
    <td class="thcons">
      <div align="left">
        <input name="ttelefono01" type="text" id="ttelefono01" readonly value="<?php
 echo $dt_empres["telefono01"];?>" />
        </div></td>
    <td class="thcons"><div align="left">Fax:</div></td>
    <td class="thcons"><div align="left">
      <input name="tfax01" type="text" id="tfax01"  readonly value="<?php
 echo $dt_empres["fax01"];?>"/>
    </div></td>
    <td class="thcons"><div align="left">E-mail:</div></td>
    <td class="thcons"><div align="left">
      <input name="temail01" type="text" id="temail01"  readonly value="<?php
 echo $dt_empres["email01"];?>"/>
    </div></td>
  </tr>
  <tr class=tragre>
    <td class="thcons"><div align="left">Colonia:</div></td>
    <td class="thcons">
      <div align="left">
        <input name="tdes_col" type="text" id="tdes_col" readonly value="<?php
 echo $dt_empres["des_col"];?>" />
        </div></td>
    <td class="thcons"><div align="left">Codigo Postal:</div></td>
    <td colspan="3" class="thcons">
      <div align="left">
        <input name="tcod_pos" type="text" id="tcod_pos"  readonly value="<?php
 echo $dt_empres["cod_pos"];?>"/>
        </div></td>
  </tr>
  <tr class=tragre>
    <td class="thcons"><div align="left">Pais:</div></td>
    <td class="thcons">
      <div align="left">
        <input name="tcve_pais" type="text" id="tcve_pais" readonly value="<?php
 echo $dt_paises["des_pais"];?>" />
        </div></td>
    <td class="thcons"><div align="left">Ciudad/Estado:</div></td>
    <td colspan="3" class="thcons">
      <div align="left">
        <input name="tcve_estado" type="text" id="tcve_estado"  readonly value="<?php
 echo $dt_estado["des_estado"];?>"/>
        </div></td>
  </tr>
  <tr class=tragre>
    <td class="thcons"><div align="left">Delegacion/Municipio:</div></td>
    <td colspan="5" class="thcons">
      <div align="left">
        <input name="tcve_delmun" type="text" id="tcve_delmun" readonly value="<?php
 echo $dt_delmun["des_delmun"];?>"/>
        </div></td>
  </tr>
  <tr class=tragre>
    <td class="thcons"><div align="left">R.F.C:</div></td>
    <td class="thcons">
      <div align="left">
        <input name="trfc" type="text" id="trfc" readonly value="<?php
 echo $dt_empres["rfc"];?>"/>
        </div></td>
    <td class="thcons"><div align="left">Camara:</div></td>
    <td colspan="3" class="thcons">
      <div align="left">
        <input name="tcamara" type="text" id="tcamara" readonly value="<?php
 echo $dt_empres["camara"];?>"/>
        </div></td>
  </tr>
  <tr class=tragre>
    <td class="thcons"><div align="left">I.M.S.S:</div></td>
    <td class="thcons">
      <div align="left">
        <input name="timss" type="text" id="timss" readonly value="<?php
 echo $dt_empres["imss"];?>"/>
        </div></td>
    <td class="thcons"><div align="left">Fecha de Alta:</div></td>
    <td colspan="3" class="thcons">
      <div align="left">
        <input name="tfec_alta" type="text" id="tfec_alta" readonly value="<?php
 echo chfecha($dt_empres["fec_alta"],'Y-m-d','d/m/Y');?>"/>
        </div></td>
  </tr>
  <tr class=tragre>
    <td class="thcons"><div align="left">Infonavit:</div></td>
    <td class="thcons">
      <div align="left">
        <input name="tinfonavit" type="text" id="tinfonavit" readonly value="<?php
 echo $dt_empres["infonavit"];?>"/>
        </div></td>
    <td class="thcons"><div align="left">Fecha de Baja:</div></td>
    <td colspan="3" class="thcons">
      <div align="left">
        <input name="tfec_baja" type="text" id="tfec_baja" readonly value="<?php
 echo chfecha($dt_empres["fec_baja"],'Y-m-d','d/m/Y');?>"/>
        </div></td>
  </tr>
  <tr class=tragre>
    <td class="thcons"><div align="left">Afore:</div></td>
    <td class="thcons">
      <div align="left">
        <input name="tafore" type="text" id="tafore" readonly value="<?php
 echo $dt_empres["afore"];?>"/>
        </div></td>
    <td class="thcons"><div align="left">Notas:</div></td>
    <td colspan="3" class="thcons">
      <div align="left">
        <input name="tnotas" type="text" id="tnotas" readonly value="<?php
 echo $dt_empres["notas"];?>"/>
        </div></td>
  </tr>
  <tr>
    <th align = center colspan=6 class=\"titulo\">DATOS REPRESENTANTE LEGAL
        </div></th>
  </tr>
  <tr class=tragre>
    <td bordercolor="#000000" style="#FFFFEA">Nombre:</td>
    <td bordercolor="#000000" style="#FFFFEA"><input name="tnom_repleg" type="text" id="tnom_repleg" readonly value="<?php
 echo $dt_empres["nom_repleg"];?>"/></td>
    <td bordercolor="#000000" style="#FFFFEA">Apellido Paterno:</td>
    <td colspan="3" bordercolor="#000000" style="#FFFFEA"><input name="tapp_repleg" type="text" id="tapp_repleg" readonly value="<?php
 echo $dt_empres["app_repleg"];?>"></td>
  </tr>
  <tr class=tragre>
    <td bordercolor="#000000" style="#FFFFEA">Apellido Materno: </td>
    <td bordercolor="#000000" style="#FFFFEA"><input name="tapm_repleg" type="text" id="tapm_repleg" readonly value="<?php
 echo $dt_empres["apm_repleg"];?>"></td>
    <td bordercolor="#000000" style="#FFFFEA">R.F.C:</td>
    <td colspan="3" bordercolor="#000000" style="#FFFFEA"><input name="trfc_repleg" type="text" id="trfc_repleg" readonly value="<?php
 echo $dt_empres["rfc_repleg"];?>"/></td>
    </tr>
  <tr class=tragre>
    <td bordercolor="#000000" style="#FFFFEA">Curp:</td>
    <td colspan="5" bordercolor="#000000" style="#FFFFEA"><input name="tcurp_repleg" type="text" id="tcurp_repleg" readonly value="<?php
 echo $dt_empres["curp_repleg"];?>"/></td>
  </tr>
  <tr>
    <th align = center colspan=6 class=\"titulo\">INFORMACION BASE DE DATOS
        </div></th>
  </tr>
  <tr class=tragre>
    <td class="inputcodigo">Nombre Base De Datos:</td>
    <td class="inputcodigo"><input name="tdbname1" type="text" id="tdbname1" readonly value="<?php
 echo $dt_empres["dbname1"];?>"/></td>
    <td class="inputcodigo">&nbsp;</td>
    <td colspan="3" class="inputcodigo">&nbsp;</td>
  </tr>
  <tr class=tragre>
    <td class="inputcodigo">Nombre Usuario:</td>
    <td class="inputcodigo"><input name="tdbuser1" type="text" id="tdbuser1" readonly value="<?php
 echo $dt_empres["dbuser1"];?>"/></td>
    <td class="inputcodigo">Contrase&ntilde;a:</td>
    <td colspan="3" class="inputcodigo"><input name="tdbpass1" type="password" id="tdbpass1" readonly value="<?php
 echo $dt_empres["dbpass1"];?>"/></td>
  </tr>
  <tr class=tragre>
    <td colspan="6">
      <div align="center">
        <input name="bo_reg" type="button" id="bo_reg" value="Regresar" onClick="openpage('DZ30000_PR.php','_self')"/ >
       </div>
    </tr>
</table>
</form>
</body>
</html>
