ADR2 is an open source project powered by Assembla

Assembla offers free public and private SVN/Git repositories and project hosting with bug/issue tracking and collaboration tools.

/
 
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<?php
/***************************************************************************
 *                    adr_menu.php
 *                ------------------------
 *    begin             :
 *    copyright        :
 *
 *
 ***************************************************************************/

/***************************************************************************
 *
 *   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_TEMPLE', true);
define('IN_ADR_BATTLE', true);
define('IN_ADR_CHARACTER', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
include($phpbb_root_path . 'adr/includes/adr_global.'.$phpEx);


//
// Start session management
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
// End session management
//

$user_id = $userdata['user_id'];

// Sorry , only logged users ...
if ( !$userdata['session_logged_in'] )
{
    $redirect = "adr_temple.$phpEx";
    $redirect .= ( isset($user_id) ) ? '&user_id=' . $user_id : '';
    header('Location: ' . append_sid("login.$phpEx?redirect=$redirect", true));
}



// Get the general settings
$adr_general = adr_get_general_config();
adr_enable_check();
adr_ban_check($user_id);
adr_character_created_check($user_id);
$adr_char = adr_get_user_infos($user_id);


// Get the general config
$adr_general = adr_get_general_config();

if ( !$adr_general['Adr_disable_rpg'] && $userdata['user_level'] != ADMIN )
{
    adr_previous ( Adr_disable_rpg , 'index' , '' );
}

// Deny access if user is imprisioned
if($userdata['user_cell_time']){
    adr_previous(Adr_shops_no_thief, adr_cell, '');}

// Get the user infos
$adr_char = adr_get_user_infos($user_id);


$resurrect_price = ceil( $adr_general['temple_resurrect_cost'] * $adr_char['character_level'] );

$heal = $HTTP_POST_VARS['heal'];
$resurrect = $HTTP_POST_VARS['resurrect'];


//@@@ START: initiate display and menus @@@
//
// adr_construct_frame: frame_id, container_id, text_content, frame_border, frame_background, position, { custom_width, custom_height, custom_left, custom_top }
//
// 'position' places the frame in predetermined locations, for now we have: main, label_top, sidebar_left, canvas (to add images, ex: adr_battle). Easy to add more. Optionally you can use the custom dimensions.
// TODO: ACP to allow user to toy around with menu/frame layout,positions, and content.

$frame[0]=adr_construct_frame(1, 0, 'Explore', 'Adr_top_bar', '',0,0,0,0);
$frame[1]=adr_construct_frame(1, 0, 'Menu', 'Adr_menu', '', 0,0,80,0);
$frame[2]=adr_stat_box($adr_char);

// if one of the frame's contents will be a menu, define it. Otherwise its best to set it to -1
$frame_is_menu = 1;
$menu_selected = 0;
// adr_construct_menu: menu_text, { location, post_parameters | get_parameters }

$menu[0]=adr_construct_menu($lang['Adr_temple'], "adr_temple.$phpEx", " ");
$menu[1]=adr_construct_menu($lang['Adr_character_stats_monster'], "adr_battle.$phpEx", " ");
$menu[2]=adr_construct_menu($lang['Adr_inventory_page_name'], "adr_character_inventory.$phpEx", " ");
$menu[3]=adr_construct_menu($lang['Adr_forge'], "adr_forge.$phpEx", " ");
$menu[4]=adr_construct_menu($lang['Logout'], "login.$phpEx", "logout=true");

//@@@ END: initiate display and menus @@@


if ( $option )
{


}


//$text = '';

adr_ajax_send ($frame,$menu,$menu_selected,$frame_is_menu,$text);

?>
Ajax-loader Loading, please wait...