forked from 9inevolt/OverRustle
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathembedchat.php
More file actions
38 lines (29 loc) · 867 Bytes
/
Copy pathembedchat.php
File metadata and controls
38 lines (29 loc) · 867 Bytes
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
<?php
require_once 'vendor/autoload.php';
require_once 'config.php';
require_once 'session.php';
if (empty($_GET['user'])) {
header('HTTP/1.1 400 Bad Request');
die('User must be specified');
}
$redis = new Predis\Client($config['redis']);
$user = $redis->hgetall('user:'.$_GET['user']);
$channel = $redis->hgetall('channel:'.$_GET['user']);
if (empty($user) || empty($channel)) {
header('HTTP/1.1 404 Not Found');
die('Channel not found');
}
include 'blacklist.php';
?>
<!DOCTYPE html>
<html>
<head>
<title>OverRustle - <?php echo $user['name'] ?>'s Chat</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" charset="utf-8">
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/overrustle.css" rel="stylesheet">
</head>
<body class="embed">
<?php include 'chat.php' ?>
</body>
</html>