$titre = "My CURE official Records...";
$img_titre = "titles/CURE.jpg";
include("includes/archi/header.php");
//==============================POST =====================================================//
$OrderBY_sel = $_POST['OrderBY_sel'];
$support_type = $_POST['support_type'];
$titre_disque= $_POST['titre_disque'];
$pays= $_POST['pays'];
$onlyNew= $_POST['onlyNew'];
$id_artist= $_POST['id_artist'];
$withPic= $_POST['withPic'];
?>
$reqNbDisques = " SELECT * FROM official_records";
$rsNbDisques = mysql_query ( $reqNbDisques );
$NbDisques = mysql_num_rows ( $rsNbDisques );
echo $NbDisques." Records listed"; ?>
if ( $withPic == 1 )
{ ?>Images reproduced with kind permission of www.thecurerecords.com
}
$no = 1;
//=========================RE-INITIALISATION DES VARIABLES======================================//
$Where = '';
if ( $OrderBY_sel == "support" )
{ $orderBy = 'ORDER BY R.support_type, R.support_detail, R.titres'; }
else if ( $OrderBY_sel == "pays" )
{ $orderBy = 'ORDER BY R.pays, R.titres'; }
else if ( $OrderBY_sel == "titres" )
{ $orderBy = 'ORDER BY R.titres, R.support_type'; }
else { $orderBy = 'ORDER BY R.titres, R.support_type, R.support_detail, R.support_detail, R.pays'; }
if ( $id_artist == 'all...' )
{ $id_artist = ''; }
if ( $support_type == 'all...' )
{ $support_type = ''; }
if ( $titre_disque == 'all...' )
{ $titre_disque = ''; }
if ( $pays == 'all...' )
{ $pays = ''; }
//===========================================================================================//
//==============================CRITERE_RECHERCHE===========================================//
if ( $support_type != '' )
{ $Where = $Where."AND R.support_type = '$support_type' "; }
if ( $id_artist != '' )
{ $Where = $Where."AND R.id_artist = '$id_artist' "; }
if ( $pays != NULL )
{ $Where = $Where."AND R.pays = \"$pays\" "; }
if ( $titre_disque != NULL && $titre_disque != "all_cure_related" )
{ $Where = $Where."AND R.titre_disque = \"$titre_disque\" "; }
if ( $titre_disque == 'all_cure_related' )
{ $Where = $Where."AND R.id_artist != 1 "; }
if ( $onlyNew != NULL )
{ $Where = $Where."AND R.new = 1"; }
$reqSELECT = " SELECT * FROM official_records R, artists A
WHERE R.id_artist = A.id_artist
$Where
$orderBy ";
$rsSELECT = mysql_query ( $reqSELECT );
$nbDisquesTrouves = mysql_num_rows ( $rsSELECT );
if ( $nbDisquesTrouves == 0)
{ echo "No result found !!!
"; }
else
{ echo "".$nbDisquesTrouves." Records found.";
echo "
";
//===========================AFFICHAGE==============================================//
while ( ($r = mysql_fetch_array( $rsSELECT ) ) != NULL )
{ echo "";
$num = $no++;
if ( strlen($num) == 1 ) { $num = "00".$num; }
else if ( strlen($num) == 2 ) { $num = "0".$num; }
// --> http://www.thecurerecords.com/
echo "".$num.". | ";
echo "".$r[support_type]." ".$r[support_detail]." | ";
echo "".$r[pays]." | ";
echo "".$r[ref]." | ";
echo "".$r[titres];
if ( $r[id_artist] != 1 || ( $r[titre_compil] != '' && $r[titre_compil] != NULL ) )
{ echo " --> "; }
if ( $r[id_artist] != 1 )
{ echo $r[artist]." "; }
if ( $r[titre_compil] != '' && $r[titre_compil] != NULL )
{ echo "\"".$r[titre_compil]."\""; }
if ( $r[year] != '' && $r[year] != NULL )
{ echo " --> ".$r[year]; }
echo " | ";
echo "".$r[description]." | ";
if ( $withPic == 1 && $r[img_thecurerecords] != NULL && $r[id_thecurerecords] != NULL )
{ echo "";
echo " | ";
}
elseif ( $withPic == 1 && $r[img_thecurerecords] == NULL && $r[id_thecurerecords] != NULL )
{ echo "";
echo "(...) | ";
}
else
{ echo " | "; }
echo "
";
}
}
?>
if ( $nbDisquesTrouves > 10 )
{ echo " "; }
?>