Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> Sortowanie plikow
tomekmvr
post
Post #1





Grupa: Zarejestrowani
Postów: 116
Pomógł: 2
Dołączył: 11.09.2006

Ostrzeżenie: (0%)
-----


Witam w ktorym miejscu przerobic trzeba skrypt File Upload Manager v1.3 aby nie sortowal plikow wedlug nazwy a dodawal je pokolei jak zostaly z uploadowane?
pozdrawiam


--------------------
Go to the top of the page
+Quote Post
jarrod
post
Post #2





Grupa: Zarejestrowani
Postów: 312
Pomógł: 9
Dołączył: 14.10.2006
Skąd: warszawa

Ostrzeżenie: (0%)
-----


poszukaj w niem funkcj z rodziny *sort
Go to the top of the page
+Quote Post
tomekmvr
post
Post #3





Grupa: Zarejestrowani
Postów: 116
Pomógł: 2
Dołączył: 11.09.2006

Ostrzeżenie: (0%)
-----


Znalazlem dwa miejsca w kodzie gdzie jest funkcja sort, teraz ktora trzeba zmodyfikowac aby sortowala wedlug daty?

1)
  1. <?
  2. for($i=1;$i<=count($sort);$i++)
  3. {
  4. list($key,$value)=each($sort);
  5.  
  6. if ($value)
  7. {
  8. $value_en = base64_encode($value);
  9. $value_view=$value;
  10.  
  11. if (strlen($value) >= 90) 
  12. { 
  13. $value_view = substr($value_view, 0, 45) . '...';
  14. }
  15. ?>


2)
  1. <?
  2. if ((!$_GET[act]||!$_GET[file])&&$_GET[act]!="delall")
  3. {
  4. $opendir = @opendir($dir_store);
  5.  
  6. while ($readdir = @readdir($opendir))
  7. {
  8. if ($readdir<>"." && $readdir<>".." && $readdir != "index.html")
  9. {
  10. $filearr[] = $readdir;
  11. }
  12. $sort=array();
  13. for($i=1;$i<=count($filearr);$i++)
  14. {
  15. $key = sizeof($filearr)-$i;
  16. $file = $filearr[$key];
  17.  
  18. $sort[$i]=$file;
  19. }
  20. asort($sort);
  21. }
  22. ?>


--------------------
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 20.08.2025 - 05:37