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"> </td>'; $tooltip .= '<td align="left">' . $mybslink->get_boss_link($boss) . '</td>'; $tooltip .= '<td align="right"> </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; } }
function bp_html_get_zoneinfo_rp2r($conf, $data, $sbzone) { global $user; // new link class require_once dirname(__FILE__) . '/../bslink.class.php'; $mybslink = new BSLINK($conf['linkurl'], $conf['linklength']); $zonei = 1; foreach ($sbzone as $zone => $bosses) { $zonei = 1 - $zonei; if ($zonei == 0) { $bpout .= '<tr><td width="50%" valign="top"><table width="100%">' . "\n"; } else { $bpout .= '<td width="50%" valign="top"><table width="100%">' . "\n"; } $bpout .= "\t" . '<tr><th colspan="3">' . $user->lang[$zone]['long'] . '</th></tr>' . "\n"; if (!$conf['dynZone'] or $data[$zone]['zk'] > 0) { $loc_completed = round($data[$zone]['zk'] / count($bosses) * 100); $bpout .= '<tr><td class="row1"></td><td class="row2"><dl style="width:197px; height:20px"><dd style="width:197px; height:20px"><div style="width:' . $loc_completed . '%; height:18px"><strong>' . $loc_completed . '%</strong></div></dd></dl></td>'; $bpout .= '<td class="row2">' . $data[$zone]['zk'] . '/' . count($bosses) . '(' . $loc_completed . '%)</td></tr>'; $bi = 1; //row number 1/2 $printed = 0; foreach ($bosses as $boss) { if (!$conf['dynBoss'] or $data[$zone]['bosses'][$boss]['kc'] > 0) { $rowid = $bi + 1; if ($data[$zone]['bosses'][$boss]['kc'] > 0) { $bpout .= "\t" . '<tr><td style="width: 25px; height: 19px" align="center" class="row1"><img src="images/bossprogress/rp/checkmark.gif" width="20" height="15" border="0" /><td class="row' . ($printed % 2 + 1) . '" colspan="2">' . $mybslink->get_boss_link($boss) . '</td></tr>' . "\n"; } else { $bpout .= "\t" . '<tr><td style="width: 25px; height: 19px" align="center" class="row1"> </td><td class="row' . $rowid . '" colspan="2">' . $mybslink->get_boss_link($boss) . '</td></tr>' . "\n"; $bi = 1 - $bi; } $printed++; } } for ($i = 1; $i <= 8 - $printed; $i++) { $bpout .= '<tr><td style="width: 25px; height: 19px" align="center" class="row1"> </td><td class="row' . (($printed + $i - 1) % 2 + 1) . '" colspan="2"> </td></tr>' . "\n"; } if ($loc_completed == 100) { $bpout .= '<img style="position:absolute; margin:25px 0px 0px 90px" src="images/bossprogress/rp/completed.gif" /></table></td>' . "\n"; } else { $bpout .= '</table></td>' . "\n"; } if ($zonei == 0) { $bpout .= '' . "\n"; } else { $bpout .= '</tr>' . "\n"; } } } return $bpout; }
$i = 1; foreach ($sbzone as $zone => $bosslist) { $loc_killed = 0; foreach ($data[$zone]['bosses'] as $boss) { if ($boss['kc'] > 0) { $loc_killed++; } } if (!$bc_conf['dynZone'] or $loc_killed > 0) { $bc_acc_title = '<table width=100% class="borderless" cellspacing="0" cellpadding="0"><tr style="cursor:pointer;"><th width="80%">' . $user->lang[$zone][$bc_conf['zonelength']] . '</th><th>' . $loc_killed . '/' . sizeof($data[$zone]['bosses']) . '</th></tr></table>' . "\n"; $bc_acc_content = '<table width="100%" border="0" cellspacing="1" cellpadding="2">'; $bi = 1; //row number 1/2 foreach ($bosslist as $boss) { if (!$bc_conf['dynBoss'] or $data[$zone]['bosses'][$boss]['kc'] > 0) { $bc_acc_content .= "\t\t" . '<tr class="row' . ($bi + 1) . '"><td align="left">' . $mybslink->get_boss_link($boss) . '</td>'; $bc_acc_content .= '<td align="right">' . $data[$zone]['bosses'][$boss]['kc'] . '</td></tr>' . "\n"; $bi = 1 - $bi; } } $bc_acc_content .= "\t\t</table>\n"; $bc_acc_array[$bc_acc_title] = $bc_acc_content; } } $bcout = '<table width=100% class="forumline" cellspacing="0" cellpadding="0"><tr><th colspan="2" align="center">BossCounter</th></tr>'; $bcout .= '<tr><td>' . "\n"; $bcout .= $jqueryp->accordion('bc_accordion', $bc_acc_array); $bcout .= '</td></tr>'; $bcout .= '</table>'; } else { $bcout = '<table width=100% class="forumline" cellspacing="0" cellpadding="0"><tr><th colspan="2" align="center">BossCounter</th></tr>';
function bp_html_get_zoneinfo_bp($conf, $data, $sbzone) { // new link class require_once dirname(__FILE__) . '/../bslink.class.php'; $mybslink = new BSLINK($conf['linkurl'], $conf['linklength']); foreach ($sbzone as $zone => $bosses) { if (!$conf['dynZone'] or $data[$zone]['zk'] > 0) { $loc_completed = round($data[$zone]['zk'] / count($bosses) * 100); $bpout .= bp_html_get_zhi($conf, $zone, $loc_completed); if ($conf['showSB']) { $bpout .= bp_html_get_zsb($zone, $data[$zone]['zk'], $loc_completed, count($bosses), $data[$zone]['fvd'], $data[$zone]['lvd'], $data[$zone]['kc']); } $bi = 1; //row number 1/2 $printed = 0; foreach ($bosses as $boss) { if (!$conf['dynBoss'] or $data[$zone]['bosses'][$boss]['kc'] > 0) { $bpout .= bp_html_get_bossinfo($bi, $boss, $mybslink->get_boss_link($boss), $data[$zone]['bosses'][$boss]['fkd'], $data[$zone]['bosses'][$boss]['lkd'], $data[$zone]['bosses'][$boss]['kc'], $conf['boss_image_type']); $bi = 1 - $bi; $printed++; } } if ($printed > 0 && $printed % 2) { $bpout .= '<td></td><td width=60px></td></tr>'; } $bpout .= '<tr height="5"><td colspan="4"></td></tr>'; } } return $bpout; }