Script:
Cita:
<?
extract($_POST);
$host="localhost";
$user="root";
$pass="root";
$db="web";
$tabla="cancion";
$con=mysql_connect($host,$user,$pass);
mysql_select_db($db,$con);
if (!isset($pg))
$pg = 0;
$cantidad = 10;
$inicial = $pg * $cantidad;
$pegar = "SELECT * FROM `cancion` where Nombrec like ('%".$buscar2."%') or Nombre like ('%".$buscar2."%') or Nombred like ('%".$buscar2."%') or Cancion like ('%".$buscar2."%') or estilo like ('%".$buscar2."%') ORDER BY Nombrec DESC LIMIT $inicial,$cantidad";
$cad = mysql_db_query($db,$pegar) or die (mysql_error());
$contar = "SELECT * FROM $tabla where Nombrec like ('%".$buscar2."%') or Nombre like ('%".$buscar2."%') or Nombred like ('%".$buscar2."%') or Cancion like ('%".$buscar2."%') or estilo like ('%".$buscar2."%')";
$contarok = mysql_db_query($db,$contar);
$total_records = mysql_num_rows($contarok);
$pages = intval($total_records / $cantidad);
while ($array = mysql_fetch_array($cad))
{
echo ("
<table width='700' border='0'>
<tr>
<td width='200'>
<script type='text/javascript' src='swfobject.js'></script>
<object type='application/x-shockwave-flash' data='player_mp3_maxi.swf' width='200' height='20'>
<param name='wmode' value='transparent' />
<param name='movie' value='player_mp3_maxi.swf' />
<param name='FlashVars' value='mp3=mp3/" . $array['Cancion'] . "&bgcolor1=ffffff&bgcolor2=cccccc&butt oncolor=999999&buttonovercolor=0&slidercol or1=cccccc&slidercolor2=999999&slideroverc olor=666666&textcolor=0&showvolume=1' />
<p>Texte alternatif</p>
</object>
</td>
<td rowspan='2'><strong>" . $array['Nombre'] . "</strong>-" . $array['Nombrec'] . "</td>
</tr>
<tr><td colspan=2><img src='skin001.png' height='3'/></td></tr>
</table>
\n");
}
echo "<br>";
echo "<center><p>";
if ($pg <>0)
{
$url = $pg - 1;
echo "<font><a href='music.php?id=".$id."&pg=".$url."'>« Anterior</a> </font>";
}
else {
echo " ";
}
for ($i = 0; $i<($pages + 1); $i++) {
if ($i == $pg) {
echo "<font><b> $i </b></font>";
}
else {
echo "<font><a href='music.php?id=".$id."&pg=".$i."'>".$i."</a> </font>";
}
}
if ($pg < $pages) {
$url = $pg + 1;
echo "<font><a href='music.php?id=".$id."&pg=".$url."'>Siguiente »</a></font>";
}
else {
echo " ";
}
echo "</p></center>";
?>
extract($_POST);
$host="localhost";
$user="root";
$pass="root";
$db="web";
$tabla="cancion";
$con=mysql_connect($host,$user,$pass);
mysql_select_db($db,$con);
if (!isset($pg))
$pg = 0;
$cantidad = 10;
$inicial = $pg * $cantidad;
$pegar = "SELECT * FROM `cancion` where Nombrec like ('%".$buscar2."%') or Nombre like ('%".$buscar2."%') or Nombred like ('%".$buscar2."%') or Cancion like ('%".$buscar2."%') or estilo like ('%".$buscar2."%') ORDER BY Nombrec DESC LIMIT $inicial,$cantidad";
$cad = mysql_db_query($db,$pegar) or die (mysql_error());
$contar = "SELECT * FROM $tabla where Nombrec like ('%".$buscar2."%') or Nombre like ('%".$buscar2."%') or Nombred like ('%".$buscar2."%') or Cancion like ('%".$buscar2."%') or estilo like ('%".$buscar2."%')";
$contarok = mysql_db_query($db,$contar);
$total_records = mysql_num_rows($contarok);
$pages = intval($total_records / $cantidad);
while ($array = mysql_fetch_array($cad))
{
echo ("
<table width='700' border='0'>
<tr>
<td width='200'>
<script type='text/javascript' src='swfobject.js'></script>
<object type='application/x-shockwave-flash' data='player_mp3_maxi.swf' width='200' height='20'>
<param name='wmode' value='transparent' />
<param name='movie' value='player_mp3_maxi.swf' />
<param name='FlashVars' value='mp3=mp3/" . $array['Cancion'] . "&bgcolor1=ffffff&bgcolor2=cccccc&butt oncolor=999999&buttonovercolor=0&slidercol or1=cccccc&slidercolor2=999999&slideroverc olor=666666&textcolor=0&showvolume=1' />
<p>Texte alternatif</p>
</object>
</td>
<td rowspan='2'><strong>" . $array['Nombre'] . "</strong>-" . $array['Nombrec'] . "</td>
</tr>
<tr><td colspan=2><img src='skin001.png' height='3'/></td></tr>
</table>
\n");
}
echo "<br>";
echo "<center><p>";
if ($pg <>0)
{
$url = $pg - 1;
echo "<font><a href='music.php?id=".$id."&pg=".$url."'>« Anterior</a> </font>";
}
else {
echo " ";
}
for ($i = 0; $i<($pages + 1); $i++) {
if ($i == $pg) {
echo "<font><b> $i </b></font>";
}
else {
echo "<font><a href='music.php?id=".$id."&pg=".$i."'>".$i."</a> </font>";
}
}
if ($pg < $pages) {
$url = $pg + 1;
echo "<font><a href='music.php?id=".$id."&pg=".$url."'>Siguiente »</a></font>";
}
else {
echo " ";
}
echo "</p></center>";
?>