![]() |
![]() ![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 29 Pomógł: 0 Dołączył: 11.05.2003 Ostrzeżenie: (0%) ![]() ![]() |
Mam taki o to skrypcik i chciałbym by ktoś mi go tak przerobił by na jednej stronce pokazywane było 20 wpisów a do reszty były linki: 1 - 2 - 3. Z góry dziękuje.
[php:1:e9198b9c85]<?php if (($REQUEST_METHOD=='POST')) { // ********** Date Stamp $datestamp = date("d.m.Y"); $fpn=@fopen("dane.txt","a+"); @flock ($fpn,2); // ********** IP Checking $ipentry = $REMOTE_ADDR; // ********** Remove HTML tags $txtcomments = ereg_replace("<","&",$txtcomments); $txtcomments = ereg_replace(">","&",$txtcomments); // ********** Remove HTML $txtname = strip_tags($txtname); $txtname = StripSlashes($txtname); $txtemail= strip_tags($txtemail); // ********** Remove back slashes $txtcomments = stripslashes($txtcomments); // ********** Allow line breaks $txtcomments = ereg_replace("(rn|n|r)", "<br />",$txtcomments); // ********** Output $rec = "<center><table border="0" cellpadding="1" cellspacing="1" bordercolor="#000000" width="350"><tr><td width="75" align="right"><font class="nagłówek">Nick:</font></td><td width="200"><a href="mailto:$txtemail">$txtname</td><td width="75"></td></tr><tr><td width="75" align="right"><font class="nagłówek">WWW:</font></td><td width="200"><a href="http://$txtwebsite" target="_blank">$txtwebsite</a></td><td width="75"></td></tr><tr><td width="75" align="right"><font class="nagłówek">Data:</font></td><td width="200">$datestamp</td><td width="75"></td></tr><tr><td width="75" align="right"><font class="nagłówek">IP:</font></td><td width="200">$ipentry</td><td width="75"></td></tr><tr><td colspan="3" width="350" valign="top"><br>$txtcomments</td></tr><tr><td colspan="3" width="350" colspan="2"><hr size="1" color class="nagłówek"></td></tr></table></center>". "n"; $fw=fwrite($fpn,$rec); @flock($fpn,3); @fclose($fpn); } $fp=@fopen("dane.txt","r"); // r = read @flock ($fp,2); $arrr=array(); while ($line=@fgets($fp,4096)) { array_push($arrr,$line); } $totalent=count($arrr); if ($totalent<0) { $totalent=0; } print "<center><a href="dodaj.php">Dodaj swój wpis</a></center><br>"; print "<center>Mam już $totalent fajnych wpisów.</center><br><br>"; if (count($arrr)==0) { print "<center>Brak wpisów</center>"; } $ar=array_reverse($arrr); $arrr=array(); $highlimit=$totalent; for($i=0;$i<=$highlimit;$i++) { if (!$ar[$i]) { } print "$ar[$i]"; } @flock($fp,3); @fclose($fp); ?>[/php:1:e9198b9c85] |
|
|
![]()
Post
#2
|
|
![]() Grupa: Zarząd Postów: 3 503 Pomógł: 28 Dołączył: 17.10.2002 Skąd: Wrocław ![]() |
To nie jest temat na PRO.
Poszukaj na forum o stronicowaniu wyników. -------------------- |
|
|
![]()
Post
#3
|
|
![]() Grupa: Zarząd Postów: 2 277 Pomógł: 6 Dołączył: 27.12.2002 Skąd: Wołów/Wrocław ![]() |
forum zazwyczaj służy do tego, by sie czegoś nauczyć.
Do zleceń również jest forum, ale nazywa się ... praca oferowana -------------------- "Niezależnie od tego, jakie masz osiągnięcia, ktoś Ci pomaga..."
|
|
|
![]() ![]() |
![]() |
Wersja Lo-Fi | Aktualny czas: 20.07.2025 - 05:45 |