1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
| $chaine=getcwd();
$pos=strpos($chaine, "New");
$chemin=substr($chaine, 0, $pos+3);
$nl = "\r\n";
echo '<?xml version="1.0" encoding="ISO-8859-1"?>' . $nl;
echo ' <medias> ' . $nl;
while($row= mysql_fetch_row($req)){
$folderV=$chemin;
$folderV .="\Vignette\V_"."$row[0]".".jpg";
if($row[1]=="image"){
$folderM=$chemin;
$folderM .="\Image\I_"."$row[0]".".jpg";
echo'<media vignette="'. stripslashes2($folderV) .'" video="" image="'. stripslashes2($folderM) .'"> ' . $nl;
echo"<type>". stripslashes2($row[1]) ."</type> " . $nl;
echo"<titre><![CDATA[" . stripslashes2($row[2]) . "]]></titre> " . $nl;
echo"<descriptif><![CDATA[" . stripslashes2($row[3]) . "]]></descriptif> " . $nl;
echo"<point_clef><![CDATA[" . stripslashes2($row[4]) . "]]></point_clef> " . $nl;
echo'</media>';
}else{
$folderM=$chemin;
$folderM .="\Video\V_"."$row[0]".".flv";
echo'<media vignette="'. stripslashes2($folderV) .'" video="'. stripslashes2($folderM) .'" image=""> ' . $nl;
echo"<type>". stripslashes2($row[1]) ."</type> " . $nl;
echo"<titre><![CDATA[" . stripslashes2($row[2]) . "]]></titre> " . $nl;
echo"<descriptif><![CDATA[" . stripslashes2($row[3]) . "]]></descriptif> " . $nl;
echo"<point_clef><![CDATA[" . stripslashes2($row[4]) . "]]></point_clef> " . $nl;
echo'</media>';
}
}
echo '</medias>' . $nl; |
Partager