query("SELECT ueberschrift,date_format(datum, '%d.%m.%Y') datum FROM quelle WHERE lid = '$id' "); $row_daten = $result1_daten->fetch_array(); $info ="$row_daten[ueberschrift] ($row_daten[datum])"; } if($art=='L'){ $systemart="Publikationen"; $result1_daten = $db->query("SELECT thema FROM lue_quelle WHERE eid = '$id' "); $row_daten = $result1_daten->fetch_array(); $info ="$row_daten[thema]"; } if($art=='B'){ $systemart="Luther Bibel 2017"; $info ="Falscher Textverweis in Bibelstelle"; } $result_user = $db->query("SELECT nachname, vorname FROM admin where user=\"$user_admin\""); $row_user = $result_user->fetch_array(); $text = "
Textwort: | $wort |
System: | $systemart |
Thema: | $info |
ID: | $id |
Betroffener: | $row_user[vorname] $row_user[nachname] |
Diese Mail wurde automatisch generiert!
Antworten Sie daher nicht auf diese Mail
Vielen Dank
";
$headers = "MIME-Version: 1.0\n";
#$headers .= "Content-type: text/html; charset=iso-8859-1\n";
$headers .= "Content-type: text/html; charset=utf-8\n";
$headers .= "From: Leitgedanken Online
b: '$b'
c: '$c'
d: '$d'
e: '$e'
f: '$f'
g: '$g'
h: '$h'
i: '$i'
";
*/
// mehrere Textwörter
if($g=='-'){
$db = dbconnect();
$result1_pruef = $db->query("SELECT count(*) Anz
FROM bibel_lut_2017
WHERE anz_buch = '$a'
AND buch = '$b'
AND kapitel ='$c'
AND vers = '$f'
ORDER BY bid ASC
");
$row_pruef1 = $result1_pruef->fetch_array();
$result2_pruef = $db->query("SELECT count(*) Anz
FROM bibel_lut_2017
WHERE anz_buch = '$a'
AND buch = '$b'
AND kapitel ='$c'
AND vers = '$h'
ORDER BY bid ASC
");
$row_pruef2 = $result2_pruef->fetch_array();
if($row_pruef1['Anz'] > 0 AND $row_pruef2 ['Anz'] > 0){
$result1 = $db->query("SELECT bid
FROM bibel_lut_2017
WHERE anz_buch = '$a'
AND buch = '$b'
AND kapitel ='$c'
AND vers = '$f'
ORDER BY bid ASC
");
$row1 = $result1->fetch_array();
$result2 = $db->query("SELECT bid
FROM bibel_lut_2017
WHERE anz_buch = '$a'
AND buch = '$b'
AND kapitel ='$c'
AND vers = '$h'
ORDER BY bid ASC
");
$row2 = $result2->fetch_array();
$query = "SELECT vers, inhalt
FROM bibel_lut_2017
WHERE bid between $row1[bid] AND $row2[bid]
AND vers !=''
ORDER BY bid ASC
";
$result = $db->query( $query)
or die ("Cannot execute query: mehrere Textwörter");
// Schleife über alle Kapitel der Bibel
$ret_wort = "";
while ($row = $result->fetch_array()){
# Text zwischen Überschriften wegfiltern
$tags = 'h3';
$inhalt = strip_only($row['inhalt'], $tags, true); // text
$ret_wort .= " $row[vers] $inhalt";
}
}else{
$ret_wort ="Die Textstelle konnte nicht geladen werden
Evtl liegt ein Schreibfehler vor.
Der Administrator wurde verständigt!";
$wort="$a$b $c$d$e$f$g$h";
mailnachricht($wort, $art,$id);
}
}
// einzelne Textstellen
if($g=='' AND $f!=''){
$db = dbconnect();
$result_pruef = $db->query("SELECT count(*) Anz
FROM bibel_lut_2017
WHERE anz_buch = '$a'
AND buch = '$b'
AND kapitel ='$c'
AND vers = '$f'
ORDER BY bid ASC
");
$row_pruef = $result_pruef->fetch_array();
if($row_pruef['Anz'] > 0){
$result1 = $db->query("SELECT bid
FROM bibel_lut_2017
WHERE anz_buch = '$a'
AND buch = '$b'
AND kapitel ='$c'
AND vers = '$f'
ORDER BY bid ASC
");
$row1 = $result1->fetch_array();
$query = "SELECT vers, inhalt
FROM bibel_lut_2017
WHERE bid = $row1[bid]
AND vers !=''
ORDER BY bid ASC
";
$result = $db->query( $query)
or die ("Cannot execute query");
// Schleife über alle Kapitel der Bibel
$ret_wort = "";
while ($row = $result->fetch_array()){
# Text zwischen Überschriften wegfiltern
$tags = 'h3';
$inhalt = strip_only($row['inhalt'], $tags, true); // text
$ret_wort .= " $row[vers] $inhalt";
}
}else{
$ret_wort ="Die Textstelle konnte nicht geladen werden
Evtl liegt ein Schreibfehler vor.
Der Administrator wurde verständigt!";
$wort="$a$b $c$d$e$f$g$h";
mailnachricht($wort, $art,$id);
}
}
// ganze Kapitel
if($g=='' AND $f==''){
$db = dbconnect();
$query = "SELECT vers, inhalt
FROM bibel_lut_2017
WHERE anz_buch = '$a'
AND buch = '$b'
AND kapitel ='$c'
AND vers != ''
ORDER BY bid ASC
";
$result = $db->query( $query)
or die ("Cannot execute query: Ganze Kapitel");
// Schleife über alle Kapitel der Bibel
$ret_wort = "";
while ($row = $result->fetch_array()){
# Text zwischen Überschriften wegfiltern
$tags = 'h3';
$inhalt = strip_only($row['inhalt'], $tags, true); // text
$ret_wort .= " $row[vers] $inhalt";
}
$max=1000;
$origin=strlen($ret_wort);
$ret_wort = substr($ret_wort.' ' , 0 , $max + 1);
$ret_wort = substr($ret_wort , 0 , strrpos ($ret_wort , ' '));
$ret_wort = strip_tags($ret_wort, '
,,,
,,,