-
Notifications
You must be signed in to change notification settings - Fork 5
/
Get_Count.php
38 lines (35 loc) · 1.36 KB
/
Get_Count.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
<?php
/**
* You may not change or alter any portion of this comment or credits
* of supporting developers from this source code or any supporting source code
* which is considered copyrighted (c) material of the original comment or credit authors.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/
/**
* SmallWorld
*
* @copyright The XOOPS Project (https://xoops.org)
* @copyright 2011 Culex
* @license GNU GPL (http://www.gnu.org/licenses/gpl-2.0.html/)
* @package SmallWorld
* @since 1.0
* @author Michael Albertsen (http://culex.dk) <[email protected]>
*/
require_once __DIR__ . '/../../mainfile.php';
require_once XOOPS_ROOT_PATH . '/class/template.php';
require_once XOOPS_ROOT_PATH . '/modules/smallworld/include/functions.php';
//require_once XOOPS_ROOT_PATH . '/modules/smallworld/class/class_collector.php';
global $xoopsUser, $xoopsLogger, $xoopsDB, $xoopsTpl;
$xoopsLogger->activated = false;
$xoopsTpl->caching = 0;
$_COOKIE[session_name()] = session_id();
if ($xoopsUser) {
if ($_GET['SmallworldGetUserMsgCount']) {
$counts = smallworld_getCountFriendMessagesEtc();
header('Content-type: application/json');
echo "{\"NewUserMsgCount\":$counts}";
}
}