Exemplo n.º 1
0
 function bossbars_module()
 {
     global $eqdkp_root_path, $eqdkp, $user, $tpl, $db, $plang, $conf_plus, $pm, $html, $jqueryp;
     if (!$pm->check(PLUGIN_INSTALLED, 'bosssuite')) {
         return '<table><tr><td>BossSuite plugin not installed.</td></tr></table>';
     } else {
         // new mgs class
         require_once $eqdkp_root_path . 'plugins/bosssuite/include/bsmgs.class.php';
         $mybsmgs = new BSMGS();
         $mybsmgs->load_game_specific_language('bossbase');
         require_once $eqdkp_root_path . 'plugins/bosssuite/include/bssql.class.php';
         $mybcsql = new BSSQL();
         $bb_conf = $mybcsql->get_config('bossbase');
         $bc_conf = $mybcsql->get_config('bosscounter');
         $sbzone = $mybcsql->get_bzone('bosscounter');
         $data = $mybcsql->get_data($bb_conf, $sbzone);
         require_once $eqdkp_root_path . 'plugins/bosssuite/include/bslink.class.php';
         $mybslink = new BSLINK($bc_conf['linkurl'], $bc_conf['linklength']);
         $bcout = '<style>#bossbars{min-width:200px;}</style>';
         $bcout .= '<table width="100%" cellspacing="0" cellpadding="0">';
         foreach ($sbzone as $zone => $bosses) {
             if (!$bc_conf['dynZone'] or $data[$zone]['zk'] > 0) {
                 $zone_name = $user->lang[$zone][$bc_conf['zonelength']];
                 $killed = $data[$zone]['zk'];
                 $total = sizeof($data[$zone]['bosses']);
                 $percentage = round($killed / $total * 100);
                 $rc = $eqdkp->switch_row_class();
                 $tooltip = '<table width="100%">';
                 foreach ($bosses as $boss) {
                     if ($data[$zone]['bosses'][$boss]['kc'] > 0) {
                         $tooltip .= '<tr>';
                         $tooltip .= '<td align="right">' . $data[$zone]['bosses'][$boss]['kc'] . 'x</td>';
                         $tooltip .= '<td align="left"><b>' . $mybslink->get_boss_link($boss) . '</b></td>';
                         $tooltip .= '<td align="right">' . date($user->style['date_notime_short'], $data[$zone]['bosses'][$boss]['fkd']) . '</td>';
                         $tooltip .= '</tr>';
                     } else {
                         $tooltip .= '<tr>';
                         $tooltip .= '<td align="right">&nbsp;</td>';
                         $tooltip .= '<td align="left">' . $mybslink->get_boss_link($boss) . '</td>';
                         $tooltip .= '<td align="right">&nbsp;</td>';
                         $tooltip .= '</tr>';
                     }
                 }
                 $tooltip .= '</table>';
                 $bcout .= '<tr><td class="' . $rc . '" nowrap="nowrap">';
                 $bcout .= $jqueryp->ProgressBar($zone . '_bar', $percentage, $html->ToolTip($tooltip, $zone_name . ' : ' . $killed . '/' . $total), 'left');
                 $bcout .= '</td></tr>';
             }
         }
         $bcout .= '</table>';
         return $bcout;
     }
 }
Exemplo n.º 2
0
if (!defined('EQDKP_INC')) {
    die('Do not access this file directly.');
}
// new mgs class
require_once dirname(__FILE__) . '/../include/bsmgs.class.php';
$mybsmgs = new BSMGS();
# Check whether the current game is supported
####################################################
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" . '<tr><td>GAME NOT SUPPORTED!</td></tr></table>';
    $bchout = '<table cellpadding=2 cellspacing=0 border=0 width=100% align=center>' . "\n" . '<tr><td>GAME NOT SUPPORTED</td></tr></table>';
} else {
    # Get configuration data from the database
    ####################################################
    $mybsmgs->load_game_specific_language('bossbase');
    require_once dirname(__FILE__) . '/../include/bssql.class.php';
    $mybcsql = new BSSQL();
    $bb_conf = $mybcsql->get_config('bossbase');
    $bc_conf = $mybcsql->get_config('bosscounter');
    $sbzone = $mybcsql->get_bzone('bosscounter');
    # Get data
    ####################################################
    $data = $mybcsql->get_data($bb_conf, $sbzone);
    # Get output
    ####################################################
    require_once dirname(__FILE__) . '/../include/bslink.class.php';
    $mybslink = new BSLINK($bc_conf['linkurl'], $bc_conf['linklength']);
    global $jqueryp;
    if ($bc_conf['eyecandy'] == 1 && isset($jqueryp)) {
        # Output