include ('gestion/connect.inc');
include ('gestion/classes.php');
require ("gestion/library.inc");
require ("gestion/ps_pagination_dms_".$sLang.".php");
require ("dic_".$sLang.".php");
?>
include ('header_'.$sLang.'.php');
?>
############################################################################################################
############# query
// hay que hacer las cosas con JOIN, sino el mysql se queja... :
$sql_rev = "SELECT reviews.review_id, reviews.review_".$sLang.", reviews.album_id, reviews.author_id, reviews.pendiente, DATE_FORMAT(reviews.date,'%d-%m-%Y'), reviews.original, albums.name ".
"FROM reviews LEFT JOIN albums ON albums.album_id=reviews.album_id ".
"WHERE (reviews.pendiente='U' OR reviews.pendiente='S' OR reviews.pendiente='A') AND (albums.pendiente='S' OR albums.pendiente='D' OR albums.pendiente='B') AND reviews.review_".$sLang." !='' ".
"ORDER BY reviews.date DESC";
//echo $sql_rev;
$pager = new PS_Pagination($conn, $sql_rev, 20, 10, "nLang=$nLang¶m2=value2");
/*
* Enable debugging if you want o view query errors
*/
$pager->setDebug(true);
/*
* The paginate() function returns a mysql result set
* or false if no rows are returned by the query
*/
$rs = $pager->paginate();
if(!$rs) die(mysql_error());
while($row = mysql_fetch_row($rs)) {
$al = new album($album_id, $name, $year, $label_id, $tracklist, $credits, $compilation, $foto, $pendiente, $format, $info, $artist_id, $genre_id);
$al->showAlbum($row[2],$sLang);
$ar = new artist($artist_id, $name, $surname, $bandmembers, $country_id, $birth_year, $birth_date, $death_year, $death_date, $foto,$pendiente, $maingenre_id,$logo,$web,$autodate,$comment);
$ar->showArtist($al->artist_id,$sLang);
$us = new authors($author_id, $geheim, $pass, $nick, $name, $surname, $address, $city, $postal_code, $country_id, $area, $genre_id, $info, $birth_date, $phone, $fax, $e_mail, $web, $activo, $tipo, $privacy, $visible, $icon, $signature);
$us->getUserInfo2($row[3]);
if ($us->activo=="S" && $us->visible=="S") {
if ($re->date=="01-01-1995") {
$fecha = "archive";
}
else {
$fecha = $row[5];
}
print "".$fecha." | ";
print "".$ar->name." ".$ar->surname." | ";
print "".$al->name." | ";
print "".$us->geheim." | ";
print "
";
}
}
?>
print "
";
echo $pager->renderFullNav();
print "
";
?>
include ('footer_'.$sLang.'.php');
?>