Host="$dbhost"; $db->Database="$dbname"; $db->User="$dbuser"; $db->Password="$dbpswd"; if (isset($id) == 0) exit; else { $db->query("SELECT * FROM $dbtable WHERE dbid = '".addslashes($id)."'"); if ($db->nf() == 1) { $db->next_record(); // Template laden $file = "output/".$db->f('link_file'); $htmlcode = loadfile($file); // Name der Randspalten Datei $randspalte = $db->f('randspalte'); $pic_actual = $db->f('pic_actual'); // Zeichensatz $charset = ""; // Language-ID für die Datenbankabfrage $id = $db->f('dbid'); // Datenbankabfrage if (isset($link) == 0) { $db->query("SELECT * FROM ".$table['links']." WHERE language = '$id' AND freigabe = '1' AND enddate >= '$year-01-01' AND enddate <= '$year-12-31' ORDER BY enddate DESC LIMIT 1"); if ($db->nf() == 0) { $year--; $db->query("SELECT * FROM ".$table['links']." WHERE language = '$id' AND freigabe = '1' AND enddate >= '$year-01-01' AND enddate <= '$year-12-31' ORDER BY enddate DESC LIMIT 1"); } } else $db->query("SELECT * FROM ".$table['links']." WHERE dbid = '".addslashes($link)."' AND freigabe = '1' ORDER BY enddate DESC LIMIT 1"); if ($db->nf() == 1) { $db->next_record(); // Datum $startdatum = makegerdate($db->f('startdate')); $enddatum = makegerdate($db->f('enddate')); $date = "$startdatum - $enddatum"; // Text $dbid = $db->f('dbid'); $titel = stripslashes($db->f('titel')); if ($db->f('dbid') > 485) { $text = stripslashes(nl2br($db->f('htmlcode'))); $text = bbcodes($text); } else { $text = stripslashes($db->f('htmlcode')); } $output .= "\n\t\t\n\t\t\n\t\n\t\n\t\n
\n\t\t\t
\n\t\t\t\t\n\t\t\t
\n\t\t
\t\t\t\n\t\t\t$titel\n\t\t\t
$text\n\t\t\t\n\t\t
\n

\n"; // Archiv if (isset($link) == 0) { $db->query("SELECT dbid, titel, startdate, enddate FROM ".$table['links']." WHERE language = '$id' AND freigabe = '1' AND (enddate >= '$year-01-01' AND enddate <= '$year-12-31') AND dbid <> '$dbid' ORDER BY enddate DESC"); $num = $db->nf(); if ($num != 0) { for($i=0;$i<$num;$i++) { $db->next_record(); $outlist .= "

\n

  • \nf('dbid')."&id=$id\">".$db->f('titel')."\n
     \n
  • \n\n"; } } else $htmlcode = preg_replace("/<\!-- Link -->.*?<\!-- \/Link -->/siU", "", $htmlcode); // Link auf vergangenes Jahr $lastyear = $year - 1; $db->query("SELECT dbid FROM ".$table['links']." WHERE enddate >= '$lastyear-01-01' AND enddate <= '$lastyear-12-31' AND freigabe = '1'"); //echo "

    SELECT dbid FROM $dbtable WHERE startdate >= '$lastyear-01-01' AND enddate <= '$lastyear-12-31'

    "; $num = $db->nf(); if ($num != 0) { $htmlcode = ereg_replace("", "$lastyear", $htmlcode); $htmlcode = preg_replace("/.*?/siU", "", $htmlcode); } else { $htmlcode = preg_replace("/.*?/siU", "", $htmlcode); } } else { $htmlcode = preg_replace("/.*?/siU", "", $htmlcode); $htmlcode = preg_replace("/.*?/siU", "", $htmlcode); } } } } if (isset($link) != 0) $htmlcode = preg_replace("/<\!-- Link -->.*?<\!-- \/Link -->/siU", "", $htmlcode); $htmlcode = eregi_replace("", $charset, $htmlcode); $htmlcode = ereg_replace("", $date, $htmlcode); $htmlcode = ereg_replace("", $output, $htmlcode); $htmlcode = ereg_replace("", $outlist, $htmlcode); if ($randspalte != '') { $randspalte = loadfile("/w3ns/juripro/layout/$randspalte"); $htmlcode = eregi_replace("", $randspalte, $htmlcode); } // Zu guter letzt mein liebster SSI-Parser in der Version 1.1 preg_match_all("//i", $htmlcode, $matches); for ($i=0;$i 1) $ssioutput = implode("\"", $dummy); // Ersetzen $htmlcode = str_replace($matches[0][$i], $ssioutput, $htmlcode); } echo $htmlcode; ?>