forked from vendethiel/ezarena
/
adr_tower.php
70 lines (60 loc) · 2.35 KB
/
adr_tower.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<?php
/***************************************************************************
* adr_tower.php
* ------------------------
* begin : 10/03/2005
* copyright : One_Piece
*
*
***************************************************************************/
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
***************************************************************************/
define('IN_PHPBB', true);
define('IN_ADR_ZONES', true);
define('IN_ADR_CHARACTER', true);
$phpbb_root_path = './';
include_once($phpbb_root_path . 'extension.inc');
include_once($phpbb_root_path . 'common.'.$phpEx);
//
// Start session management
$userdata = session_pagestart($user_ip, PAGE_ADR);
init_userprefs($userdata);
// End session management
//
$user_id = $userdata['user_id'];
include_once($phpbb_root_path . 'adr/includes/adr_global.'.$phpEx);
// Sorry , only logged users ...
if ( !$userdata['session_logged_in'] )
{
$redirect = "adr_character.$phpEx";
$redirect .= ( isset($user_id) ) ? '&user_id=' . $user_id : '';
header('Location: ' . append_sid("login.$phpEx?redirect=$redirect", true));
}
// Includes the tpl and the header
adr_template_file('adr_tower_body.tpl');
include_once($phpbb_root_path . 'includes/page_header.'.$phpEx);
// Get the general config and character infos
$adr_general = adr_get_general_config();
adr_enable_check();
adr_ban_check($user_id);
adr_character_created_check($user_id);
$adr_user = adr_get_user_infos($user_id);
$template->assign_vars(array(
'L_ZONE_TOWER' => $lang['Adr_zone_tower_title'],
'L_ZONE_CHARACTER_SKILLS' => $lang['Adr_zone_character_skills'],
'L_ZONE_CHARACTER_EQUIP' => $lang['Adr_zone_character_equip'],
'U_ZONE_CHARACTER_SKILLS' => append_sid("adr_character_skills.$phpEx"),
'U_ZONE_CHARACTER_EQUIP' => append_sid("adr_character_equipment.$phpEx"),
'S_ZONES_ACTION' => append_sid("adr_tower.$phpEx"),
));
include($phpbb_root_path . 'adr/includes/adr_header.'.$phpEx);
$template->pparse('body');
include_once($phpbb_root_path . 'includes/page_tail.'.$phpEx);
?>