264 lines
10 KiB
PHP
264 lines
10 KiB
PHP
<?php
|
|
include_once '../classes/lg-on_Smarty.class_subdir.php';
|
|
$smarty = new lgon_Smarty();
|
|
require_once("../config.inc.php");
|
|
$templatename = substr(basename($_SERVER['PHP_SELF']),0,-3)."html";
|
|
require_once "../language/german.inc.php";
|
|
|
|
/*
|
|
ALTER TABLE `lieder` ADD `Titel_suche` MEDIUMTEXT NOT NULL AFTER `Titel`;
|
|
update lieder set Titel_suche=Titel;
|
|
|
|
ALTER TABLE `lieder_texte` ADD `Text_suche` MEDIUMTEXT NOT NULL AFTER `Text`;
|
|
update lieder_texte set Text_suche=Text;
|
|
|
|
ALTER TABLE `chorbuch` ADD `Titel_suche` MEDIUMTEXT NOT NULL AFTER `Titel`;
|
|
update chorbuch set Titel_suche=Titel;
|
|
|
|
ALTER TABLE `chorbuch_texte` ADD `Text_suche` MEDIUMTEXT NOT NULL AFTER `Text`;
|
|
update chorbuch_texte set Text_suche=Text;
|
|
|
|
|
|
update lieder set titel_suche=replace(titel_suche,''', '');
|
|
update lieder_texte set Text_suche=replace(Text_suche,''', '');
|
|
update chorbuch set titel_suche=replace(titel_suche,''', '');
|
|
update chorbuch_texte set Text_suche=replace(Text_suche,''', '');
|
|
|
|
update lieder set titel_suche=replace(titel_suche,'“', '');
|
|
update lieder_texte set Text_suche=replace(Text_suche,'“', '');
|
|
update chorbuch set titel_suche=replace(titel_suche,'“', '');
|
|
update chorbuch_texte set Text_suche=replace(Text_suche,'“', '');
|
|
|
|
update lieder set titel_suche=replace(titel_suche,'„', '');
|
|
update lieder_texte set Text_suche=replace(Text_suche,'„', '');
|
|
update chorbuch set titel_suche=replace(titel_suche,'„', '');
|
|
update chorbuch_texte set Text_suche=replace(Text_suche,'„', '');
|
|
|
|
update lieder set titel_suche=replace(titel_suche,'’', '');
|
|
update lieder_texte set Text_suche=replace(Text_suche,'’', '');
|
|
update chorbuch set titel_suche=replace(titel_suche,'’', '');
|
|
update chorbuch_texte set Text_suche=replace(Text_suche,'’', '');
|
|
|
|
update lieder set titel_suche=replace(titel_suche,"'", '');
|
|
update lieder_texte set Text_suche=replace(Text_suche,"'", '');
|
|
update chorbuch set titel_suche=replace(titel_suche,"'", '');
|
|
update chorbuch_texte set Text_suche=replace(Text_suche,"'", '');
|
|
|
|
update lieder set titel_suche=replace(titel_suche,':', '');
|
|
update lieder_texte set Text_suche=replace(Text_suche,':', '');
|
|
update chorbuch set titel_suche=replace(titel_suche,':', '');
|
|
update chorbuch_texte set Text_suche=replace(Text_suche,':', '');
|
|
|
|
update lieder set titel_suche=replace(titel_suche,'|', '');
|
|
update lieder_texte set Text_suche=replace(Text_suche,'|', '');
|
|
update chorbuch set titel_suche=replace(titel_suche,'|', '');
|
|
update chorbuch_texte set Text_suche=replace(Text_suche,'|', '');
|
|
|
|
update lieder set titel_suche=replace(titel_suche,';', '');
|
|
update lieder_texte set Text_suche=replace(Text_suche,';', '');
|
|
update chorbuch set titel_suche=replace(titel_suche,';', '');
|
|
update chorbuch_texte set Text_suche=replace(Text_suche,';', '');
|
|
|
|
update lieder set titel_suche=replace(titel_suche,'?', '');
|
|
update lieder_texte set Text_suche=replace(Text_suche,'?', '');
|
|
update chorbuch set titel_suche=replace(titel_suche,'?', '');
|
|
update chorbuch_texte set Text_suche=replace(Text_suche,'?', '');
|
|
|
|
update lieder set titel_suche=replace(titel_suche,'!', '');
|
|
update lieder_texte set Text_suche=replace(Text_suche,'!', '');
|
|
update chorbuch set titel_suche=replace(titel_suche,'!', '');
|
|
update chorbuch_texte set Text_suche=replace(Text_suche,'!', '');
|
|
|
|
update lieder set titel_suche=replace(titel_suche,'.', '');
|
|
update lieder_texte set Text_suche=replace(Text_suche,'.', '');
|
|
update chorbuch set titel_suche=replace(titel_suche,'.', '');
|
|
update chorbuch_texte set Text_suche=replace(Text_suche,'.', '');
|
|
|
|
update lieder set titel_suche=replace(titel_suche,',', '');
|
|
update lieder_texte set Text_suche=replace(Text_suche,',', '');
|
|
update chorbuch set titel_suche=replace(titel_suche,',', '');
|
|
update chorbuch_texte set Text_suche=replace(Text_suche,',', '');
|
|
|
|
update lieder set titel_suche=replace(titel_suche,'<br>', '');
|
|
update lieder_texte set Text_suche=replace(Text_suche,'<br>', '');
|
|
update chorbuch set titel_suche=replace(titel_suche,'<br>', '');
|
|
update chorbuch_texte set Text_suche=replace(Text_suche,'<br>', '');
|
|
|
|
update lieder set titel_suche=replace(titel_suche,'"', '');
|
|
update lieder_texte set Text_suche=replace(Text_suche,'"', '');
|
|
update chorbuch set titel_suche=replace(titel_suche,'"', '');
|
|
update chorbuch_texte set Text_suche=replace(Text_suche,'"', '');
|
|
|
|
|
|
update lieder set titel_suche=replace(titel_suche,'1 ', '');
|
|
update lieder_texte set Text_suche=replace(Text_suche,'1 ', '');
|
|
update chorbuch set titel_suche=replace(titel_suche,'1 ', '');
|
|
update chorbuch_texte set Text_suche=replace(Text_suche,'1 ', '');
|
|
|
|
update lieder set titel_suche=replace(titel_suche,'2 ', '');
|
|
update lieder_texte set Text_suche=replace(Text_suche,'2 ', '');
|
|
update chorbuch set titel_suche=replace(titel_suche,'2 ', '');
|
|
update chorbuch_texte set Text_suche=replace(Text_suche,'2 ', '');
|
|
|
|
update lieder set titel_suche=replace(titel_suche,'3 ', '');
|
|
update lieder_texte set Text_suche=replace(Text_suche,'3 ', '');
|
|
update chorbuch set titel_suche=replace(titel_suche,'3 ', '');
|
|
update chorbuch_texte set Text_suche=replace(Text_suche,'3 ', '');
|
|
|
|
update lieder set titel_suche=replace(titel_suche,'4 ', '');
|
|
update lieder_texte set Text_suche=replace(Text_suche,'4 ', '');
|
|
update chorbuch set titel_suche=replace(titel_suche,'4 ', '');
|
|
update chorbuch_texte set Text_suche=replace(Text_suche,'4 ', '');
|
|
|
|
update lieder set titel_suche=replace(titel_suche,'5 ', '');
|
|
update lieder_texte set Text_suche=replace(Text_suche,'5 ', '');
|
|
update chorbuch set titel_suche=replace(titel_suche,'5 ', '');
|
|
update chorbuch_texte set Text_suche=replace(Text_suche,'5 ', '');
|
|
|
|
update lieder set titel_suche=replace(titel_suche,'6 ', '');
|
|
update lieder_texte set Text_suche=replace(Text_suche,'6 ', '');
|
|
update chorbuch set titel_suche=replace(titel_suche,'6 ', '');
|
|
update chorbuch_texte set Text_suche=replace(Text_suche,'6 ', '');
|
|
|
|
update lieder set titel_suche=replace(titel_suche,'7 ', '');
|
|
update lieder_texte set Text_suche=replace(Text_suche,'7 ', '');
|
|
update chorbuch set titel_suche=replace(titel_suche,'7 ', '');
|
|
update chorbuch_texte set Text_suche=replace(Text_suche,'7 ', '');
|
|
|
|
update lieder set titel_suche=replace(titel_suche,'8 ', '');
|
|
update lieder_texte set Text_suche=replace(Text_suche,'8 ', '');
|
|
update chorbuch set titel_suche=replace(titel_suche,'8 ', '');
|
|
update chorbuch_texte set Text_suche=replace(Text_suche,'8 ', '');
|
|
|
|
update lieder set titel_suche=replace(titel_suche,'9 ', '');
|
|
update lieder_texte set Text_suche=replace(Text_suche,'9 ', '');
|
|
update chorbuch set titel_suche=replace(titel_suche,'9 ', '');
|
|
update chorbuch_texte set Text_suche=replace(Text_suche,'9 ', '');
|
|
|
|
|
|
update lieder set titel_suche=replace(titel_suche,'<em>', '');
|
|
update lieder_texte set Text_suche=replace(Text_suche,'<em>', '');
|
|
update chorbuch set titel_suche=replace(titel_suche,'<em>', '');
|
|
update chorbuch_texte set Text_suche=replace(Text_suche,'<em>', '');
|
|
|
|
update lieder set titel_suche=replace(titel_suche,'</em>', '');
|
|
update lieder_texte set Text_suche=replace(Text_suche,'</em>', '');
|
|
update chorbuch set titel_suche=replace(titel_suche,'</em>', '');
|
|
update chorbuch_texte set Text_suche=replace(Text_suche,'</em>', '');
|
|
|
|
|
|
update lieder set titel_suche=replace(titel_suche,'*', '');
|
|
update lieder_texte set Text_suche=replace(Text_suche,'*', '');
|
|
update chorbuch set titel_suche=replace(titel_suche,'*', '');
|
|
update chorbuch_texte set Text_suche=replace(Text_suche,'*', '');
|
|
|
|
update lieder set titel_suche=replace(titel_suche,' ', ' ');
|
|
update lieder_texte set Text_suche=replace(Text_suche,' ', ' ');
|
|
update chorbuch set titel_suche=replace(titel_suche,' ', ' ');
|
|
update chorbuch_texte set Text_suche=replace(Text_suche,' ', ' ');
|
|
|
|
update lieder set titel_suche=trim(titel_suche);
|
|
update lieder_texte set Text_suche=trim(Text_suche);
|
|
update chorbuch set titel_suche=trim(titel_suche);
|
|
update chorbuch_texte set Text_suche=trim(Text_suche);
|
|
|
|
entfernen von unten nach oben:
|
|
1.-9. Punkte wurden vorher schon entfernt
|
|
# "
|
|
# ,
|
|
# .
|
|
# !
|
|
# ?
|
|
# ;
|
|
# |
|
|
# :
|
|
# '
|
|
# ’
|
|
# „
|
|
# “
|
|
# '
|
|
*/
|
|
|
|
|
|
$db = dbconnect();
|
|
$query = "SELECT lkid, kategorie
|
|
FROM lieder_kategorie
|
|
ORDER BY lkid ASC
|
|
";
|
|
|
|
$zaehler = 0;
|
|
$outer_loop = array();
|
|
|
|
$result = $db->query($query) or die("Cannot execute query");
|
|
;
|
|
while ($row = $result->fetch_array()) {
|
|
#$value2 = '';
|
|
$zaehler = $zaehler + 1;
|
|
$query1 = "SELECT lukid, lkid, unterkategorie
|
|
FROM lieder_unterkategorie
|
|
WHERE lkid = '$row[lkid].%'
|
|
ORDER BY lukid ASC
|
|
";
|
|
|
|
$result1 = $db->query($query1) or die("Cannot execute query1");
|
|
|
|
while ($row2 = $result1->fetch_array()) {
|
|
$value2[] = $row2;
|
|
}
|
|
|
|
$row['zaehler'] = $zaehler;
|
|
$row['inner'] = $value2;
|
|
$value[] = $row;
|
|
|
|
}
|
|
#echo "<pre>";
|
|
#print_r($value);
|
|
#echo "</pre>";
|
|
#exit;
|
|
$smarty->assign('outer_loop', $value);
|
|
|
|
$result_liedopt = $db->query( "SELECT lied_search, lied_bestand, lied_favorit, lied_status
|
|
FROM profil
|
|
WHERE user='$user_admin'");
|
|
$row_liedopt = $result_liedopt->fetch_array();
|
|
|
|
if($row_liedopt['lied_search'] == 'regexp'){
|
|
$lied_search = "Ganze Wörter";
|
|
}elseif($row_liedopt['lied_search'] == 'like'){
|
|
$lied_search = "Wortbestandteile";
|
|
}
|
|
|
|
if($row_liedopt['lied_bestand'] == 'ALL'){
|
|
$lied_bestand = "Gesamtbestand";
|
|
}elseif($row_liedopt['lied_bestand'] == 'CB'){
|
|
$lied_bestand = "Chorbuch";
|
|
}elseif($row_liedopt['lied_bestand'] == 'GB'){
|
|
$lied_bestand = "Gesangbuch";
|
|
}
|
|
|
|
if($row_liedopt['lied_favorit'] == '1'){
|
|
$lied_favorit = "Ja";
|
|
}elseif($row_liedopt['lied_favorit'] == '0'){
|
|
$lied_favorit = "Nein";
|
|
}
|
|
|
|
if($row_liedopt['lied_status'] == 'A'){
|
|
$lied_status = "Aufführbare Lieder";
|
|
}elseif($row_liedopt['lied_status'] == 'P'){
|
|
$lied_status = "Übphase";
|
|
}elseif($row_liedopt['lied_status'] == 'U'){
|
|
$lied_status = "Unbekannte Lieder";
|
|
}elseif($row_liedopt['lied_status'] == 'K'){
|
|
$lied_status = "Keine Statusbeschränkung";
|
|
}
|
|
|
|
|
|
|
|
$smarty->assign('opt_lied_search', $lied_search);
|
|
$smarty->assign('opt_lied_bestand', $lied_bestand);
|
|
$smarty->assign('opt_lied_favorit', $lied_favorit);
|
|
$smarty->assign('opt_lied_status', $lied_status);
|
|
|
|
$smarty->display("../templates/$template/lieder/$templatename");
|
|
?>
|