Übersicht läuft

This commit is contained in:
Manuel Weiser 2018-08-04 15:49:43 +02:00
parent 9f7da5deb9
commit 2c0012a6f4
19 changed files with 162 additions and 154 deletions

View File

@ -6,7 +6,7 @@
}
-->
</style>
<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">
<tr bgcolor="#FFFFFF">
<td>neue Organisation/Ort</td>
@ -57,7 +57,7 @@
<td>&nbsp;</td>
</tr>
<tr>
<td bgcolor="#FFFFFF"><div align="center"><a href="admin.php">Zur&uuml;ck</a> | <a href="$_SERVER[php_self]?show=dme&do=delete&id=$_GET[id]&org=$_GET[org]&adresse=$row[adresse]">RIC L&ouml;schen</a> </div></td>
<td bgcolor="#FFFFFF"><div align="center"><a href="admin.php">Zur&uuml;ck</a> | <a href="$_SERVER[PHP_SELF]?show=dme&do=delete&id=$_GET[id]&org=$_GET[org]&adresse=$row[adresse]">RIC L&ouml;schen</a> </div></td>
<td bgcolor="#FFFFFF"><input type="submit" name="Submit" value="Aktualisieren"></td>
</tr>
</table>

View File

@ -7,15 +7,15 @@
<table width="400" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#000000">
<tr bgcolor="#FFFFFF">
<td>&nbsp;<strong>$num_dme</strong> DME/ZVEI ohne Organisation </td>
<td><div align="center"><a href="$_SERVER[php_self]?show=dme&org=0">anzeigen</a></div></td>
<td><div align="center"><a href="$_SERVER[PHP_SELF]?show=dme&org=0">anzeigen</a></div></td>
</tr>
<tr bgcolor="#FFFFFF">
<td>&nbsp;<strong>$num_kfz</strong> Fahrzeuge ohne Organisation </td>
<td><div align="center"><a href="$_SERVER[php_self]?show=kfz&org=0">anzeigen</a></div></td>
<td><div align="center"><a href="$_SERVER[PHP_SELF]?show=kfz&org=0">anzeigen</a></div></td>
</tr>
<tr bgcolor="#FFFFFF">
<td>&nbsp;<strong>$num_user</strong> User im System, <strong>$num_new_user</strong> davon neu </td>
<td><div align="center"><a href="$_SERVER[php_self]?show=user">anzeigen</a></div></td>
<td><div align="center"><a href="$_SERVER[PHP_SELF]?show=user">anzeigen</a></div></td>
</tr>
</table>
<br><br>

View File

@ -1,4 +1,4 @@
<form name="form1" method="post" action="$_SERVER[php_self]?show=kfz&do=setupdate">
<form name="form1" method="post" action="$_SERVER[PHP_SELF]?show=kfz&do=setupdate">
<table width="500" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#000000">
<tr bgcolor="#FFFFFF">
<td>neue Organisation/Ort</td>
@ -38,7 +38,7 @@
<td>&nbsp;</td>
</tr>
<tr>
<td bgcolor="#FFFFFF"><div align="center"><a href="admin.php">Zur&uuml;ck</a> | <a href="$_SERVER[php_self]?show=kfz&do=delete&id=$_GET[id]&org=$_GET[org]">KFZ L&ouml;schen</a> </div></td>
<td bgcolor="#FFFFFF"><div align="center"><a href="admin.php">Zur&uuml;ck</a> | <a href="$_SERVER[PHP_SELF]?show=kfz&do=delete&id=$_GET[id]&org=$_GET[org]">KFZ L&ouml;schen</a> </div></td>
<td bgcolor="#FFFFFF"><input type="submit" name="Submit" value="Aktualisieren"></td>
</tr>
</table>

View File

@ -1,5 +1,5 @@
<body onload="javascript:document.form1.msg_text.focus()">
<form name="form1" method="post" action="$_SERVER[php_self]?pmdo=doreply">
<form name="form1" method="post" action="$_SERVER[PHP_SELF]?pmdo=doreply">
<input name="userid_to" type="hidden" id="userid_to" value="$_GET[to]">
<input name="msg_id" type="hidden" id="msg_id" value="$_GET[msg_id]">

View File

@ -1,5 +1,5 @@
<body onload="javascript:document.form1.msg_text.focus()">
<form name="form1" id="form1" method="post" action="$_SERVER[php_self]?pmdo=dowrite">
<form name="form1" id="form1" method="post" action="$_SERVER[PHP_SELF]?pmdo=dowrite">
<table width="90%" class="msg_box" border="0" cellspacing="1" cellpadding="0">
<tr>

View File

