Ver Mensaje Individual
  #2 (permalink)  
Antiguo 30/03/2004, 11:56
cisneros
 
Fecha de Ingreso: diciembre-2003
Ubicación: Valera Estado Trujillo
Mensajes: 27
Antigüedad: 20 años, 3 meses
Puntos: 0
Falto.!!

-----------------------------------------------------------------------------------
4 to Archivo: lista2.php
-----------------------------------------------------------------------------------


<?php
include("llamar_estilos.php");

$page = $_GET['page'];
if ($page == "") { $page = 1; }
$fwd = $page - 1;
$rwd = $page +1;


// Setting the default values for number of records per page -------------------------
$perpage = 10;
$filename = "lista2.php";

// Reading in all the records, putting each guestbook entry in one Array Element -----

$fd = fopen ("lista.txt", "r");
while (!feof ($fd))
{
$buffer = fgets($fd, 4096);
$lines[] = $buffer;
}
fclose ($fd);

// Counting the total number of entries (lines) in the data text file ----------------

$result = count($lines);
$count = $result-1;

// Caclulate how many pages there are ----------------------------------------

if ($count == 0) { $totalpages = 0; }
else { $totalpages = intval(($count - 1) / $perpage) + 1; }

$end = ($page * $perpage) - 1;
$start = $end - ($perpage-1); if ($start <= 1) { $start = 0; }


if ($start < 0) { $start = 0; }

for ($i = $start; $i<=$end; $i++)
{
echo (stripslashes($lines[$i]));
}

echo "<center>";

// Creating the Forward and Backward links -------------------------------------

if ($fwd > 0 && $rwd > 0 && $rwd<$totalpages+1)
{
echo "<br><a href=\"$filename?page=$fwd\">&lt&lt</a>";
echo "<a href=\"$filename?page=$rwd\">&gt&gt</a><br>";
}
else if ($fwd == 0)
{ echo "<a href=\"$filename?page=$rwd\">&gt&gt</a><br>"; }
else if ($rwd == 0)
{ echo "<br><a href=\"$filename?page=$fwd\">&lt&lt</a>"; }
else if ($rwd == $totalpages+1)
{ echo "<a href=\"$filename?page=$fwd\">&lt&lt</a><br>"; }


for ($i = 1; $i<=$totalpages; $i++)
{
echo " [<a href=\"$filename?page=$i\">$i</a>] ";
}
echo "</center>";

?>


-----------------------------------------------------------------------------------
5 to Archivo: llamar_estilos.php
-----------------------------------------------------------------------------------

<html>
<head>
<title>Llamar a la página de Stylos</title>
<link rel="STYLESHEET" type="text/css" href="style.css">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#FFFFFF" text="#000000">

</body>
</html>

-----------------------------------------------------------------------------------
6 to Archivo: style.ccs
-----------------------------------------------------------------------------------

BODY, TD {
font-family: Verdana, Helvetica, Arial, sans-serif; font-size: 10px; font-weight: normal; color: #000000; text-decoration: none; }


}

A { font-family: Verdana, Helvetica, Arial, sans-serif; font-size: 10px; font-weight: normal; color: #999999; text-decoration: none; }

A:Hover {
color: red;
}
HR {
height: 1pt;
color: Maroon;

}
H1, H2, H3, H4 {
font-family: Verdana, Helvetica, Arial, sans-serif;
font-variant: normal;
background-color: white;
color: black;
width: 100%;
margin: 0px;
padding: 0px;
}
.date{
font-family: Verdana, Helvetica, Arial, sans-serif; font-size: 8px; font-weight: normal; color: #999999; text-decoration: none; }
.italic{
font-family: Verdana, Helvetica, Arial, sans-serif;
font-size: 10px;
font-weight: normal;
color: #999999;
text-decoration: none;
font-style : italic;
}

-----------------------------------------------------------------------------------
7 mo y ultimo: lista.txt (donde se almacenan los mensajes)
-----------------------------------------------------------------------------------

Espero que me ayuden.

__________________________________________________ __
__________________
http://www.rumbavalera.com