header('Location: http://www.jura.uni-saarland.de/RSS.63.100.html'); exit; include("output/config.output.php"); include("output/db_mysql.inc.php"); include("output/bbcodes.inc.php"); if (isset($year) == 0) { $yearflag = true; $year = date('Y'); } // Sicherheitsupdate zum Abfangen von Code-Injections if (empty($id) == false) $id = intval($id); if (empty($link) == false) $link = intval($link); if (empty($year) == false) $year = intval($year); $db = new $DbModule; $db->Host="$dbhost"; $db->Database="$dbname"; $db->User="$dbuser"; $db->Password="$dbpswd"; if (isset($id) == 0) exit; else { // Holen der Infos für die Seite $db->query("SELECT * FROM $dbtable WHERE dbid = '$id' AND news_table <> ''"); if ($db->nf() == 1) { $db->next_record(); $file = "output/".$db->f('news_file'); $htmlcode = loadfile($file); // $dbtable = $db->f('news_table'); $dbtable = "news"; $randspalte = $db->f('randspalte'); $pic_actual = $db->f('pic_actual'); $charset = ""; // Query erstellen $mon = date('m'); $day = date('d'); if (isset($news) == 0) { // Damit auch der Monat mit den letzten News erscheint, wenn die Schlufis ihre DB mal wieder nicht gepflegt haben... $monatskorrektur = -1; $jahreskorrektur = 0; $query = "SELECT * FROM $dbtable WHERE datum >= '$year-$mon-01' AND datum <= '$year-$mon-$day' AND language = '".addslashes($id)."' AND freigabe = '1' ORDER BY dbid DESC"; $db->query($query); while (($db->nf() == 0) AND ($monatskorrektur < 12) AND $yearflag == true ) { $monatskorrektur++; $mon--; if ($mon == 0) { $mon = 12; $year--; } $query = "SELECT * FROM $dbtable WHERE datum >= '$year-$mon-01' AND datum <= '$year-$mon-31' AND language = '".addslashes($id)."' AND freigabe = '1' ORDER BY datum DESC, dbid DESC"; $db->query($query); //echo "\n"; } } else $db->query("SELECT * FROM $dbtable WHERE dbid = '$news' AND freigabe = '1' LIMIT 1"); $num = $db->nf(); if ($num != 0) { for ($i = 0; $i < $num; $i++) { $db->next_record(); $titel = stripslashes($db->f('titel')); if ($db->f('dbid') > 2340) { $text = stripslashes(nl2br($db->f('htmlcode'))); $text = bbcodes($text); } else { $text = stripslashes($db->f('htmlcode')); } $iddatum = makegerdate($db->f('datum')); if ($db->f('link') <> "") $tlink = "name=\"anker".$db->f('dbid')."\" href=\"".$db->f('link')."\""; else $tlink = "name=\"anker".$db->f('dbid')."\""; $output .= "
\n$titel\n
\n\n".$text."
[$iddatum]
\n