-
Notifications
You must be signed in to change notification settings - Fork 7
/
chatroomadmin.php
30 lines (27 loc) · 993 Bytes
/
chatroomadmin.php
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
<?php
session_name("icsession");
session_start();
include('db.php');
$getchar = mysql_query("SELECT * FROM characters WHERE id='".$_SESSION['userid']."'") or die(mysql_error());
$char = mysql_fetch_assoc($getchar);
if($char['username'] == "Ajezior" || $char['username'] == "Wtfheather"){
print "<table>";
$getmessages = mysql_query("SELECT * FROM chatroom ORDER BY id DESC LIMIT 2500");
while($messages = mysql_fetch_array($getmessages))
{
$username = $messages['username'];
$userlevel = $messages['userlevel'];
$to = $messages['to'];
$date = $messages['date'];
$message = str_replace("+", "\+", $messages['message']);
$message = str_replace("&", "\&", $messages['message']);
$message = str_replace("'", "\'", $message);
$message = str_replace("\\\\", "\\", $message);
$data = $data.$message;
}
print "<tr><td>".$data."</td></tr>";
print "</table>";
}else{
print "You should not be here.";
}
?>