# if ($id = $_GET["view"]) # { # $path = substr($row["fichier"],0,strrpos($row["fichier"],"/")); # if (!$resultat = mysql_query("SELECT * FROM contenu WHERE id = '$id' ORDER by dir DESC ;")) # echo mysql_error(); # $row = mysql_fetch_array($resultat); # if ($row["dir"]=="n") # $path = substr($row["fichier"],0,strrpos($row["fichier"],"/")); # else # $path = $row["fichier"]; # if (!$resultat = mysql_query("SELECT count(DISTINCT fichier) FROM contenu WHERE fichier like \"$path%\" ORDER by dir DESC;")) # echo mysql_error(); # $row = mysql_fetch_array($resultat); # # # if ($row["count(DISTINCT fichier)"] < 55) # $query = "SELECT DISTINCT fichier,dir,titre,id FROM contenu WHERE fichier like \"$path/%\" AND dir ='n' ORDER by dir DESC;"; # else # $query = "SELECT DISTINCT fichier,dir,titre,id FROM contenu WHERE fichier like \"$path/%\" AND fichier # NOT LIKE \"$path/%/%\" ORDER by dir DESC;"; # # if (!$resultat = mysql_query($query)) # echo mysql_error(); # $row = mysql_fetch_array($resultat); # echo " #
". utf8_encode($row['titre']) ."
"; # do # { # if (strtolower(substr($row["fichier"],strrpos($row["fichier"],".")+1,strlen($row["fichier"]))) == "jpg") # { # $tbimg=substr($row["fichier"],0,strpos($row["fichier"],".")) . "-tb" . substr($row["fichier"],strlen($row["fichier"])-4,strlen($row["fichier"])); # if (!file_exists("/home/oexal/www/" .$tbimg)) # { # if (!$flagge) # { # echo ""; # $flagge=1; # ob_flush(); # flush(); # # } # shell_exec("convert -scale 130x130 '/home/oexal/www/" . $row["fichier"] . "' '/home/oexal/www/" . $tbimg ."'"); # } # echo " # \"".$row["fichier"]."\""; # } # if ($row[dir]=="y") # echo " # \"".$row["fichier"]."\" ".strtolower(substr($row["fichier"],strrpos($row["fichier"],"/")+1,strlen($row["fichier"]))).""; # ob_flush(); # flush(); # } # while ($row = mysql_fetch_array($resultat)) ; # }