1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
|
<?php
require_once('../__#conf#__/config.inc.php');
$verbindung = @mysql_connect($GnexdbHost,$GnexdbUser,$GnexdbPassword);
if (!$verbindung) {
echo "Keine Verbindung möglich!";
exit;
}
$sql = "SELECT * FROM usr_gx0_2.mchat ORDER BY zeit DESC LIMIT 5";
$result = mysql_db_query($GnexdbName,$sql,$verbindung);
while ($row = mysql_fetch_array($result)) {
$message = htmlspecialchars($row['message']);
if($row['anwen']) {
if($row['anwen'] == $username || $row['name'] == $username) {
$backgroundNow = '; color: #fff';
}
} else {
$backgroundNow = '';
}
if($row['anwen']) {
if($row['anwen'] == $username || $row['name'] == $username) {
echo "<div style='font-size: 13px; font-family: Tahoma; color: #fff; font-weight: bold; float: left; margin-right: 5px$backgroundNow'>@<a href=" . '"' . "javascript:parent.mChatWhisperTo('$row[name]')" . '"' . ">$row[name]</a></div><div style='font-size: 13px; font-family: Tahoma; color: #fff; float: left$backgroundNow'> $message</div><div style='clear: both'></div>";
}
} else if(!$row['anwen']) {
echo "<div style='font-size: 13px; font-family: Tahoma; color: #fff; font-weight: bold; float: left; margin-right: 5px$backgroundNow'><a href=" . '"' . "javascript:parent.mChatWhisperTo('$row[name]')" . '"' . ">$row[name]</a></div><div style='font-size: 13px; font-family: Tahoma; color: #fff; float: left$backgroundNow'> $message</div><div style='clear: both'></div>";
}
}
?> |