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
$sql = "SELECT id, headline_".$sLang.", quelle, country_id, DATE_FORMAT(start_date,'%d-%m-%Y'), DATE_FORMAT(end_date,'%d-%m-%Y') FROM new_noticias WHERE (valido=\"S\" OR valido=\"B\" OR VALIDO=\"D\") AND headline_".$sLang." != '' AND tipo='festival' AND jahr>'2013' ORDER BY start_date DESC, id DESC";
//echo $sql;
$pager = new PS_Pagination($conn, $sql, 20, 10, "nLang=$nLang&tipo_noticia=$tipo_noticia");
/*
* 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)) {
$start_date = strtotime($row[4]);
$end_date = strtotime($row[5]);
if ($start_date == $end_date) {
$print_date = $row[4];
}
else {
$print_date = $row[4]." - ".$row[5];
}
if ($row[3]!="" && $row[3]!=0) {
$cou = new country($country_id,$country_name);
$cou->getCountry($row[3],$sLang);
}
print "".$print_date." | ";
print "".$row[1]." (".$cou->country_name.") |
";
}
?>
print "
";
echo $pager->renderFullNav();
print "
";
?>
include ('footer_'.$sLang.'.php');
?>