Chat output
This commit is contained in:
parent
af75583404
commit
16704acba7
5
chat.php
5
chat.php
@ -17,12 +17,13 @@ $uid = $_SESSION['uid'];
|
||||
|
||||
if ($msg) db::c()->query('INSERT INTO `chat` (`cid`, `uid`, `msg`) VALUES (?i, ?i, "?s")', 1, $uid, $msg);
|
||||
|
||||
$chat = db::c()->query('SELECT * FROM `chat` ORDER BY `id` ASC LIMIT 50');
|
||||
$chat = db::c()->query('SELECT `msg`, `msgdate`, (SELECT `login` FROM `users` WHERE `users`.`id` = `uid`) AS `from` FROM `chat` ORDER BY `id` ASC LIMIT 50');
|
||||
|
||||
while ($message = $chat->fetch_assoc()) {
|
||||
$d = new DateTime($message['msgdate']);
|
||||
$m = htmlspecialchars($message['msg']);
|
||||
echo $d->format('H:i').": " . $m."<br>";
|
||||
// echo $d->format('H:i').": " . $m."<br>";
|
||||
sprintf('$s [%s]: $s <br>', $d->format('H:i'),$message['from'],$m);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1467,6 +1467,10 @@ function getslot($i, $user1 = 0)
|
||||
}
|
||||
}
|
||||
|
||||
function nickname(){
|
||||
$s=1;
|
||||
}
|
||||
|
||||
function nick($user)
|
||||
{
|
||||
$r = '';
|
||||
|
Loading…
Reference in New Issue
Block a user