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 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?php require_once('Connections/videos.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
$colname_Recordset1 = "0";
if (isset($_POST['style'])) {
$colname_Recordset1 = $_POST['style'];
}
mysql_select_db($database_videos, $videos);
$query_Recordset1 = sprintf("SELECT * FROM videos_tbl ", GetSQLValueString($colname_Recordset1 . "%", "text"));
$Recordset1 = mysql_query($query_Recordset1, $videos) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
$count= 0; // nouveau compteur!
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>test flv1 php</title>
</head>
<!-- ***********************************************************-->
<div id="main" class="rond">
<!--*************************************************************************************************** fin du menu de style -->
<br>
<table class="table">
<?php
$i=0; // nouvelle variable pour savoir quand sauter à la ligne
do {
if($i == 0){
echo "<tr>";
}
?>
<td>
<table class="table">
<div id="artiste">
<div class="cim rond"><p class="title2"><a href="#"><?php echo $row_Recordset1['id']; ?></a></p></div>
</div>
<tr>
<br />
<div>
<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' width='470' height='320' id='<?php echo $row_Recordset1['num']; ?>.xml" />' name='single1'>
<param name="allowScriptAccess" value="sameDomain" />
<param name='movie' value='player.swf'>
<param name='allowfullscreen' value='true'>
<param name='allowscriptaccess' value='always'>
<param name='wmode' value='transparent'>
<param name="flashvars" value="playlistfile=/xml=xml/<?php echo $row_Recordset1['artiste']; ?>.xml" />
<embed
name='single2'
src='player.swf'
width='470'
height='320'
bgcolor='#000000'
allowscriptaccess='always'
allowfullscreen='true'
flashvars='playlistfile=<?php echo $row_Recordset1['artiste']; ?>.xml/>'
/>
</object>
</div>
</tr>
</table>
<?php
++$i;
if($i == 3){
echo "</tr>";
$i=0;
}
}
while ($row_Recordset1 = mysql_fetch_assoc($Recordset1));
if($i != 5) // ce test est néssaire pour la dernière ligne : elle peut ne pas être complète > il faut fermer le <tr>!
echo "</tr>";
?>
</table>
</div>
</div>
</body>
</html>
<?php
mysql_free_result($Recordset1);
?> |
Partager