<?php
function anzeige_ohne_caption($sql){ $result = db_query_range($sql,0,10); foreach ($result as $record) { $node=node_load($record->nid); $node->title = ''; $anzeige = node_view($node, 'full'); $rendered = render($anzeige); print $rendered; echo '
function anzeige($sql,$caption=''){ $result = db_query_range($sql,0,10); if (($result->rowCount()>0) and ($caption<>'')) { echo '
// Das Intro anzeigen $sql = "SELECT * FROM {node} WHERE nid=1 ORDER BY created ASC"; anzeige_ohne_caption($sql);
// Die oben in Listen Termine anzeigen $sql = "SELECT * FROM {node} WHERE type = 'article' AND status = 1 AND nid<>1 AND promote=1 AND sticky=1 ORDER BY created ASC"; anzeige($sql,'');
// Die heutigen Termine anzeigen $sql = "SELECT * FROM {node} WHERE type = 'article' AND status = 1 AND nid<>1 AND promote=1 AND sticky=0 AND DATE(FROM_UNIXTIME(created))=CURDATE() ORDER BY created DESC"; anzeige($sql,'Heute in Niederfrohna');
//Zukunft anzeigen 28 Tage $sql = "SELECT * FROM {node} WHERE type = 'article' AND status = 1 AND nid<>1 AND promote=1 AND sticky=0 AND DATE(FROM_UNIXTIME(created))>CURDATE() AND FROM_UNIXTIME(created)<DATE_ADD(CURDATE(),INTERVAL 28 DAY) ORDER BY created ASC"; anzeige($sql,'Demnächst in Niederfrohna');
//Vergangenheit anzeigen $sql = "SELECT * FROM {node} WHERE type = 'article' AND status = 1 AND nid<>1 AND promote=1 AND DATE(FROM_UNIXTIME(created))<CURDATE() AND sticky<>1 ORDER BY created DESC"; anzeige($sql,'Das war los in Niederfrohna');
?>
Tags: php<?php
function naechstertermin($image, $ueberschrift, $arr_termine, $firma = " ")
{
$heute = date("Y/m/d");
$termin=""; foreach ($arr_termine as $value) {
if (($value>=$heute) and ($termin=="")) $termin=$value;
};
$retval="";
if ($termin<>"") {
$arr2 = explode("/",$termin);
$retval = "<p style='height:30px'> <img src='$image' alt='$ueberschrift' width='25' height='35' style='float:left; margin-right:5px; margin-top:-5px;' /> $arr2[2].$arr2[1].$arr2[0] $firma</p>\n";
};
return $retval;
}
function kecl_termine() {
//Termine fuer die Blauen Tonnen in der Schreibweise YYYY/MM/TT //erzeugt durch wnfAbfallkalender (Lazarus) $bttermine = array ( "2019/02/27", "2019/03/13", "2019/03/27", "2019/04/10", "2019/04/24", "2019/05/08", "2019/05/22", "2019/06/05", "2019/06/19", "2019/07/03", "2019/07/17", "2019/07/31", "2019/08/14", "2019/08/28", "2019/09/11", "2019/09/25", "2019/10/09", "2019/10/23", "2019/11/06", "2019/11/21", "2019/12/04", "2019/12/18", "2020/01/02", "2020/01/15", "2020/01/29", "2020/02/12", "2020/02/26", "2020/03/11", "2020/03/25", "2020/04/08", "2020/04/22", "2020/05/06", "2020/05/20", "2020/06/03", "2020/06/17", "2020/07/01", "2020/07/15", "2020/07/29", "2020/08/12", "2020/08/26", "2020/09/09", "2020/09/23", "2020/10/07", "2020/10/21", "2020/11/04", "2020/11/19", "2020/12/02", "2020/12/16", "2020/12/30" );
//Termine fuer die Gelben Tonnen in der Schreibweise YYYY/MM/TT //erzeugt durch wnfAbfallkalender (Lazarus) $gstermine = array ( "2019/03/01", "2019/03/15", "2019/03/29", "2019/04/12", "2019/04/26", "2019/05/10", "2019/05/24", "2019/06/07", "2019/06/21", "2019/07/05", "2019/07/19", "2019/08/02", "2019/08/16", "2019/08/30", "2019/09/13", "2019/09/27", "2019/10/11", "2019/10/25", "2019/11/08", "2019/11/22", "2019/12/06", "2019/12/20", "2020/01/03", "2020/01/17", "2020/01/31", "2020/02/14", "2020/02/28", "2020/03/13", "2020/03/27", "2020/04/11", "2020/04/24", "2020/05/08", "2020/05/22", "2020/06/05", "2020/06/19", "2020/07/03", "2020/07/17", "2020/07/31", "2020/08/14", "2020/08/28", "2020/09/11", "2020/09/25", "2020/10/09", "2020/10/23", "2020/11/06", "2020/11/20", "2020/12/04", "2020/12/18" );
//Termine fuer die Restabfall in der Schreibweise YYYY/MM/TT //erzeugt durch wnfAbfallkalender (Lazarus) $ratermine = array ( "2019/02/27", "2019/03/13", "2019/03/27", "2019/04/10", "2019/04/24", "2019/05/08", "2019/05/22", "2019/06/05", "2019/06/19", "2019/07/03", "2019/07/17", "2019/07/31", "2019/08/14", "2019/08/28", "2019/09/11", "2019/09/25", "2019/10/09", "2019/10/23", "2019/11/06", "2019/11/21", "2019/12/04", "2019/12/18", "2020/01/02", "2020/01/15", "2020/01/29", "2020/02/12", "2020/02/26", "2020/03/11", "2020/03/25", "2020/04/08", "2020/04/22", "2020/05/06", "2020/05/20", "2020/06/03", "2020/06/17", "2020/07/01", "2020/07/15", "2020/07/29", "2020/08/12", "2020/08/26", "2020/09/09", "2020/09/23", "2020/10/07", "2020/10/21", "2020/11/04", "2020/11/19", "2020/12/02", "2020/12/16", "2020/12/30" );
//Termine fuer die Bio-Tonnen in der Schreibweise YYYY/MM/TT //erzeugt durch wnfAbfallkalender (Lazarus) $bio_kecl_termine = array ( "2019/02/28", "2019/03/14", "2019/03/28", "2019/04/11", "2019/04/25", "2019/05/09", "2019/05/23", "2019/06/06", "2019/06/20", "2019/07/04", "2019/07/18", "2019/08/01", "2019/08/15", "2019/08/29", "2019/09/12", "2019/09/26", "2019/10/10", "2019/10/24", "2019/11/07", "2019/11/21", "2019/12/05", "2019/12/19", "2020/01/02", "2020/01/16", "2020/01/30", "2020/02/13", "2020/02/27", "2020/03/12", "2020/03/26", "2020/04/09", "2020/04/23", "2020/05/07", "2020/05/22", "2020/06/04", "2020/06/18", "2020/07/02", "2020/07/16", "2020/07/30", "2020/08/13", "2020/08/27", "2020/09/10", "2020/09/24", "2020/10/08", "2020/10/22", "2020/11/05", "2020/11/19", "2020/12/03", "2020/12/17", "2020/12/31" );
//Termine fuer die Bio-Tonnen in der Schreibweise YYYY/MM/TT //erzeugt durch wnfAbfallkalender (Lazarus) $bio_veolia_termine = array ( "2019/02/22", "2019/03/08", "2019/03/22", "2019/04/05", "2019/04/20", "2019/05/03", "2019/05/17", "2019/05/31", "2019/06/14", "2019/06/28", "2019/07/12", "2019/07/26", "2019/08/09", "2019/08/23", "2019/09/06", "2019/09/20", "2019/10/04", "2019/10/18", "2019/11/01", "2019/11/15", "2019/11/29", "2019/12/13", "2019/12/27", "2020/01/10", "2020/01/24", "2020/02/07", "2020/02/21", "2020/03/06", "2020/03/20", "2020/04/03", "2020/04/17", "2020/05/02", "2020/05/15", "2020/05/29", "2020/06/12", "2020/06/26", "2020/07/10", "2020/07/24", "2020/08/07", "2020/08/21", "2020/09/04", "2020/09/18", "2020/10/02", "2020/10/16", "2020/10/30", "2020/11/13", "2020/11/27", "2020/12/11", "2020/12/28" );
//echo "
kecl_termine();
echo 'KECL Hotline Tel.: 03763 404-0';
echo '
';
echo 'Veolia Hotline Tel.: 0800 088 70 887';
?>
Tags: php