Fehlerbereinigung #1
@ -9,22 +9,12 @@
|
|||||||
<form name="form1" method="post" action="$_SERVER[PHP_SELF]?show=dme&do=setupdate">
|
<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">
|
<table width="500" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#000000">
|
||||||
<tr bgcolor="#FFFFFF">
|
<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">-->
|
<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">
|
<select name="new_org_typ" id="new_org_typ">
|
||||||
<option value="RLS" selected>Org</option>
|
$updateSelectOrgTyp
|
||||||
<option value="FF">FF</option>
|
</select> <input name="new_org" type="text" id="new_org" size="40" value="$org_name">
|
||||||
<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">
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr bgcolor="#FFFFFF">
|
<tr bgcolor="#FFFFFF">
|
||||||
@ -41,7 +31,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr bgcolor="#FFFFFF">
|
<tr bgcolor="#FFFFFF">
|
||||||
<td>Zusatz:</td>
|
<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>
|
||||||
<tr bgcolor="#FFFFFF">
|
<tr bgcolor="#FFFFFF">
|
||||||
<td>Formatierung:</td>
|
<td>Formatierung:</td>
|
||||||
@ -57,7 +47,7 @@
|
|||||||
<td> </td>
|
<td> </td>
|
||||||
</tr>
|
</tr>
|
||||||
<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>
|
<td bgcolor="#FFFFFF"><input type="submit" name="Submit" value="Aktualisieren"></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
67
admin.php
67
admin.php
@ -45,17 +45,34 @@ if( $_SESSION["admin"] != 1 ) exit;
|
|||||||
if( isset($_GET["show"]) && $_GET["show"] == 'dme' && !isset($_GET["do"]) )
|
if( isset($_GET["show"]) && $_GET["show"] == 'dme' && !isset($_GET["do"]) )
|
||||||
{
|
{
|
||||||
// Alle DME ohne Organisation holen
|
// 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))
|
while($row = mysqli_fetch_array($result))
|
||||||
{
|
{
|
||||||
$show_all .= '
|
if (isset($row["import_id"])) {
|
||||||
|
$show_all .= '
|
||||||
<tr bgcolor="#FFFFFF">
|
<tr bgcolor="#FFFFFF">
|
||||||
<td align="center">'.$row["rec_typ"].'</td>
|
<td align="center">' . $row["rec_typ"] . '</td>
|
||||||
<td> <b>'.$row["adresse"].'</b> / '.$row["bezeichnung"].'</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"].'">zuordnen</a> </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>
|
<td align="center"> <a href="' . $_SERVER["PHP_SELF"] . '?show=dme&do=delete&id=' . $row["id"] . '">löschen</a> </td>
|
||||||
</tr>
|
</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
|
// Seiteninhalt ausgeben
|
||||||
@ -66,11 +83,24 @@ if( isset($_GET["show"]) && $_GET["show"] == 'dme' && !isset($_GET["do"]) )
|
|||||||
// Wenn dme updaten
|
// Wenn dme updaten
|
||||||
elseif( isset($_GET["show"]) && $_GET["show"] == 'dme' && $_GET["do"] && $_GET["do"] == 'update' )
|
elseif( isset($_GET["show"]) && $_GET["show"] == 'dme' && $_GET["do"] && $_GET["do"] == 'update' )
|
||||||
{
|
{
|
||||||
// Zusammenstellung bekannter Organisationen
|
// Abfrage ob in import table vorhanden
|
||||||
$result = mysqli_query($dbconn, "SELECT id, org_name, org FROM organisation ORDER BY org ASC, org_name ASC") or die (mysqli_error($dbconn));
|
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))
|
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>';
|
$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
|
// 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);
|
$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
|
// Seiteninhalt ausgeben
|
||||||
eval ("\$page_middle .= \"".gettemplate($template_dir."body_admin_dme2org")."\";");
|
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
|
// UserID für IP
|
||||||
$ip_users = array(
|
$ip_users = array(
|
||||||
"192.168.1.81" => 1,
|
"192.168.1.50" => 1,
|
||||||
"192.168.1.80" => 1,
|
"192.168.1.80" => 1,
|
||||||
"192.168.1.75" => 1,
|
"192.168.1.75" => 1,
|
||||||
);
|
);
|
||||||
|
25
get.php
25
get.php
@ -154,7 +154,20 @@ else { //if( $show_filter != 1 ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Wenn unbekannte Ric Wert setzen
|
// 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"];
|
if( !$row["org_name"] ) $row["org_name"] = $row["adresse_neu"];
|
||||||
|
|
||||||
// Wenn ZVEI
|
// 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"];
|
if (isset($formatierung[$row["formatierung_id"]]["text_format"])) $row["text_format"] = $formatierung[$row["formatierung_id"]]["text_format"];
|
||||||
|
|
||||||
// default Farben bestimmen
|
// 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"]) ) $row["text_farbe"] = 'black';
|
||||||
if( !isset($row["text_farbe_text"]) ) $row["text_farbe_text"] = '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"]) ) $row["text_groesse"] = '13';
|
||||||
if( !isset($row["text_groesse_text"]) ) $row["text_groesse_text"] = '12';
|
if( !isset($row["text_groesse_text"]) ) $row["text_groesse_text"] = '12';
|
||||||
if( !isset($row["text_format"]) ) $row["text_format"] = '1';
|
if( !isset($row["text_format"]) ) $row["text_format"] = '1';
|
||||||
|
@ -29,6 +29,8 @@ require_once("config.inc.php");
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Check PM
|
// 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
|
$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
|
FROM messages a
|
||||||
LEFT JOIN admin_users b ON b.id = a.userid_from
|
LEFT JOIN admin_users b ON b.id = a.userid_from
|
||||||
|
Loading…
Reference in New Issue
Block a user