Ver Mensaje Individual
  #1 (permalink)  
Antiguo 10/10/2007, 09:17
Avatar de hulray
hulray
 
Fecha de Ingreso: septiembre-2006
Mensajes: 630
Antigüedad: 17 años, 8 meses
Puntos: 3
Problema con tablas

Tengo un problema de en el ultimo codigo, no me arroja el valor "ins_estado", quien me puede ayudar, estoy seguro de que es algo muy simple, pero ya me la gano, jeje


Código PHP:
<?
if (strstr($PHP_SELF"/am_modules/"))  die ("Usted no puede accesar este archivo directamente...");

// Genero la fecha para la evaluacion de las 48 hrs [2 dias]

$fechan date("d/m/Y");

 
$f_ni_aa substr($fechan,6,4);
 
$f_ni_mm substr($fechan,3,2);
 
$f_ni_dd substr($fechan,0,2);
 

$hoy=$f_ni_aa.$f_ni_mm.$f_ni_dd;

$sel_sql "SELECT * from am_inspeccion order by ins_folio desc";
$resultado db_query($sel_sql) or die(db_error());


$i=mysql_fetch_array($resultado);
if (
$i){

//---> include idioma
//
  
$config["leng"] = "sp"// Español
  
include_once( "am_modules/contratista/idioma/msg_".check_lang($config["leng"]).".php" );

  
srand((double)microtime()*1000000);

  
draw_header();

if( ! 
$session["logged"] )
{
    
theme_draw_boxlg_TitConINGRESO_ACTIVATE_ERROR"100%" );
    
draw_footer();
    exit;
}
?>
<style type="text/css">
TD {
    font-size : 10px;
    font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
}
</style>
<?
echo"<h3 align=\"center\">Inspecciones realizadas</h3>";

echo 
"<table border=0 width=90%><tr>";
echo 
"<td></td><td>Folio</td><td>Fecha</td><td>Empresa</td><td>Ingresado por </td><td>Estado</td></tr>";

while(
$i=mysql_fetch_array($resultado)){

echo 
"<td><a href=\"contratista.php?id_insmod=$i[0]\" target=\"parent\"><img src=\"am_modules/downloads/derec.gif\" width=16 height=16 alt=\"click\" border=0 align=left></a></td>";
echo 
"<td>$i[0]</td>";

$f_fecing  substr($i["ins_fecing"],6,2)."/".substr($i["ins_fecing"],4,2)."/".substr($i["ins_fecing"],0,4);

echo 
"<td>$f_fecing</td><td>$i[3]</td>";

$nom_sql "SELECT realname FROM am_users WHERE name = '$i[ins_digito]'"
$nom     db_query($nom_sql) or die(db_error());
$nombre  db_fetch_array($nom);
$f_autor $nombre["realname"];


echo 
"<td>$f_autor</td></tr>";

$est_sql "SELECT ins_estado FROM am_inspeccion"
$est     db_query($est_sql) or die(db_error());
$estado  db_fetch_array($est);
$f_estado $nombre["ins_estado "];


echo 
"<td>$ins_estado</td></tr>";

}
}
//}
//}
?>