root = $aRoot; $this->videoDir = $aVideoDir; $this->width = 320; $this->height = 240; } /* This function display All the video present on the video directory. */ function Affiche () { $rootDir = $this->root . $this->videoDir; $id = 0; $col = 1; if ($dh = opendir ($rootDir)) { print "
\n"; while (($file = readdir($dh)) !== false) { $videoFile = strstr ($file, "flv"); $videoFileLen = strlen ($videoFile); if ($videoFileLen != 0) { echo ""; $id += 1; $col = $col + 1; if ($col == 3) { print "\n"; $col = 1; } } } if (col == 1) { print "/"; } print "
"; $this->DisplayVideo ($id, "../".$file, $this->width, $this->height); echo "

\n"; $FileName = explode( ".", $file); $docFileName = $rootDir . $FileName[0] . ".html"; $pFichier = @fopen ($docFileName,"r"); if ($pFichier == false) { echo "

"; } else { while ( feof($pFichier) != 1 ) { $szLigne = fgets($pFichier); echo "
".$szLigne."

"; } } echo "
\n"; } closedir($dh); } /* This function display the video with the flash video player. */ function DisplayVideo ($id, $aFileName, $width, $height) { echo "
Get the Flash Player to see this player.
\n"; echo "\n"; echo "\n"; } } ?>