61 lines
2.3 KiB
PHP
Executable File
61 lines
2.3 KiB
PHP
Executable File
<?php
|
|
require_once("config.inc.php");
|
|
|
|
// Check User online
|
|
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($dbconn));
|
|
$row = mysqli_fetch_array($result);
|
|
|
|
if( !empty($row["u_meldung"]) )
|
|
{
|
|
$uw_show_link = '<a href="javascript:animatedcollapse.toggle(\'wetter\')"><font style="background-color:#FFFFFF;"> toggle </font></a>';
|
|
$uw_warntime = time_format(get_time($row["u_lastchange"]));
|
|
$uw_text = $row["u_text"];
|
|
|
|
// Neu markieren wenn ungelesen
|
|
( $_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")."\";");
|
|
}
|
|
*/
|
|
|
|
// Check PM
|
|
if (!isset($message_field)) $message_field = "";
|
|
|
|
$result = mysqli_query($dbconn, "SELECT a.*, DATE_FORMAT(a.pm_date, '%Y%m%d%H%i%s') AS date, b.real_name
|
|
FROM messages a
|
|
LEFT JOIN admin_users b ON b.id = a.userid_from
|
|
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"]);
|
|
$msg_text = nl2br($row["message"]);
|
|
|
|
eval ("\$message_field .= \"".gettemplate($template_dir."body_message")."\";");
|
|
}
|
|
|
|
// Ausgabe
|
|
echo "<html>";
|
|
|
|
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;
|
|
echo "|";
|
|
|
|
if( !empty($msg_date) ) echo $message_field;
|
|
|
|
echo "</html>";
|
|
|
|
// Sessions füllen
|
|
$_SESSION["online_users"] = $show_online_users;
|
|
?>
|