| 1 |
4950 |
psotfx |
<?php
|
| 2 |
8146 |
acydburn |
/**
|
| 3 |
5114 |
acydburn |
*
|
| 4 |
5114 |
acydburn |
* @package ucp
|
| 5 |
5114 |
acydburn |
* @version $Id$
|
| 6 |
8146 |
acydburn |
* @copyright (c) 2005 phpBB Group
|
| 7 |
8146 |
acydburn |
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
| 8 |
5114 |
acydburn |
*
|
| 9 |
5114 |
acydburn |
*/
|
| 10 |
3075 |
thefinn |
|
| 11 |
5114 |
acydburn |
/**
|
| 12 |
5883 |
acydburn |
* @ignore
|
| 13 |
5114 |
acydburn |
*/
|
| 14 |
3075 |
thefinn |
define('IN_PHPBB', true);
|
| 15 |
8572 |
acydburn |
if (!defined('PHPBB_ROOT_PATH')) define('PHPBB_ROOT_PATH', './');
|
| 16 |
8572 |
acydburn |
if (!defined('PHP_EXT')) define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
|
| 17 |
8572 |
acydburn |
include(PHPBB_ROOT_PATH . 'common.' . PHP_EXT);
|
| 18 |
8572 |
acydburn |
require(PHPBB_ROOT_PATH . 'includes/functions_user.' . PHP_EXT);
|
| 19 |
8572 |
acydburn |
require(PHPBB_ROOT_PATH . 'includes/functions_module.' . PHP_EXT);
|
| 20 |
4906 |
acydburn |
|
| 21 |
4950 |
psotfx |
// Basic parameter data
|
| 22 |
5254 |
acydburn |
$id = request_var('i', '');
|
| 23 |
4950 |
psotfx |
$mode = request_var('mode', '');
|
| 24 |
4950 |
psotfx |
|
| 25 |
6892 |
davidmj |
if ($mode == 'login' || $mode == 'logout' || $mode == 'confirm')
|
| 26 |
4906 |
acydburn |
{
|
| 27 |
4906 |
acydburn |
define('IN_LOGIN', true);
|
| 28 |
4906 |
acydburn |
}
|
| 29 |
3075 |
thefinn |
|
| 30 |
4950 |
psotfx |
// Start session management
|
| 31 |
5254 |
acydburn |
$user->session_begin();
|
| 32 |
4950 |
psotfx |
$auth->acl($user->data);
|
| 33 |
4950 |
psotfx |
$user->setup('ucp');
|
| 34 |
4950 |
psotfx |
|
| 35 |
6104 |
acydburn |
// Setting a variable to let the style designer know where he is...
|
| 36 |
6104 |
acydburn |
$template->assign_var('S_IN_UCP', true);
|
| 37 |
6104 |
acydburn |
|
| 38 |
5254 |
acydburn |
$module = new p_master();
|
| 39 |
4950 |
psotfx |
|
| 40 |
8916 |
acydburn |
// Go through basic "global" modes
|
| 41 |
4003 |
psotfx |
switch ($mode)
|
| 42 |
4003 |
psotfx |
{
|
| 43 |
4003 |
psotfx |
case 'activate':
|
| 44 |
5254 |
acydburn |
$module->load('ucp', 'activate');
|
| 45 |
5254 |
acydburn |
$module->display($user->lang['UCP_ACTIVATE']);
|
| 46 |
5790 |
acydburn |
|
| 47 |
8572 |
acydburn |
redirect(append_sid('index'));
|
| 48 |
5254 |
acydburn |
break;
|
| 49 |
5254 |
acydburn |
|
| 50 |
5114 |
acydburn |
case 'resend_act':
|
| 51 |
5254 |
acydburn |
$module->load('ucp', 'resend');
|
| 52 |
5254 |
acydburn |
$module->display($user->lang['UCP_RESEND']);
|
| 53 |
5254 |
acydburn |
break;
|
| 54 |
5114 |
acydburn |
|
| 55 |
4583 |
psotfx |
case 'sendpassword':
|
| 56 |
5254 |
acydburn |
$module->load('ucp', 'remind');
|
| 57 |
5254 |
acydburn |
$module->display($user->lang['UCP_REMIND']);
|
| 58 |
5254 |
acydburn |
break;
|
| 59 |
4020 |
psotfx |
|
| 60 |
4003 |
psotfx |
case 'register':
|
| 61 |
5117 |
acydburn |
if ($user->data['is_registered'] || isset($_REQUEST['not_agreed']))
|
| 62 |
4003 |
psotfx |
{
|
| 63 |
8572 |
acydburn |
redirect(append_sid('index'));
|
| 64 |
4003 |
psotfx |
}
|
| 65 |
3650 |
psotfx |
|
| 66 |
5254 |
acydburn |
$module->load('ucp', 'register');
|
| 67 |
5378 |
subblue |
$module->display($user->lang['REGISTER']);
|
| 68 |
5254 |
acydburn |
break;
|
| 69 |
3650 |
psotfx |
|
| 70 |
4020 |
psotfx |
case 'confirm':
|
| 71 |
5254 |
acydburn |
$module->load('ucp', 'confirm');
|
| 72 |
5254 |
acydburn |
break;
|
| 73 |
5254 |
acydburn |
|
| 74 |
4003 |
psotfx |
case 'login':
|
| 75 |
5117 |
acydburn |
if ($user->data['is_registered'])
|
| 76 |
4003 |
psotfx |
{
|
| 77 |
8572 |
acydburn |
redirect(append_sid('index'));
|
| 78 |
4003 |
psotfx |
}
|
| 79 |
3650 |
psotfx |
|
| 80 |
8686 |
aptx |
login_box(request_var('redirect', 'index'));
|
| 81 |
5494 |
acydburn |
break;
|
| 82 |
4003 |
psotfx |
|
| 83 |
4003 |
psotfx |
case 'logout':
|
| 84 |
7966 |
acydburn |
if ($user->data['user_id'] != ANONYMOUS && isset($_GET['sid']) && !is_array($_GET['sid']) && $_GET['sid'] === $user->session_id)
|
| 85 |
7593 |
acydburn |
{
|
| 86 |
7593 |
acydburn |
$user->session_kill();
|
| 87 |
7593 |
acydburn |
$user->session_begin();
|
| 88 |
7593 |
acydburn |
$message = $user->lang['LOGOUT_REDIRECT'];
|
| 89 |
7593 |
acydburn |
}
|
| 90 |
7593 |
acydburn |
else
|
| 91 |
7593 |
acydburn |
{
|
| 92 |
7593 |
acydburn |
$message = ($user->data['user_id'] == ANONYMOUS) ? $user->lang['LOGOUT_REDIRECT'] : $user->lang['LOGOUT_FAILED'];
|
| 93 |
7593 |
acydburn |
}
|
| 94 |
8572 |
acydburn |
meta_refresh(3, append_sid('index'));
|
| 95 |
8656 |
acydburn |
|
| 96 |
8572 |
acydburn |
$message = $message . '<br /><br />' . sprintf($user->lang['RETURN_INDEX'], '<a href="' . append_sid('index') . '">', '</a> ');
|
| 97 |
7593 |
acydburn |
trigger_error($message);
|
| 98 |
7593 |
acydburn |
|
| 99 |
5494 |
acydburn |
break;
|
| 100 |
4904 |
acydburn |
|
| 101 |
5650 |
acydburn |
case 'terms':
|
| 102 |
5650 |
acydburn |
case 'privacy':
|
| 103 |
5650 |
acydburn |
|
| 104 |
5650 |
acydburn |
$message = ($mode == 'terms') ? 'TERMS_OF_USE_CONTENT' : 'PRIVACY_POLICY';
|
| 105 |
5650 |
acydburn |
$title = ($mode == 'terms') ? 'TERMS_USE' : 'PRIVACY';
|
| 106 |
5650 |
acydburn |
|
| 107 |
5650 |
acydburn |
if (empty($user->lang[$message]))
|
| 108 |
5650 |
acydburn |
{
|
| 109 |
5650 |
acydburn |
if ($user->data['is_registered'])
|
| 110 |
5650 |
acydburn |
{
|
| 111 |
8572 |
acydburn |
redirect(append_sid('index'));
|
| 112 |
5650 |
acydburn |
}
|
| 113 |
6015 |
acydburn |
|
| 114 |
5881 |
acydburn |
login_box();
|
| 115 |
5650 |
acydburn |
}
|
| 116 |
5650 |
acydburn |
|
| 117 |
5650 |
acydburn |
$template->set_filenames(array(
|
| 118 |
5650 |
acydburn |
'body' => 'ucp_agreement.html')
|
| 119 |
5650 |
acydburn |
);
|
| 120 |
5650 |
acydburn |
|
| 121 |
6054 |
acydburn |
// Disable online list
|
| 122 |
6054 |
acydburn |
page_header($user->lang[$title], false);
|
| 123 |
5650 |
acydburn |
|
| 124 |
5650 |
acydburn |
$template->assign_vars(array(
|
| 125 |
5650 |
acydburn |
'S_AGREEMENT' => true,
|
| 126 |
5650 |
acydburn |
'AGREEMENT_TITLE' => $user->lang[$title],
|
| 127 |
5662 |
acydburn |
'AGREEMENT_TEXT' => sprintf($user->lang[$message], $config['sitename'], generate_board_url()),
|
| 128 |
8572 |
acydburn |
'U_BACK' => append_sid('ucp', 'mode=login'),
|
| 129 |
5650 |
acydburn |
'L_BACK' => $user->lang['BACK_TO_LOGIN'])
|
| 130 |
5650 |
acydburn |
);
|
| 131 |
6015 |
acydburn |
|
| 132 |
5650 |
acydburn |
page_footer();
|
| 133 |
5650 |
acydburn |
|
| 134 |
5494 |
acydburn |
break;
|
| 135 |
5114 |
acydburn |
|
| 136 |
4904 |
acydburn |
case 'delete_cookies':
|
| 137 |
8656 |
acydburn |
|
| 138 |
4904 |
acydburn |
// Delete Cookies with dynamic names (do NOT delete poll cookies)
|
| 139 |
4912 |
acydburn |
if (confirm_box(true))
|
| 140 |
4904 |
acydburn |
{
|
| 141 |
4912 |
acydburn |
$set_time = time() - 31536000;
|
| 142 |
6015 |
acydburn |
|
| 143 |
4912 |
acydburn |
foreach ($_COOKIE as $cookie_name => $cookie_data)
|
| 144 |
4904 |
acydburn |
{
|
| 145 |
4912 |
acydburn |
$cookie_name = str_replace($config['cookie_name'] . '_', '', $cookie_name);
|
| 146 |
6851 |
acydburn |
|
| 147 |
6851 |
acydburn |
// Polls are stored as {cookie_name}_poll_{topic_id}, cookie_name_ got removed, therefore checking for poll_
|
| 148 |
6851 |
acydburn |
if (strpos($cookie_name, 'poll_') !== 0)
|
| 149 |
4912 |
acydburn |
{
|
| 150 |
4912 |
acydburn |
$user->set_cookie($cookie_name, '', $set_time);
|
| 151 |
4912 |
acydburn |
}
|
| 152 |
4904 |
acydburn |
}
|
| 153 |
6015 |
acydburn |
|
| 154 |
4912 |
acydburn |
$user->set_cookie('track', '', $set_time);
|
| 155 |
5183 |
psotfx |
$user->set_cookie('u', '', $set_time);
|
| 156 |
5183 |
psotfx |
$user->set_cookie('k', '', $set_time);
|
| 157 |
4912 |
acydburn |
$user->set_cookie('sid', '', $set_time);
|
| 158 |
4904 |
acydburn |
|
| 159 |
4912 |
acydburn |
// We destroy the session here, the user will be logged out nevertheless
|
| 160 |
5199 |
acydburn |
$user->session_kill();
|
| 161 |
5429 |
subblue |
$user->session_begin();
|
| 162 |
4904 |
acydburn |
|
| 163 |
8572 |
acydburn |
meta_refresh(3, append_sid('index'));
|
| 164 |
4904 |
acydburn |
|
| 165 |
8572 |
acydburn |
$message = $user->lang['COOKIES_DELETED'] . '<br /><br />' . sprintf($user->lang['RETURN_INDEX'], '<a href="' . append_sid('index') . '">', '</a>');
|
| 166 |
4912 |
acydburn |
trigger_error($message);
|
| 167 |
4912 |
acydburn |
}
|
| 168 |
4912 |
acydburn |
else
|
| 169 |
4912 |
acydburn |
{
|
| 170 |
4912 |
acydburn |
confirm_box(false, 'DELETE_COOKIES', '');
|
| 171 |
4912 |
acydburn |
}
|
| 172 |
5595 |
acydburn |
|
| 173 |
8572 |
acydburn |
redirect(append_sid('index'));
|
| 174 |
6015 |
acydburn |
|
| 175 |
5494 |
acydburn |
break;
|
| 176 |
5790 |
acydburn |
|
| 177 |
5790 |
acydburn |
case 'switch_perm':
|
| 178 |
5790 |
acydburn |
|
| 179 |
5790 |
acydburn |
$user_id = request_var('u', 0);
|
| 180 |
5790 |
acydburn |
|
| 181 |
5790 |
acydburn |
$sql = 'SELECT *
|
| 182 |
5790 |
acydburn |
FROM ' . USERS_TABLE . '
|
| 183 |
5790 |
acydburn |
WHERE user_id = ' . (int) $user_id;
|
| 184 |
5790 |
acydburn |
$result = $db->sql_query($sql);
|
| 185 |
5790 |
acydburn |
$user_row = $db->sql_fetchrow($result);
|
| 186 |
5790 |
acydburn |
$db->sql_freeresult($result);
|
| 187 |
5790 |
acydburn |
|
| 188 |
5790 |
acydburn |
if (!$auth->acl_get('a_switchperm') || !$user_row || $user_id == $user->data['user_id'])
|
| 189 |
5790 |
acydburn |
{
|
| 190 |
8572 |
acydburn |
redirect(append_sid('index'));
|
| 191 |
5790 |
acydburn |
}
|
| 192 |
5790 |
acydburn |
|
| 193 |
8572 |
acydburn |
include(PHPBB_ROOT_PATH . 'includes/acp/auth.' . PHP_EXT);
|
| 194 |
5790 |
acydburn |
|
| 195 |
5790 |
acydburn |
$auth_admin = new auth_admin();
|
| 196 |
5790 |
acydburn |
if (!$auth_admin->ghost_permissions($user_id, $user->data['user_id']))
|
| 197 |
5790 |
acydburn |
{
|
| 198 |
8572 |
acydburn |
redirect(append_sid('index'));
|
| 199 |
5790 |
acydburn |
}
|
| 200 |
5790 |
acydburn |
|
| 201 |
6015 |
acydburn |
add_log('admin', 'LOG_ACL_TRANSFER_PERMISSIONS', $user_row['username']);
|
| 202 |
5790 |
acydburn |
|
| 203 |
8572 |
acydburn |
$message = sprintf($user->lang['PERMISSIONS_TRANSFERRED'], $user_row['username']) . '<br /><br />' . sprintf($user->lang['RETURN_INDEX'], '<a href="' . append_sid('index') . '">', '</a>');
|
| 204 |
5790 |
acydburn |
trigger_error($message);
|
| 205 |
5790 |
acydburn |
|
| 206 |
5790 |
acydburn |
break;
|
| 207 |
5790 |
acydburn |
|
| 208 |
5790 |
acydburn |
case 'restore_perm':
|
| 209 |
5790 |
acydburn |
|
| 210 |
5790 |
acydburn |
if (!$user->data['user_perm_from'] || !$auth->acl_get('a_switchperm'))
|
| 211 |
5790 |
acydburn |
{
|
| 212 |
8572 |
acydburn |
redirect(append_sid('index'));
|
| 213 |
5790 |
acydburn |
}
|
| 214 |
5790 |
acydburn |
|
| 215 |
5790 |
acydburn |
$auth->acl_cache($user->data);
|
| 216 |
5790 |
acydburn |
|
| 217 |
5790 |
acydburn |
$sql = 'UPDATE ' . USERS_TABLE . "
|
| 218 |
5790 |
acydburn |
SET user_perm_from = 0
|
| 219 |
5790 |
acydburn |
WHERE user_id = " . $user->data['user_id'];
|
| 220 |
5790 |
acydburn |
$db->sql_query($sql);
|
| 221 |
5790 |
acydburn |
|
| 222 |
5790 |
acydburn |
$sql = 'SELECT username
|
| 223 |
5790 |
acydburn |
FROM ' . USERS_TABLE . '
|
| 224 |
5790 |
acydburn |
WHERE user_id = ' . $user->data['user_perm_from'];
|
| 225 |
5790 |
acydburn |
$result = $db->sql_query($sql);
|
| 226 |
5790 |
acydburn |
$username = $db->sql_fetchfield('username');
|
| 227 |
5790 |
acydburn |
$db->sql_freeresult($result);
|
| 228 |
5790 |
acydburn |
|
| 229 |
5790 |
acydburn |
add_log('admin', 'LOG_ACL_RESTORE_PERMISSIONS', $username);
|
| 230 |
5790 |
acydburn |
|
| 231 |
8572 |
acydburn |
$message = $user->lang['PERMISSIONS_RESTORED'] . '<br /><br />' . sprintf($user->lang['RETURN_INDEX'], '<a href="' . append_sid('index') . '">', '</a>');
|
| 232 |
5790 |
acydburn |
trigger_error($message);
|
| 233 |
5790 |
acydburn |
|
| 234 |
5790 |
acydburn |
break;
|
| 235 |
3075 |
thefinn |
|
| 236 |
8916 |
acydburn |
default:
|
| 237 |
4950 |
psotfx |
|
| 238 |
8916 |
acydburn |
// Only registered users can go beyond this point
|
| 239 |
8916 |
acydburn |
if (!$user->data['is_registered'])
|
| 240 |
8916 |
acydburn |
{
|
| 241 |
8916 |
acydburn |
if ($user->data['is_bot'])
|
| 242 |
8916 |
acydburn |
{
|
| 243 |
8916 |
acydburn |
redirect(append_sid('index'));
|
| 244 |
8916 |
acydburn |
}
|
| 245 |
8916 |
acydburn |
|
| 246 |
8916 |
acydburn |
login_box('', $user->lang['LOGIN_EXPLAIN_UCP']);
|
| 247 |
8916 |
acydburn |
}
|
| 248 |
8916 |
acydburn |
|
| 249 |
8916 |
acydburn |
// Instantiate module system and generate list of available modules
|
| 250 |
8916 |
acydburn |
$module->list_modules('ucp');
|
| 251 |
8916 |
acydburn |
|
| 252 |
8916 |
acydburn |
// Check if the zebra module is set
|
| 253 |
8916 |
acydburn |
if ($module->is_active('zebra', 'friends'))
|
| 254 |
8916 |
acydburn |
{
|
| 255 |
8916 |
acydburn |
_display_friends();
|
| 256 |
8916 |
acydburn |
}
|
| 257 |
8916 |
acydburn |
|
| 258 |
8916 |
acydburn |
// Do not display subscribed topics/forums if not allowed
|
| 259 |
8916 |
acydburn |
if (!$config['allow_topic_notify'] && !$config['allow_forum_notify'])
|
| 260 |
8916 |
acydburn |
{
|
| 261 |
8916 |
acydburn |
$module->set_display('main', 'subscribed', false);
|
| 262 |
8916 |
acydburn |
}
|
| 263 |
8916 |
acydburn |
|
| 264 |
8916 |
acydburn |
// Select the active module
|
| 265 |
8916 |
acydburn |
$module->set_active($id, $mode);
|
| 266 |
8916 |
acydburn |
|
| 267 |
8916 |
acydburn |
// Load and execute the relevant module
|
| 268 |
8916 |
acydburn |
$module->load_active();
|
| 269 |
8916 |
acydburn |
|
| 270 |
8916 |
acydburn |
// Assign data to the template engine for the list of modules
|
| 271 |
8916 |
acydburn |
$module->assign_tpl_vars(append_sid('ucp'));
|
| 272 |
8916 |
acydburn |
|
| 273 |
8916 |
acydburn |
// Generate the page, do not display/query online list
|
| 274 |
8916 |
acydburn |
$module->display($module->get_page_title(), false);
|
| 275 |
8916 |
acydburn |
|
| 276 |
8916 |
acydburn |
break;
|
| 277 |
4003 |
psotfx |
}
|
| 278 |
3650 |
psotfx |
|
| 279 |
8916 |
acydburn |
/**
|
| 280 |
8916 |
acydburn |
* Output listing of friends online
|
| 281 |
8916 |
acydburn |
*/
|
| 282 |
8916 |
acydburn |
function _display_friends()
|
| 283 |
8916 |
acydburn |
{
|
| 284 |
8916 |
acydburn |
global $config, $db, $template, $user, $auth;
|
| 285 |
3650 |
psotfx |
|
| 286 |
7229 |
davidmj |
$update_time = $config['load_online_time'] * 60;
|
| 287 |
5885 |
davidmj |
|
| 288 |
7229 |
davidmj |
$sql = $db->sql_build_query('SELECT_DISTINCT', array(
|
| 289 |
7829 |
kellanved |
'SELECT' => 'u.user_id, u.username, u.username_clean, u.user_colour, MAX(s.session_time) as online_time, MIN(s.session_viewonline) AS viewonline',
|
| 290 |
5885 |
davidmj |
|
| 291 |
7229 |
davidmj |
'FROM' => array(
|
| 292 |
7229 |
davidmj |
USERS_TABLE => 'u',
|
| 293 |
7229 |
davidmj |
ZEBRA_TABLE => 'z'
|
| 294 |
7229 |
davidmj |
),
|
| 295 |
5885 |
davidmj |
|
| 296 |
7229 |
davidmj |
'LEFT_JOIN' => array(
|
| 297 |
7229 |
davidmj |
array(
|
| 298 |
7229 |
davidmj |
'FROM' => array(SESSIONS_TABLE => 's'),
|
| 299 |
7229 |
davidmj |
'ON' => 's.session_user_id = z.zebra_id'
|
| 300 |
7229 |
davidmj |
)
|
| 301 |
7229 |
davidmj |
),
|
| 302 |
5885 |
davidmj |
|
| 303 |
7229 |
davidmj |
'WHERE' => 'z.user_id = ' . $user->data['user_id'] . '
|
| 304 |
7229 |
davidmj |
AND z.friend = 1
|
| 305 |
7229 |
davidmj |
AND u.user_id = z.zebra_id',
|
| 306 |
5957 |
acydburn |
|
| 307 |
7828 |
kellanved |
'GROUP_BY' => 'z.zebra_id, u.user_id, u.username_clean, u.user_colour, u.username',
|
| 308 |
5885 |
davidmj |
|
| 309 |
7229 |
davidmj |
'ORDER_BY' => 'u.username_clean ASC',
|
| 310 |
7229 |
davidmj |
));
|
| 311 |
3431 |
thefinn |
|
| 312 |
7229 |
davidmj |
$result = $db->sql_query($sql);
|
| 313 |
3996 |
psotfx |
|
| 314 |
7229 |
davidmj |
while ($row = $db->sql_fetchrow($result))
|
| 315 |
7229 |
davidmj |
{
|
| 316 |
7828 |
kellanved |
$which = (time() - $update_time < $row['online_time'] && ($row['viewonline'] || $auth->acl_get('u_viewonline'))) ? 'online' : 'offline';
|
| 317 |
4950 |
psotfx |
|
| 318 |
7229 |
davidmj |
$template->assign_block_vars("friends_{$which}", array(
|
| 319 |
7229 |
davidmj |
'USER_ID' => $row['user_id'],
|
| 320 |
7229 |
davidmj |
|
| 321 |
7229 |
davidmj |
'U_PROFILE' => get_username_string('profile', $row['user_id'], $row['username'], $row['user_colour']),
|
| 322 |
7229 |
davidmj |
'USER_COLOUR' => get_username_string('colour', $row['user_id'], $row['username'], $row['user_colour']),
|
| 323 |
7229 |
davidmj |
'USERNAME' => get_username_string('username', $row['user_id'], $row['username'], $row['user_colour']),
|
| 324 |
7229 |
davidmj |
'USERNAME_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']))
|
| 325 |
7229 |
davidmj |
);
|
| 326 |
7229 |
davidmj |
}
|
| 327 |
7229 |
davidmj |
$db->sql_freeresult($result);
|
| 328 |
3591 |
thefinn |
}
|
| 329 |
3591 |
thefinn |
|
| 330 |
5767 |
acydburn |
/**
|
| 331 |
5767 |
acydburn |
* Function for assigning a template var if the zebra module got included
|
| 332 |
5767 |
acydburn |
*/
|
| 333 |
5767 |
acydburn |
function _module_zebra($mode, &$module_row)
|
| 334 |
5767 |
acydburn |
{
|
| 335 |
5767 |
acydburn |
global $template;
|
| 336 |
5767 |
acydburn |
|
| 337 |
5767 |
acydburn |
$template->assign_var('S_ZEBRA_ENABLED', true);
|
| 338 |
7232 |
acydburn |
|
| 339 |
7232 |
acydburn |
if ($mode == 'friends')
|
| 340 |
7232 |
acydburn |
{
|
| 341 |
7232 |
acydburn |
$template->assign_var('S_ZEBRA_FRIENDS_ENABLED', true);
|
| 342 |
7232 |
acydburn |
}
|
| 343 |
7232 |
acydburn |
|
| 344 |
7232 |
acydburn |
if ($mode == 'foes')
|
| 345 |
7232 |
acydburn |
{
|
| 346 |
7232 |
acydburn |
$template->assign_var('S_ZEBRA_FOES_ENABLED', true);
|
| 347 |
7232 |
acydburn |
}
|
| 348 |
5767 |
acydburn |
}
|
| 349 |
5767 |
acydburn |
|
| 350 |
3075 |
thefinn |
?> |