All pastes #558133 Raw Edit

Someone

public php v1 · immutable
·published 2007-06-11 08:09 UTC
rendered paste body
<div id="list"><?phpmysql_connect("localhost", "root", "");mysql_select_db("stream");// On récupère les 5 dernières news$requete = mysql_query('SELECT url FROM video');$data = mysql_fetch_array($requete);$REP="./video";include "fonctions.php";$listedir = ListDir($REP."/$dossier/", $sort=1);if (!empty($listedir)) {	foreach ($listedir as $name) {		echo "<img src=\"./images/rep.gif\">&nbsp<a href=\"index.php?c=video&REP=$REP&dossier=$dossier/$name\">".$name."</a><br><br>";	}} else {	echo "";}while ($dt = mysql_fetch_array($requete)) {echo '';}$listfile= ListFile($REP."/$dossier/", "jpg|bmp|gif|mp3|exe|msi|reg|rar|zip|avi|mpg|mpeg|mkv|wmv|doc|xls|pdf|ini|ppt|html|txt|wma|ogg") ; if (!empty($listfile)) {	foreach ($listfile as $file) {		$file_ext = strtolower(substr(strrchr($file,"."),1));		if (in_array($file_ext, array("jpg", "gif", "jpeg", "bmp", "exe", "msi", "reg", "rar", "zip","doc", "xls", "pdf", "ini", "ppt", "html", "txt", "mp3", "wma", "ogg", "wav", "avi", "wmv", "mpeg", "mkv", "mpg"))) {			echo "<img src=\"./images/$file_ext.gif\">&nbsp<a href=\"index.php?c=lecvideo&dossier=$dossier&file=$file\">".$file."</a><br><br>";				} else {			echo "<img src=\"./images/no.gif\">&nbsp<a href=\"index.php?c=lecvideo&dossier=$dossier&file=$file\">".$file."</a><br><br>";		}		$fichier= $dossier.'/'.$file;		if (!empty($data)) {			while ($dt = mysql_fetch_array($requete)) {				if (in_array($fichier,$dt['url'])) {					echo'';				} else {					mysql_query("INSERT INTO video VALUES ('','$fichier')");				}			}		} else {			mysql_query("INSERT INTO video VALUES ('','$fichier')");		}	}}?>