![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 41 Pomógł: 0 Dołączył: 25.03.2003 Ostrzeżenie: (0%) ![]() ![]() |
Mam taki problem. oto czesc skryptu do kat. linkow:
[php:1:a139329939]<?php $tablica=file("../users/domowe.txt"); $tablica=array_reverse($tablica); for($i=0;$i{ $http_string=basename($SCRIPT_NAME);$sign=strpos($http_string,"."); $kat=substr($http_string,0,$sign); $ile=@file("../komentarze/$kat/$id.txt"); $ile_kom=count($ile); if(@filesize("../komentarze/$kat/$id.txt")<=0){$ile_kom="brak"; } $ex=explode("",$tablica[$i]); ?>[/php:1:a139329939] jak widac odwracam tablice, po to zeby nowsze linki pojawialy sie na gorze, ale tu wlasnie pojawia sie problem, bo mam tez komentarze, ktore po dodaniu zapisuja sie w postaci id.txt (np 3.txt), ale przez to ze odwrocilem tablice, wszystkie linki maja zmienne id (najnowsze ma zawsze 0) przez co komentarze sie przesowaja wypadaloby spowrotem odwrocic tablice przed komentarzami, ale jak? ![]() ---------------------------- Używaj odpowiedniego BBcode -DeyV -------------------- Arbeit macht frei
|
|
|
![]() |
![]()
Post
#2
|
|
Grupa: Zarejestrowani Postów: 41 Pomógł: 0 Dołączył: 25.03.2003 Ostrzeżenie: (0%) ![]() ![]() |
Oto caly kod (wraz z html-em (jak za duzo, to usune)) jednej ze stron (dzialow). Chyba fatycznie wkradl tam sie jakis blad (sorki).
[php:1:455022dbeb] <? echo" <center><a HREF=../dodaj.php>dopisz do katalogu</A> | <a HREF=../dir.php>Wykaz katalogów</A></center><br>"; $id=0; $tablica=file("../users/domowe.txt"); $tablica=array_reverse($tablica); for($i=0;$i<count($tablica);$i++) { $http_string=basename($SCRIPT_NAME);$sign=strpos($http_string,"."); $kat=substr($http_string,0,$sign); $ile=@file("../komentarze/$kat/$id.txt"); $ile_kom=count($ile); if(@filesize("../komentarze/$kat/$id.txt")<=0){$ile_kom="brak"; } $ex=explode("|**|",$tablica[$i]); echo "<div align=center><center><table border=0 cellpadding=0 cellspacing=1 bgcolor=white width=360 height=94><tr><td width=137 height=21 valign=middle align=center bgcolor=rgb(245,245,245)> <font class=text>dodał: </font><a HREF=mailto:$ex[2]>$ex[1]</A></td><td width=217 height=21 valign=middle align=center bgcolor=rgb(245,245,245)> <a HREF=$ex[0] target=new>$ex[0]</A></td></tr><tr><td width=138 height=69 style=background-color:transparent></td><td width=216 height=69 valign=middle align=center valign=top bgcolor=rgb(235,235,235)> <div align=center><center><table border=0 cellpadding=5 cellspacing=0 width=193 height=54><tr><td width=193 height=54 valign=top bgcolor=rgb(245,245,245)><font class=text>$ex[3]</font></td></tr></table> </center> </div></td></tr></table></center></div> <div align=center><center><table border=0 cellpadding=0 cellspacing=0 width=360 height=11><tr><td width=138 height=11> <font class=text>Komentarzy [ $ile_kom ]</FONT></td><td width=216 height=11 bgcolor=rgb(245,245,245) align=center><a HREF=../komentarze/domowe.php?id=$id>dodaj komenatrz</A> <a HREF=../kom.pokaz.php?id=$id>Zobacz opinie</A></td></tr></table><hr noshade size=1 width=360></center></div>"; $id++; } ?>[/php:1:455022dbeb] -------------------- Arbeit macht frei
|
|
|
![]() ![]() |
![]() |
Wersja Lo-Fi | Aktualny czas: 14.08.2025 - 19:06 |