update config
This commit is contained in:
49
suche.php
49
suche.php
@ -22,6 +22,22 @@
|
||||
|
||||
require('config.inc.php');
|
||||
|
||||
if (!isset($_REQUEST["search_what"])) $_REQUEST["search_what"]="";
|
||||
if (!isset($search_word)) $search_word="";
|
||||
if (!isset($search_word_org)) $search_word_org="";
|
||||
if (!isset($_REQUEST["search_org"])) $_REQUEST["search_org"]="";
|
||||
if (!isset($_REQUEST["search_ric"])) $_REQUEST["search_ric"]="";
|
||||
if (!isset($_REQUEST["search_max_results"])) $_REQUEST["search_max_results"]="";
|
||||
if (!isset($_REQUEST["search_time"])) $_REQUEST["search_time"]="";
|
||||
if (!isset($_REQUEST["search_time_from"])) $_REQUEST["search_time_from"]="";
|
||||
if (!isset($_REQUEST["search_time_to"])) $_REQUEST["search_time_to"]="";
|
||||
if (!isset($_REQUEST["Submit"])) $_REQUEST["Submit"]="";
|
||||
if (!isset($_REQUEST["select_tag_from"])) $_REQUEST["select_tag_from"]="";
|
||||
if (!isset($_REQUEST["select_monat_from"])) $_REQUEST["select_monat_from"]="";
|
||||
if (!isset($_REQUEST["select_tag_to"])) $_REQUEST["select_tag_to"]="";
|
||||
if (!isset($_REQUEST["select_monat_to"])) $_REQUEST["select_monat_to"]="";
|
||||
if (!isset($show)) $show="";
|
||||
|
||||
/**************************/
|
||||
// Seite zusammenstellen
|
||||
//
|
||||
@ -44,8 +60,8 @@ require('config.inc.php');
|
||||
$select_search_ric = '
|
||||
<select name="search_ric" id="search_ric">';
|
||||
|
||||
$result = mysql_query("SELECT id, org_name, org FROM organisation WHERE org != '' ORDER BY org ASC, org_name ASC") or die (mysql_error());
|
||||
while($row = mysql_fetch_array($result))
|
||||
$result = mysqli_query($dbconn, "SELECT id, org_name, org FROM organisation WHERE org != '' ORDER BY org ASC, org_name ASC") or die (mysqli_error($dbconn));
|
||||
while($row = mysqli_fetch_array($result))
|
||||
{
|
||||
$select_search_ric .= '
|
||||
<option value="'.$row["id"].'"'; if($_REQUEST["search_ric"]==$row["id"]) {$select_search_ric.=' selected';}else{$select_search_ric.='';} $select_search_ric.='>'.$row["org"].' '.$row["org_name"].'</option>
|
||||
@ -118,20 +134,20 @@ require('config.inc.php');
|
||||
{
|
||||
if( $_REQUEST["search_word"] )
|
||||
{
|
||||
$show_filter = 'WHERE a.text LIKE "%'.$_REQUEST[search_word].'%"';
|
||||
$show_filter = 'WHERE a.text LIKE "%'.$_REQUEST["search_word"].'%"';
|
||||
|
||||
if( $_REQUEST["search_word_org"] )
|
||||
{
|
||||
$show_filter .= 'AND d.org_name LIKE "%'.$_REQUEST[search_word_org].'%"';
|
||||
$show_filter .= 'AND d.org_name LIKE "%'.$_REQUEST["search_word_org"].'%"';
|
||||
}
|
||||
}
|
||||
else{
|
||||
$show_filter = 'WHERE d.org_name LIKE "%'.$_REQUEST[search_word_org].'%"';
|
||||
$show_filter = 'WHERE d.org_name LIKE "%'.$_REQUEST["search_word_org"].'%"';
|
||||
}
|
||||
|
||||
}
|
||||
else{
|
||||
$show_filter = 'WHERE d.id = "'.$_REQUEST[search_ric].'"';
|
||||
$show_filter = 'WHERE d.id = "'.$_REQUEST["search_ric"].'"';
|
||||
}
|
||||
|
||||
if( $_REQUEST["search_org"] != '0' )
|
||||
@ -153,7 +169,7 @@ require('config.inc.php');
|
||||
// Auslesen pocsag
|
||||
if( $_REQUEST["search_what"] == 'ric' && $_REQUEST["search_ric"] != '' || $_REQUEST["search_what"] == 'word' && $_REQUEST["search_word"] != '' || $_REQUEST["search_what"] == 'word' && $_REQUEST["search_word_org"] != '' )
|
||||
{
|
||||
$result = mysql_query("SELECT a.adresse AS adresse_neu, a.bezeichnung AS bezeichnung_neu, a.rec_typ, a.text, DATE_FORMAT(a.zeit, '%Y%m%d%H%i%s') AS zeit, a.funktion,
|
||||
$result = mysqli_query($dbconn, "SELECT a.adresse AS adresse_neu, a.bezeichnung AS bezeichnung_neu, a.rec_typ, a.text, DATE_FORMAT(a.zeit, '%Y%m%d%H%i%s') AS zeit, a.funktion,
|
||||
b.adresse, b.formatierung_id, b.bezeichnung,
|
||||
c.id, c.bg_farbe, c.text_farbe, c.text_format, c.text_groesse, c.text_groesse_text,
|
||||
d.org_name, d.org
|
||||
@ -162,12 +178,13 @@ if( $_REQUEST["search_what"] == 'ric' && $_REQUEST["search_ric"] != '' || $_REQU
|
||||
LEFT JOIN formatierung c ON c.id = b.formatierung_id
|
||||
LEFT JOIN organisation d ON d.id = b.org_id
|
||||
$show_filter
|
||||
ORDER BY a.zeit DESC LIMIT 0,$_REQUEST[search_max_results]") or die (mysql_error());
|
||||
while($row = mysql_fetch_array($result))
|
||||
ORDER BY a.zeit DESC LIMIT 0,$_REQUEST[search_max_results]") or die (mysqli_error($dbconn));
|
||||
while($row = mysqli_fetch_array($result))
|
||||
{
|
||||
$bezeichnung = $row["bezeichnung"];
|
||||
|
||||
// Tageswechsel ausgeben
|
||||
if (!isset($lastday)) $lastday="";
|
||||
if( get_day($row["zeit"]) != $lastday )
|
||||
{
|
||||
$nextday = '
|
||||
@ -186,12 +203,12 @@ if( $_REQUEST["search_what"] == 'ric' && $_REQUEST["search_ric"] != '' || $_REQU
|
||||
if( !$bezeichnung && !$row["org_name"] ) $bezeichnung = 'Unbekannt';
|
||||
|
||||
// default Farben bestimmen
|
||||
if( !$row["bg_farbe"] ) $row["bg_farbe"] = 'white';
|
||||
if( !$row["text_farbe"] ) $row["text_farbe"] = 'black';
|
||||
if( !$row["text_farbe_text"] ) $row["text_farbe_text"] = 'black';
|
||||
if( !$row["bg_farbe_text"] ) $row["bg_farbe_text"] = '#CCCCCC';
|
||||
if( !$row["text_groesse"] ) $row["text_groesse"] = '13';
|
||||
if( !$row["text_groesse_text"] )$row["text_groesse_text"] = '12';
|
||||
if( !isset($row["bg_farbe"]) ) $row["bg_farbe"] = 'white';
|
||||
if( !isset($row["text_farbe"]) ) $row["text_farbe"] = 'black';
|
||||
if( !isset($row["text_farbe_text"]) ) $row["text_farbe_text"] = 'black';
|
||||
if( !isset($row["bg_farbe_text"]) ) $row["bg_farbe_text"] = '#CCCCCC';
|
||||
if( !isset($row["text_groesse"]) ) $row["text_groesse"] = '13';
|
||||
if( !isset($row["text_groesse_text"]) )$row["text_groesse_text"] = '12';
|
||||
|
||||
/* // pocsag in Array schreiben
|
||||
$thisday = $nextday.'
|
||||
@ -260,5 +277,5 @@ eval ("dooutput(\"".gettemplate($template_dir."rahmen")."\");");
|
||||
/**************************/
|
||||
// Datenbank schliessen
|
||||
//
|
||||
mysql_close($dbconn);
|
||||
mysqli_close($dbconn);
|
||||
?>
|
||||
|
Reference in New Issue
Block a user