Übersicht läuft
This commit is contained in:
parent
9f7da5deb9
commit
2c0012a6f4
@ -6,7 +6,7 @@
|
|||||||
}
|
}
|
||||||
-->
|
-->
|
||||||
</style>
|
</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">
|
<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 Organisation/Ort</td>
|
||||||
@ -57,7 +57,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="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"><input type="submit" name="Submit" value="Aktualisieren"></td>
|
<td bgcolor="#FFFFFF"><input type="submit" name="Submit" value="Aktualisieren"></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
@ -7,15 +7,15 @@
|
|||||||
<table width="400" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#000000">
|
<table width="400" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#000000">
|
||||||
<tr bgcolor="#FFFFFF">
|
<tr bgcolor="#FFFFFF">
|
||||||
<td> <strong>$num_dme</strong> DME/ZVEI ohne Organisation </td>
|
<td> <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>
|
||||||
<tr bgcolor="#FFFFFF">
|
<tr bgcolor="#FFFFFF">
|
||||||
<td> <strong>$num_kfz</strong> Fahrzeuge ohne Organisation </td>
|
<td> <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>
|
||||||
<tr bgcolor="#FFFFFF">
|
<tr bgcolor="#FFFFFF">
|
||||||
<td> <strong>$num_user</strong> User im System, <strong>$num_new_user</strong> davon neu </td>
|
<td> <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>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<br><br>
|
<br><br>
|
||||||
|
@ -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">
|
<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 Organisation/Ort</td>
|
||||||
@ -38,7 +38,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=kfz&do=delete&id=$_GET[id]&org=$_GET[org]">KFZ Löschen</a> </div></td>
|
<td bgcolor="#FFFFFF"><div align="center"><a href="admin.php">Zurück</a> | <a href="$_SERVER[PHP_SELF]?show=kfz&do=delete&id=$_GET[id]&org=$_GET[org]">KFZ 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>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<body onload="javascript:document.form1.msg_text.focus()">
|
<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="userid_to" type="hidden" id="userid_to" value="$_GET[to]">
|
||||||
<input name="msg_id" type="hidden" id="msg_id" value="$_GET[msg_id]">
|
<input name="msg_id" type="hidden" id="msg_id" value="$_GET[msg_id]">
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<body onload="javascript:document.form1.msg_text.focus()">
|
<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">
|
<table width="90%" class="msg_box" border="0" cellspacing="1" cellpadding="0">
|
||||||
<tr>
|
<tr>
|
||||||
|
78
admin.php
78
admin.php
@ -39,15 +39,15 @@ if( $_SESSION["admin"] != 1 ) exit;
|
|||||||
if( $_GET["show"] == 'dme' && !$_GET["do"] )
|
if( $_GET["show"] == 'dme' && !$_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());
|
$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))
|
while($row = mysqli_fetch_array($result))
|
||||||
{
|
{
|
||||||
$show_all .= '
|
$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["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=update&id='.$row["id"].'">zuordnen</a> </td>
|
||||||
<td align="center"> <a href="'.$_SERVER["php_self"].'?show=dme&do=delete&id='.$row["id"].'">l<EFBFBD>schen</a> </td>
|
<td align="center"> <a href="'.$_SERVER["PHP_SELF"].'?show=dme&do=delete&id='.$row["id"].'">l<EFBFBD>schen</a> </td>
|
||||||
</tr>
|
</tr>
|
||||||
';
|
';
|
||||||
}
|
}
|
||||||
@ -61,7 +61,7 @@ if( $_GET["show"] == 'dme' && !$_GET["do"] )
|
|||||||
elseif( $_GET["show"] == 'dme' && $_GET["do"] == 'update' )
|
elseif( $_GET["show"] == 'dme' && $_GET["do"] == 'update' )
|
||||||
{
|
{
|
||||||
// Zusammenstellung bekannter Organisationen
|
// 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))
|
while($row = mysqli_fetch_array($result))
|
||||||
{
|
{
|
||||||
if( $_REQUEST["org"] == $row["id"] ) { $selected = 'selected'; } else { $selected = ''; }
|
if( $_REQUEST["org"] == $row["id"] ) { $selected = 'selected'; } else { $selected = ''; }
|
||||||
@ -69,7 +69,7 @@ elseif( $_GET["show"] == 'dme' && $_GET["do"] == 'update' )
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Zusammenstellung der Formatierungen
|
// 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))
|
while($row = mysqli_fetch_array($result))
|
||||||
{
|
{
|
||||||
if( $_REQUEST["form"] == $row["id"] ) { $selected = 'selected'; } else { $selected = ''; }
|
if( $_REQUEST["form"] == $row["id"] ) { $selected = 'selected'; } else { $selected = ''; }
|
||||||
@ -77,7 +77,7 @@ elseif( $_GET["show"] == 'dme' && $_GET["do"] == 'update' )
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 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());
|
$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);
|
$row = mysqli_fetch_array($result);
|
||||||
|
|
||||||
// Seiteninhalt ausgeben
|
// Seiteninhalt ausgeben
|
||||||
@ -88,8 +88,8 @@ elseif( $_GET["show"] == 'dme' && $_GET["do"] == 'update' )
|
|||||||
// Wenn dme l<>schen
|
// Wenn dme l<>schen
|
||||||
elseif( $_GET["show"] == 'dme' && $_GET["do"] == 'delete' )
|
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 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());
|
$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
|
// Pr<50>fen ob noch weitere Eintr<74>ge zur Org da sind, wenn nicht l<>schen
|
||||||
if( $_GET["org"] )
|
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
|
$result = mysqli_query($dbconn, "SELECT a.id AS dme_id, b.id AS kfz_id
|
||||||
FROM ric_zvei a
|
FROM ric_zvei a
|
||||||
LEFT JOIN kfz_fms b ON b.org_id = $_GET[org]
|
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);
|
$row = mysqli_fetch_array($result);
|
||||||
|
|
||||||
if( !$row["dme_id"] && !$row["kfz_id"] )
|
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"];
|
/////////////////$organisation = $_REQUEST["new_org"];
|
||||||
|
|
||||||
// Pr<50>fen ob die Org schon existiert, wenn ja update kein eintrag
|
// 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);
|
$row = mysqli_fetch_array($result);
|
||||||
|
|
||||||
if( $row["id"] )
|
if( $row["id"] )
|
||||||
@ -149,7 +149,7 @@ elseif( $_GET["show"] == 'dme' && $_GET["do"] == 'setupdate' )
|
|||||||
$org_id = $_REQUEST["select_org"];
|
$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
|
// Pr<50>fen ob noch weitere Eintr<74>ge zur Org da sind, wenn nicht l<>schen
|
||||||
if( $_REQUEST["old_org"] )
|
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
|
$result = mysqli_query($dbconn, "SELECT a.id AS dme_id, b.id AS kfz_id
|
||||||
FROM ric_zvei a
|
FROM ric_zvei a
|
||||||
LEFT JOIN kfz_fms b ON b.org_id = $_REQUEST[old_org]
|
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);
|
$row = mysqli_fetch_array($result);
|
||||||
|
|
||||||
if( !$row["dme_id"] && !$row["kfz_id"] )
|
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"] )
|
elseif( $_GET["show"] == 'kfz' && !$_GET["do"] )
|
||||||
{
|
{
|
||||||
// Alle DME ohne Organisation holen
|
// 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))
|
while($row = mysqli_fetch_array($result))
|
||||||
{
|
{
|
||||||
$show_all .= '
|
$show_all .= '
|
||||||
<tr bgcolor="#FFFFFF">
|
<tr bgcolor="#FFFFFF">
|
||||||
<td> '.$row["bezeichnung"].'</td>
|
<td> '.$row["bezeichnung"].'</td>
|
||||||
<td align="center"> <a href="'.$_SERVER["php_self"].'?show=kfz&do=update&id='.$row["id"].'">zuordnen</a> </td>
|
<td align="center"> <a href="'.$_SERVER["PHP_SELF"].'?show=kfz&do=update&id='.$row["id"].'">zuordnen</a> </td>
|
||||||
<td align="center"> <a href="'.$_SERVER["php_self"].'?show=kfz&do=delete&id='.$row["id"].'">l<EFBFBD>schen</a> </td>
|
<td align="center"> <a href="'.$_SERVER["PHP_SELF"].'?show=kfz&do=delete&id='.$row["id"].'">l<EFBFBD>schen</a> </td>
|
||||||
</tr>
|
</tr>
|
||||||
';
|
';
|
||||||
}
|
}
|
||||||
@ -195,7 +195,7 @@ elseif( $_GET["show"] == 'kfz' && !$_GET["do"] )
|
|||||||
elseif( $_GET["show"] == 'kfz' && $_GET["do"] == 'update' )
|
elseif( $_GET["show"] == 'kfz' && $_GET["do"] == 'update' )
|
||||||
{
|
{
|
||||||
// Zusammenstellung bekannter Organisationen
|
// 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))
|
while($row = mysqli_fetch_array($result))
|
||||||
{
|
{
|
||||||
if( $_REQUEST["org"] == $row["id"] ) { $selected = 'selected'; } else { $selected = ''; }
|
if( $_REQUEST["org"] == $row["id"] ) { $selected = 'selected'; } else { $selected = ''; }
|
||||||
@ -203,7 +203,7 @@ elseif( $_GET["show"] == 'kfz' && $_GET["do"] == 'update' )
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Abfrage des verlangten Datensatzes
|
// 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);
|
$row = mysqli_fetch_array($result);
|
||||||
|
|
||||||
// Seiteninhalt ausgeben
|
// Seiteninhalt ausgeben
|
||||||
@ -214,7 +214,7 @@ elseif( $_GET["show"] == 'kfz' && $_GET["do"] == 'update' )
|
|||||||
// Wenn kfz l<>schen
|
// Wenn kfz l<>schen
|
||||||
elseif( $_GET["show"] == 'kfz' && $_GET["do"] == 'delete' )
|
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
|
// Pr<50>fen ob noch weitere Eintr<74>ge zur Org da sind, wenn nicht l<>schen
|
||||||
if( $_GET["org"] )
|
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
|
$result = mysqli_query($dbconn, "SELECT a.id AS dme_id, b.id AS kfz_id
|
||||||
FROM ric_zvei a
|
FROM ric_zvei a
|
||||||
LEFT JOIN kfz_fms b ON b.org_id = $_GET[org]
|
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);
|
$row = mysqli_fetch_array($result);
|
||||||
|
|
||||||
if( !$row["dme_id"] && !$row["kfz_id"] )
|
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"];
|
$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
|
// Pr<50>fen ob noch weitere Eintr<74>ge zur Org da sind, wenn nicht l<>schen
|
||||||
if( $_REQUEST["old_org"] )
|
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
|
$result = mysqli_query($dbconn, "SELECT a.id AS dme_id, b.id AS kfz_id
|
||||||
FROM ric_zvei a
|
FROM ric_zvei a
|
||||||
LEFT JOIN kfz_fms b ON b.org_id = $_REQUEST[old_org]
|
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);
|
$row = mysqli_fetch_array($result);
|
||||||
|
|
||||||
if( !$row["dme_id"] && !$row["kfz_id"] )
|
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"] )
|
elseif( $_GET["show"] == 'user' && !$_GET["do"] )
|
||||||
{
|
{
|
||||||
// Alle DME ohne Organisation holen
|
// 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))
|
while($row = mysqli_fetch_array($result))
|
||||||
{
|
{
|
||||||
if( $row["a_admin"] == '0' ) $status = '<b>(User)</b> ';
|
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> ';
|
elseif( $row["a_admin"] == '3' ) $status = '<b>(Closed)</b> ';
|
||||||
|
|
||||||
if( $row["a_admin"] != '1') {
|
if( $row["a_admin"] != '1') {
|
||||||
$show_del_button = '<a href="'.$_SERVER["php_self"].'?show=user&do=delete&id='.$row["id"].'">löschen</a>';
|
$show_del_button = '<a href="'.$_SERVER["PHP_SELF"].'?show=user&do=delete&id='.$row["id"].'">löschen</a>';
|
||||||
} else {
|
} else {
|
||||||
$show_del_button = "";
|
$show_del_button = "";
|
||||||
}
|
}
|
||||||
@ -304,7 +304,7 @@ elseif( $_GET["show"] == 'user' && !$_GET["do"] )
|
|||||||
<tr bgcolor="#FFFFFF">
|
<tr bgcolor="#FFFFFF">
|
||||||
<td> '.$status.$row["real_name"].'</td>
|
<td> '.$status.$row["real_name"].'</td>
|
||||||
<td><font size="2"> '.$row["a_mail"].'</font></td>
|
<td><font size="2"> '.$row["a_mail"].'</font></td>
|
||||||
<!--<td align="center"> <a href="'.$_SERVER["php_self"].'?show=user&do=update&id='.$row["id"].'">ändern</a> </td>-->
|
<!--<td align="center"> <a href="'.$_SERVER["PHP_SELF"].'?show=user&do=update&id='.$row["id"].'">ändern</a> </td>-->
|
||||||
<td>'.$row["a_name"].'</td>
|
<td>'.$row["a_name"].'</td>
|
||||||
<td align="center"> '.$show_del_button.' </td>
|
<td align="center"> '.$show_del_button.' </td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -321,7 +321,7 @@ elseif( $_GET["show"] == 'user' && !$_GET["do"] )
|
|||||||
<td>EMail</td>
|
<td>EMail</td>
|
||||||
<td colspan="2"></td>
|
<td colspan="2"></td>
|
||||||
</tr>
|
</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">
|
<tr bgcolor="#FFFFFF">
|
||||||
<td><input name="ins_name" id="ins_name" type="text" size="30"> </td>
|
<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>
|
<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
|
// Wenn user l<>schen
|
||||||
elseif( $_GET["show"] == 'user' && $_GET["do"] == 'delete' )
|
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 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());
|
$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());
|
$result = mysqli_query($dbconn, "DELETE FROM admin_users WHERE id = '$_GET[id]'") or die (mysqli_error($dbconn));
|
||||||
|
|
||||||
echo gohome($_SERVER["PHP_SELF"].'?show=user');
|
echo gohome($_SERVER["PHP_SELF"].'?show=user');
|
||||||
}
|
}
|
||||||
@ -366,18 +366,18 @@ elseif( $_GET["show"] == 'user' && $_GET["do"] == 'delete' )
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Wir schauen nach dme die keiner Org zugeordnet sind
|
// 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);
|
$num_dme = mysqli_num_rows($result);
|
||||||
|
|
||||||
// Wir schauen nach kfz die keiner Org zugeordnet sind
|
// 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);
|
$num_kfz = mysql_num_rows($result);
|
||||||
|
|
||||||
// Wir schauen nach der Userzahl
|
// 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);
|
$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);
|
$num_new_user = mysql_num_rows($result);
|
||||||
|
|
||||||
// Ausklappmenu erstellen
|
// Ausklappmenu erstellen
|
||||||
@ -385,7 +385,7 @@ else
|
|||||||
<select name="search_org" id="search_org">
|
<select name="search_org" id="search_org">
|
||||||
<option value="">--- wähle Org. zum bearbeiten ---</option>';
|
<option value="">--- wä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))
|
while($row = mysqli_fetch_array($result))
|
||||||
{
|
{
|
||||||
if( $_REQUEST["search_org"] == $row["id"] ) { $selected = 'selected'; } else { $selected = ''; }
|
if( $_REQUEST["search_org"] == $row["id"] ) { $selected = 'selected'; } else { $selected = ''; }
|
||||||
@ -403,7 +403,7 @@ else
|
|||||||
{
|
{
|
||||||
$show_ric = '--- <b>RIC/ZVEI</b> ----------<br>';
|
$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))
|
while($row = mysqli_fetch_array($result))
|
||||||
{
|
{
|
||||||
$show_ric .= ' <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>';
|
$show_ric .= ' <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>';
|
$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))
|
while($row = mysqli_fetch_array($result))
|
||||||
{
|
{
|
||||||
$show_ric .= ' <a href="'.$_SERVER["PHP_SELF"].'?do=update&id='.$row["id"].'&show=kfz&org='.$row["org_id"].'">'.$row["kennung"].'</a> | '.$row["bezeichnung"].'<br>';
|
$show_ric .= ' <a href="'.$_SERVER["PHP_SELF"].'?do=update&id='.$row["id"].'&show=kfz&org='.$row["org_id"].'">'.$row["kennung"].'</a> | '.$row["bezeichnung"].'<br>';
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Done in Haupttabelle updaten
|
// 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 )
|
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
|
$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
|
FROM alarm2mail a
|
||||||
LEFT JOIN admin_users b ON b.id = a.userid
|
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) )
|
while( $row_alarm_mail = mysqli_fetch_array($result_alarm_mail) )
|
||||||
{
|
{
|
||||||
// Alarmmail Counter
|
// Alarmmail Counter
|
||||||
@ -91,6 +91,6 @@ if( trim($row["funktion"]) != 'Klartext' && trim($row["funktion"]) != 'Info' &&
|
|||||||
if( ($row["zeit"] - $row["last_alarm"]) > 1000 )
|
if( ($row["zeit"] - $row["last_alarm"]) > 1000 )
|
||||||
{
|
{
|
||||||
$alarmcount = $row["alarm_count"] + 1;
|
$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));
|
||||||
}
|
}
|
||||||
?>
|
?>
|
@ -31,7 +31,7 @@ require('config.inc.php');
|
|||||||
LEFT JOIN ric_zvei b ON b.adresse = a.adresse
|
LEFT JOIN ric_zvei b ON b.adresse = a.adresse
|
||||||
LEFT JOIN organisation d ON d.id = b.org_id
|
LEFT JOIN organisation d ON d.id = b.org_id
|
||||||
$show_filter
|
$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))
|
while($row = mysqli_fetch_array($result))
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -51,7 +51,7 @@ require('config.inc.php');
|
|||||||
|
|
||||||
if( !$row_check["id"] )
|
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"];
|
$bezeichnung = $row["bezeichnung_neu"];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -63,7 +63,7 @@ require('config.inc.php');
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Unwetter Check
|
// 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);
|
$row = mysqli_fetch_array($result);
|
||||||
|
|
||||||
if( ($timestampnow - $row["u_lastcheck"]) > ($uw_checktime * 100) )
|
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
|
// Wenn noch kein Eintrag in DB existiert
|
||||||
if( empty($row["u_lastcheck"]) )
|
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
|
// Wenn bereits Eintrag vorhanden und Checktime erreicht
|
||||||
if( $unwetter_meldung == $row["u_text"] )
|
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
|
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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -301,13 +301,13 @@ $orgcolor["D"] = 'green'; // RD sonstige
|
|||||||
//
|
//
|
||||||
// Datenbankserververbindung aufbauen und Datenbank auswhlen
|
// Datenbankserververbindung aufbauen und Datenbank auswhlen
|
||||||
//
|
//
|
||||||
$dbconn = mysqli_connect($dbhost, $dbuser, $dbpass, $dbname) 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());
|
//$dbselect = mysqli_select_db($dbname, $dbconn) or die (mysqli_error($dbconn));
|
||||||
|
|
||||||
//
|
//
|
||||||
// Sessions starten
|
// Sessions starten
|
||||||
//
|
//
|
||||||
//session_start();
|
session_start();
|
||||||
|
|
||||||
/////////////////
|
/////////////////
|
||||||
// Requires
|
// Requires
|
||||||
|
@ -140,7 +140,7 @@ function get_day($time) {
|
|||||||
// Filter Zeit errechnen
|
// Filter Zeit errechnen
|
||||||
function filter_zeit($filter) {
|
function filter_zeit($filter) {
|
||||||
$filter = date("YmdHis", mktime(date("G")-$filter,date("i"),date("s"), date("m"),date("d"),date("Y")));
|
$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;
|
return $filter;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
52
get.php
52
get.php
@ -22,6 +22,7 @@
|
|||||||
|
|
||||||
require('config.inc.php');
|
require('config.inc.php');
|
||||||
|
|
||||||
|
if (!isset($_SESSION["querystring"])) $_SESSION["querystring"] = "";
|
||||||
if( $_SERVER['QUERY_STRING'] != $_SESSION["querystring"] )
|
if( $_SERVER['QUERY_STRING'] != $_SESSION["querystring"] )
|
||||||
{
|
{
|
||||||
//$_SESSION["lastupdate"] = "";
|
//$_SESSION["lastupdate"] = "";
|
||||||
@ -30,7 +31,7 @@ require('config.inc.php');
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Filter Datum/Zeit erstellen
|
// Filter Datum/Zeit erstellen
|
||||||
if( !$_GET["filter"] || $_GET["filter"] == 1 )
|
if( !isset($_GET["filter"]) || $_GET["filter"] == 1 )
|
||||||
{
|
{
|
||||||
$show_filter = 1;
|
$show_filter = 1;
|
||||||
}
|
}
|
||||||
@ -39,27 +40,28 @@ require('config.inc.php');
|
|||||||
$filter = $_GET["filter"];
|
$filter = $_GET["filter"];
|
||||||
}
|
}
|
||||||
|
|
||||||
if( $show_filter == 1 && $_SESSION["lastupdate"] == "" && !$_GET["clean"] ) {
|
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 = filter_zeit(1);
|
||||||
$show_filter = " WHERE a.zeit > '$show_filter' ";
|
$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"];
|
$show_filter = " WHERE a.num > ".$_SESSION["lastupdate"];
|
||||||
}
|
}
|
||||||
elseif( $show_filter == 1 && $_GET["clean"] == "yes" )
|
elseif( $show_filter == 1 && $_SESSION["lastupdate"] != "" && isset($_GET["clean"]) && $_GET["clean"] == "yes" ) {
|
||||||
{
|
|
||||||
$show_filter = filter_zeit(1);
|
$show_filter = filter_zeit(1);
|
||||||
$show_filter = " WHERE a.zeit > '$show_filter' ";
|
$show_filter = " WHERE a.zeit > '$show_filter' ";
|
||||||
}
|
}
|
||||||
elseif( $show_filter != 1 )
|
elseif( $show_filter != 1 ) {
|
||||||
{
|
|
||||||
$show_filter = filter_zeit($filter);
|
$show_filter = filter_zeit($filter);
|
||||||
$show_filter = " WHERE a.zeit > '$show_filter' ";
|
$show_filter = " WHERE a.zeit > '$show_filter' ";
|
||||||
}
|
}
|
||||||
|
|
||||||
/////////
|
/////////
|
||||||
|
|
||||||
|
if (!isset($_GET["org_filter"])) $_GET["org_filter"] = "";
|
||||||
if( $_GET["org_filter"] == 'ff' )
|
if( $_GET["org_filter"] == 'ff' )
|
||||||
{
|
{
|
||||||
$sql_org_filter = 'AND (org = "BF" OR org = "FF" OR org = "THW")';
|
$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
|
// 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))
|
while($row = mysqli_fetch_array($result))
|
||||||
{
|
{
|
||||||
$formatierung[$row["id"]] = array(
|
$formatierung[$row["id"]] = array(
|
||||||
@ -108,11 +110,11 @@ elseif( $show_filter != 1 )
|
|||||||
LEFT JOIN ric_zvei b ON b.adresse = a.adresse
|
LEFT JOIN ric_zvei b ON b.adresse = a.adresse
|
||||||
LEFT JOIN organisation d ON d.id = b.org_id
|
LEFT JOIN organisation d ON d.id = b.org_id
|
||||||
$show_filter
|
$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))
|
while($row = mysqli_fetch_array($result))
|
||||||
{
|
{
|
||||||
|
//echo "<br>-----------";
|
||||||
if( !$_GET["filter"] || $_GET["filter"] == 1 || $_GET["clean"] == "yes" )
|
if( !isset($_GET["filter"]) || $_GET["filter"] == 1 || (isset($_GET["clean"]) && $_GET["clean"] == "yes") )
|
||||||
{
|
{
|
||||||
if( $row["num"] > $_SESSION["lastupdate"] ) $_SESSION["lastupdate"] = $row["num"];
|
if( $row["num"] > $_SESSION["lastupdate"] ) $_SESSION["lastupdate"] = $row["num"];
|
||||||
}
|
}
|
||||||
@ -120,7 +122,7 @@ elseif( $show_filter != 1 )
|
|||||||
$bezeichnung = $row["bezeichnung"];
|
$bezeichnung = $row["bezeichnung"];
|
||||||
|
|
||||||
// Tageswechsel ausgeben
|
// 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");
|
$tageswechsel = get_timestamp(str_replace("-","",date_dbformat($lastday))."000000");
|
||||||
|
|
||||||
@ -146,7 +148,7 @@ elseif( $show_filter != 1 )
|
|||||||
|
|
||||||
if( !$row_check["id"] )
|
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"];
|
$bezeichnung = $row["bezeichnung_neu"];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -160,19 +162,19 @@ elseif( $show_filter != 1 )
|
|||||||
|
|
||||||
$row["bg_farbe"] = $formatierung[$row["formatierung_id"]]["bg_farbe"];
|
$row["bg_farbe"] = $formatierung[$row["formatierung_id"]]["bg_farbe"];
|
||||||
$row["text_farbe"] = $formatierung[$row["formatierung_id"]]["text_farbe"];
|
$row["text_farbe"] = $formatierung[$row["formatierung_id"]]["text_farbe"];
|
||||||
$row["text_farbe_text"] = $formatierung[$row["formatierung_id"]]["text_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["bg_farbe_text"] = $formatierung[$row["formatierung_id"]]["bg_farbe_text"];
|
||||||
$row["text_groesse"] = $formatierung[$row["formatierung_id"]]["text_groesse"];
|
$row["text_groesse"] = $formatierung[$row["formatierung_id"]]["text_groesse"];
|
||||||
$row["text_groesse_text"] = $formatierung[$row["formatierung_id"]]["text_groesse_text"];
|
$row["text_groesse_text"] = $formatierung[$row["formatierung_id"]]["text_groesse_text"];
|
||||||
$row["text_format"] = $formatierung[$row["formatierung_id"]]["text_format"];
|
$row["text_format"] = $formatierung[$row["formatierung_id"]]["text_format"];
|
||||||
|
|
||||||
// default Farben bestimmen
|
// default Farben bestimmen
|
||||||
if( !$row["bg_farbe"] ) $row["bg_farbe"] = 'white';
|
if( !isset($row["bg_farbe"]) ) $row["bg_farbe"] = 'white';
|
||||||
if( !$row["text_farbe"] ) $row["text_farbe"] = 'black';
|
if( !isset($row["text_farbe"]) ) $row["text_farbe"] = 'black';
|
||||||
if( !$row["text_farbe_text"] ) $row["text_farbe_text"] = 'black';
|
if( !isset($row["text_farbe_text"]) ) $row["text_farbe_text"] = 'black';
|
||||||
if( !$row["bg_farbe_text"] ) $row["bg_farbe_text"] = '#CCCCCC';
|
if( !isset($row["bg_farbe_text"]) ) $row["bg_farbe_text"] = '#CCCCCC';
|
||||||
if( !$row["text_groesse"] ) $row["text_groesse"] = '13';
|
if( !isset($row["text_groesse"]) ) $row["text_groesse"] = '13';
|
||||||
if( !$row["text_groesse_text"] ) $row["text_groesse_text"] = '12';
|
if( !isset($row["text_groesse_text"]) ) $row["text_groesse_text"] = '12';
|
||||||
|
|
||||||
// pocsag in Array schreiben
|
// pocsag in Array schreiben
|
||||||
//$thisday = $nextday.'
|
//$thisday = $nextday.'
|
||||||
@ -201,7 +203,7 @@ elseif( $show_filter != 1 )
|
|||||||
|
|
||||||
// Falls sich Zeit letzter Status mit pocsag berschneiden um eins erhÔøΩen
|
// Falls sich Zeit letzter Status mit pocsag berschneiden um eins erhÔøΩen
|
||||||
$show_time = get_timestamp($row["zeit"]);
|
$show_time = get_timestamp($row["zeit"]);
|
||||||
if( $show )
|
if( isset($show) )
|
||||||
{
|
{
|
||||||
while( array_key_exists($show_time, $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 ($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">';
|
echo '<table width="98%" border="0" cellspacing="1" cellpadding="0" bgcolor="#000000" valign="top">';
|
||||||
foreach ( $show as $item )
|
foreach ( $show as $item )
|
||||||
|
@ -2,14 +2,15 @@
|
|||||||
require_once("config.inc.php");
|
require_once("config.inc.php");
|
||||||
|
|
||||||
// Check User online
|
// 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))
|
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>,';
|
$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
|
// 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);
|
$row = mysqli_fetch_array($result);
|
||||||
|
|
||||||
if( !empty($row["u_meldung"]) )
|
if( !empty($row["u_meldung"]) )
|
||||||
@ -19,8 +20,9 @@ require_once("config.inc.php");
|
|||||||
$uw_text = $row["u_text"];
|
$uw_text = $row["u_text"];
|
||||||
|
|
||||||
// Neu markieren wenn ungelesen
|
// 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")."\";");
|
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
|
$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
|
||||||
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))
|
while($row = mysqli_fetch_array($result))
|
||||||
{
|
{
|
||||||
$msg_date = get_date_long($row["date"])." / ".get_time($row["date"]);
|
$msg_date = get_date_long($row["date"])." / ".get_time($row["date"]);
|
||||||
@ -40,7 +42,7 @@ require_once("config.inc.php");
|
|||||||
// Ausgabe
|
// Ausgabe
|
||||||
echo "<html>";
|
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 "|";
|
echo "|";
|
||||||
|
|
||||||
if( !empty($uw_text) ) echo $unwetter_field."@".$uw_text;
|
if( !empty($uw_text) ) echo $unwetter_field."@".$uw_text;
|
||||||
|
40
index.php
40
index.php
@ -2,26 +2,26 @@
|
|||||||
require_once("config.inc.php");
|
require_once("config.inc.php");
|
||||||
|
|
||||||
// Filter Datum/Zeit erstellen
|
// Filter Datum/Zeit erstellen
|
||||||
if( !$_GET["filter"] && !$_SESSION["filter"] )
|
if( !isset($_GET["filter"]) && !isset($_SESSION["filter"]) )
|
||||||
{
|
{
|
||||||
$filter = 1;
|
$filter = 1;
|
||||||
}
|
}
|
||||||
elseif( !$_GET["filter"] && $_SESSION["filter"] )
|
elseif( !isset($_GET["filter"]) && isset($_SESSION["filter"]) )
|
||||||
{
|
{
|
||||||
$filter = $_SESSION["filter"];
|
$filter = $_SESSION["filter"];
|
||||||
}
|
}
|
||||||
elseif( $_GET["filter"] )
|
elseif( isset($_GET["filter"]) )
|
||||||
{
|
{
|
||||||
$filter = $_GET["filter"];
|
$filter = $_GET["filter"];
|
||||||
$_SESSION["filter"] = $_GET["filter"];
|
$_SESSION["filter"] = $_GET["filter"];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Filter organisation
|
// Filter organisation
|
||||||
if( !$_GET["org_filter"] && !$_SESSION["org_filter"] )
|
if( !isset($_GET["org_filter"]) && !isset($_SESSION["org_filter"]) )
|
||||||
{
|
{
|
||||||
$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")' )
|
if( $_SESSION["org_filter"] == 'AND (org = "BF" OR org = "FF")' )
|
||||||
{
|
{
|
||||||
@ -32,7 +32,7 @@ require_once("config.inc.php");
|
|||||||
$org_filter = $_SESSION["org_filter"];
|
$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"];
|
$org_filter = $_GET["org_filter"];
|
||||||
$_SESSION["org_filter"] = $_GET["org_filter"];
|
$_SESSION["org_filter"] = $_GET["org_filter"];
|
||||||
@ -44,11 +44,11 @@ require_once("config.inc.php");
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Filter Status anzeigen
|
// Filter Status anzeigen
|
||||||
if( $_GET["stat"] == '' && !$_SESSION["stat"] )
|
if( !isset($_GET["stat"]) && !isset($_SESSION["stat"]) )
|
||||||
{
|
{
|
||||||
$stat = '0';
|
$stat = '0';
|
||||||
}
|
}
|
||||||
elseif( $_GET["stat"] == '' && $_SESSION["stat"] )
|
elseif( $_GET["stat"] == '' && isset($_SESSION["stat"]) )
|
||||||
{
|
{
|
||||||
$stat = $_SESSION["stat"];
|
$stat = $_SESSION["stat"];
|
||||||
}
|
}
|
||||||
@ -59,7 +59,7 @@ require_once("config.inc.php");
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Wenn Aktualisierung ohne Ausgabe
|
// 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 = filter_zeit($filter);
|
||||||
$show_filter = " WHERE a.zeit > '$show_filter' ";
|
$show_filter = " WHERE a.zeit > '$show_filter' ";
|
||||||
@ -70,23 +70,25 @@ require_once("config.inc.php");
|
|||||||
|
|
||||||
$nav_org_filter = '
|
$nav_org_filter = '
|
||||||
<select name="org_filter" onChange="MM_jumpMenu(\'parent\',this,0)">
|
<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=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=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=all&stat=0"'; if( !$org_filter && $stat == '0' ) $nav_org_filter .= 'selected'; $nav_org_filter .= '>FW und RD</option>
|
||||||
</select>
|
</select>
|
||||||
';
|
';
|
||||||
|
|
||||||
$nav_filter = '
|
$nav_filter = '
|
||||||
<select id="filter" name="filter" onChange="MM_jumpMenu(\'parent\',this,0)">
|
<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=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=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=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=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=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=1&org_filter='.$org_filter.'&stat='.$stat.'&aq='.$aq.'"'; if( $filter == 1 ) $nav_filter .= 'selected'; $nav_filter .= '>1</option>
|
||||||
</select>
|
</select>
|
||||||
';
|
';
|
||||||
|
|
||||||
|
|
||||||
|
if (!isset($java_script)) $java_script = "";
|
||||||
$java_script .= "
|
$java_script .= "
|
||||||
<script type=\"text/javascript\" language=\"javascript\">
|
<script type=\"text/javascript\" language=\"javascript\">
|
||||||
|
|
||||||
@ -308,4 +310,6 @@ function doSQL(what, pk) {
|
|||||||
</script>
|
</script>
|
||||||
";
|
";
|
||||||
|
|
||||||
|
if (!isset($page_middle)) $page_middle = "";
|
||||||
|
|
||||||
eval ("dooutput(\"".gettemplate($template_dir."rahmen")."\");");
|
eval ("dooutput(\"".gettemplate($template_dir."rahmen")."\");");
|
||||||
|
@ -70,20 +70,20 @@ require_once("config.inc.php");
|
|||||||
|
|
||||||
$nav_org_filter = '
|
$nav_org_filter = '
|
||||||
<select name="org_filter" onChange="MM_jumpMenu(\'parent\',this,0)">
|
<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=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=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=all&stat=0"'; if( !$org_filter && $stat == '0' ) $nav_org_filter .= 'selected'; $nav_org_filter .= '>FW und RD</option>
|
||||||
</select>
|
</select>
|
||||||
';
|
';
|
||||||
|
|
||||||
$nav_filter = '
|
$nav_filter = '
|
||||||
<select id="filter" name="filter" onChange="MM_jumpMenu(\'parent\',this,0)">
|
<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=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=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=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=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=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=1&org_filter='.$org_filter.'&stat='.$stat.'&aq='.$aq.'"'; if( $filter == 1 ) $nav_filter .= 'selected'; $nav_filter .= '>1</option>
|
||||||
</select>
|
</select>
|
||||||
';
|
';
|
||||||
|
|
||||||
|
@ -33,12 +33,12 @@ if ( (ip2str($ip_start) <= ip2str($_SERVER["REMOTE_ADDR"]) && ip2str($_SERVER["R
|
|||||||
$_SESSION["userid"] = $ip_users[$_SERVER["REMOTE_ADDR"]];
|
$_SESSION["userid"] = $ip_users[$_SERVER["REMOTE_ADDR"]];
|
||||||
}
|
}
|
||||||
$zack = $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);
|
$row = mysqli_fetch_array($result);
|
||||||
$_SESSION["name"] = $row["a_name"];
|
$_SESSION["name"] = $row["a_name"];
|
||||||
$_SESSION["last_seen"] = ($row["last_seen"] - 200 );
|
$_SESSION["last_seen"] = ($row["last_seen"] - 200 );
|
||||||
}
|
}
|
||||||
elseif ( $_GET["iam"] == "manuelw" )
|
elseif ( isset($_GET["iam"]) && $_GET["iam"] == "manuelw" )
|
||||||
{
|
{
|
||||||
//$_SESSION["userid"] = '1';
|
//$_SESSION["userid"] = '1';
|
||||||
$_SESSION["admin"] = '1';
|
$_SESSION["admin"] = '1';
|
||||||
@ -47,13 +47,13 @@ elseif ( $_GET["iam"] == "manuelw" )
|
|||||||
|
|
||||||
$_SESSION["userid"] = 1;
|
$_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);
|
$row = mysqli_fetch_array($result);
|
||||||
$_SESSION["name"] = $row["a_name"];
|
$_SESSION["name"] = $row["a_name"];
|
||||||
$_SESSION["last_seen"] = ($row["last_seen"] - 200 );
|
$_SESSION["last_seen"] = ($row["last_seen"] - 200 );
|
||||||
$filter=1;
|
$filter=1;
|
||||||
}
|
}
|
||||||
elseif( $wap == 1 )
|
elseif( isset($wap) && $wap == 1 )
|
||||||
{
|
{
|
||||||
////////////////////////
|
////////////////////////
|
||||||
// Login per Wap
|
// Login per Wap
|
||||||
@ -111,7 +111,7 @@ elseif( $wap == 1 )
|
|||||||
}
|
}
|
||||||
elseif (!$_SESSION["name"] && $_GET["mode"] == 'login' && $_REQUEST["a_name"] && $_REQUEST["a_pass"])
|
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);
|
$row = mysqli_fetch_array($result);
|
||||||
|
|
||||||
if( !$row["wap_handy"] )
|
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')");
|
$result = mysqli_query($dbconn, "INSERT INTO pocsag_logins (name, zeit, datum, ip, agent) VALUES ('$row[real_name]', '$timenow', '$datnow', '$ip', '$agent')");
|
||||||
|
|
||||||
$row["login_count"]++;
|
$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
|
else
|
||||||
{
|
{
|
||||||
@ -207,7 +207,7 @@ else
|
|||||||
}
|
}
|
||||||
elseif (!$_SESSION["name"] && $_GET["mode"] == 'login')
|
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);
|
$row = mysqli_fetch_array($result);
|
||||||
|
|
||||||
if( $row[a_name] && $row["a_admin"] != '2' )
|
if( $row[a_name] && $row["a_admin"] != '2' )
|
||||||
@ -219,7 +219,7 @@ else
|
|||||||
|
|
||||||
mail_pass($row["a_mail"], $pass);
|
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.';
|
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"]) )
|
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);
|
$row = mysqli_fetch_array($result);
|
||||||
|
|
||||||
if( !empty($row["a_name"]) )
|
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')");
|
$result = mysqli_query($dbconn, "INSERT INTO pocsag_logins (name, zeit, datum, ip, agent) VALUES ('$row[real_name]', '$timenow', '$datnow', '$ip', '$agent')");
|
||||||
|
|
||||||
$row["login_count"]++;
|
$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");
|
echo gohome("index.php");
|
||||||
}
|
}
|
||||||
|
@ -24,7 +24,7 @@ require_once("config.inc.php");
|
|||||||
|
|
||||||
if( $_GET["pmdo"] == "reply" )
|
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);
|
$row = mysqli_fetch_array($result);
|
||||||
eval ("\$message_field .= \"".gettemplate($template_dir."body_message_reply")."\";");
|
eval ("\$message_field .= \"".gettemplate($template_dir."body_message_reply")."\";");
|
||||||
|
|
||||||
@ -33,7 +33,7 @@ if( $_GET["pmdo"] == "reply" )
|
|||||||
elseif( $_GET["pmdo"] == "doreply" )
|
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, "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"]);
|
echo gohome($_SERVER["PHP_SELF"]);
|
||||||
}
|
}
|
||||||
@ -46,7 +46,7 @@ elseif( $_GET["pmdo"] == "write" )
|
|||||||
<option>--------------------</option>
|
<option>--------------------</option>
|
||||||
<option value="0">Alle</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))
|
while($row = mysqli_fetch_array($result))
|
||||||
{
|
{
|
||||||
if( $_GET["msg_to"] == $row["id"] ) { $selected = 'selected'; $can_pm = '1'; } else { $selected = ''; }
|
if( $_GET["msg_to"] == $row["id"] ) { $selected = 'selected'; $can_pm = '1'; } else { $selected = ''; }
|
||||||
@ -82,7 +82,7 @@ elseif( $_GET["pmdo"] == "dowrite" )
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// an alle User die PM d<>rfen
|
// 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))
|
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]')");
|
$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" )
|
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));
|
||||||
}
|
}
|
||||||
?>
|
?>
|
20
profile.php
20
profile.php
@ -35,7 +35,7 @@ $_SESSION["online_users"] = "";
|
|||||||
if( !$_GET["do"] )
|
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);
|
$row = mysqli_fetch_array($result);
|
||||||
|
|
||||||
$wap_pass = $row["wap_pass"];
|
$wap_pass = $row["wap_pass"];
|
||||||
@ -86,7 +86,7 @@ if( !$_GET["do"] )
|
|||||||
<select name="search_ric" id="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))
|
while($row = mysqli_fetch_array($result))
|
||||||
{
|
{
|
||||||
$select_search_ric .= '
|
$select_search_ric .= '
|
||||||
@ -106,7 +106,7 @@ if( !$_GET["do"] )
|
|||||||
LEFT JOIN ric_zvei b ON b.adresse = a.adresse
|
LEFT JOIN ric_zvei b ON b.adresse = a.adresse
|
||||||
LEFT JOIN formatierung c ON c.id = b.formatierung_id
|
LEFT JOIN formatierung c ON c.id = b.formatierung_id
|
||||||
LEFT JOIN organisation d ON d.id = b.org_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))
|
while($row = mysqli_fetch_array($result))
|
||||||
{
|
{
|
||||||
// Zeitfunktion
|
// 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);
|
$row = mysqli_fetch_array($result);
|
||||||
|
|
||||||
$org_id = $row["id"];
|
$org_id = $row["id"];
|
||||||
$org = $row["org"];
|
$org = $row["org"];
|
||||||
$org_name = $row["org_name"];
|
$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))
|
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>';
|
$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 )
|
foreach( $_REQUEST["abo_ric"] AS $v )
|
||||||
{
|
{
|
||||||
// pr<70>fen ob der User diese Ric bereits Abonniert hat
|
// 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);
|
$row = mysqli_fetch_array($result);
|
||||||
|
|
||||||
if( empty($row["id"]) )
|
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' )
|
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"]);
|
echo gohome($_SERVER["PHP_SELF"]);
|
||||||
|
|
||||||
@ -199,7 +199,7 @@ elseif( $_GET["do"] == 'setmailform' )
|
|||||||
{
|
{
|
||||||
if( $_REQUEST["mail2sms"] == 1 ) { $setto = 1; } else { $setto = 0; }
|
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"]);
|
echo gohome($_SERVER["PHP_SELF"]);
|
||||||
|
|
||||||
@ -208,7 +208,7 @@ elseif( $_GET["do"] == 'setmailform' )
|
|||||||
// Wap Einstellungen speichern
|
// Wap Einstellungen speichern
|
||||||
elseif( $_GET["do"] == 'setwap' )
|
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"]);
|
echo gohome($_SERVER["PHP_SELF"]);
|
||||||
}
|
}
|
||||||
|
@ -44,7 +44,7 @@ require('config.inc.php');
|
|||||||
$select_search_ric = '
|
$select_search_ric = '
|
||||||
<select name="search_ric" id="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))
|
while($row = mysqli_fetch_array($result))
|
||||||
{
|
{
|
||||||
$select_search_ric .= '
|
$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 formatierung c ON c.id = b.formatierung_id
|
||||||
LEFT JOIN organisation d ON d.id = b.org_id
|
LEFT JOIN organisation d ON d.id = b.org_id
|
||||||
$show_filter
|
$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))
|
while($row = mysqli_fetch_array($result))
|
||||||
{
|
{
|
||||||
$bezeichnung = $row["bezeichnung"];
|
$bezeichnung = $row["bezeichnung"];
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* 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);
|
$row = mysqli_fetch_array($result);
|
||||||
|
|
||||||
if( ($timestampnow - $row["u_lastcheck"]) > ($uw_checktime * 100) && $_GET["nooutput"] == 1 )
|
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
|
// Wenn noch kein Eintrag in DB existiert
|
||||||
if( empty($row["u_lastcheck"]) )
|
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
|
// Wenn bereits Eintrag vorhanden und Checktime erreicht
|
||||||
if( $unwetter_meldung == $row["u_text"] )
|
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
|
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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user