Merge branch 'boswatch' of ManuelW/monitor-frontend into master
This commit is contained in:
commit
4283ecd11d
@ -9,22 +9,12 @@
|
||||
<form name="form1" method="post" action="$_SERVER[PHP_SELF]?show=dme&do=setupdate">
|
||||
<table width="500" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#000000">
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td>neue Organisation/Ort</td>
|
||||
<td>neue Org./Ort</td>
|
||||
<td><!--<input name="new_org_typ" type="text" id="new_org_typ" size="3" maxlength="3">-->
|
||||
|
||||
<select name="new_org_typ" id="new_org_typ">
|
||||
<option value="RLS" selected>Org</option>
|
||||
<option value="FF">FF</option>
|
||||
<option value="BF">BF</option>
|
||||
<option value="RD">RD</option>
|
||||
<option value="THW">THW</option>
|
||||
<option value="KAT">KAT</option>
|
||||
<option value="KBM">KBM</option>
|
||||
<option value="RLS">RLS</option>
|
||||
</select>
|
||||
|
||||
/
|
||||
<input name="new_org" type="text" id="new_org" size="40">
|
||||
|
||||
<select name="new_org_typ" id="new_org_typ">
|
||||
$updateSelectOrgTyp
|
||||
</select> <input name="new_org" type="text" id="new_org" size="40" value="$org_name">
|
||||
</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
@ -41,7 +31,7 @@
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td>Zusatz:</td>
|
||||
<td><input name="bezeichnung" type="text" id="bezeichnung" value="$row[bezeichnung]" size="50"></td>
|
||||
<td><input name="bezeichnung" type="text" id="bezeichnung" value="$org_bezeichnung" size="50"></td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td>Formatierung:</td>
|
||||
@ -57,7 +47,7 @@
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#FFFFFF"><div align="center"><a href="admin.php">Zurück</a> | <a href="$_SERVER[PHP_SELF]?show=dme&do=delete&id=$_GET[id]&org=$_GET[org]&adresse=$row[adresse]">RIC Löschen</a> </div></td>
|
||||
<td bgcolor="#FFFFFF"><div align="center"><a href="javascript:history.back()">Zurück</a> | <a href="$_SERVER[PHP_SELF]?show=dme&do=delete&id=$_GET[id]&org=$_GET[org]&adresse=$row[adresse]">RIC Löschen</a> </div></td>
|
||||
<td bgcolor="#FFFFFF"><input type="submit" name="Submit" value="Aktualisieren"></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
69
admin.php
69
admin.php
@ -45,17 +45,34 @@ if( $_SESSION["admin"] != 1 ) exit;
|
||||
if( isset($_GET["show"]) && $_GET["show"] == 'dme' && !isset($_GET["do"]) )
|
||||
{
|
||||
// Alle DME ohne Organisation holen
|
||||
$result = mysqli_query($dbconn, "SELECT id, adresse, bezeichnung, rec_typ FROM ric_zvei WHERE org_id = '0' ORDER BY bezeichnung ASC") or die (mysqli_error($dbconn));
|
||||
$result = mysqli_query($dbconn, "SELECT a.id, a.adresse, a.bezeichnung, a.rec_typ, b.id as import_id, b.i_ric, b.i_org, b.i_ort, b.i_zusatz
|
||||
FROM ric_zvei a
|
||||
LEFT JOIN import_ric b ON a.adresse = b.i_ric
|
||||
WHERE a.org_id = '0'
|
||||
ORDER BY a.bezeichnung ASC") or die (mysqli_error($dbconn));
|
||||
|
||||
while($row = mysqli_fetch_array($result))
|
||||
{
|
||||
$show_all .= '
|
||||
if (isset($row["import_id"])) {
|
||||
$show_all .= '
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td align="center">'.$row["rec_typ"].'</td>
|
||||
<td> <b>'.$row["adresse"].'</b> / '.$row["bezeichnung"].'</td>
|
||||
<td align="center"> <a href="'.$_SERVER["PHP_SELF"].'?show=dme&do=update&id='.$row["id"].'">zuordnen</a> </td>
|
||||
<td align="center"> <a href="'.$_SERVER["PHP_SELF"].'?show=dme&do=delete&id='.$row["id"].'">löschen</a> </td>
|
||||
<td align="center">' . $row["rec_typ"] . '</td>
|
||||
<td> <b>' . $row["adresse"] . '</b> / ' . $row["i_org"]." ".$row["i_ort"]." | ".$row["i_zusatz"] . '</td>
|
||||
<td align="center"> <a href="' . $_SERVER["PHP_SELF"] . '?show=dme&do=update&id=' . $row["id"] . '&ric='.$row["i_ric"].'">zuordnen</a> </td>
|
||||
<td align="center"> <a href="' . $_SERVER["PHP_SELF"] . '?show=dme&do=delete&id=' . $row["id"] . '">löschen</a> </td>
|
||||
</tr>
|
||||
';
|
||||
';
|
||||
}
|
||||
else {
|
||||
$show_all .= '
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td align="center">' . $row["rec_typ"] . '</td>
|
||||
<td> <b>' . $row["adresse"] . '</b> / ' . $row["bezeichnung"] . '</td>
|
||||
<td align="center"> <a href="' . $_SERVER["PHP_SELF"] . '?show=dme&do=update&id=' . $row["id"] . '">zuordnen</a> </td>
|
||||
<td align="center"> <a href="' . $_SERVER["PHP_SELF"] . '?show=dme&do=delete&id=' . $row["id"] . '">löschen</a> </td>
|
||||
</tr>
|
||||
';
|
||||
}
|
||||
}
|
||||
|
||||
// Seiteninhalt ausgeben
|
||||
@ -66,11 +83,24 @@ if( isset($_GET["show"]) && $_GET["show"] == 'dme' && !isset($_GET["do"]) )
|
||||
// Wenn dme updaten
|
||||
elseif( isset($_GET["show"]) && $_GET["show"] == 'dme' && $_GET["do"] && $_GET["do"] == 'update' )
|
||||
{
|
||||
// Zusammenstellung bekannter Organisationen
|
||||
$result = mysqli_query($dbconn, "SELECT id, org_name, org FROM organisation ORDER BY org ASC, org_name ASC") or die (mysqli_error($dbconn));
|
||||
// Abfrage ob in import table vorhanden
|
||||
if (isset($_GET["ric"])) {
|
||||
$ric = trim($_GET["ric"]);
|
||||
|
||||
$result = mysqli_query($dbconn, "SELECT i_ric, i_org, i_ort, i_zusatz FROM import_ric WHERE i_ric=$ric") or die (mysqli_error($dbconn));
|
||||
$imp = mysqli_fetch_array($result);
|
||||
|
||||
(!empty($imp["i_ort"])) ? $org_name = strtoupper($imp["i_ort"]) : $org_name="";
|
||||
}
|
||||
|
||||
// Zusammenstellung bekannter Organisationen
|
||||
$result = mysqli_query($dbconn, "SELECT a.id, a.org_name, a.org
|
||||
FROM organisation a
|
||||
ORDER BY a.org ASC, a.org_name ASC") or die (mysqli_error($dbconn));
|
||||
|
||||
while($row = mysqli_fetch_array($result))
|
||||
{
|
||||
if( $_REQUEST["org"] == $row["id"] ) { $selected = 'selected'; } else { $selected = ''; }
|
||||
($_REQUEST["org"] == $row["id"]) ? $selected="selected" : $selected="";
|
||||
$option_org .= '<option value="'.$row["id"].'" '.$selected.'>'.$row["org"].' '.$row["org_name"].'</option>';
|
||||
}
|
||||
|
||||
@ -83,9 +113,24 @@ elseif( isset($_GET["show"]) && $_GET["show"] == 'dme' && $_GET["do"] && $_GET["
|
||||
}
|
||||
|
||||
// Abfrage des verlangten Datensatzes
|
||||
$result = mysqli_query($dbconn, "SELECT id, adresse, bezeichnung, rec_typ FROM ric_zvei WHERE id = '$_GET[id]'") or die (mysqli_error($dbconn));
|
||||
$result = mysqli_query($dbconn, "SELECT a.id, a.adresse, a.bezeichnung, a.rec_typ, b.i_org, b.i_ort, b.i_zusatz
|
||||
FROM ric_zvei a
|
||||
LEFT JOIN import_ric b ON a.adresse=b.i_ric
|
||||
WHERE a.id = '$_GET[id]'") or die (mysqli_error($dbconn));
|
||||
$row = mysqli_fetch_array($result);
|
||||
|
||||
|
||||
(!empty($imp["i_zusatz"])) ? $org_bezeichnung=$imp["i_zusatz"] : $org_bezeichnung=$row["bezeichnung"];
|
||||
|
||||
// Formular zusammenstellen
|
||||
$updateSelectOrgTyp="";
|
||||
$orgs = array("RLS", "FF", "BF", "RD", "THW", "KAT", "KBM", "RLS");
|
||||
foreach ($orgs as $v) {
|
||||
($v == trim($row["i_org"])) ? $selected="selected" : $selected="";
|
||||
$updateSelectOrgTyp .= "<option value=\"$v\" $selected>$v</option>";
|
||||
}
|
||||
|
||||
if (!isset($org_name)) $org_name="";
|
||||
|
||||
// Seiteninhalt ausgeben
|
||||
eval ("\$page_middle .= \"".gettemplate($template_dir."body_admin_dme2org")."\";");
|
||||
}
|
||||
|
BIN
apple-touch-icon.png
Normal file
BIN
apple-touch-icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 21 KiB |
@ -101,7 +101,7 @@ $ip_ende = '192.168.1.250';
|
||||
|
||||
// UserID für IP
|
||||
$ip_users = array(
|
||||
"192.168.1.81" => 1,
|
||||
"192.168.1.50" => 1,
|
||||
"192.168.1.80" => 1,
|
||||
"192.168.1.75" => 1,
|
||||
);
|
||||
|
@ -566,4 +566,28 @@ $timenow = date("G:i");
|
||||
$timenowlong = date("G:i:s");
|
||||
$useronlinetime = date("Y-m-d H:i:s", mktime(date("H"),date("i")-5,date("s"), date("m"),date("d"),date("Y")));
|
||||
|
||||
?>
|
||||
function remove_idea_codes($input) {
|
||||
$toRemove = array(
|
||||
"<DC1>",
|
||||
"<DC2>",
|
||||
"<DC3>",
|
||||
"<ENQ>",
|
||||
"<ETX>",
|
||||
"<BS>",
|
||||
"<ESC>",
|
||||
"<ETB>",
|
||||
"<RS>",
|
||||
"<ACK>",
|
||||
"<CAN>",
|
||||
"<GS>",
|
||||
"<HT>",
|
||||
"<LF>",
|
||||
"<US>",
|
||||
"<DEL>",
|
||||
"<SUB>",
|
||||
"<DLE>"
|
||||
);
|
||||
|
||||
return str_replace($toRemove, " ", $input);
|
||||
//return $input;
|
||||
}
|
33
get.php
33
get.php
@ -40,7 +40,7 @@ require('config.inc.php');
|
||||
$filter = $_GET["filter"];
|
||||
}
|
||||
|
||||
if (!isset($_SESSION["lastupdate"])) $_SESSION["lastupdate"];
|
||||
if (!isset($_SESSION["lastupdate"])) $_SESSION["lastupdate"]="";
|
||||
if (!isset($show_filter)) $show_filter="";
|
||||
|
||||
if( $show_filter == 1 && $_SESSION["lastupdate"] == "" && !isset($_GET["clean"]) ) {
|
||||
@ -127,9 +127,9 @@ else { //if( $show_filter != 1 ) {
|
||||
$tageswechsel = get_timestamp(str_replace("-","",date_dbformat($lastday))."000000");
|
||||
|
||||
//$nextday = '
|
||||
$show[$tageswechsel] .= '
|
||||
$show[$tageswechsel] = '
|
||||
<tr>
|
||||
<td colspan="5" bgcolor="black"><span style="color:white;font-size:16px;font-weight:bold"> Tageswechsel: '.get_date_long($row["zeit"]).'</span></td>
|
||||
<td colspan="5" bgcolor="black"><span style="color:white;font-size:16px;font-weight:bold"> Tageswechsel: ' . get_date_long($row["zeit"]) . '</span></td>
|
||||
</tr>
|
||||
';
|
||||
}
|
||||
@ -154,7 +154,20 @@ else { //if( $show_filter != 1 ) {
|
||||
}
|
||||
|
||||
// Wenn unbekannte Ric Wert setzen
|
||||
if( !$bezeichnung && !$row["org_name"] ) $bezeichnung = 'Unbekannt';
|
||||
$isNew = false;
|
||||
if( empty($row["org_name"]) ) {
|
||||
$check_imp = mysqli_query($dbconn, "SELECT id, i_org, i_ort, i_zusatz FROM import_ric WHERE i_ric=".$row["adresse_neu"]);
|
||||
$imp = mysqli_fetch_array($check_imp);
|
||||
|
||||
if( !empty($imp["id"])) {
|
||||
$bezeichnung = $row["adresse_neu"];
|
||||
$row["org_name"] = $imp["i_org"]." ".$imp["i_ort"]." ".$imp["i_zusatz"];
|
||||
$isNew = true;
|
||||
}
|
||||
else {
|
||||
$bezeichnung = 'Unbekannt';
|
||||
}
|
||||
}
|
||||
if( !$row["org_name"] ) $row["org_name"] = $row["adresse_neu"];
|
||||
|
||||
// Wenn ZVEI
|
||||
@ -169,10 +182,16 @@ else { //if( $show_filter != 1 ) {
|
||||
if (isset($formatierung[$row["formatierung_id"]]["text_format"])) $row["text_format"] = $formatierung[$row["formatierung_id"]]["text_format"];
|
||||
|
||||
// default Farben bestimmen
|
||||
if( !isset($row["bg_farbe"]) ) $row["bg_farbe"] = 'white';
|
||||
if( !isset($row["bg_farbe"]) && $isNew == false ) {
|
||||
$row["bg_farbe"] = '#FFFFFF';
|
||||
}
|
||||
elseif( !isset($row["bg_farbe"]) && $isNew == true ) {
|
||||
$row["bg_farbe"] = '#E8C700';
|
||||
}
|
||||
//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["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';
|
||||
if( !isset($row["text_format"]) ) $row["text_format"] = '1';
|
||||
@ -196,7 +215,7 @@ else { //if( $show_filter != 1 ) {
|
||||
$thisday .= '
|
||||
<tr bgcolor="'.$row["bg_farbe_text"].'">
|
||||
<td colspan="5">
|
||||
<span style="color:'.$row["text_farbe_text"].';font-size:'.$row["text_groesse_text"].'">'.$row["text"].'</span>
|
||||
<span style="color:'.$row["text_farbe_text"].';font-size:'.$row["text_groesse_text"].'">'.remove_idea_codes($row["text"]).'</span>
|
||||
</td>
|
||||
</tr>
|
||||
';
|
||||
|
@ -29,6 +29,8 @@ require_once("config.inc.php");
|
||||
*/
|
||||
|
||||
// Check PM
|
||||
if (!isset($message_field)) $message_field = "";
|
||||
|
||||
$result = mysqli_query($dbconn, "SELECT a.*, DATE_FORMAT(a.pm_date, '%Y%m%d%H%i%s') AS date, b.real_name
|
||||
FROM messages a
|
||||
LEFT JOIN admin_users b ON b.id = a.userid_from
|
||||
|
10
idea.php
Normal file
10
idea.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
function remove_idea_codes($input) {
|
||||
$toRemove = array("<DC2>", "<ENQ>", "<ETX>", "<BS>", "<ESC>");
|
||||
|
||||
foreach ($toRemove as $value) {
|
||||
$output = str_replace($value, "", $input);
|
||||
}
|
||||
|
||||
return $output;
|
||||
}
|
19
suche.php
19
suche.php
@ -134,15 +134,15 @@ if (!isset($show)) $show="";
|
||||
{
|
||||
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"].'%"';
|
||||
}
|
||||
|
||||
}
|
||||
@ -184,6 +184,7 @@ if( $_REQUEST["search_what"] == 'ric' && $_REQUEST["search_ric"] != '' || $_REQU
|
||||
$bezeichnung = $row["bezeichnung"];
|
||||
|
||||
// Tageswechsel ausgeben
|
||||
if (!isset($lastday)) $lastday="";
|
||||
if( get_day($row["zeit"]) != $lastday )
|
||||
{
|
||||
$nextday = '
|
||||
@ -202,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.'
|
||||
|
Loading…
Reference in New Issue
Block a user