@ -39,15 +39,15 @@ if( $_SESSION["admin"] != 1 ) exit;
if( $_GET["show"] == 'dme' && !$_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());
$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));
while($row = mysqli_fetch_array($result))
{
$show_all .= '
<tr bgcolor="#FFFFFF">
<td align="center">'.$row["rec_typ"].'</td>
<td>&nbsp;<b>'.$row["adresse"].'</b> / '.$row["bezeichnung"].'</td>
<td align="center">&nbsp;<a href="'.$_SERVER["php_self"].'?show=dme&do=update&id='.$row["id"].'">zuordnen</a>&nbsp;</td>
<td align="center">&nbsp;<a href="'.$_SERVER["php_self"].'?show=dme&do=delete&id='.$row["id"].'">l<EFBFBD>schen</a>&nbsp;</td>
<td align="center">&nbsp;<a href="'.$_SERVER["PHP_SELF"].'?show=dme&do=update&id='.$row["id"].'">zuordnen</a>&nbsp;</td>
<td align="center">&nbsp;<a href="'.$_SERVER["PHP_SELF"].'?show=dme&do=delete&id='.$row["id"].'">l<EFBFBD>schen</a>&nbsp;</td>
</tr>
';
}
@ -61,7 +61,7 @@ if( $_GET["show"] == 'dme' && !$_GET["do"] )
elseif( $_GET["show"] == 'dme' && $_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());
$result = mysqli_query($dbconn, "SELECT id, org_name, org FROM organisation ORDER BY org ASC, org_name ASC") or die (mysqli_error($dbconn));
while($row = mysqli_fetch_array($result))
{
if( $_REQUEST["org"] == $row["id"] ) { $selected = 'selected'; } else { $selected = ''; }
@ -69,7 +69,7 @@ elseif( $_GET["show"] == 'dme' && $_GET["do"] == 'update' )
}
// Zusammenstellung der Formatierungen
$result = mysqli_query($dbconn, "SELECT id, beschreibung FROM formatierung ORDER BY beschreibung ASC") or die (mysqli_error());
$result = mysqli_query($dbconn, "SELECT id, beschreibung FROM formatierung ORDER BY beschreibung ASC") or die (mysqli_error($dbconn));
while($row = mysqli_fetch_array($result))
{
if( $_REQUEST["form"] == $row["id"] ) { $selected = 'selected'; } else { $selected = ''; }
@ -77,7 +77,7 @@ elseif( $_GET["show"] == 'dme' && $_GET["do"] == 'update' )
}
// 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());
$result = mysqli_query($dbconn, "SELECT id, adresse, bezeichnung, rec_typ FROM ric_zvei WHERE id = '$_GET[id]'") or die (mysqli_error($dbconn));
$row = mysqli_fetch_array($result);
// Seiteninhalt ausgeben
@ -88,8 +88,8 @@ elseif( $_GET["show"] == 'dme' && $_GET["do"] == 'update' )
// Wenn dme l<>schen
elseif( $_GET["show"] == 'dme' && $_GET["do"] == 'delete' )
{
$result = mysqli_query($dbconn, "DELETE FROM ric_zvei WHERE id = '$_GET[id]'") or die (mysqli_error());
$result = mysqli_query($dbconn, "DELETE FROM alarm2mail WHERE adresse = '$_GET[adresse]'") or die (mysqli_error());
$result = mysqli_query($dbconn, "DELETE FROM ric_zvei WHERE id = '$_GET[id]'") or die (mysqli_error($dbconn));
$result = mysqli_query($dbconn, "DELETE FROM alarm2mail WHERE adresse = '$_GET[adresse]'") or die (mysqli_error($dbconn));
// Pr<50>fen ob noch weitere Eintr<74>ge zur Org da sind, wenn nicht l<>schen
if( $_GET["org"] )
@ -97,12 +97,12 @@ elseif( $_GET["show"] == 'dme' && $_GET["do"] == 'delete' )
$result = mysqli_query($dbconn, "SELECT a.id AS dme_id, b.id AS kfz_id
FROM ric_zvei a
LEFT JOIN kfz_fms b ON b.org_id = $_GET[org]
WHERE a.org_id = '$_GET[org]' OR b.org_id = '$_GET[org]'") or die (mysqli_error());
WHERE a.org_id = '$_GET[org]' OR b.org_id = '$_GET[org]'") or die (mysqli_error($dbconn));
$row = mysqli_fetch_array($result);
if( !$row["dme_id"] && !$row["kfz_id"] )
{
$result = mysqli_query($dbconn, "DELETE FROM organisation WHERE id = '$_GET[org]'") or die (mysqli_error());
$result = mysqli_query($dbconn, "DELETE FROM organisation WHERE id = '$_GET[org]'") or die (mysqli_error($dbconn));
}
}
@ -127,7 +127,7 @@ elseif( $_GET["show"] == 'dme' && $_GET["do"] == 'setupdate' )
/////////////////$organisation = $_REQUEST["new_org"];
// Pr<50>fen ob die Org schon existiert, wenn ja update kein eintrag
$result = mysqli_query($dbconn, "SELECT id FROM organisation WHERE org_name = '$_REQUEST[new_org]' AND org = '$_REQUEST[new_org_typ]'") or die (mysqli_error());
$result = mysqli_query($dbconn, "SELECT id FROM organisation WHERE org_name = '$_REQUEST[new_org]' AND org = '$_REQUEST[new_org_typ]'") or die (mysqli_error($dbconn));
$row = mysqli_fetch_array($result);
if( $row["id"] )
@ -149,7 +149,7 @@ elseif( $_GET["show"] == 'dme' && $_GET["do"] == 'setupdate' )
$org_id = $_REQUEST["select_org"];
}
$result = mysqli_query($dbconn, "UPDATE ric_zvei SET bezeichnung = '$_REQUEST[bezeichnung]', formatierung_id = '$_REQUEST[formatierung]', org_id = '$org_id' WHERE id='$_REQUEST[id]'") or die (mysqli_error());
$result = mysqli_query($dbconn, "UPDATE ric_zvei SET bezeichnung = '$_REQUEST[bezeichnung]', formatierung_id = '$_REQUEST[formatierung]', org_id = '$org_id' WHERE id='$_REQUEST[id]'") or die (mysqli_error($dbconn));
// Pr<50>fen ob noch weitere Eintr<74>ge zur Org da sind, wenn nicht l<>schen
if( $_REQUEST["old_org"] )
@ -157,12 +157,12 @@ elseif( $_GET["show"] == 'dme' && $_GET["do"] == 'setupdate' )
$result = mysqli_query($dbconn, "SELECT a.id AS dme_id, b.id AS kfz_id
FROM ric_zvei a
LEFT JOIN kfz_fms b ON b.org_id = $_REQUEST[old_org]
WHERE a.org_id = '$_REQUEST[old_org]' OR b.org_id = '$_REQUEST[old_org]'") or die (mysqli_error());
WHERE a.org_id = '$_REQUEST[old_org]' OR b.org_id = '$_REQUEST[old_org]'") or die (mysqli_error($dbconn));
$row = mysqli_fetch_array($result);
if( !$row["dme_id"] && !$row["kfz_id"] )
{
$result = mysqli_query($dbconn, "DELETE FROM organisation WHERE id = '$_REQUEST[old_org]'") or die (mysqli_error());
$result = mysqli_query($dbconn, "DELETE FROM organisation WHERE id = '$_REQUEST[old_org]'") or die (mysqli_error($dbconn));
}
}
@ -174,14 +174,14 @@ elseif( $_GET["show"] == 'dme' && $_GET["do"] == 'setupdate' )
elseif( $_GET["show"] == 'kfz' && !$_GET["do"] )
{
// Alle DME ohne Organisation holen
$result = mysqli_query($dbconn, "SELECT id, bezeichnung FROM kfz_fms WHERE org_id = '0' ORDER BY bezeichnung ASC") or die (mysqli_error());
$result = mysqli_query($dbconn, "SELECT id, bezeichnung FROM kfz_fms WHERE org_id = '0' ORDER BY bezeichnung ASC") or die (mysqli_error($dbconn));
while($row = mysqli_fetch_array($result))
{
$show_all .= '
<tr bgcolor="#FFFFFF">
<td>&nbsp;'.$row["bezeichnung"].'</td>
<td align="center">&nbsp;<a href="'.$_SERVER["php_self"].'?show=kfz&do=update&id='.$row["id"].'">zuordnen</a>&nbsp;</td>
<td align="center">&nbsp;<a href="'.$_SERVER["php_self"].'?show=kfz&do=delete&id='.$row["id"].'">l<EFBFBD>schen</a>&nbsp;</td>
<td align="center">&nbsp;<a href="'.$_SERVER["PHP_SELF"].'?show=kfz&do=update&id='.$row["id"].'">zuordnen</a>&nbsp;</td>
<td align="center">&nbsp;<a href="'.$_SERVER["PHP_SELF"].'?show=kfz&do=delete&id='.$row["id"].'">l<EFBFBD>schen</a>&nbsp;</td>
</tr>
';
}
@ -195,7 +195,7 @@ elseif( $_GET["show"] == 'kfz' && !$_GET["do"] )
elseif( $_GET["show"] == 'kfz' && $_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());
$result = mysqli_query($dbconn, "SELECT id, org_name, org FROM organisation ORDER BY org ASC, org_name ASC") or die (mysqli_error($dbconn));
while($row = mysqli_fetch_array($result))
{
if( $_REQUEST["org"] == $row["id"] ) { $selected = 'selected'; } else { $selected = ''; }
@ -203,7 +203,7 @@ elseif( $_GET["show"] == 'kfz' && $_GET["do"] == 'update' )
}
// Abfrage des verlangten Datensatzes
$result = mysqli_query($dbconn, "SELECT id, bezeichnung FROM kfz_fms WHERE id = '$_GET[id]'") or die (mysqli_error());
$result = mysqli_query($dbconn, "SELECT id, bezeichnung FROM kfz_fms WHERE id = '$_GET[id]'") or die (mysqli_error($dbconn));
$row = mysqli_fetch_array($result);
// Seiteninhalt ausgeben
@ -214,7 +214,7 @@ elseif( $_GET["show"] == 'kfz' && $_GET["do"] == 'update' )
// Wenn kfz l<>schen
elseif( $_GET["show"] == 'kfz' && $_GET["do"] == 'delete' )
{
$result = mysqli_query($dbconn, "DELETE FROM kfz_fms WHERE id = '$_GET[id]'") or die (mysqli_error());
$result = mysqli_query($dbconn, "DELETE FROM kfz_fms WHERE id = '$_GET[id]'") or die (mysqli_error($dbconn));
// Pr<50>fen ob noch weitere Eintr<74>ge zur Org da sind, wenn nicht l<>schen
if( $_GET["org"] )
@ -222,12 +222,12 @@ elseif( $_GET["show"] == 'kfz' && $_GET["do"] == 'delete' )
$result = mysqli_query($dbconn, "SELECT a.id AS dme_id, b.id AS kfz_id
FROM ric_zvei a
LEFT JOIN kfz_fms b ON b.org_id = $_GET[org]
WHERE a.org_id = '$_GET[org]' OR b.org_id = '$_GET[org]'") or die (mysqli_error());
WHERE a.org_id = '$_GET[org]' OR b.org_id = '$_GET[org]'") or die (mysqli_error($dbconn));
$row = mysqli_fetch_array($result);
if( !$row["dme_id"] && !$row["kfz_id"] )
{
$result = mysqli_query($dbconn, "DELETE FROM organisation WHERE id = '$_GET[org]'") or die (mysqli_error());
$result = mysqli_query($dbconn, "DELETE FROM organisation WHERE id = '$_GET[org]'") or die (mysqli_error($dbconn));
}
}
@ -261,7 +261,7 @@ elseif( $_GET["show"] == 'kfz' && $_GET["do"] == 'setupdate' )
$organisation = $_REQUEST["select_org"];
}
$result = mysqli_query($dbconn, "UPDATE kfz_fms SET bezeichnung = '$_REQUEST[bezeichnung]', org_id = '$organisation' WHERE id='$_REQUEST[id]'") or die (mysqli_error());
$result = mysqli_query($dbconn, "UPDATE kfz_fms SET bezeichnung = '$_REQUEST[bezeichnung]', org_id = '$organisation' WHERE id='$_REQUEST[id]'") or die (mysqli_error($dbconn));
// Pr<50>fen ob noch weitere Eintr<74>ge zur Org da sind, wenn nicht l<>schen
if( $_REQUEST["old_org"] )
@ -269,12 +269,12 @@ elseif( $_GET["show"] == 'kfz' && $_GET["do"] == 'setupdate' )
$result = mysqli_query($dbconn, "SELECT a.id AS dme_id, b.id AS kfz_id
FROM ric_zvei a
LEFT JOIN kfz_fms b ON b.org_id = $_REQUEST[old_org]
WHERE a.org_id = '$_REQUEST[old_org]' OR b.org_id = '$_REQUEST[old_org]'") or die (mysqli_error());
WHERE a.org_id = '$_REQUEST[old_org]' OR b.org_id = '$_REQUEST[old_org]'") or die (mysqli_error($dbconn));
$row = mysqli_fetch_array($result);
if( !$row["dme_id"] && !$row["kfz_id"] )
{
$result = mysqli_query($dbconn, "DELETE FROM organisation WHERE id = '$_REQUEST[old_org]'") or die (mysqli_error());
$result = mysqli_query($dbconn, "DELETE FROM organisation WHERE id = '$_REQUEST[old_org]'") or die (mysqli_error($dbconn));
}
}
@ -286,7 +286,7 @@ elseif( $_GET["show"] == 'kfz' && $_GET["do"] == 'setupdate' )
elseif( $_GET["show"] == 'user' && !$_GET["do"] )
{
// Alle DME ohne Organisation holen
$result = mysqli_query($dbconn, "SELECT id, a_name, real_name, a_admin, a_mail FROM admin_users ORDER BY a_admin DESC, a_name ASC") or die (mysqli_error());
$result = mysqli_query($dbconn, "SELECT id, a_name, real_name, a_admin, a_mail FROM admin_users ORDER BY a_admin DESC, a_name ASC") or die (mysqli_error($dbconn));
while($row = mysqli_fetch_array($result))
{
if( $row["a_admin"] == '0' ) $status = '<b>(User)</b> ';
@ -295,7 +295,7 @@ elseif( $_GET["show"] == 'user' && !$_GET["do"] )
elseif( $row["a_admin"] == '3' ) $status = '<b>(Closed)</b> ';
if( $row["a_admin"] != '1') {
$show_del_button = '<a href="'.$_SERVER["php_self"].'?show=user&do=delete&id='.$row["id"].'">l&ouml;schen</a>';
$show_del_button = '<a href="'.$_SERVER["PHP_SELF"].'?show=user&do=delete&id='.$row["id"].'">l&ouml;schen</a>';
} else {
$show_del_button = "";
}
@ -304,7 +304,7 @@ elseif( $_GET["show"] == 'user' && !$_GET["do"] )
<tr bgcolor="#FFFFFF">
<td>&nbsp;'.$status.$row["real_name"].'</td>
<td><font size="2">&nbsp;'.$row["a_mail"].'</font></td>
<!--<td align="center">&nbsp;<a href="'.$_SERVER["php_self"].'?show=user&do=update&id='.$row["id"].'">&auml;ndern</a>&nbsp;</td>-->
<!--<td align="center">&nbsp;<a href="'.$_SERVER["PHP_SELF"].'?show=user&do=update&id='.$row["id"].'">&auml;ndern</a>&nbsp;</td>-->
<td>'.$row["a_name"].'</td>
<td align="center">&nbsp;'.$show_del_button.'&nbsp;</td>
</tr>
@ -321,7 +321,7 @@ elseif( $_GET["show"] == 'user' && !$_GET["do"] )
<td>EMail</td>
<td colspan="2"></td>
</tr>
<form name="form999" method="post" action="'.$_SERVER[php_self].'?show=user&do=insert">
<form name="form999" method="post" action="'.$_SERVER[PHP_SELF].'?show=user&do=insert">
<tr bgcolor="#FFFFFF">
<td><input name="ins_name" id="ins_name" type="text" size="30"> </td>
<td><input name="ins_mail" id="ins_mail" type="text" size="30"> </td>
@ -354,9 +354,9 @@ elseif( $_GET["show"] == 'user' && $_GET["do"] == 'insert' )
// Wenn user l<>schen
elseif( $_GET["show"] == 'user' && $_GET["do"] == 'delete' )
{
$result = mysqli_query($dbconn, "DELETE FROM messages WHERE userid_to = '$_GET[id]'") or die (mysqli_error());
$result = mysqli_query($dbconn, "DELETE FROM alarm2mail WHERE userid = '$_GET[id]'") or die (mysqli_error());
$result = mysqli_query($dbconn, "DELETE FROM admin_users WHERE id = '$_GET[id]'") or die (mysqli_error());
$result = mysqli_query($dbconn, "DELETE FROM messages WHERE userid_to = '$_GET[id]'") or die (mysqli_error($dbconn));
$result = mysqli_query($dbconn, "DELETE FROM alarm2mail WHERE userid = '$_GET[id]'") or die (mysqli_error($dbconn));
$result = mysqli_query($dbconn, "DELETE FROM admin_users WHERE id = '$_GET[id]'") or die (mysqli_error($dbconn));
echo gohome($_SERVER["PHP_SELF"].'?show=user');
}
@ -366,18 +366,18 @@ elseif( $_GET["show"] == 'user' && $_GET["do"] == 'delete' )
else
{
// Wir schauen nach dme die keiner Org zugeordnet sind
$result = mysqli_query($dbconn, "SELECT id FROM ric_zvei WHERE org_id = '0'") or die (mysqli_error());
$result = mysqli_query($dbconn, "SELECT id FROM ric_zvei WHERE org_id = '0'") or die (mysqli_error($dbconn));
$num_dme = mysqli_num_rows($result);
// Wir schauen nach kfz die keiner Org zugeordnet sind
$result = mysqli_query($dbconn, "SELECT id FROM kfz_fms WHERE org_id = '0'") or die (mysqli_error());
$result = mysqli_query($dbconn, "SELECT id FROM kfz_fms WHERE org_id = '0'") or die (mysqli_error($dbconn));
$num_kfz = mysql_num_rows($result);
// Wir schauen nach der Userzahl
$result = mysqli_query($dbconn, "SELECT id FROM admin_users") or die (mysqli_error());
$result = mysqli_query($dbconn, "SELECT id FROM admin_users") or die (mysqli_error($dbconn));
$num_user = mysql_num_rows($result);
$result = mysqli_query($dbconn, "SELECT id FROM admin_users WHERE a_admin = '2'") or die (mysqli_error());
$result = mysqli_query($dbconn, "SELECT id FROM admin_users WHERE a_admin = '2'") or die (mysqli_error($dbconn));
$num_new_user = mysql_num_rows($result);
// Ausklappmenu erstellen
@ -385,7 +385,7 @@ else
<select name="search_org" id="search_org">
<option value="">--- w&auml;hle Org. zum bearbeiten ---</option>';
$result = mysqli_query($dbconn, "SELECT id, org_name, org FROM organisation WHERE org != '' ORDER BY org ASC, org_name ASC") or die (mysqli_error());
$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))
{
if( $_REQUEST["search_org"] == $row["id"] ) { $selected = 'selected'; } else { $selected = ''; }
@ -403,7 +403,7 @@ else
{
$show_ric = '--- <b>RIC/ZVEI</b> ----------<br>';
$result = mysqli_query("SELECT id, adresse, bezeichnung, rec_typ, org_id, formatierung_id FROM ric_zvei WHERE org_id = '$_REQUEST[search_org]' ORDER BY rec_typ ASC, adresse ASC") or die (mysqli_error());
$result = mysqli_query("SELECT id, adresse, bezeichnung, rec_typ, org_id, formatierung_id FROM ric_zvei WHERE org_id = '$_REQUEST[search_org]' ORDER BY rec_typ ASC, adresse ASC") or die (mysqli_error($dbconn));
while($row = mysqli_fetch_array($result))
{
$show_ric .= '&nbsp;<a href="'.$_SERVER["PHP_SELF"].'?do=update&id='.$row["id"].'&show=dme&org='.$row["org_id"].'&form='.$row["formatierung_id"].'">'.$row["adresse"].'</a> | '.$row["rec_typ"].' | '.$row["bezeichnung"].'<br>';
@ -411,7 +411,7 @@ else
$show_ric .= '<br>--- <b>KFZ/FMS</b> ----------<br>';
$result = mysqli_query($dbconn, "SELECT id, kennung, bezeichnung, org_id FROM kfz_fms WHERE org_id = '$_REQUEST[search_org]' ORDER BY kennung ASC") or die (mysqli_error());
$result = mysqli_query($dbconn, "SELECT id, kennung, bezeichnung, org_id FROM kfz_fms WHERE org_id = '$_REQUEST[search_org]' ORDER BY kennung ASC") or die (mysqli_error($dbconn));
while($row = mysqli_fetch_array($result))
{
$show_ric .= '&nbsp;<a href="'.$_SERVER["PHP_SELF"].'?do=update&id='.$row["id"].'&show=kfz&org='.$row["org_id"].'">'.$row["kennung"].'</a> | '.$row["bezeichnung"].'<br>';

View File

@ -21,7 +21,7 @@
*/
// Done in Haupttabelle updaten
$result_check_ins = mysqli_query($dbconn, "UPDATE dme SET zeit='$row[zeit]', done='1' WHERE num='$row[num]'") or die (mysqli_error());
$result_check_ins = mysqli_query($dbconn, "UPDATE dme SET zeit='$row[zeit]', done='1' WHERE num='$row[num]'") or die (mysqli_error($dbconn));
if( trim($row["funktion"]) != 'Klartext' && trim($row["funktion"]) != 'Info' && $amenable == 1 )
@ -29,7 +29,7 @@ if( trim($row["funktion"]) != 'Klartext' && trim($row["funktion"]) != 'Info' &&
$result_alarm_mail = mysqli_query($dbconn, "SELECT a.userid, a.time_from, a.time_to, a.stiwo, b.id, b.a_mail, b.a_alarmmail, b.a_alarmmail2sms, b.amail_count, b.ft_allow
FROM alarm2mail a
LEFT JOIN admin_users b ON b.id = a.userid
WHERE adresse=".$row["adresse_neu"]) or die(mysqli_error());
WHERE adresse=".$row["adresse_neu"]) or die(mysqli_error($dbconn));
while( $row_alarm_mail = mysqli_fetch_array($result_alarm_mail) )
{
// Alarmmail Counter
@ -91,6 +91,6 @@ if( trim($row["funktion"]) != 'Klartext' && trim($row["funktion"]) != 'Info' &&
if( ($row["zeit"] - $row["last_alarm"]) > 1000 )
{
$alarmcount = $row["alarm_count"] + 1;
$result_check_ins = mysqli_query($dbconn, "UPDATE organisation SET alarm_count='$alarmcount', last_alarm='$row[zeit]' WHERE id='$row[org_id]'") or die (mysqli_error());
$result_check_ins = mysqli_query($dbconn, "UPDATE organisation SET alarm_count='$alarmcount', last_alarm='$row[zeit]' WHERE id='$row[org_id]'") or die (mysqli_error($dbconn));
}
?>

View File

@ -31,7 +31,7 @@ require('config.inc.php');
LEFT JOIN ric_zvei b ON b.adresse = a.adresse
LEFT JOIN organisation d ON d.id = b.org_id
$show_filter
ORDER BY a.zeit DESC") or die (mysqli_error());
ORDER BY a.zeit DESC") or die (mysqli_error($dbconn));
while($row = mysqli_fetch_array($result))
{
@ -51,7 +51,7 @@ require('config.inc.php');
if( !$row_check["id"] )
{
$result_check = mysqli_query($dbconn, "INSERT INTO ric_zvei (adresse, bezeichnung, rec_typ, formatierung_id) VALUES ('$row[adresse_neu]', '$row[bezeichnung_neu]', '$row[REC_TYP]', '0')") or die(mysqli_error());
$result_check = mysqli_query($dbconn, "INSERT INTO ric_zvei (adresse, bezeichnung, rec_typ, formatierung_id) VALUES ('$row[adresse_neu]', '$row[bezeichnung_neu]', '$row[REC_TYP]', '0')") or die(mysqli_error($dbconn));
$bezeichnung = $row["bezeichnung_neu"];
}
}
@ -63,7 +63,7 @@ require('config.inc.php');
}
// Unwetter Check
$result = mysqli_query($dbconn, "SELECT u_meldung, u_text, u_farbe, DATE_FORMAT(u_lastcheck, '%Y%m%d%H%i%s') AS u_lastcheck, DATE_FORMAT(u_lastchange, '%Y%m%d%H%i%s') AS u_lastchange FROM unwetter WHERE id = '1'") or die (mysqli_error());
$result = mysqli_query($dbconn, "SELECT u_meldung, u_text, u_farbe, DATE_FORMAT(u_lastcheck, '%Y%m%d%H%i%s') AS u_lastcheck, DATE_FORMAT(u_lastchange, '%Y%m%d%H%i%s') AS u_lastchange FROM unwetter WHERE id = '1'") or die (mysqli_error($dbconn));
$row = mysqli_fetch_array($result);
if( ($timestampnow - $row["u_lastcheck"]) > ($uw_checktime * 100) )
@ -116,17 +116,17 @@ if( ($timestampnow - $row["u_lastcheck"]) > ($uw_checktime * 100) )
// Wenn noch kein Eintrag in DB existiert
if( empty($row["u_lastcheck"]) )
{
mysqli_query($dbconn, "INSERT INTO unwetter (id, u_meldung, u_text, u_farbe, u_lastchange) VALUES ('1', '$unwetter_status', '$unwetter_meldung', '$unwetter_farbe', '$timestampnow')") or die(mysqli_error());
mysqli_query($dbconn, "INSERT INTO unwetter (id, u_meldung, u_text, u_farbe, u_lastchange) VALUES ('1', '$unwetter_status', '$unwetter_meldung', '$unwetter_farbe', '$timestampnow')") or die(mysqli_error($dbconn));
}
// Wenn bereits Eintrag vorhanden und Checktime erreicht
if( $unwetter_meldung == $row["u_text"] )
{
mysqli_query($dbconn, "UPDATE unwetter SET u_lastcheck='$timestampnow' WHERE id = '1'") or die(mysqli_error());
mysqli_query($dbconn, "UPDATE unwetter SET u_lastcheck='$timestampnow' WHERE id = '1'") or die(mysqli_error($dbconn));
}
else
{
mysqli_query($dbconn, "UPDATE unwetter SET u_meldung='$unwetter_status', u_text='$unwetter_meldung', u_farbe='$unwetter_farbe', u_lastcheck='$timestampnow', u_lastchange='$timestampnow' WHERE id = '1'") or die(mysqli_error());
mysqli_query($dbconn, "UPDATE unwetter SET u_meldung='$unwetter_status', u_text='$unwetter_meldung', u_farbe='$unwetter_farbe', u_lastcheck='$timestampnow', u_lastchange='$timestampnow' WHERE id = '1'") or die(mysqli_error($dbconn));
}
}

View File

@ -301,13 +301,13 @@ $orgcolor["D"] = 'green'; // RD sonstige
//
// Datenbankserververbindung aufbauen und Datenbank auswhlen
//
$dbconn = mysqli_connect($dbhost, $dbuser, $dbpass, $dbname) or die (mysqli_error());
//$dbselect = mysqli_select_db($dbname, $dbconn) or die (mysqli_error());
$dbconn = mysqli_connect($dbhost, $dbuser, $dbpass, $dbname) or die (mysqli_error($dbconn));
//$dbselect = mysqli_select_db($dbname, $dbconn) or die (mysqli_error($dbconn));
//
// Sessions starten
//
//session_start();
session_start();
/////////////////
// Requires

View File

@ -140,7 +140,7 @@ function get_day($time) {
// Filter Zeit errechnen
function filter_zeit($filter) {
$filter = date("YmdHis", mktime(date("G")-$filter,date("i"),date("s"), date("m"),date("d"),date("Y")));
//$filter = date("Y-m-d H:i:s", mktime(date("G")-$filter,date("i"),date("s"), date("m"),date("d"),date("Y")));
return $filter;
}

60
get.php
View File

@ -22,6 +22,7 @@
require('config.inc.php');
if (!isset($_SESSION["querystring"])) $_SESSION["querystring"] = "";
if( $_SERVER['QUERY_STRING'] != $_SESSION["querystring"] )
{
//$_SESSION["lastupdate"] = "";
@ -30,7 +31,7 @@ require('config.inc.php');
}
// Filter Datum/Zeit erstellen
if( !$_GET["filter"] || $_GET["filter"] == 1 )
if( !isset($_GET["filter"]) || $_GET["filter"] == 1 )
{
$show_filter = 1;
}
@ -39,27 +40,28 @@ require('config.inc.php');
$filter = $_GET["filter"];
}
if( $show_filter == 1 && $_SESSION["lastupdate"] == "" && !$_GET["clean"] ) {
$show_filter = filter_zeit(1);
if (!isset($_SESSION["lastupdate"])) $_SESSION["lastupdate"];
if (!isset($show_filter)) $show_filter;
if( $show_filter == 1 && $_SESSION["lastupdate"] == "" && !isset($_GET["clean"]) ) {
$show_filter = filter_zeit(1);
$show_filter = " WHERE a.zeit > '$show_filter' ";
}
elseif( $show_filter == 1 && $_SESSION["lastupdate"] != "" && !$_GET["clean"] )
{
elseif( $show_filter == 1 && $_SESSION["lastupdate"] != "" && !isset($_GET["clean"]) ) {
$show_filter = " WHERE a.num > ".$_SESSION["lastupdate"];
}
elseif( $show_filter == 1 && $_GET["clean"] == "yes" )
{
$show_filter = filter_zeit(1);
}
elseif( $show_filter == 1 && $_SESSION["lastupdate"] != "" && isset($_GET["clean"]) && $_GET["clean"] == "yes" ) {
$show_filter = filter_zeit(1);
$show_filter = " WHERE a.zeit > '$show_filter' ";
}
elseif( $show_filter != 1 )
{
$show_filter = filter_zeit($filter);
elseif( $show_filter != 1 ) {
$show_filter = filter_zeit($filter);
$show_filter = " WHERE a.zeit > '$show_filter' ";
}
/////////
if (!isset($_GET["org_filter"])) $_GET["org_filter"] = "";
if( $_GET["org_filter"] == 'ff' )
{
$sql_org_filter = 'AND (org = "BF" OR org = "FF" OR org = "THW")';
@ -79,9 +81,9 @@ elseif( $show_filter != 1 )
//
// Daten f¸r Formatierung holen und in array->session schreiben
if( !$_SESSION["formatierung"] && !$_GET["nooutput"] )
if( !isset($_SESSION["formatierung"]) && !isset($_GET["nooutput"]) )
{
$result = mysqli_query($dbconn, "SELECT id, bg_farbe, text_farbe, text_format, text_groesse, text_groesse_text FROM formatierung ORDER BY id ASC") or die (mysqli_error());
$result = mysqli_query($dbconn, "SELECT id, bg_farbe, text_farbe, text_format, text_groesse, text_groesse_text FROM formatierung ORDER BY id ASC") or die (mysqli_error($dbconn));
while($row = mysqli_fetch_array($result))
{
$formatierung[$row["id"]] = array(
@ -108,11 +110,11 @@ elseif( $show_filter != 1 )
LEFT JOIN ric_zvei b ON b.adresse = a.adresse
LEFT JOIN organisation d ON d.id = b.org_id
$show_filter
ORDER BY a.zeit DESC") or die (mysqli_error());
ORDER BY a.zeit DESC") or die (mysqli_error($dbconn));
while($row = mysqli_fetch_array($result))
{
if( !$_GET["filter"] || $_GET["filter"] == 1 || $_GET["clean"] == "yes" )
//echo "<br>-----------";
if( !isset($_GET["filter"]) || $_GET["filter"] == 1 || (isset($_GET["clean"]) && $_GET["clean"] == "yes") )
{
if( $row["num"] > $_SESSION["lastupdate"] ) $_SESSION["lastupdate"] = $row["num"];
}
@ -120,7 +122,7 @@ elseif( $show_filter != 1 )
$bezeichnung = $row["bezeichnung"];
// Tageswechsel ausgeben
if( get_date($row["zeit"]) != $lastday && $lastday )
if( isset($lastday) && get_date($row["zeit"]) != $lastday )
{
$tageswechsel = get_timestamp(str_replace("-","",date_dbformat($lastday))."000000");
@ -146,7 +148,7 @@ elseif( $show_filter != 1 )
if( !$row_check["id"] )
{
$result_check = mysqli_query($dbconn, "INSERT INTO ric_zvei (adresse, bezeichnung, rec_typ, formatierung_id) VALUES ('$row[adresse_neu]', '$row[bezeichnung_neu]', '$row[REC_TYP]', '0')") or die(mysqli_error());
$result_check = mysqli_query($dbconn, "INSERT INTO ric_zvei (adresse, bezeichnung, rec_typ, formatierung_id) VALUES ('$row[adresse_neu]', '$row[bezeichnung_neu]', '$row[REC_TYP]', '0')") or die(mysqli_error($dbconn));
$bezeichnung = $row["bezeichnung_neu"];
}
}
@ -160,19 +162,19 @@ elseif( $show_filter != 1 )
$row["bg_farbe"] = $formatierung[$row["formatierung_id"]]["bg_farbe"];
$row["text_farbe"] = $formatierung[$row["formatierung_id"]]["text_farbe"];
$row["text_farbe_text"] = $formatierung[$row["formatierung_id"]]["text_farbe_text"];
$row["bg_farbe_text"] = $formatierung[$row["formatierung_id"]]["bg_farbe_text"];
//$row["text_farbe_text"] = $formatierung[$row["formatierung_id"]]["text_farbe_text"];
//$row["bg_farbe_text"] = $formatierung[$row["formatierung_id"]]["bg_farbe_text"];
$row["text_groesse"] = $formatierung[$row["formatierung_id"]]["text_groesse"];
$row["text_groesse_text"] = $formatierung[$row["formatierung_id"]]["text_groesse_text"];
$row["text_format"] = $formatierung[$row["formatierung_id"]]["text_format"];
// 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.'
@ -201,7 +203,7 @@ elseif( $show_filter != 1 )
// Falls sich Zeit letzter Status mit pocsag berschneiden um eins erhÔøΩen
$show_time = get_timestamp($row["zeit"]);
if( $show )
if( isset($show) )
{
while( array_key_exists($show_time, $show) )
{
@ -224,7 +226,7 @@ echo "
//if ($new_unwetter == 1) echo '<meta http-equiv="refresh" content="1">';
if ( $show )
if ( isset($show) )
{
echo '<table width="98%" border="0" cellspacing="1" cellpadding="0" bgcolor="#000000" valign="top">';
foreach ( $show as $item )

View File

@ -2,14 +2,15 @@
require_once("config.inc.php");
// Check User online
$result = mysqli_query($dbconn, "SELECT id, a_name, real_name FROM admin_users where last_seen > '$useronlinetime' ORDER BY a_name ASC") or die (mysqli_error());
if (!isset($show_online_users)) $show_online_users = "";
$result = mysqli_query($dbconn, "SELECT id, a_name, real_name FROM admin_users where last_seen > '$useronlinetime' ORDER BY a_name ASC") or die (mysqli_error($dbconn));
while($row = mysqli_fetch_array($result))
{
$show_online_users .= '<a href="javascript:oeffnefenster(\'pmfunctions.inc.php?pmdo=write&msg_to='.$row["id"].'\');" title="Nachricht an: '.$row["real_name"].'"><i>'.$row["a_name"].'</i></a>,';
}
// Check Wetter
$result = mysqli_query($dbconn, "SELECT u_meldung, u_text, u_farbe, DATE_FORMAT(u_lastcheck, '%Y%m%d%H%i%s') AS u_lastcheck, DATE_FORMAT(u_lastchange, '%Y%m%d%H%i%s') AS u_lastchange FROM unwetter WHERE id = '1'") or die (mysqli_error());
$result = mysqli_query($dbconn, "SELECT u_meldung, u_text, u_farbe, DATE_FORMAT(u_lastcheck, '%Y%m%d%H%i%s') AS u_lastcheck, DATE_FORMAT(u_lastchange, '%Y%m%d%H%i%s') AS u_lastchange FROM unwetter WHERE id = '1'") or die (mysqli_error($dbconn));
$row = mysqli_fetch_array($result);
if( !empty($row["u_meldung"]) )
@ -19,8 +20,9 @@ require_once("config.inc.php");
$uw_text = $row["u_text"];
// Neu markieren wenn ungelesen
if( $_SESSION["last_seen"] <= $row["u_lastchange"] ) $_SESSION["uw_isnew"] = 'neu';
( $_SESSION["last_seen"] <= $row["u_lastchange"] ) ? $_SESSION["uw_isnew"] = 'neu' : $_SESSION["uw_isnew"] = "";
if (!isset($unwetter_field)) $unwetter_field = "";
eval ("\$unwetter_field .= \"".gettemplate($template_dir."body_unwetter")."\";");
}
@ -28,7 +30,7 @@ require_once("config.inc.php");
$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
WHERE a.userid_to = '$_SESSION[userid]' ORDER BY pm_date ASC") or die (mysqli_error());
WHERE a.userid_to = '$_SESSION[userid]' ORDER BY pm_date ASC") or die (mysqli_error($dbconn));
while($row = mysqli_fetch_array($result))
{
$msg_date = get_date_long($row["date"])." / ".get_time($row["date"]);
@ -40,7 +42,7 @@ require_once("config.inc.php");
// Ausgabe
echo "<html>";
if( $_SESSION["online_users"] != $show_online_users ) echo $show_online_users;
if( !isset($_SESSION["online_users"]) || $_SESSION["online_users"] != $show_online_users ) echo $show_online_users;
echo "|";
if( !empty($uw_text) ) echo $unwetter_field."@".$uw_text;

View File

@ -2,26 +2,26 @@
require_once("config.inc.php");
// Filter Datum/Zeit erstellen
if( !$_GET["filter"] && !$_SESSION["filter"] )
if( !isset($_GET["filter"]) && !isset($_SESSION["filter"]) )
{
$filter = 1;
}
elseif( !$_GET["filter"] && $_SESSION["filter"] )
elseif( !isset($_GET["filter"]) && isset($_SESSION["filter"]) )
{
$filter = $_SESSION["filter"];
}
elseif( $_GET["filter"] )
elseif( isset($_GET["filter"]) )
{
$filter = $_GET["filter"];
$_SESSION["filter"] = $_GET["filter"];
}
// Filter organisation
if( !$_GET["org_filter"] && !$_SESSION["org_filter"] )
if( !isset($_GET["org_filter"]) && !isset($_SESSION["org_filter"]) )
{
$org_filter = '';
}
elseif( !$_GET["org_filter"] && $_SESSION["org_filter"] )
elseif( !isset($_GET["org_filter"]) && isset($_SESSION["org_filter"]) )
{
if( $_SESSION["org_filter"] == 'AND (org = "BF" OR org = "FF")' )
{
@ -32,7 +32,7 @@ require_once("config.inc.php");
$org_filter = $_SESSION["org_filter"];
}
}
elseif( $_GET["org_filter"] && $_GET["org_filter"] != 'all' )
elseif( isset($_GET["org_filter"]) && $_GET["org_filter"] != 'all' )
{
$org_filter = $_GET["org_filter"];
$_SESSION["org_filter"] = $_GET["org_filter"];
@ -44,11 +44,11 @@ require_once("config.inc.php");
}
// Filter Status anzeigen
if( $_GET["stat"] == '' && !$_SESSION["stat"] )
if( !isset($_GET["stat"]) && !isset($_SESSION["stat"]) )
{
$stat = '0';
}
elseif( $_GET["stat"] == '' && $_SESSION["stat"] )
elseif( $_GET["stat"] == '' && isset($_SESSION["stat"]) )
{
$stat = $_SESSION["stat"];
}
@ -59,7 +59,7 @@ require_once("config.inc.php");
}
// Wenn Aktualisierung ohne Ausgabe
if( $_GET["nooutput"] ) { $filter = 1; $stat = 1; }
if( isset($_GET["nooutput"]) ) { $filter = 1; $stat = 1; }
$show_filter = filter_zeit($filter);
$show_filter = " WHERE a.zeit > '$show_filter' ";
@ -70,23 +70,25 @@ require_once("config.inc.php");
$nav_org_filter = '
<select name="org_filter" onChange="MM_jumpMenu(\'parent\',this,0)">
<option value="'.$_SERVER["php_self"].'?filter='.$filter.'&org_filter=ff&stat=0"'; if( $org_filter == 'ff' && $stat == '0' ) $nav_org_filter .= 'selected'; $nav_org_filter .= '>Feuerwehr</option>
<option value="'.$_SERVER["php_self"].'?filter='.$filter.'&org_filter=rd&stat=0"'; if( $org_filter == 'rd' && $stat == '0' ) $nav_org_filter .= 'selected'; $nav_org_filter .= '>Rettungsdienst</option>
<option value="'.$_SERVER["php_self"].'?filter='.$filter.'&org_filter=all&stat=0"'; if( !$org_filter && $stat == '0' ) $nav_org_filter .= 'selected'; $nav_org_filter .= '>FW und RD</option>
<option value="'.$_SERVER["PHP_SELF"].'?filter='.$filter.'&org_filter=ff&stat=0"'; if( $org_filter == 'ff' && $stat == '0' ) $nav_org_filter .= 'selected'; $nav_org_filter .= '>Feuerwehr</option>
<option value="'.$_SERVER["PHP_SELF"].'?filter='.$filter.'&org_filter=rd&stat=0"'; if( $org_filter == 'rd' && $stat == '0' ) $nav_org_filter .= 'selected'; $nav_org_filter .= '>Rettungsdienst</option>
<option value="'.$_SERVER["PHP_SELF"].'?filter='.$filter.'&org_filter=all&stat=0"'; if( !$org_filter && $stat == '0' ) $nav_org_filter .= 'selected'; $nav_org_filter .= '>FW und RD</option>
</select>
';
$nav_filter = '
<select id="filter" name="filter" onChange="MM_jumpMenu(\'parent\',this,0)">
<option value="'.$_SERVER["php_self"].'?filter=48&org_filter='.$org_filter.'&stat='.$stat.'&aq='.$aq.'"'; if( $filter == 48 ) $nav_filter .= 'selected'; $nav_filter .= '>48</option>
<option value="'.$_SERVER["php_self"].'?filter=24&org_filter='.$org_filter.'&stat='.$stat.'&aq='.$aq.'"'; if( $filter == 24 ) $nav_filter .= 'selected'; $nav_filter .= '>24</option>
<option value="'.$_SERVER["php_self"].'?filter=10&org_filter='.$org_filter.'&stat='.$stat.'&aq='.$aq.'"'; if( $filter == 10 ) $nav_filter .= 'selected'; $nav_filter .= '>10</option>
<option value="'.$_SERVER["php_self"].'?filter=5&org_filter='.$org_filter.'&stat='.$stat.'&aq='.$aq.'"'; if( $filter == 5 ) $nav_filter .= 'selected'; $nav_filter .= '>5</option>
<option value="'.$_SERVER["php_self"].'?filter=2&org_filter='.$org_filter.'&stat='.$stat.'&aq='.$aq.'"'; if( $filter == 2 ) $nav_filter .= 'selected'; $nav_filter .= '>2</option>
<option value="'.$_SERVER["php_self"].'?filter=1&org_filter='.$org_filter.'&stat='.$stat.'&aq='.$aq.'"'; if( $filter == 1 ) $nav_filter .= 'selected'; $nav_filter .= '>1</option>
<option value="'.$_SERVER["PHP_SELF"].'?filter=48&org_filter='.$org_filter.'&stat='.$stat.'&aq='.$aq.'"'; if( $filter == 48 ) $nav_filter .= 'selected'; $nav_filter .= '>48</option>
<option value="'.$_SERVER["PHP_SELF"].'?filter=24&org_filter='.$org_filter.'&stat='.$stat.'&aq='.$aq.'"'; if( $filter == 24 ) $nav_filter .= 'selected'; $nav_filter .= '>24</option>
<option value="'.$_SERVER["PHP_SELF"].'?filter=10&org_filter='.$org_filter.'&stat='.$stat.'&aq='.$aq.'"'; if( $filter == 10 ) $nav_filter .= 'selected'; $nav_filter .= '>10</option>
<option value="'.$_SERVER["PHP_SELF"].'?filter=5&org_filter='.$org_filter.'&stat='.$stat.'&aq='.$aq.'"'; if( $filter == 5 ) $nav_filter .= 'selected'; $nav_filter .= '>5</option>
<option value="'.$_SERVER["PHP_SELF"].'?filter=2&org_filter='.$org_filter.'&stat='.$stat.'&aq='.$aq.'"'; if( $filter == 2 ) $nav_filter .= 'selected'; $nav_filter .= '>2</option>
<option value="'.$_SERVER["PHP_SELF"].'?filter=1&org_filter='.$org_filter.'&stat='.$stat.'&aq='.$aq.'"'; if( $filter == 1 ) $nav_filter .= 'selected'; $nav_filter .= '>1</option>
</select>
';
if (!isset($java_script)) $java_script = "";
$java_script .= "
<script type=\"text/javascript\" language=\"javascript\">
@ -308,4 +310,6 @@ function doSQL(what, pk) {
</script>
";
if (!isset($page_middle)) $page_middle = "";
eval ("dooutput(\"".gettemplate($template_dir."rahmen")."\");");

View File

@ -70,20 +70,20 @@ require_once("config.inc.php");
$nav_org_filter = '
<select name="org_filter" onChange="MM_jumpMenu(\'parent\',this,0)">
<option value="'.$_SERVER["php_self"].'?filter='.$filter.'&org_filter=ff&stat=0"'; if( $org_filter == 'ff' && $stat == '0' ) $nav_org_filter .= 'selected'; $nav_org_filter .= '>Feuerwehr</option>
<option value="'.$_SERVER["php_self"].'?filter='.$filter.'&org_filter=rd&stat=0"'; if( $org_filter == 'rd' && $stat == '0' ) $nav_org_filter .= 'selected'; $nav_org_filter .= '>Rettungsdienst</option>
<option value="'.$_SERVER["php_self"].'?filter='.$filter.'&org_filter=all&stat=0"'; if( !$org_filter && $stat == '0' ) $nav_org_filter .= 'selected'; $nav_org_filter .= '>FW und RD</option>
<option value="'.$_SERVER["PHP_SELF"].'?filter='.$filter.'&org_filter=ff&stat=0"'; if( $org_filter == 'ff' && $stat == '0' ) $nav_org_filter .= 'selected'; $nav_org_filter .= '>Feuerwehr</option>
<option value="'.$_SERVER["PHP_SELF"].'?filter='.$filter.'&org_filter=rd&stat=0"'; if( $org_filter == 'rd' && $stat == '0' ) $nav_org_filter .= 'selected'; $nav_org_filter .= '>Rettungsdienst</option>
<option value="'.$_SERVER["PHP_SELF"].'?filter='.$filter.'&org_filter=all&stat=0"'; if( !$org_filter && $stat == '0' ) $nav_org_filter .= 'selected'; $nav_org_filter .= '>FW und RD</option>
</select>
';
$nav_filter = '
<select id="filter" name="filter" onChange="MM_jumpMenu(\'parent\',this,0)">
<option value="'.$_SERVER["php_self"].'?filter=48&org_filter='.$org_filter.'&stat='.$stat.'&aq='.$aq.'"'; if( $filter == 48 ) $nav_filter .= 'selected'; $nav_filter .= '>48</option>
<option value="'.$_SERVER["php_self"].'?filter=24&org_filter='.$org_filter.'&stat='.$stat.'&aq='.$aq.'"'; if( $filter == 24 ) $nav_filter .= 'selected'; $nav_filter .= '>24</option>
<option value="'.$_SERVER["php_self"].'?filter=10&org_filter='.$org_filter.'&stat='.$stat.'&aq='.$aq.'"'; if( $filter == 10 ) $nav_filter .= 'selected'; $nav_filter .= '>10</option>
<option value="'.$_SERVER["php_self"].'?filter=5&org_filter='.$org_filter.'&stat='.$stat.'&aq='.$aq.'"'; if( $filter == 5 ) $nav_filter .= 'selected'; $nav_filter .= '>5</option>
<option value="'.$_SERVER["php_self"].'?filter=2&org_filter='.$org_filter.'&stat='.$stat.'&aq='.$aq.'"'; if( $filter == 2 ) $nav_filter .= 'selected'; $nav_filter .= '>2</option>
<option value="'.$_SERVER["php_self"].'?filter=1&org_filter='.$org_filter.'&stat='.$stat.'&aq='.$aq.'"'; if( $filter == 1 ) $nav_filter .= 'selected'; $nav_filter .= '>1</option>
<option value="'.$_SERVER["PHP_SELF"].'?filter=48&org_filter='.$org_filter.'&stat='.$stat.'&aq='.$aq.'"'; if( $filter == 48 ) $nav_filter .= 'selected'; $nav_filter .= '>48</option>
<option value="'.$_SERVER["PHP_SELF"].'?filter=24&org_filter='.$org_filter.'&stat='.$stat.'&aq='.$aq.'"'; if( $filter == 24 ) $nav_filter .= 'selected'; $nav_filter .= '>24</option>
<option value="'.$_SERVER["PHP_SELF"].'?filter=10&org_filter='.$org_filter.'&stat='.$stat.'&aq='.$aq.'"'; if( $filter == 10 ) $nav_filter .= 'selected'; $nav_filter .= '>10</option>
<option value="'.$_SERVER["PHP_SELF"].'?filter=5&org_filter='.$org_filter.'&stat='.$stat.'&aq='.$aq.'"'; if( $filter == 5 ) $nav_filter .= 'selected'; $nav_filter .= '>5</option>
<option value="'.$_SERVER["PHP_SELF"].'?filter=2&org_filter='.$org_filter.'&stat='.$stat.'&aq='.$aq.'"'; if( $filter == 2 ) $nav_filter .= 'selected'; $nav_filter .= '>2</option>
<option value="'.$_SERVER["PHP_SELF"].'?filter=1&org_filter='.$org_filter.'&stat='.$stat.'&aq='.$aq.'"'; if( $filter == 1 ) $nav_filter .= 'selected'; $nav_filter .= '>1</option>
</select>
';

View File

@ -33,12 +33,12 @@ if ( (ip2str($ip_start) <= ip2str($_SERVER["REMOTE_ADDR"]) && ip2str($_SERVER["R
$_SESSION["userid"] = $ip_users[$_SERVER["REMOTE_ADDR"]];
}
$zack = $ip_users[$_SERVER["REMOTE_ADDR"]];
$result = mysqli_query($dbconn, "SELECT a_name, DATE_FORMAT(last_seen, '%Y%m%d%H%i%s') AS last_seen FROM admin_users WHERE id = '$zack'") or die (mysqli_error());
$result = mysqli_query($dbconn, "SELECT a_name, DATE_FORMAT(last_seen, '%Y%m%d%H%i%s') AS last_seen FROM admin_users WHERE id = '$zack'") or die (mysqli_error($dbconn));
$row = mysqli_fetch_array($result);
$_SESSION["name"] = $row["a_name"];
$_SESSION["last_seen"] = ($row["last_seen"] - 200 );
}
elseif ( $_GET["iam"] == "manuelw" )
elseif ( isset($_GET["iam"]) && $_GET["iam"] == "manuelw" )
{
//$_SESSION["userid"] = '1';
$_SESSION["admin"] = '1';
@ -47,13 +47,13 @@ elseif ( $_GET["iam"] == "manuelw" )
$_SESSION["userid"] = 1;
$result = mysqli_query($dbconn, "SELECT a_name, DATE_FORMAT(last_seen, '%Y%m%d%H%i%s') AS last_seen FROM admin_users WHERE id = '1'") or die (mysqli_error());
$result = mysqli_query($dbconn, "SELECT a_name, DATE_FORMAT(last_seen, '%Y%m%d%H%i%s') AS last_seen FROM admin_users WHERE id = '1'") or die (mysqli_error($dbconn));
$row = mysqli_fetch_array($result);
$_SESSION["name"] = $row["a_name"];
$_SESSION["last_seen"] = ($row["last_seen"] - 200 );
$filter=1;
}
elseif( $wap == 1 )
elseif( isset($wap) && $wap == 1 )
{
////////////////////////
// Login per Wap
@ -111,7 +111,7 @@ elseif( $wap == 1 )
}
elseif (!$_SESSION["name"] && $_GET["mode"] == 'login' && $_REQUEST["a_name"] && $_REQUEST["a_pass"])
{
$result = mysqli_query("SELECT id, a_name, a_admin, a_mail, real_name, wap_show, wap_rows, wap_def_orgfilter, wap_def_statfilter, wap_handy, login_count FROM admin_users WHERE a_name = '$_REQUEST[a_name]' AND wap_pass = '$_REQUEST[a_pass]'") or die (mysqli_error());
$result = mysqli_query($dbconn, "SELECT id, a_name, a_admin, a_mail, real_name, wap_show, wap_rows, wap_def_orgfilter, wap_def_statfilter, wap_handy, login_count FROM admin_users WHERE a_name = '$_REQUEST[a_name]' AND wap_pass = '$_REQUEST[a_pass]'") or die (mysqli_error($dbconn));
$row = mysqli_fetch_array($result);
if( !$row["wap_handy"] )
@ -143,7 +143,7 @@ elseif( $wap == 1 )
$result = mysqli_query($dbconn, "INSERT INTO pocsag_logins (name, zeit, datum, ip, agent) VALUES ('$row[real_name]', '$timenow', '$datnow', '$ip', '$agent')");
$row["login_count"]++;
$result = mysqli_query($dbconn, "UPDATE admin_users SET login_count = '$row[login_count]' WHERE id = '$row[id]' ") or die(mysqli_error());
$result = mysqli_query($dbconn, "UPDATE admin_users SET login_count = '$row[login_count]' WHERE id = '$row[id]' ") or die(mysqli_error($dbconn));
}
else
{
@ -207,7 +207,7 @@ else
}
elseif (!$_SESSION["name"] && $_GET["mode"] == 'login')
{
$result = mysqli_query($dbconn, "SELECT id, a_name, a_admin, a_mail FROM admin_users WHERE a_name = '$_POST[a_name]'") or die (mysqli_error());
$result = mysqli_query($dbconn, "SELECT id, a_name, a_admin, a_mail FROM admin_users WHERE a_name = '$_POST[a_name]'") or die (mysqli_error($dbconn));
$row = mysqli_fetch_array($result);
if( $row[a_name] && $row["a_admin"] != '2' )
@ -219,7 +219,7 @@ else
mail_pass($row["a_mail"], $pass);
$result = mysqli_query($dbconn, "UPDATE admin_users SET login_pass='$pass' WHERE id='$row[id]'") or die(mysqli_error());
$result = mysqli_query($dbconn, "UPDATE admin_users SET login_pass='$pass' WHERE id='$row[id]'") or die(mysqli_error($dbconn));
echo'<center><br><br><br>Eine EMail mit deinem Zugang wurde an <b>'.$row[a_mail].'</b> versand.';
@ -274,7 +274,7 @@ exit;
if( !empty($_GET["login"]) )
{
$result = mysqli_query($dbconn, "SELECT id, a_name, a_admin, a_mail, real_name, login_count, pm_allow, DATE_FORMAT(last_seen, '%Y%m%d%H%i%s') AS last_seen FROM admin_users WHERE login_pass = '$_GET[login]'") or die (mysqli_error());
$result = mysqli_query($dbconn, "SELECT id, a_name, a_admin, a_mail, real_name, login_count, pm_allow, DATE_FORMAT(last_seen, '%Y%m%d%H%i%s') AS last_seen FROM admin_users WHERE login_pass = '$_GET[login]'") or die (mysqli_error($dbconn));
$row = mysqli_fetch_array($result);
if( !empty($row["a_name"]) )
@ -294,7 +294,7 @@ exit;
$result = mysqli_query($dbconn, "INSERT INTO pocsag_logins (name, zeit, datum, ip, agent) VALUES ('$row[real_name]', '$timenow', '$datnow', '$ip', '$agent')");
$row["login_count"]++;
$result = mysqli_query($dbconn, "UPDATE admin_users SET login_pass='', login_count='$row[login_count]' WHERE id='$row[id]'") or die(mysqli_error());
$result = mysqli_query($dbconn, "UPDATE admin_users SET login_pass='', login_count='$row[login_count]' WHERE id='$row[id]'") or die(mysqli_error($dbconn));
echo gohome("index.php");
}

View File

@ -24,7 +24,7 @@ require_once("config.inc.php");
if( $_GET["pmdo"] == "reply" )
{
$result = mysqli_query($dbconn, "SELECT real_name FROM admin_users WHERE id = '$_GET[to]'") or die (mysqli_error());
$result = mysqli_query($dbconn, "SELECT real_name FROM admin_users WHERE id = '$_GET[to]'") or die (mysqli_error($dbconn));
$row = mysqli_fetch_array($result);
eval ("\$message_field .= \"".gettemplate($template_dir."body_message_reply")."\";");
@ -33,7 +33,7 @@ if( $_GET["pmdo"] == "reply" )
elseif( $_GET["pmdo"] == "doreply" )
{
$result = mysqli_query($dbconn, "INSERT INTO messages (userid_from, userid_to, message) VALUES ('$_SESSION[userid]', '$_REQUEST[userid_to]', '$_REQUEST[msg_text]')");
$result = mysqli_query($dbconn, "DELETE FROM messages WHERE id = '$_REQUEST[msg_id]'")or die(mysqli_error());
$result = mysqli_query($dbconn, "DELETE FROM messages WHERE id = '$_REQUEST[msg_id]'")or die(mysqli_error($dbconn));
echo gohome($_SERVER["PHP_SELF"]);
}
@ -46,7 +46,7 @@ elseif( $_GET["pmdo"] == "write" )
<option>--------------------</option>
<option value="0">Alle</option>';
$result = mysqli_query($dbconn, "SELECT id, real_name FROM admin_users WHERE pm_allow = '1' ORDER BY real_name ASC") or die (mysqli_error());
$result = mysqli_query($dbconn, "SELECT id, real_name FROM admin_users WHERE pm_allow = '1' ORDER BY real_name ASC") or die (mysqli_error($dbconn));
while($row = mysqli_fetch_array($result))
{
if( $_GET["msg_to"] == $row["id"] ) { $selected = 'selected'; $can_pm = '1'; } else { $selected = ''; }
@ -82,7 +82,7 @@ elseif( $_GET["pmdo"] == "dowrite" )
else
{
// an alle User die PM d<>rfen
$result = mysqli_query($dbconn, "SELECT id FROM admin_users WHERE pm_allow = '1'") or die (mysqli_error());
$result = mysqli_query($dbconn, "SELECT id FROM admin_users WHERE pm_allow = '1'") or die (mysqli_error($dbconn));
while($row = mysqli_fetch_array($result))
{
$result_msg = mysqli_query($dbconn, "INSERT INTO messages (userid_from, userid_to, message) VALUES ('$_SESSION[userid]', '$row[id]', '$_REQUEST[msg_text]')");
@ -94,6 +94,6 @@ elseif( $_GET["pmdo"] == "dowrite" )
elseif( $_GET["pmdo"] == "deletepm" )
{
$result = mysqli_query($dbconn, "DELETE FROM messages WHERE id = '$_GET[msg_id]'")or die(mysqli_error());
$result = mysqli_query($dbconn, "DELETE FROM messages WHERE id = '$_GET[msg_id]'")or die(mysqli_error($dbconn));
}
?>

View File

@ -35,7 +35,7 @@ $_SESSION["online_users"] = "";
if( !$_GET["do"] )
{
$result = mysqli_query($dbconn, "SELECT a_alarmmail, a_alarmmail2sms, wap_pass, wap_show, wap_rows, wap_def_orgfilter, wap_def_statfilter FROM admin_users WHERE id = '$_SESSION[userid]'") or die (mysqli_error());
$result = mysqli_query($dbconn, "SELECT a_alarmmail, a_alarmmail2sms, wap_pass, wap_show, wap_rows, wap_def_orgfilter, wap_def_statfilter FROM admin_users WHERE id = '$_SESSION[userid]'") or die (mysqli_error($dbconn));
$row = mysqli_fetch_array($result);
$wap_pass = $row["wap_pass"];
@ -86,7 +86,7 @@ if( !$_GET["do"] )
<select name="search_ric" id="search_ric">'
;
$result = mysqli_query($dbconn, "SELECT id, org_name, org FROM organisation WHERE org != '' ORDER BY org ASC, org_name ASC") or die (mysqli_error());
$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 .= '
@ -106,7 +106,7 @@ if( !$_GET["do"] )
LEFT JOIN ric_zvei b ON b.adresse = a.adresse
LEFT JOIN formatierung c ON c.id = b.formatierung_id
LEFT JOIN organisation d ON d.id = b.org_id
WHERE a.userid = '$_SESSION[userid]' ORDER BY org ASC, org_name ASC, rec_typ ASC") or die (mysqli_error());
WHERE a.userid = '$_SESSION[userid]' ORDER BY org ASC, org_name ASC, rec_typ ASC") or die (mysqli_error($dbconn));
while($row = mysqli_fetch_array($result))
{
// Zeitfunktion
@ -146,14 +146,14 @@ elseif( $_GET["do"] == 'abodet' )
';
}
$result = mysqli_query($dbconn, "SELECT id, org_name, org FROM organisation WHERE id = '$_REQUEST[search_ric]'") or die (mysqli_error());
$result = mysqli_query($dbconn, "SELECT id, org_name, org FROM organisation WHERE id = '$_REQUEST[search_ric]'") or die (mysqli_error($dbconn));
$row = mysqli_fetch_array($result);
$org_id = $row["id"];
$org = $row["org"];
$org_name = $row["org_name"];
$result = mysqli_query($dbconn, "SELECT id, adresse, bezeichnung, rec_typ FROM ric_zvei WHERE org_id = '$org_id'") or die (mysqli_error());
$result = mysqli_query($dbconn, "SELECT id, adresse, bezeichnung, rec_typ FROM ric_zvei WHERE org_id = '$org_id'") or die (mysqli_error($dbconn));
while($row = mysqli_fetch_array($result))
{
$select_ric .= '<input name="abo_ric['.$i++.']" type="checkbox" value="'.$row["adresse"].'"> <b>'.$org.' '.$org_name.' '.$row["bezeichnung"].'</b> - '.$row["rec_typ"].'<br>';
@ -171,12 +171,12 @@ elseif( $_GET["do"] == 'aboins' )
foreach( $_REQUEST["abo_ric"] AS $v )
{
// pr<70>fen ob der User diese Ric bereits Abonniert hat
$result = mysqli_query($dbconn, "SELECT id FROM alarm2mail WHERE userid = '$_SESSION[userid]' AND adresse = '$v'") or die (mysqli_error());
$result = mysqli_query($dbconn, "SELECT id FROM alarm2mail WHERE userid = '$_SESSION[userid]' AND adresse = '$v'") or die (mysqli_error($dbconn));
$row = mysqli_fetch_array($result);
if( empty($row["id"]) )
{
$result = mysqli_query($dbconn, "INSERT INTO alarm2mail (adresse, userid, time_from, time_to, stiwo) VALUES ('$v', '$_SESSION[userid]', '$_REQUEST[alarm_time_filter_from]', '$_REQUEST[alarm_time_filter_to]', '$_REQUEST[alarm_stiwo]')") or die(mysqli_error());
$result = mysqli_query($dbconn, "INSERT INTO alarm2mail (adresse, userid, time_from, time_to, stiwo) VALUES ('$v', '$_SESSION[userid]', '$_REQUEST[alarm_time_filter_from]', '$_REQUEST[alarm_time_filter_to]', '$_REQUEST[alarm_stiwo]')") or die(mysqli_error($dbconn));
}
}
@ -188,7 +188,7 @@ elseif( $_GET["do"] == 'aboins' )
elseif( $_GET["do"] == 'abodel' )
{
$result = mysqli_query($dbconn, "DELETE FROM alarm2mail WHERE id = '$_GET[id]' AND userid = '$_SESSION[userid]'") or die(mysqli_error());
$result = mysqli_query($dbconn, "DELETE FROM alarm2mail WHERE id = '$_GET[id]' AND userid = '$_SESSION[userid]'") or die(mysqli_error($dbconn));
echo gohome($_SERVER["PHP_SELF"]);
@ -199,7 +199,7 @@ elseif( $_GET["do"] == 'setmailform' )
{
if( $_REQUEST["mail2sms"] == 1 ) { $setto = 1; } else { $setto = 0; }
$result = mysqli_query($dbconn, "UPDATE admin_users SET a_alarmmail2sms='$setto', a_alarmmail='$_REQUEST[alarmmail]' WHERE id = '$_SESSION[userid]'") or die(mysqli_error());
$result = mysqli_query($dbconn, "UPDATE admin_users SET a_alarmmail2sms='$setto', a_alarmmail='$_REQUEST[alarmmail]' WHERE id = '$_SESSION[userid]'") or die(mysqli_error($dbconn));
echo gohome($_SERVER["PHP_SELF"]);
@ -208,7 +208,7 @@ elseif( $_GET["do"] == 'setmailform' )
// Wap Einstellungen speichern
elseif( $_GET["do"] == 'setwap' )
{
$result = mysqli_query($dbconn, "UPDATE admin_users SET wap_show='$_REQUEST[wap_show]', wap_rows='$_REQUEST[wap_rows]', wap_pass='$_REQUEST[wap_pass]', wap_def_orgfilter='$_REQUEST[wap_orgfilter]', wap_def_statfilter='$_REQUEST[wap_statfilter]' WHERE id = '$_SESSION[userid]'") or die(mysqli_error());
$result = mysqli_query($dbconn, "UPDATE admin_users SET wap_show='$_REQUEST[wap_show]', wap_rows='$_REQUEST[wap_rows]', wap_pass='$_REQUEST[wap_pass]', wap_def_orgfilter='$_REQUEST[wap_orgfilter]', wap_def_statfilter='$_REQUEST[wap_statfilter]' WHERE id = '$_SESSION[userid]'") or die(mysqli_error($dbconn));
echo gohome($_SERVER["PHP_SELF"]);
}

View File

@ -44,7 +44,7 @@ require('config.inc.php');
$select_search_ric = '
<select name="search_ric" id="search_ric">';
$result = mysqli_query($dbconn, "SELECT id, org_name, org FROM organisation WHERE org != '' ORDER BY org ASC, org_name ASC") or die (mysqli_error());
$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 .= '
@ -162,7 +162,7 @@ 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 (mysqli_error());
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"];

View File

@ -20,7 +20,7 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
$result = mysqli_query($dbconn, "SELECT u_meldung, u_text, u_farbe, DATE_FORMAT(u_lastcheck, '%Y%m%d%H%i%s') AS u_lastcheck, DATE_FORMAT(u_lastchange, '%Y%m%d%H%i%s') AS u_lastchange FROM unwetter WHERE id = '1'") or die (mysqli_error());
$result = mysqli_query($dbconn, "SELECT u_meldung, u_text, u_farbe, DATE_FORMAT(u_lastcheck, '%Y%m%d%H%i%s') AS u_lastcheck, DATE_FORMAT(u_lastchange, '%Y%m%d%H%i%s') AS u_lastchange FROM unwetter WHERE id = '1'") or die (mysqli_error($dbconn));
$row = mysqli_fetch_array($result);
if( ($timestampnow - $row["u_lastcheck"]) > ($uw_checktime * 100) && $_GET["nooutput"] == 1 )
@ -73,17 +73,17 @@ if( ($timestampnow - $row["u_lastcheck"]) > ($uw_checktime * 100) && $_GET["noou
// Wenn noch kein Eintrag in DB existiert
if( empty($row["u_lastcheck"]) )
{
mysqli_query($dbconn, "INSERT INTO unwetter (id, u_meldung, u_text, u_farbe, u_lastchange) VALUES ('1', '$unwetter_status', '$unwetter_meldung', '$unwetter_farbe', '$timestampnow')") or die(mysqli_error());
mysqli_query($dbconn, "INSERT INTO unwetter (id, u_meldung, u_text, u_farbe, u_lastchange) VALUES ('1', '$unwetter_status', '$unwetter_meldung', '$unwetter_farbe', '$timestampnow')") or die(mysqli_error($dbconn));
}
// Wenn bereits Eintrag vorhanden und Checktime erreicht
if( $unwetter_meldung == $row["u_text"] )
{
mysqli_query($dbconn, "UPDATE unwetter SET u_lastcheck='$timestampnow' WHERE id = '1'") or die(mysqli_error());
mysqli_query($dbconn, "UPDATE unwetter SET u_lastcheck='$timestampnow' WHERE id = '1'") or die(mysqli_error($dbconn));
}
else
{
mysqli_query($dbconn, "UPDATE unwetter SET u_meldung='$unwetter_status', u_text='$unwetter_meldung', u_farbe='$unwetter_farbe', u_lastcheck='$timestampnow', u_lastchange='$timestampnow' WHERE id = '1'") or die(mysqli_error());
mysqli_query($dbconn, "UPDATE unwetter SET u_meldung='$unwetter_status', u_text='$unwetter_meldung', u_farbe='$unwetter_farbe', u_lastcheck='$timestampnow', u_lastchange='$timestampnow' WHERE id = '1'") or die(mysqli_error($dbconn));
}
}