-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchat.php
51 lines (36 loc) · 1.22 KB
/
chat.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php
/*
Copyright (C) 2007-2008 Gilles Dubuc.
This file is part of photographycomp.com.
*/
error_reporting(E_ALL);
header('Content-Type: text/html; charset=utf-8');
$start_time = microtime(true);
require_once (dirname(__FILE__).'/includes/facebook.php');
require_once(dirname(__FILE__).'/entities/user.php');
require_once(dirname(__FILE__).'/utilities/analytics.php');
require_once(dirname(__FILE__).'/utilities/ui.php');
require_once(dirname(__FILE__).'/constants.php');
require_once(dirname(__FILE__).'/settings.php');
include($STYLING["TEXT"]);
include($STYLING["TOPMENU"]);
$facebook = new Facebook($api_key, $secret);
$uid = $facebook->require_login();
$user = User :: getUser($uid);
if ($user->getStatus() == $STATUS["BANNED"]) {
echo "<fb:redirect url=\"".$PAGE["BANNED"]."\"/>";
exit(0);
}
echo UI::RenderMenu($PAGE_CODE["CHAT"], $uid);
if (isset($ADMINS[$uid])) {
$candelete = true;
$canmark = true;
} else {
$candelete = false;
$canmark = false;
}
?>
<fb:board xid="<?=$BOARD_NAME?>" canpost="true" candelete="<?=$candelete?>" canmark="<?=$canmark?>" cancreatetopic="true" numtopics="10" returnurl="<?=$PAGE["CHAT"]?>"> <fb:title><?=$TEXT["FORUM"]?></fb:title> </fb:board>
<?php
echo Analytics::Page("chat.php");
?>