forked from EQdkpPlus/plugin-bosssuite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bossprogress.php
115 lines (96 loc) · 3.94 KB
/
bossprogress.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
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
<?php
/*
* Project: BossSuite v4 MGS
* License: Creative Commons - Attribution-Noncommercial-Share Alike 3.0 Unported
* Link: http://creativecommons.org/licenses/by-nc-sa/3.0/
* -----------------------------------------------------------------------
* Began: 2006
* Date: $Date$
* -----------------------------------------------------------------------
* @author $Author$
* @copyright 2006-2008 sz3
* @link http://eqdkp-plus.com
* @package bosssuite
* @version $Rev$
*
* $Id$
*/
define('EQDKP_INC', true);
define('PLUGIN', 'bosssuite');
$eqdkp_root_path = './../../';
include_once ($eqdkp_root_path . 'common.php');
global $user;
$user->check_auth('u_bosssuite_bp_view');
if ( !$pm->check(PLUGIN_INSTALLED, 'bosssuite') )
{
message_die('BossSuite plugin not installed.');
}
# Check whether the current game is supported
####################################################
// new mgs class
require(dirname(__FILE__).'/include/bsmgs.class.php');
$mybsmgs = new BSMGS();
if (!$mybsmgs->game_supported('bossbase')){
$bcout = '<table width=100% class="borderless" cellspacing="0" cellpadding="2">
<tr><th colspan="2" align="center">BossCounter</th></tr>'."\n".
'<td>GAME NOT SUPPORTED!</td></tr></table>';
$bchout = '<table cellpadding=2 cellspacing=0 border=0 width='.$BKtablewidth.' align=center>'."\n".
'<tr><td>GAME NOT SUPPORTED</td></tr></table>';
}else{
$bs_image_suffix = null;
$bs_image_map = null;
function import_image_config(){
global $bs_image_suffix, $bs_image_map, $mybsmgs;
$mapfile = dirname(__FILE__)."/games/".$mybsmgs->get_current_game()."/image_config.php";
if(file_exists($mapfile)){
include($mapfile);
$bs_image_suffix = $suffix;
$bs_image_map = $image_map;
}
}
import_image_config();
# Get configuration data
####################################################
$mybsmgs->load_game_specific_language('bossbase');
require(dirname(__FILE__).'/include/bssql.class.php');
$mybpsql = new BSSQL();
$sbzone = $mybpsql->get_bzone('bossprogress');
$bb_conf = $mybpsql->get_config('bossbase');
$bp_conf = $mybpsql->get_config('bossprogress');
# Get data
####################################################
$data = $mybpsql->get_data($bb_conf, $sbzone);
# Get output
####################################################
switch ($bp_conf['style']){
case 0: require_once(dirname(__FILE__).'/include/bp_styles/bp_style.php');
$bpout = bp_html_get_zoneinfo_bp($bp_conf, $data, $sbzone);
break;
case 1: require_once(dirname(__FILE__).'/include/bp_styles/bp_style_simple.php');
$bpout = bp_html_get_zoneinfo_bps($bp_conf, $data, $sbzone);
break;
case 2: require_once(dirname(__FILE__).'/include/bp_styles/rp_2_column.php');
$bpout = bp_html_get_zoneinfo_rp2r($bp_conf, $data, $sbzone);
break;
case 3: require_once(dirname(__FILE__).'/include/bp_styles/rp_3_column.php');
$bpout = bp_html_get_zoneinfo_rp3r($bp_conf, $data, $sbzone);
break;
}
}
//Framework include
include_once($eqdkp_root_path . 'plugins/bosssuite/include/libloader.inc.php');
# Assign Vars
####################################################
$tpl->assign_vars(array (
'BOSSKILLVV' => $bpout,
'JS_ABOUT' => $jquery->Dialog_URL('About', $user->lang['bs_about_header'], 'about.php', '500', '600'),
'L_CREDITS' => $user->lang['bs_credits_p1'].$pm->get_data('bosssuite', 'version').$user->lang['bs_credits_p2'],
'BS_INFO_IMG' => 'images/credits/info.png',
));
$eqdkp->set_vars(array (
'page_title' => sprintf($user->lang['title_prefix'], $eqdkp->config['guildtag'], $eqdkp->config['dkp_name']).': '.$user->lang['bp_um_link'],
'template_path' => $pm->get_data('bosssuite', 'template_path'),
'template_file' => 'bossprogress.html',
'display' => true)
);
?>