"; session_start(); #error_reporting(E_ALL); #ini_set('display_errors', 1); require_once("config/ftpanbindung.php"); // fügt die FTP-anbindung ein include_once 'classes/lg-on_Smarty.class.php'; $smarty = new lgon_Smarty(); #$smarty->caching = true; require_once("config.inc.php"); require_once("func_rollenrechte.php"); $templatename = substr(basename($_SERVER['PHP_SELF']),0,-3)."html"; require_once "language/german.inc.php"; require_once("func_highlight.php"); require_once("func_ansicht.php"); $lid = $_GET['lid']; $sid = session_id(); $datum=date("Y-m-d H:i:s"); $result = $db->query( "INSERT INTO historie (vaid, datum, session_id, art, art_id) VALUES ('$user_vaid;', '$datum', '$sid', 'L', '$lid')" ); $suchart = @$_GET['suchart']; $fadeout = @$_GET['fadeout']; if(isset($_GET['inhalt_hig'])){ $inhalt_hig = stripslashes($_GET['inhalt_hig']); $inhalt_hig = unserialize("$inhalt_hig"); } $verweis = @stripslashes($_GET['verweis']); $verweis = @unserialize($verweis); if ($user_admin == ""){ require("index.php"); exit;} //Wenn man nicht angemeldet ist, darf man nicht auf die Seite $db = dbconnect(); $result = $db->query( "SELECT lid, txt_anz_buch, txt_buch, txt_kapitel, txt_vers, Ueberschrift, thema, unterthema, textstelle, replace(replace(replace(textstelle, ' aus ', ''), 'vgl',''), ' ','') textstelle2, vorwort, botschaft, textwort, inhalt, zusammenfassung, kontext, DATE_Format(datum, '%d.%m.%Y') as datum, kid, ukid, DATE_Format(datum, '%d') tag, DATE_Format(datum, '%m') monat, DATE_Format(datum, '%Y') jahr, ukid, DATE_Format(datum, '%Y-%m-%d')AS datum_berechnung, stapgd FROM quelle WHERE lid='$lid'"); $row = $result->fetch_array(); ##### ÄNDERUNG NEUE LUTHERBIBEL ######## if($row['jahr'] < 2019){ # Lutherbibel 1984 require_once("bibellookup_1984.php"); $bibelversion = "1984"; }else{ # Lutherbibel 2017 require_once("bibellookup_2017.php"); $bibelversion = "2017"; } $result_link_bibel = $db->query( "SELECT bibellink FROM profil WHERE user='$user_admin'"); $row_link_bibel = $result_link_bibel->fetch_array(); $result_count = $db->query( "SELECT count(*) Anz FROM quelle_cache WHERE link = '$row_link_bibel[bibellink]' AND lid='$lid'"); $row_cache_count = $result_count->fetch_array(); $ueberschrift = html_entity_decode($row['Ueberschrift']); # typografische Anführungszeichen im UTF8 Format Korrekt darstellen $ueberschrift = preg_replace("/\x{0084}/u","„",$ueberschrift); $ueberschrift = preg_replace("/\x{0093}/u","“",$ueberschrift); $wochentag = date("l", mktime(0,0,0,$row['monat'],$row['tag'],$row['jahr'])); $result_gd = $db->query( "SELECT wgd FROM profil WHERE user = '$user_admin'"); $row_gd = $result_gd->fetch_array(); if($wochentag == 'Wednesday' AND $row_gd['wgd'] != '0' AND ($row['ukid'] == '1')){ // Hintergrund kommt aus der wort_wahl.php. Es gibt einige Gottesdienste, die auf einen Mittwoch fallen (1. vom Monat) aber kein Tag addiert werden darf, daher: Wann muss ein Tag (faktor) addiert werden, generell, wenn Wochengottesdienst, wenn Faktor im Profil != 0 und wenn unterkategorie 1 (GD normal) ist. Bei allen anderen Gottesdiensten bleibt der Mittwoch erhalten. (Buß und Bettag ist Mittwoch, Erntedank bleibt auch am 1. des Monats) $datum_wt = date("d.m.Y", mktime(0,0,0,$row['monat'],$row['tag']+$row_gd['wgd'],$row['jahr'])); $wochentag = date("l", mktime(0,0,0,$row['monat'],$row['tag']+$row_gd['wgd'],$row['jahr'])); }else{ $wochentag = date("l", mktime(0,0,0,$row['monat'],$row['tag'],$row['jahr'])); $datum_wt = date("d.m.Y", mktime(0,0,0,$row['monat'],$row['tag'],$row['jahr'])); } switch($wochentag) { case 'Sunday': $wochentag_wt = "So."; break; case 'Monday': $wochentag_wt = "Mo."; break; case 'Tuesday': $wochentag_wt = "Di."; break; case 'Wednesday': $wochentag_wt = "Mi."; break; case 'Thursday': $wochentag_wt = "Do."; break; case 'Friday': $wochentag_wt = "Fr."; break; case 'Saturday': $wochentag_wt = "Sa."; break; } $result1 = $db->query( "SELECT bezeichnung FROM kategorie WHERE kid='$row[kid]'"); $row1 = $result1->fetch_array(); $cat_text = $row1['bezeichnung']; $result2 = $db->query( "SELECT bezeichnung FROM unterkategorie WHERE ukid='$row[ukid]'"); $row2 = $result2->fetch_array(); $result3 = $db->query( "SELECT bezeichnung FROM thema WHERE tid='$row[thema]'"); $row3 = $result3->fetch_array(); $thema_head = $row3['bezeichnung']; $result4 = $db->query( "SELECT bezeichnung FROM unterthema WHERE tid='$row[thema]' AND utid='$row[unterthema]'"); $row4 = $result4->fetch_array(); $textwort = strip_tags($row['textwort']); if($row_cache_count['Anz'] == 0){ $vorwort = strip_tags($row['vorwort'], '
,,,