3. Tagung der 11. Synode der EKD

Hannover, 07. bis 10. November 2010

Aktuelles von der Synode

<? $param = (isset($_GET["id"])) ? "?id=".$_GET["id"] : ""; if($param=="") $param = (isset($_GET["t"])) ? "?t=".intval($_GET["t"]) : ""; if($param=="") $param = (isset($_GET["m"])) ? "?m=".intval($_GET["m"]) : ""; include "http://code.ekd.de/blog_s10h.php".$param; ?>


erweiterte Suche

 

<? // DB-Config $DB_SERVER = "localhost"; $DB_USER = "ekddb"; $DB_PASS = "81SnoopY"; $DB_NAME = "ekddb"; $BLOG = 1; $LIMIT = 20; $TAGE = array("Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Sonnabend"); $MONATE = array("Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"); // Verbindung herstellen $dbh = mysql_connect($DB_SERVER, $DB_USER, $DB_PASS); mysql_select_db($DB_NAME); ?> <style type="text/css"> ul.bloglist { padding-left:1.2em; list-style:square; color:#777; } div#marginal ul.bloglist li { font-size:0.9em; } div#marginal ul.bloglist li a { display:inline; font-size:0.95em; } div#marginal table.blogkalender tr td { padding:0em; text-align:right; padding:0.1em; font-size:0.85em; color:#777; } div#marginal table.blogkalender tr td.blogmonat { text-align:center; } div#marginal table.blogkalender tr td.tname { color:#000; font-weight:bold; } div#marginal table.blogkalender tr td a { font-weight:bold; font-size:1em; } div#marginal table.blogkalender { margin-bottom:1.5em; } </style> <h2 class="context">Kalender</h2> <? // Datum setzen $datum = (isset($_GET["d"]) and intval(trim($_GET["d"]))>0) ? trim(intval($_GET["d"])) : time(); if(isset($_GET["t"]) and intval(trim($_GET["t"]))>0) $datum = trim(intval($_GET["t"])); ?> <table class="blogkalender"> <tr> <td><a href="?d=<? echo mktime(0,0,0,(date("m", $datum)-1),1,date("Y", $datum)); ?>">&lt;&lt;</a></td> <td class="blogmonat" colspan="5"><a href="?m=<? echo $datum; ?>"><? echo $MONATE[(date("m", $datum)-1)]." ".date("Y", $datum); ?></a></td> <td><a href="?d=<? echo mktime(0,0,0,(date("m", $datum)+1),1,date("Y", $datum)); ?>">&gt;&gt;</a></td> </tr> <tr> <td class="tname">Mo</td><td class="tname">Di</td><td class="tname">Mi</td><td class="tname">Do</td><td class="tname">Fr</td><td class="tname">Sa</td><td class="tname">So</td> </tr> <tr> <? $leer = date("w", mktime(0,0,0,date("m", $datum),1,date("Y", $datum)))-1; if($leer<0) $leer = 6; echo str_repeat("<td>&nbsp;</td>", $leer); $t = 1; while($t<=date("t", mktime(0,0,0,date("m", $datum),1,date("Y", $datum)))) { // Eintrag für diesen Tag? $check = mysql_query("select entry_id from ekd_blog_entry where blog_id = ".$BLOG." and from_unixtime(erstellt, '%Y-%m-%d') = '".date("Y-m-d", mktime(0,0,0,date("m", $datum), $t, date("Y", $datum)))."'", $dbh); if(mysql_affected_rows($dbh)>0) { echo "<td><a href=\"?t=".mktime(0,0,0,date("m", $datum), $t, date("Y", $datum))."\">".$t."</td>"; } else { echo "<td>".$t."</td>"; } if(date("w", mktime(0,0,0,date("m", $datum),$t,date("Y", $datum)))==0) { echo "</tr>\n"; if(date("t", mktime(0,0,0,date("m", $datum),$t,date("Y", $datum)))>=($t+1)) echo "<tr>\n"; } $t++; } ?> </table> <h2 class="context">Neueste Einträge</h2> <ul class="bloglist"> <? // Neueste auflisten $query = mysql_query("select u.name, e.* from ekd_blog_user u, ekd_blog_entry e where e.user_id = u.user_id and e.blog_id = ".$BLOG." order by e.erstellt desc limit 0,5", $dbh); while($row = mysql_fetch_array($query, MYSQL_ASSOC)) { echo "<li><a href=\"?id=".$row["entry_id"]."\">".stripslashes($row["ueberschrift"])."</a></li>"; } ?> </ul>