Gallery

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

  • Gallery

    Die Pfade:
    PHP-Code:
    $location "Hier der Pfad (komplet)... /page/gallery/";
    $location_img "/page/gallery/"
    Hier der Code:
    PHP-Code:
    if(!isset($folder))
      {
      echo 
    "<table><tr>";
      
    $gallery_counter_1 1;
      
    $gallery_counter_2 5;
        
    $verz opendir($ordner."/".$location);
        while(
    $folder readdir($verz))
            {
              if(
    $folder == "." or $folder == "..")
                {}
              else
                {
                if(
    $gallery_counter_1/$gallery_counter_2 != 1)
                {
                echo 
    "<td><a href=\"gallery.php?folder=$folder\">";
               
    $location_folder "Hier der Pfad (komplet)... /page/gallery/$folder/";
        
    $location_link "/page/gallery/$folder/";
        
    $verz_bild opendir($ordner."/".$location_folder);
            while(
    $file readdir($verz_bild))
            {
              if(
    $file == "." or $file == ".." or $file == "Thumbs.db" or ($zaehler 0))
                {}
              else
              {
                echo 
    "<img src=\"$location_link$file\" width=\"128\" height=\"96\">";
                
    $gallery_counter_1 $gallery_counter_1+1;
              }
            }    
                
                
                  echo 
    "<br>$folder</a></td><br>";
                }
                else
                {
                  echo 
    "<td><a href=\"gallery.php?folder=$folder\">";
               
    $location_folder "Hier der Pfad (komplet)... page/gallery/$folder/";
        
    $location_link "/page/gallery/$folder/";
        
    $verz_bild opendir($ordner."/".$location_folder);
            while(
    $file readdir($verz_bild))
            {
              if(
    $file == "." or $file == ".." or $file == "Thumbs.db" or ($zaehler 0))
                {}
              else
              {
                echo 
    "<img src=\"$location_link$file\" width=\"128\" height=\"96\">";
                
    $gallery_counter_1 $gallery_counter_1+1;
                
    $gallery_counter_2 $gallery_counter_2+5;
              }
            }    
                
                
                  echo 
    "<br>$folder</a></td></tr><tr><br>";
                }
            }
        
    closedir($verz);
      echo 
    "</table>";
      }
    }
    else
      {
        
    $count1 1;
        
    $count2 5;
        
    $location_folder "Hier der Pfad (komplet)... page/gallery/$folder/";
        
    $location_link "/page/gallery/$folder/";
        
    $verz opendir($ordner."/".$location_folder);
            while(
    $file readdir($verz))
            {
              if(
    $file == "." or $file == ".." or $file == "Thumbs.db")
                {}
              else
                {
                    if(
    $count1/$count2 != 1)
                    {
                    echo 
    " <a href=\"$location_link$file\" target=\"\_blank\"><img src=\"$location_link$file\" width=\"128\" height=\"96\"></a> ";
                    
    $count1 $count1+1;
                    }
                    else
                    {
                    echo 
    " <a href=\"$location_link$file\" target=\"\_blank\"><img src=\"$location_link$file\" width=\"128\" height=\"96\"></a><br> ";
                    
    $count1 $count1+1;
                    
    $count2 $count2+5;
                    }
                }
            }
        
    closedir($verz);
      echo 
    "<br><a href=\"gallery.php\">Zurück zur Gallery-Übersicht</a>";
      } 
    Fehler gleich am Anfang, der Ausdruck while($folder = readdir($verz))
    Error: Warning: readdir(): 6 is not a valid Directory resource

    Die Bilder sind in 2 ordner drüber, sprich /gallery/ordner/

  • #2
    und was glaubst du kommt dabei heraus?
    PHP-Code:
    $verz opendir($ordner."/".$location); 
    gruß
    peter
    Nukular, das Wort ist N-u-k-u-l-a-r (Homer Simpson)
    Meine Seite

    Kommentar


    • #3
      Dieser Befehl liest aus der location die ordner namen aus

      Kommentar


      • #4
        und was gibt echo $verz aus?

        EDIT:
        upsi was übersehen, sorry, die punkte gehören ja nicht zum pfad


        vieleicht mal mit relativen pfaden arbeiten:


        peter
        Zuletzt geändert von Kropff; 18.05.2006, 18:54.
        Nukular, das Wort ist N-u-k-u-l-a-r (Homer Simpson)
        Meine Seite

        Kommentar


        • #5
          sofern das sowas ist /usr/export/www/vhosts/network/host/nicknames/page/gallery/$folder/

          tu ich das

          Kommentar


          • #6
            CLOSED

            Kommentar


            • #7
              bitte lösung für andere posten.

              gruß
              peter
              Nukular, das Wort ist N-u-k-u-l-a-r (Homer Simpson)
              Meine Seite

              Kommentar


              • #8
                PHP-Code:
                $location "Hier der Pfad (komplet)... /page/gallery/";
                $location_img "/page/gallery/"
                PHP-Code:
                if(!isset($folder))
                  {
                  echo 
                "<table><tr>";
                    
                $count_gallery_1 1;
                    
                $count_gallery_2 5;
                    
                $verz opendir($ordner."/".$location);
                    while(
                $folder readdir($verz))
                        {
                          if(
                $folder == "." or $folder == "..")
                            {}
                          else
                            {
                                if(
                $count_gallery_1/$count_gallery_2 != 1)
                                {
                            echo 
                "<td><a href=\"gallery.php?folder=$folder\">";
                            
                $zaehler 0;
                           
                $location_folder "Hier der Pfad (komplet)... /page/gallery/$folder/";
                    
                $location_link "/page/gallery/$folder/";
                    
                $verz_bild opendir($ordner."/".$location_folder);
                        while(
                $file readdir($verz_bild))
                        {
                          if(
                $file == "." or $file == ".." or $file == "Thumbs.db" or ($zaehler 0))
                            {}
                          else
                          {
                            echo 
                "<img src=\"$location_link$file\" width=\"128\" height=\"96\">";
                            
                $zaehler $zaehler+1;
                          }
                        }    
                            
                            
                $count_gallery_1 $count_gallery_1+1;
                              echo 
                "<br>$folder</a></td>";
                            }
                            else
                            {
                            echo 
                "<td><a href=\"gallery.php?folder=$folder\">";
                            
                $zaehler 0;
                           
                $location_folder "Hier der Pfad (komplet)... /page/gallery/$folder/";
                    
                $location_link "/page/gallery/$folder/";
                    
                $verz_bild opendir($ordner."/".$location_folder);
                        while(
                $file readdir($verz_bild))
                        {
                          if(
                $file == "." or $file == ".." or $file == "Thumbs.db" or ($zaehler 0))
                            {}
                          else
                          {
                            echo 
                "<img src=\"$location_link$file\" width=\"128\" height=\"96\">";
                            
                $zaehler $zaehler+1;
                          }
                        }    
                            
                            
                $count_gallery_1 $count_gallery_1+1;
                            
                $count_gallery_2 $count_gallery_2+5;
                              echo 
                "<br>$folder</a></td></tr><tr>";
                            }
                            }
                        }
                    
                closedir($verz);
                    echo 
                "</tr></table>";
                  }
                else
                  {
                    
                $count1 1;
                    
                $count2 5;
                    
                $location_folder "Hier der Pfad (komplet)... /page/gallery/$folder/";
                    
                $location_link "/page/gallery/$folder/";
                    
                $verz opendir($ordner."/".$location_folder);
                        while(
                $file readdir($verz))
                        {
                          if(
                $file == "." or $file == ".." or $file == "Thumbs.db")
                            {}
                          else
                            {
                                if(
                $count1/$count2 != 1)
                                {
                                echo 
                " <a href=\"viewpic.php?location_link=$location_link&file=$file\" target=\"\_blank\"><img src=\"$location_link$file\" width=\"128\" height=\"96\"></a> ";
                                
                $count1 $count1+1;
                                }
                                else
                                {
                                echo 
                " <a href=\"viewpic.php?location_link=$location_link&file=$file\" target=\"\_blank\"><img src=\"$location_link$file\" width=\"128\" height=\"96\"></a><br> ";
                                
                $count1 $count1+1;
                                
                $count2 $count2+5;
                                }
                            }
                        }
                    
                closedir($verz);
                  echo 
                "<br><a href=\"gallery.php\">Zurück zur Gallery-Übersicht</a>";
                  }

                so funktioniert es bei mir

                Kommentar

                Lädt...
                X