105 lines
4.0 KiB
PHP
105 lines
4.0 KiB
PHP
<?php
|
|
if (!isset($_GET['recherche'])) {
|
|
header('Location: index.php');
|
|
}
|
|
?>
|
|
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
|
|
<head>
|
|
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
|
|
<title>Résultat de la recherche pour : <?php echo $_GET['recherche']; ?></title>
|
|
<script type="text/javascript" src="ajax.js"></script>
|
|
<script type="text/javascript" src="etoiles.js"></script>
|
|
<link href="design.css" rel="stylesheet" type="text/css" />
|
|
</head>
|
|
<body>
|
|
|
|
<?php
|
|
mysql_connect('mysql5-2.bdb', 'crystalynet', 'pentium4');
|
|
mysql_select_db('crystalynet');
|
|
mysql_query('SET NAMES UTF8');
|
|
|
|
$reponse = mysql_query('SELECT * FROM mp3 WHERE titre LIKE "%'. $_GET['recherche'] .'%"');
|
|
|
|
mysql_close();
|
|
?>
|
|
|
|
<table>
|
|
<tr class="playlist">
|
|
<td colspan="3">Résultat de la recherche</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="3" id="lecteur" <?php if (mysql_fetch_array($reponse) == NULL) { echo 'style="display: none;">'; } mysql_data_seek($reponse, 0); ?>>
|
|
<object data="dewplayer-multi.swf?son=generer.php?id=
|
|
<?php
|
|
$donnees = mysql_fetch_array($reponse);
|
|
echo $donnees['id'];
|
|
mysql_data_seek($reponse, 0);
|
|
?>
|
|
&autostart=1" type="application/x-shockwave-flash" width="200" height="20">
|
|
<param name="movie" value="dewplayer-multi.swf?son=generer.php?id=
|
|
<?php
|
|
$donnees = mysql_fetch_array($reponse);
|
|
echo $donnees['id'];
|
|
mysql_data_seek($reponse, 0);
|
|
?>
|
|
&autostart=1" />
|
|
<param name="wmode" value="transparent" />
|
|
</object>
|
|
</td>
|
|
</tr>
|
|
<tr id="avoter">
|
|
<td colspan="3">Merci d'avoir voté !</td>
|
|
</tr>
|
|
<?php
|
|
if (mysql_fetch_array($reponse) == NULL) {
|
|
echo '<tr><td class="acolspan">Aucun résultats :-(</td></tr>';
|
|
}
|
|
else {
|
|
mysql_data_seek($reponse, 0);
|
|
while ($donnees = mysql_fetch_array($reponse)) {
|
|
$nb_caract = strlen($donnees['titre']);
|
|
echo '<tr><td class="acolspan"><a href="#" title="'. $donnees['titre'] .'" onclick="charge_mp3(\''. $donnees['id'] .'\');">';
|
|
|
|
if ($nb_caract > 25) {
|
|
echo substr($donnees['titre'], 0, 25). ' ...';
|
|
}
|
|
else {
|
|
echo $donnees['titre'];
|
|
}
|
|
|
|
echo '</a></td><td class="avoter"><a href="#" title="Votez !" onclick="vote(\''. $donnees['id'] .'\');">
|
|
<img src="imgs/icone_aime.gif" alt="" /> '. $donnees['nb_vote'] .' </a></td>
|
|
<td class="ddl"><img title="Télécharger '. $donnees['titre'] .'" onclick="window.open(\'generer.php?id='. $donnees['id'] .'\', \'\', \'\');" src="imgs/downloadicon.gif" alt="" /></td></tr>';
|
|
}
|
|
mysql_data_seek($reponse, 0);
|
|
}
|
|
?>
|
|
<tr>
|
|
<td colspan="3"><a href="index.php" style="color: purple;"><-- Retour à la JuKeBoX</a></td>
|
|
</tr>
|
|
</table>
|
|
|
|
<table <?php if (mysql_fetch_array($reponse) == NULL) { echo 'style="display: none;"'; } ?>>
|
|
<tr class="playlist">
|
|
<td colspan="2">Exporter</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="export">Sur un forum :</td>
|
|
<td>
|
|
<input id="export_forum" name="export_forum" size="25" readonly="readonly" type="text" onclick="select();" value="[flash(200,20)]http://tagada.crystalyx.net/jukebox/dewplayer-multi.swf?son=http://tagada.crystalyx.net/jukebox/generer.php?id=<?php mysql_data_seek($reponse, 0); $donnees = mysql_fetch_array($reponse); echo $donnees['id']; mysql_data_seek($reponse, 0); ?>[/flash]" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="export">Sur une page web :</td>
|
|
<td>
|
|
<input id="export_site" name="export_site" size="25" readonly="readonly" type="text" onclick="select();" value='<object data="http://tagada.crystalyx.net/jukebox/dewplayer-multi.swf?son=http://tagada.crystalyx.net/jukebox/generer.php?id=<?php $donnees = mysql_fetch_array($reponse); echo $donnees['id']; mysql_data_seek($reponse, 0); ?>" type="application/x-shockwave-flash" width="200" height="20"><param name="movie" value="http://tagada.crystalyx.net/jukebox/dewplayer-multi.swf?son=http://tagada.crystalyx.net/jukebox/generer.php?id=<?php $donnees = mysql_fetch_array($reponse); echo $donnees['id']; ?>" /><param name="wmode" value="transparent" /></object>' />
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
</body>
|
|
</html>
|