Viewing file: mostrar 1.php (3.17 KB) -rw-rw-rw- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php include("../../conex.php");
?>
<html><head>
<title>Modulo Administración</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="../index_files/style.css" rel="stylesheet" type="text/css">
<link rel="StyleSheet" href="../../tabla_files/orangebrownie.css" type="text/css">
<script language="JavaScript">
function enviar(){
document.forms.norma.submit();
}
</script>
</head>
<body bgcolor="#FCFAE6">
<div> <img src="../index_files/header.png" width="780" height="228" border="0"></div>
<TABLE width="764" border=0 style="BORDER-LEFT-COLOR: green; BORDER-BOTTOM-COLOR: green; BORDER-TOP-COLOR: green; BORDER-RIGHT-COLOR: green" align="center">
<TR>
<TD>
<div id='boundary'>
<div id='content'>
<div id='itsthetable'>
<table width='100%'>
<thead>
<tr>
<th width='15' scope='col'>Id</th>
<th width='129' scope='col'>Nombre</th>
<th width='42' scope='col'>Sector</th>
<th width='349' scope='col'>Encabezado</th>
<th width='109' scope='col'>Seleccionar</th>
</tr>
</thead>
<?php
$sql = "select id,norma,ano,sector,vinculo,resuelve from normatividad";
//echo "$sql";
//id='$id'";
$cursor = mysql_query( $sql, $conexion );
$num_rows = mysql_num_rows($cursor);
$change=0;
while( $row = mysql_fetch_array( $cursor ) ){
$id = $row["id"];
$con = $con+1;
$norma = $row["norma"];
$resuelve = $row["resuelve"];
$ano = $row["ano"];
$sector = $row["sector"];
?>
<form name="<?php echo "form$con"; ?>" method="post" action="modificar.php">
<tbody>
<tr <?php if ($change == 1) {echo "class='odd'";} ?>>
<td><input name='id' type='text' onFocus='setFocus(this.id);' onBlur='setFocus(' value='<?php echo "$id"; ?>' size="4"');'></td>
<td><input type='text' name='norma' value='<?php echo "$norma"; ?>' onFocus='setFocus(this.id);' onBlur='setFocus('');'></td>
<td><?php echo "$sector"; ?></td>
<td><?php echo "$resuelve"; ?></td>
<td><INPUT id=creTercero:_id468 onBlur="setFocus('');" onfocus=setFocus(this.id); onClick="window.opener.document.getElementById('norma').value = window.document.<?php echo "form$con"; ?>.norma.value;
window.opener.document.getElementById('id').value = window.document.<?php echo "form$con"; ?>.id.value; window.opener.focus(); self.close(); return false;" type=button value=Aceptar name=creTercero:_id468>
</INPUT></td>
</tr>
</form>
<?php
if ($change == 0){
$change=1;
}
else if ($change == 1){
$change=0;
}
}
?>
<tfoot>
<tr>
<th scope='row'>Total Registros:</th>
<td colspan='4'><?php echo "$num_rows"; ?></td>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
</TD>
</TR>
</TBODY></TABLE> </TD>
</TR></TBODY>
</TABLE>
</FORM>
</body></html>
|