Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\xampp\htdocs\siap\jao\conexion.php:15) in C:\xampp\htdocs\siap\OP\listado_empleados.php on line 2
este es el codigo:
Código PHP:
<?php include ("../jao/conexion.php");?>
<?php session_start();?>
<?php
$currentPage = $_SERVER["PHP_SELF"];
$maxRows_productos = 10;
$pageNum_productos = 0;
if (isset($_GET['pageNum_productos'])) {
$pageNum_productos = $_GET['pageNum_productos'];
}
$startRow_productos = $pageNum_productos * $maxRows_productos;
//mysql_select_db($database_rayitaBD, $rayitaBD); codigo Antiguo
mysql_select_db($database, $conexion);//Nuevo
$query_productos = "SELECT Id_Empleado,Nombre,Rut,Apellido FROM tblempleados";
$query_limit_productos = sprintf("%s LIMIT %d, %d", $query_productos, $startRow_productos, $maxRows_productos);
$productos = mysql_query($query_limit_productos, $conexion) or die(mysql_error());
$row_productos = mysql_fetch_assoc($productos);
if (isset($_GET['totalRows_productos'])) {
$totalRows_productos = $_GET['totalRows_productos'];
} else {
$all_productos = mysql_query($query_productos);
$totalRows_productos = mysql_num_rows($all_productos);
}
$totalPages_productos = ceil($totalRows_productos/$maxRows_productos)-1;
$queryString_productos = "";
if (!empty($_SERVER['QUERY_STRING'])) {
$params = explode("&", $_SERVER['QUERY_STRING']);
$newParams = array();
foreach ($params as $param) {
if (stristr($param, "pageNum_productos") == false &&
stristr($param, "totalRows_productos") == false) {
array_push($newParams, $param);
}
}
if (count($newParams) != 0) {
$queryString_productos = "&" . htmlentities(implode("&", $newParams));
}
}
$queryString_productos = sprintf("&totalRows_productos=%d%s", $totalRows_productos, $queryString_productos);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Documento sin título</title>
<link href="../css/siap.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="estilo1" id="Menu">
<table width="164" border="0" align="right" cellpadding="0" cellspacing="0" class="estilo1">
<tr>
<td width="15"><img src="../imag/24x24/001_20.png" alt="Home" width="24" height="24" longdesc="Home" />Home</td>
<td width="15" align="left" valign="baseline"> </td>
<td width="15"><img src="../imag/24x24/001_06.png" width="24" height="24" />Informe</td>
<td width="15"> </td>
<td width="15"><img src="../imag/24x24/001_55.png" width="24" height="24" /></td>
<td width="15"><? echo $_SESSION['usuario_login'] ?></td>
<td width="74"> </td>
</tr>
</table>
</div>
<p> </p>
<div id="contenidos">
<table width="100%" border="0" cellpadding="2" cellspacing="0" bgcolor="#FFFFFF">
<!--DWLayoutTable-->
<tr align="center">
<td colspan="3"><?php if ($pageNum_productos > 0) { // Show if not first page ?>
<a href="<?php printf("%s?pageNum_productos=%d%s", $currentPage, max(0, $pageNum_productos - 1), $queryString_productos); ?>">anterior</a>
<?php } // Show if not first page ?>
<?php echo ($startRow_productos + 1) ?> a <?php echo min($startRow_productos + $maxRows_productos, $totalRows_productos) ?> de <?php echo $totalRows_productos ?>
<?php if ($pageNum_productos < $totalPages_productos) { // Show if not last page ?>
<a href="<?php printf("%s?pageNum_productos=%d%s", $currentPage, min($totalPages_productos, $pageNum_productos + 1), $queryString_productos); ?>">siguiente</a>
<?php } // Show if not last page ?>
</td>
</tr>
<?php do { ?>
<tr valign="top">
<td width="1%"><img src="../imag/24x24/001_47.png" width="24" height="24" hspace="5" /></td>
<td width="50%"><b><a href="producto.php?Id_Empleado=<?php echo $row_productos['Id_Empleado']; ?>"><?php echo $row_productos['Nombre']; ?></a></b><br />
<i><?php echo $row_productos['Apellido']; ?><?php echo $row_productos['Rut']; ?></i> </td>
<td>$<?php echo number_format($row_productos['precio'],0); ?></td>
</tr>
<?php } while ($row_productos = mysql_fetch_assoc($productos)); ?>
<tr>
<td height="4" colspan="3"></td>
</tr>
</table>
</div>
<p>
<?php //include("menu.php"); ?>
</p>
<p> </p>
</body>
</html>