Exemplo n.º 1
0
 function display()
 {
     global $roster;
     $raids = array("Mogu'shan Vaults" => array('boss_count' => '6', 'image' => 'mv', 'cfg' => 'mv'), 'Heart of Fear' => array('boss_count' => '6', 'image' => 'hf', 'cfg' => 'hof'), 'Terrace of Endless Spring' => array('boss_count' => '4', 'image' => 'tes', 'cfg' => 'toes'), 'Throne of Thunder' => array('boss_count' => '13', 'image' => 'tot', 'cfg' => 'tot'), 'Siege of Orgrimmar' => array('boss_count' => '14', 'image' => 'soo', 'cfg' => 'soo'), 'Blackrock Foundry' => array('boss_count' => '10', 'image' => 'achievement_boss_blackhand', 'cfg' => 'brf'), 'Highmaul' => array('boss_count' => '7', 'image' => 'achievement_boss_highmaul_king', 'cfg' => 'hml'));
     $addon = getaddon('raidbox');
     //echo '<prE>';
     //print_r($addon);
     $down = 0;
     $bosses = '';
     foreach ($raids as $name => $det) {
         $down = 0;
         $per = 0;
         $bosses = $name . '<br />';
         for ($t = 1; $t < $det['boss_count'] + 1; $t++) {
             $down = $down + $addon['config']['' . $det['cfg'] . '_boss_' . $t . ''];
             $color = 'ff0000';
             if ($addon['config']['' . $det['cfg'] . '_boss_' . $t . ''] == 1) {
                 $color = '7eff00';
             }
             $e = $addon['config']['' . $det['cfg'] . '_boss_' . $t . ''] == 1 ? 'Down' : 'Up';
             //$bosses .= ''.$roster->locale->act[''.$det['cfg'].'_boss_'.$t.''].' - '.$e.'</span><br />';
             $bosses .= '<span style="color:#' . $color . ';font-size:12px;font-weight:bold;"><div style="width:250px;"><span style="float:right;">' . $e . '</span>' . $roster->locale->act['' . $det['cfg'] . '_boss_' . $t . ''] . '</div></span>';
             //$bosses .= $roster->locale->act[''.$det['cfg'].'_boss_'.$t.''].' - '.($addon['config'][''.$det['cfg'].'_boss_'.$t.''] == 1 ? 'Up' : 'Down').'<br />';
         }
         $tooltip = makeOverlib($bosses, '', '#8000ff', 0, '', ', WIDTH, 275');
         $per = $down / $det['boss_count'] * 100;
         if ($per == 0) {
             $per = '1';
         }
         $roster->tpl->assign_block_vars('raidbox', array('TITLE' => $name, 'IMG' => $addon['image_url'] . $det['image'], 'COUNT' => $det['boss_count'], 'TOOLTIP' => $tooltip, 'DOWN' => $down, 'PER' => $per, 'XPER' => 100 - $per));
     }
     $roster->tpl->set_filenames(array('rbpannle' => $addon['basename'] . '/raidbox.html'));
     $this->output = $roster->tpl->fetch('rbpannle');
 }
Exemplo n.º 2
0
function itemidname($item_id)
{
    global $roster, $tab_data, $tooltips;
    foreach ($tab_data as $tab) {
        if (is_object($tab)) {
            foreach ($tab->contents as $object) {
                $object_id = explode(':', $object->data['item_id']);
                $object_id = $object_id[0];
                $id = explode(':', $item_id);
                $id = $id[0];
                if ($object_id == $id) {
                    $tooltip = makeOverlib($object->html_tooltip, '', '', 2, '', ', WIDTH, 325');
                    $num_of_tips = count($tooltips) + 1;
                    $linktip = '';
                    foreach ($roster->locale->wordings[$roster->config['locale']]['itemlinks'] as $key => $ilink) {
                        $linktip .= '<a href="' . $ilink . $item_id . '" target="_blank">' . $key . '</a><br />';
                    }
                    setTooltip($num_of_tips, $linktip);
                    setTooltip('itemlink', $roster->locale->wordings[$roster->config['locale']]['itemlink']);
                    $linktip = ' onclick="return overlib(overlib_' . $num_of_tips . ',CAPTION,overlib_itemlink,STICKY,NOCLOSE,WRAP,OFFSETX,5,OFFSETY,5);"';
                    return '<span style="color:#' . $object->data['item_color'] . ';font-weight:bold;" ' . $tooltip . $linktip . '>[' . $object->data['item_name'] . ']</span>';
                }
            }
        }
    }
    return $item_id;
}
Exemplo n.º 3
0
 function out()
 {
     global $roster, $addon, $tooltips;
     $lang = $this->data['locale'];
     $bag_type = strpos($this->data['item_slot'], 'Bank') !== false ? 'bank' : 'bag';
     $bag_type = $this->data['item_slot'] == 'Bag5' ? 'key' : $bag_type;
     $bag_style = $this->data['item_quantity'] % 4;
     if ($bag_style == 0) {
         $offset = $this->data['item_quantity'] / 4 * 41;
         $offset += 42;
     } elseif ($bag_style == 2) {
         $offset = ($this->data['item_quantity'] - 2 + 1) / 4 * 41;
         $offset += 53;
     }
     // Item links
     list($item_id) = explode(':', $this->item_id);
     $num_of_tips = count($tooltips) + 1;
     $linktip = '';
     foreach ($roster->locale->wordings[$lang]['itemlinks'] as $key => $ilink) {
         $linktip .= '<a href="' . $ilink . $item_id . '" target="_blank">' . $key . '</a><br />';
     }
     setTooltip($num_of_tips, $linktip);
     setTooltip('itemlink', $roster->locale->wordings[$lang]['itemlink']);
     $linktip = ' onclick="return overlib(overlib_' . $num_of_tips . ',CAPTION,overlib_itemlink,STICKY,NOCLOSE,WRAP,OFFSETX,5,OFFSETY,5);"';
     $roster->tpl->assign_block_vars('bag', array('NAME' => $this->data['item_name'], 'SLOT' => $this->data['item_slot'], 'TYPE' => $bag_type, 'STYLE' => $bag_style, 'OFFSET' => $offset, 'ICON' => $this->data['item_texture'], 'TOOLTIP' => makeOverlib($this->data['item_tooltip'], '', $this->data['item_color'], 0, $lang), 'LINKTIP' => $linktip));
     // Select all item for this bag
     for ($slot = 0; $slot < $this->data['item_quantity']; $slot++) {
         if (isset($this->contents[$slot + 1])) {
             $item = $this->contents[$slot + 1];
             $roster->tpl->assign_block_vars('bag.item', array('ICON' => $item->out()));
         } else {
             $roster->tpl->assign_block_vars('bag.item', array('ICON' => '<div class="item"><img src="' . $roster->config['img_url'] . 'pixel.gif" class="noicon" alt="" /></div>'));
         }
     }
 }
Exemplo n.º 4
0
function guide_step1()
{
    global $roster;
    $name = post_or_db('name');
    $server = post_or_db('server');
    $region = strtoupper(substr(post_or_db('region'), 0, 2));
    $roster->tpl->assign_vars(array('S_STEP_1' => true, 'NAME' => $name, 'SERVER' => $server, 'REGION' => $region, 'L_NAME_TIP' => makeOverlib($roster->locale->act['guildname']), 'L_SERVER_TIP' => makeOverlib($roster->locale->act['realmname']), 'L_REGION_TIP' => makeOverlib($roster->locale->act['regionname'])));
}
Exemplo n.º 5
0
/**
 * WoWRoster.net EventCalendar
 *
 * Event Calendar is a Roster addon that will show upcoming events from ingame
 * WoW addons GuildEventManager (GEM) or GroupCalendar
 *
 * LICENSE: Licensed under the Creative Commons
 *          "Attribution-NonCommercial-ShareAlike 2.5" license
 *
 * @copyright  2006-2007 PoloDude
 * @license    http://creativecommons.org/licenses/by-nc-sa/2.5   Creative Commons "Attribution-NonCommercial-ShareAlike 2.5"
 * @version    1.0.3
 * @svn        SVN: $Id$
 * @author     PoloDude
 * @link       http://www.wowroster.net/Forums/viewforum/f=59.html
 *
*/
function getNoteIcon($note)
{
    global $wowdb, $roster_conf, $wordings, $rt_wordings, $db_prefix;
    $icon_value = '';
    if ($note != '') {
        $icon_value = '<img src="' . $roster_conf['img_url'] . 'note.gif" style="cursor:help;" class="membersRowimg" alt="' . $wordings[$roster_conf['roster_lang']]['note'] . '" ' . makeOverlib(stripslashes($note), $wordings[$roster_conf['roster_lang']]['note'], '', 1) . '>';
    } else {
        $icon_value = '<img src="' . $roster_conf['img_url'] . 'no_note.gif" class="membersRowimg" alt="' . $wordings[$roster_conf['roster_lang']]['note'] . '">';
    }
    return $icon_value;
}
Exemplo n.º 6
0
function debugNote($row, $field, $data)
{
    global $addon;
    $rules = $addon['rules']['use_global'] ? $addon['config'] : $addon['rules'];
    if (preg_match($rules['getmain_regex'], $row[$field], $regs)) {
        $tooltip_h = $regs[$rules['getmain_match']];
        $tooltip = aprint($regs, '', true);
    } else {
        $tooltip_h = '';
        $tooltip = 'No main match';
    }
    return '<div ' . makeOverlib($tooltip, $tooltip_h) . '>' . $row[$field] . '</div>' . "\n";
}
Exemplo n.º 7
0
 function out()
 {
     global $roster_conf, $wordings, $itemlink, $char;
     if (!is_object($char)) {
         $lang = $roster_conf['roster_lang'];
     } else {
         $lang = $char->data['clientLocale'];
     }
     $path = $roster_conf['interface_url'] . $this->data['recipe_texture'] . '.' . $roster_conf['img_suffix'];
     $tooltip = makeOverlib($this->data['recipe_tooltip'], '', $this->data['item_color'], 0, $lang);
     $returnstring = '<div class="item" ' . $tooltip . '>';
     $returnstring .= '<a href="' . $itemlink[$roster_conf['roster_lang']] . urlencode(utf8_decode($this->data['recipe_name'])) . '" target="_blank">' . '<img src="' . $path . '" class="icon"' . " alt=\"\" /></a>\n";
     $returnstring .= '</div>';
     return $returnstring;
 }
Exemplo n.º 8
0
    function guildAchievement($data)
    {
        global $roster, $tooltips;
        $tooltip_text = $data['Achievement'];
        //return 'Earned the achievement "'.$data['achievement']['title'].'"<br>';
        $tooltip = makeOverlib($tooltip_text, '', '', 0, '', ', WIDTH, 325');
        $ts = $data['ts'] / 1000;
        return '<div class="line">
			<span  class="icon-frame frame-36" >
			<img src="http://www.wowroster.net/Interface/Icons/' . $data['achievement_icon'] . '.png" />
			</span>
			<div class="text">
				Earned the achievement <span style="color:#FFB100" ' . $tooltip . '>' . $data['achievement_title'] . '</span> for ' . $data['achievement_points'] . ' points.
			</div>
			<div class="date">' . $this->convert_date($ts) . '</div>
		</div>';
    }
Exemplo n.º 9
0
/**
 * Controls Output of a Note Column
 *
 * @param array $row - of character data
 * @return string - Formatted output
 */
function note_value($row, $field)
{
    global $roster, $addon;
    if (!empty($row[$field])) {
        $note = htmlspecialchars(nl2br($row[$field]));
        if ($addon['config']['compress_note']) {
            $note = '<img src="' . $roster->config['theme_path'] . '/images/note.gif" style="cursor:help;" ' . makeOverlib($note, $roster->locale->act['note'], '', 1, '', ',WRAP') . ' alt="[]" />';
        } else {
            $value = $note;
        }
    } else {
        $note = '&nbsp;';
        if ($addon['config']['compress_note']) {
            $note = '<img src="' . $roster->config['theme_path'] . '/images/no_note.gif" alt="[]" />';
        } else {
            $value = $note;
        }
    }
    return '<div style="display:none;">' . $row['note'] . '</div>' . $note;
}
Exemplo n.º 10
0
 public function guild_rep($row, $field)
 {
     global $roster, $member_list_where;
     if (isset($row['curr_rep'])) {
         $img = array('999' => 'exalted', '1000' => 'exalted', '21000' => 'revered', '12000' => 'honored', '6000' => 'friendly', '3000' => 'neutral', '-3000' => 'unfriendly', '-6000' => 'hostile', '36000' => 'hated');
         $percentage = round($row['curr_rep'] / $row['max_rep'] * 100);
         $toolTip = ' [' . $row['curr_rep'] . ' / ' . $row['max_rep'] . ' ] ';
         $toolTiph = $row['Standing'];
         $tooltip = makeOverlib($toolTip, $toolTiph, '', 2, '', ',WRAP');
         $cell_value = '<div ' . $tooltip . ' style="cursor:default;"><div class="levelbarParent" style="width:70px;"><div class="levelbarChild">' . $row['Standing'] . '</div></div>';
         $cell_value .= '<table class="expOutline" border="0" cellpadding="0" cellspacing="0" width="70">';
         $cell_value .= '<tr>';
         $cell_value .= '<td style="background-image: url(\'' . $roster->config['theme_path'] . '/images/bars/' . $img[$row['max_rep']] . '.gif\');" width="' . $percentage . '%"><img src="' . $roster->config['img_url'] . 'pixel.gif" height="14" width="1" alt="" /></td>';
         $cell_value .= '<td width="' . (100 - $percentage) . '%"></td>';
         $cell_value .= "</tr>\n</table>\n</div>\n";
         return '<div style="display:none;">' . str_pad($row['Standing'], 2, '0', STR_PAD_LEFT) . '</div>' . $cell_value;
     } else {
         $cell_value = '';
         //'<div ' . $tooltip . ' style="cursor:default;">' . $row['Standing'] . '</div>';
         return $cell_value;
     }
 }
Exemplo n.º 11
0
 function out()
 {
     global $roster, $char, $tooltips;
     if (!is_object($char)) {
         $lang = $roster->config['locale'];
     } else {
         $lang = $char->data['clientLocale'];
     }
     $path = $roster->config['interface_url'] . 'Interface/Icons/' . $this->data['recipe_texture'] . '.' . $roster->config['img_suffix'];
     // Item links
     $num_of_tips = count($tooltips) + 1;
     $linktip = '';
     foreach ($roster->locale->wordings[$lang]['data_links'] as $key => $ilink) {
         $linktip .= '<a href="' . $ilink . urlencode(utf8_decode($this->data['recipe_name'])) . '" target="_blank">' . $key . '</a><br />';
     }
     setTooltip($num_of_tips, $linktip);
     setTooltip('itemlink', $roster->locale->wordings[$lang]['data_search']);
     $linktip = ' onclick="return overlib(overlib_' . $num_of_tips . ',CAPTION,overlib_itemlink,STICKY,NOCLOSE,WRAP,OFFSETX,5,OFFSETY,5);"';
     $tooltip = makeOverlib($this->data['recipe_tooltip'], '', $this->data['item_color'], 0, $lang);
     $returnstring = '<div class="item" ' . $tooltip . $linktip . '>';
     $returnstring .= '<img src="' . $path . '" class="icon" alt="" />' . "\n";
     $returnstring .= '</div>';
     return $returnstring;
 }
Exemplo n.º 12
0
//echo '<pre>';
//print_r($lootcfg);
//echo '</pre>';
$form = '';
$html = '';
$menu .= '
<!-- Begin Config Menu -->
' . border('sgray', 'start', 'Config Menu') . '
<div >
  <ul id="rp_menu" class="tab_menu">' . "\n";
$first_tab = ' class="selected"';
$menu .= '<li class="selected">
                  <a href="#" rel="i0" ' . makeOverlib($roster->locale->act['admin']['main'], $caption = $roster->locale->act['admin']['main'], $caption_color = '', $mode = 0, $locale = '', $extra_parameters = '') . ">" . $roster->locale->act['admin']['main'] . "</a></li>\n";
$r = '0';
foreach ($instcfg as $instance => $inst) {
    $menu .= '<li><a href="#" rel="i' . $inst['inst_id'] . '" ' . makeOverlib($inst['inst_zone'] . '<br>' . $roster->locale->act['admin']['t_boss'] . ': ' . $inst['inst_t_bosses'], $caption = $inst['inst_name'], $caption_color = '', $mode = 0, $locale = '', $extra_parameters = '') . '>' . $roster->locale->act['admin'][$inst['inst_name']] . '</a></li>' . "\n";
}
$menu .= '</ul></div>' . border('sgray', 'end');
$html .= '<div id="i0" style="display:none">';
$html .= '' . border('sgreen', 'start', $roster->locale->act['admin']['main']) . '';
$html .= '<table width="600" cellspacing="0" cellpadding="0">';
$html .= '<tr><td>' . $roster->locale->act['admin']['loot_main'] . '';
$html .= '</td></tr>';
$html .= '</table>' . border('sgreen', 'end') . '';
$html .= "</div>\n\n";
foreach ($instcfg as $instance => $inst) {
    $html .= '<div id="i' . $inst['inst_id'] . '" style="display:none">';
    $html .= '' . border('sgreen', 'start', '' . $inst['inst_name'] . '') . '';
    $html .= '<table width="600" cellspacing="0" cellpadding="0">';
    $stripe = 0;
    foreach ($bosscfg as $b_inst => $b_id) {
Exemplo n.º 13
0
        $formbody .= "\t</tr>\n";
        $i++;
    }
    $formbody .= "</table>\n" . border('syellow', 'end') . "\n</div>\n";
    $formbody .= $prev . $listing . $next;
} else {
    $formbody = 'No Data';
}
$roster->output['body_onload'] .= 'initARC(\'config\',\'radioOn\',\'radioOff\',\'checkboxOn\',\'checkboxOff\');';
$body = "\n<form action=\"\" method=\"post\" enctype=\"multipart/form-data\" id=\"config\" onsubmit=\"return confirm('" . $roster->locale->act['confirm_config_submit'] . "');submitonce(this);\">\n\t{$formbody}\n<br /><br />\n<input type=\"submit\" value=\"" . $roster->locale->act['config_submit_button'] . "\" />\n<input type=\"reset\" name=\"Reset\" value=\"" . $roster->locale->act['config_reset_button'] . "\" onclick=\"return confirm('" . $roster->locale->act['confirm_config_reset'] . "')\"/>\n<input type=\"hidden\" name=\"process\" value=\"process\" />\n\n</form>";
$tab1 = explode('|', $roster->locale->act['acc_settings']['set']);
$tab2 = explode('|', $roster->locale->act['acc_settings']['prof']);
$menu = messagebox('
<ul class="tab_menu">
	<li class="selected"><a href="' . makelink('util-accounts-settings') . '" style="cursor:help;"' . makeOverlib($tab1[1], $tab1[0], '', 1, '', ',WRAP') . '>' . $tab1[0] . '</a></li>
	<li><a href="' . makelink('util-accounts-settings-profile') . '" style="cursor:help;"' . makeOverlib($tab2[1], $tab2[0], '', 1, '', ',WRAP') . '>' . $tab2[0] . '</a></li>
</ul>
', $roster->locale->act['acc_page']['settings'], 'sgray', '145px');
/**
 * Process Data for entry to the database
 *
 * @return string Settings changed or not changed
 */
function processData()
{
    global $roster;
    $update_sql = array();
    // Update only the changed fields
    foreach ($_POST as $settingName => $settingValue) {
        if (substr($settingName, 0, 5) == 'disp_') {
            $settingName = str_replace('disp_', '', $settingName);
Exemplo n.º 14
0
 /**
  * Returns the file input fields for all addon files we need.
  *
  * @return string $filefields | The HTML, without border
  */
 function makeFileFields($blockname = 'file_fields')
 {
     global $roster;
     if (!is_array($this->files) || count($this->files) == 0) {
         $roster->tpl->assign_block_vars($blockname, array('TOOLTIP' => '', 'FILE' => 'No files accepted!'));
     }
     $account_dir = '<i>*WOWDIR*</i>\\\\WTF\\\\Account\\\\<i>*ACCOUNT_NAME*</i>\\\\SavedVariables\\\\';
     foreach ($this->files as $file) {
         $roster->tpl->assign_block_vars($blockname, array('TOOLTIP' => makeOverlib($account_dir . $file . '.lua', $file . '.lua Location', '', 2, '', ',WRAP'), 'FILE' => $file));
     }
 }
Exemplo n.º 15
0
function key_value($row, $field, $data)
{
    global $roster, $addon;
    $key_data = $data['stages'];
    if ($row[$field . '_stages'] === null) {
        return '&nbsp;';
    } else {
        $active_stages = explode(',', $row[$field . '_stages']);
    }
    $last_stage = max(array_keys($key_data));
    $num_completed_stages = 0;
    $depth = 0;
    $completed[0] = false;
    $tooltip_h = $field;
    $tooltip = '';
    for ($id = $last_stage; $id >= 0; $id--) {
        if ($key_data[$id]['flow'] == ')' || $key_data[$id]['flow'] == '()') {
            $depth++;
            $completed[$depth] = $completed[$depth - 1];
            $tooltip = '</div>' . $tooltip;
        }
        if (in_array($id, $active_stages)) {
            $tipline = '<span style="color:' . $addon['config']['colorcur'] . ';">' . $key_data[$id]['value'] . '</span><br />';
            $completed[$depth] = true;
            if ($key_data[$id]['active']) {
                $num_completed_stages++;
            }
        } elseif ($completed[$depth]) {
            $tipline = '<span style="color:' . $addon['config']['colorcmp'] . ';">' . $key_data[$id]['value'] . '</span><br />';
            $num_completed_stages++;
        } else {
            $tipline = '<span style="color:' . $addon['config']['colorno'] . ';">' . $key_data[$id]['value'] . '</span><br />';
        }
        if ($key_data[$id]['flow'] == '(' || $key_data[$id]['flow'] == '()') {
            if ($depth == 0) {
                $error = 'key_syntax';
            }
            if ($completed[$depth]) {
                $completed[$depth - 1] = true;
            }
            $depth--;
            $tipline = '<div class="keyindent">' . $tipline;
        }
        $tooltip = $tipline . $tooltip;
    }
    $tooltip = '<div style="cursor:pointer;" ' . makeOverlib($tooltip, $tooltip_h, '', 2) . '>';
    if (in_array($last_stage, $active_stages)) {
        $output = '<div class="item-sm"><img src="' . $roster->config['interface_url'] . 'Interface/Icons/' . $data['icon'] . '.' . $roster->config['img_suffix'] . '" alt="" /><div class="mask"></div></div>';
    } else {
        $perc_done = round($num_completed_stages / ($last_stage + 1) * 100);
        $output = '<div class="levelbarParent" style="width:40px;"><div class="levelbarChild">' . $num_completed_stages . '/' . ($last_stage + 1) . '</div></div>' . "\n" . '<table class="expOutline" border="0" cellpadding="0" cellspacing="0" width="40">' . "\n" . '<tr>' . "\n" . '<td style="background-image: url(\'' . $roster->config['img_url'] . 'expbar-var2.gif\');" width="' . $perc_done . '%">' . "\n" . '<img src="' . $roster->config['img_url'] . 'pixel.gif" height="14" width="1" alt="" />' . "\n" . '</td>' . "\n" . '<td width="' . (100 - $perc_done) . '%"></td>' . "\n" . '</tr>' . "\n" . '</table>' . "\n";
    }
    return '<div style="display:none; ">' . $num_completed_stages . '</div>' . $tooltip . $output . '</div>';
}
Exemplo n.º 16
0
 /**
  * Build a equiped item slot
  *
  * @param string $slot
  * @return string
  */
 function equip_slot($slot)
 {
     global $roster;
     if (isset($this->equip[$slot])) {
         $roster->tpl->assign_block_vars('equipment', array('SLOT' => $slot, 'ICON' => $this->equip[$slot]->tpl_get_icon(), 'TOOLTIP' => $this->equip[$slot]->tpl_get_tooltip(), 'ITEMLINK' => $this->equip[$slot]->tpl_get_itemlink(), 'QUALITY' => $this->equip[$slot]->quality, 'QTY' => $this->equip[$slot]->quantity, 'S_AMMO' => $slot == 'Ammo'));
     } else {
         $roster->tpl->assign_block_vars('equipment', array('SLOT' => $slot, 'ICON' => $roster->config['img_url'] . 'pixel.gif', 'TOOLTIP' => makeOverlib($roster->locale->act['empty_equip'], $roster->locale->act[$slot], '', 2, '', ',WRAP'), 'ITEMLINK' => '', 'QUALITY' => 'none', 'QTY' => 0, 'S_AMMO' => $slot == 'Ammo'));
     }
 }
Exemplo n.º 17
0
 /**
  * Create a tooltip
  *
  * @param string $disp_text | Text to hover over
  * @param string $content | Content in tooltip
  * @param string $caption | Text in the caption
  * @return string ( Overlib styled tooltip )
  */
 function createTip($disp_text, $content, $caption)
 {
     $tip = makeOverlib($content, $caption, '', 2, '', ',WRAP');
     $tip = " style=\"cursor:help;\" {$tip}>{$disp_text}";
     return $tip;
 }
Exemplo n.º 18
0
    /**
     * statusbox Memberlist output
     *
     * @param int $jobid
     */
    function _ruletableHead($style, $title, $type, $mode, $name)
    {
        global $roster;
        $output = border($style, 'start', $title) . '
<table class="bodyline" cellspacing="0" cellpadding="0">
        <thead>
                <tr>
';
        //$name = $roster->locale->act['guildname'];
        $output .= '
                        <th class="membersHeader" ' . makeOverlib($name) . '> ' . $name . '</th>
                        <th class="membersHeader" ' . makeOverlib($roster->locale->act['realmname']) . '> ' . $roster->locale->act['server'] . '</th>
                        <th class="membersHeader" ' . makeOverlib($roster->locale->act['regionname']) . '> ' . $roster->locale->act['region'] . '</th>
                        <th class="membersHeaderRight">&nbsp;</th>
                </tr>
        </thead>
        <tbody>' . "\n";
        $this->_debug(3, $output, 'Fetched header of rule table', 'OK');
        return $output;
    }
Exemplo n.º 19
0
 /**
  * Returns the file input fields for all addon files we need.
  *
  * @return string $filefields | The HTML, without border
  */
 function makeFileFields()
 {
     global $roster;
     $filefields = '';
     if (!is_array($this->files) || count($this->files) == 0) {
         return "No files accepted!";
     }
     foreach ($this->files as $file) {
         $filefields .= "<tr>\n" . "\t" . '<td class="membersRow1" style="cursor:help;" ' . makeOverlib('<i>*WOWDIR*</i>\\\\WTF\\\\Account\\\\<i>*ACCOUNT_NAME*</i>\\\\SavedVariables\\\\' . $file . '.lua', $file . '.lua Location', '', 2, '', ',WRAP') . '><img src="' . $roster->config['img_url'] . 'blue-question-mark.gif" alt="?" />' . $file . ".lua</td>\n" . "\t" . '<td class="membersRowRight1"><input type="file" accept="' . $file . '.lua" name="' . $file . '" /></td>' . "\n" . "</tr>\n";
     }
     return $filefields;
 }
Exemplo n.º 20
0
            $roster->tpl->assign_block_vars('profile.cfg', array('NAME' => $roster->locale->act['user_profile_edit'][$val_name], 'FIELD' => $field));
        }
    }
} else {
    $formbody = 'No Data';
}
$tab1 = explode('|', $roster->locale->act['user_settings']['set']);
$tab2 = explode('|', $roster->locale->act['user_settings']['prof']);
$tab3 = explode('|', $roster->locale->act['user_main_menu']['my_prof']);
$tab4 = explode('|', $roster->locale->act['user_password']['settings_password']);
$menu = '
<ul class="tab_menu">
	<li><span class="ui-icon ui-icon-help" style="float:left;cursor:help;" ' . makeOverlib($tab1[1], $tab1[0], '', 2, '', ',WRAP') . '></span><a href="' . makelink('user-user-settings') . '">' . $tab1[0] . '</a></li>
	<li><span class="ui-icon ui-icon-help" style="float:left;cursor:help;" ' . makeOverlib($tab2[1], $tab2[0], '', 2, '', ',WRAP') . '></span><a href="' . makelink('user-user-settings-profile') . '">' . $tab2[0] . '</a></li>
	<li class="selected"><span class="ui-icon ui-icon-help" style="float:left;cursor:help;" ' . makeOverlib($tab3[1], $tab3[0], '', 2, '', ',WRAP') . '></span><a href="' . makelink('user-user-settings-edit') . '">' . $tab3[0] . '</a></li>
	<li><span class="ui-icon ui-icon-help" style="float:left;cursor:help;" ' . makeOverlib($tab4[1], $tab4[0], '', 2, '', ',WRAP') . '></span><a href="' . makelink('user-user-settings-pass') . '">' . $tab4[0] . '</a></li>
</ul>';
$roster->tpl->set_filenames(array('ucp3' => $addon['basename'] . '/ucp-edit.html'));
$roster->tpl->assign_vars(array('ROSTERCP_TITLE' => !empty($rostercp_title) ? $rostercp_title : $roster->locale->act['roster_cp_ab'], 'MENU' => $menu, 'BODY' => $roster->tpl->fetch('ucp3'), 'PAGE_INFO' => $roster->locale->act['user_cp']));
$roster->tpl->set_filenames(array('ucp' => $addon['basename'] . '/ucp.html'));
$roster->tpl->display('ucp');
/**
 * Make select box of characters for main selection
 */
function selectMain($uid)
{
    global $roster, $addon, $user;
    include_once $addon['inc_dir'] . 'users.lib.php';
    $user = new user();
    $query = "SELECT `users`.`id`, `member`.`name`,`member`.`member_id` FROM `" . $roster->db->table('user_members') . "` AS users LEFT JOIN `" . $roster->db->table('members') . "` AS member ON `users`.`id` = `member`.`account_id` WHERE `users`.`id` = " . $uid . ";";
    $result = $roster->db->query($query);
Exemplo n.º 21
0
 function tpl_get_tooltip()
 {
     return makeOverlib($this->data['recipe_tooltip'], '', $this->data['item_color'], 0, $this->lang);
 }
Exemplo n.º 22
0
    }
    $button['titkey'] = $button['title'];
    $button['title'] = isset($roster->locale->act[$button['title']]) ? $roster->locale->act[$button['title']] : $button['title'];
    if (strpos($button['title'], '|')) {
        list($button['title'], $button['tooltip']) = explode('|', $button['title'], 2);
    } else {
        $button['tooltip'] = '';
    }
    $button['tooltip'] .= ($button['tooltip'] != '' ? '<br /><br />' : '') . '<span style="font-size:10px;">' . $roster->locale->act['scope'] . ': <span style="color:#FF3300;">' . $button['scope'] . '</span></span><br />' . '<span style="font-size:10px;">' . $roster->locale->act['basename'] . ': <span style="color:#FF3300;">' . $button['basename'] . '</span></span><br />' . '<span style="font-size:10px;">' . $roster->locale->act['url'] . ': <span style="color:#FF3300;">' . $button['url'] . '</span></span><br />' . '<span style="font-size:10px;">' . $roster->locale->act['title'] . ': <span style="color:#0099FF;">' . $button['titkey'] . '</span></span>';
    if ($button['active'] == '0') {
        $buttonclass = 'menu_config_div_disabled';
        $button['tooltip'] .= '<br /><span style="font-size:10px;">' . $roster->locale->act['info'] . ': <span style="color:#FF3300;">' . $roster->locale->act['menuconf_addon_inactive'] . '</span></span>';
    } else {
        $buttonclass = 'menu_config_div';
    }
    $button['tooltip'] = ' ' . makeOverlib($button['tooltip'], $button['title'], '', 2, '');
    $roster->tpl->assign_block_vars('pallet_grid', array('ID' => $button['button_id'], 'CLASS' => $buttonclass, 'ICON' => $button['icon'], 'TOOLTIP' => $button['tooltip']));
    // Restore our locale array
    $roster->locale->wordings = $localetemp;
    unset($localetemp);
}
// --[ Javascript defines and variable passing ]--
$footer .= '<script type="text/javascript">
<!--

SET_DHTML(CURSOR_MOVE, TRANSPARENT, SCROLL' . $dhtml_reg . ', "palet"+NO_DRAG, "array"+NO_DRAG, "rec_bin"+NO_DRAG);

var roster_url	= \'' . ROSTER_URL . '\';

var dy		= 40;
var margTop	= 5;
Exemplo n.º 23
0
        ?>
</th>
			<th class="membersHeader"><?php 
        echo $roster->locale->act['compo'];
        ?>
</th>
			<th class="membersHeader"><?php 
        echo $roster->locale->act['crafter'];
        ?>
</th>
		</tr>
<?php 
        $tmp = $type[$keyColor];
        foreach ($tmp as $item) {
            if (isset($_GET['quality']) && $_GET['quality'] == $item['item_color'] || !isset($_GET['quality']) || isset($_GET['quality']) && $_GET['quality'] == "none") {
                $tooltip = makeOverlib($item['recipe_tooltip'], '', $item['item_color'], 0, $lang);
                $itemAff = '<div class="item" ' . $tooltip . '>';
                $itemAff .= "<img src=\"" . $roster->config['interface_url'] . 'Interface/Icons/' . $item['recipe_texture'] . '.' . $roster->config['img_suffix'] . "\" class=\"icon\" alt=\"\" />";
                $itemAff .= '</div>';
                $query = "SELECT M.name\n\t\t\t\t\tFROM `" . $roster->db->table('recipes') . "` R, `" . $roster->db->table('members') . "` M\n\t\t\t\t\tWHERE R.member_id=M.member_id\n\t\t\t\tAND R.`recipe_name` = '" . addslashes($item['recipe_name']) . "'\n\t\t\t\t";
                $result = $roster->db->query($query) or die_quietly($roster->db->error(), 'Database Error', basename(__FILE__), __LINE__, $query);
                $craftName = '';
                $craftSeperator = false;
                while ($row = $roster->db->fetch($result)) {
                    if ($craftSeperator == true) {
                        $craftName .= ", ";
                    }
                    $craftName .= $row['name'];
                    $craftSeperator = true;
                }
                ?>
Exemplo n.º 24
0
$result = $wowdb->query($query) or die_quietly($wowdb->error(), 'Database Error', basename(__FILE__), __LINE__, $query);
$ab = array();
$striping_counter = 1;
$rep = array();
while ($row = $wowdb->fetch_array($result)) {
    $category = $row['faction'];
    $faction = $row['fct_name'];
    $query = "SELECT s.skill_name, s.skill_level " . "FROM `" . ROSTER_SKILLSTABLE . "` s " . "WHERE s.member_id = " . $row['member_id'] . "  " . "AND s.skill_type='" . $wordings[$lang]['professions'] . "'";
    //echo $query."<br>";
    $result2 = $wowdb->query($query) or die_quietly($wowdb->error(), 'Database Error', basename(__FILE__), __LINE__, $query);
    $cell_value = '';
    while ($row2 = $wowdb->fetch_array($result2)) {
        $toolTip = str_replace(':', '/', $row2['skill_level']);
        $toolTiph = $row2['skill_name'];
        $skill_image = 'Interface/Icons/' . $wordings[$lang]['ts_iconArray'][$row2['skill_name']];
        $cell_value .= "<img class=\"membersRowimg\" width=\"" . $roster_conf['index_iconsize'] . "\" height=\"" . $roster_conf['index_iconsize'] . "\" src=\"" . $roster_conf['interface_url'] . $skill_image . '.' . $roster_conf['img_suffix'] . "\" alt=\"\" " . makeOverlib($toolTip, $toolTiph, '', 2, '', ',RIGHT,WRAP') . " />\n";
    }
    // Increment counter so rows are colored alternately
    ++$striping_counter;
    $rep[$row['standing']] .= '<tr class="membersRow' . ($striping_counter % 2 + 1) . "\">\n";
    $rep[$row['standing']] .= '<td class="membersRow' . ($striping_counter % 2 + 1) . '"><a href="char.php?name=' . $row['member'] . '&amp;server=' . $row['server'] . '">' . $row['member'] . '</a></td>';
    $rep[$row['standing']] .= '<td class="membersRow' . ($striping_counter % 2 + 1) . '">' . $row['standing'] . '</td>';
    $rep[$row['standing']] .= '<td class="membersRow' . ($striping_counter % 2 + 1) . '">' . $row['curr_rep'] . ' / ' . $row['max_rep'] . '</td>';
    $rep[$row['standing']] .= '<td class="membersRowRight' . ($striping_counter % 2 + 1) . '">' . $cell_value . '</td>';
    $rep[$row['standing']] .= '</tr>';
}
$wowdb->free_result($result);
$borderTop = border('syellow', 'start', $category . ' - ' . $faction);
$tableHeader = '<table width="100%" cellspacing="0" class="bodyline">';
$tableHeaderRow = '	<tr>
		<th class="membersHeader">' . $wordings[$roster_conf['roster_lang']]['rep_name'] . '</th>
Exemplo n.º 25
0
    return true;
}
$plugins = getPluginList();
if (!empty($plugins)) {
    $roster->tpl->assign_vars(array('S_ADDON_LIST' => true, 'L_TIP_STATUS_ACTIVE' => makeOverlib($roster->locale->act['installer_turn_off'], $roster->locale->act['installer_activated']), 'L_TIP_STATUS_INACTIVE' => makeOverlib($roster->locale->act['installer_turn_on'], $roster->locale->act['installer_deactivated']), 'L_TIP_INSTALL_OLD' => makeOverlib($roster->locale->act['installer_replace_files'], $roster->locale->act['installer_overwrite']), 'L_TIP_INSTALL' => makeOverlib($roster->locale->act['installer_click_uninstall'], $roster->locale->act['installer_installed']), 'L_TIP_UNINSTALL' => makeOverlib($roster->locale->act['installer_click_install'], $roster->locale->act['installer_not_installed'])));
    foreach ($plugins as $addon) {
        if (!empty($addon['icon'])) {
            if (strpos($addon['icon'], '.') !== false) {
                $addon['icon'] = ROSTER_PATH . 'plugins/' . $addon['basename'] . '/images/' . $addon['icon'];
            } else {
                $addon['icon'] = $roster->config['interface_url'] . 'Interface/Icons/' . $addon['icon'] . '.' . $roster->config['img_suffix'];
            }
        } else {
            $addon['icon'] = $roster->config['interface_url'] . 'Interface/Icons/inv_misc_questionmark.' . $roster->config['img_suffix'];
        }
        $roster->tpl->assign_block_vars('addon_list', array('ROW_CLASS' => $roster->switch_row_class(), 'ID' => isset($addon['id']) ? $addon['id'] : '', 'ICON' => $addon['icon'], 'FULLNAME' => $addon['fullname'], 'BASENAME' => $addon['basename'], 'FILENAME' => $addon['filename'], 'PARENT' => $addon['parent'], 'VERSION' => $addon['version'], 'OLD_VERSION' => isset($addon['oldversion']) ? $addon['oldversion'] : '', 'DESCRIPTION' => $addon['description'], 'DEPENDENCY' => $addon['requires'], 'AUTHOR' => $addon['author'], 'ACTIVE' => isset($addon['active']) ? $addon['active'] : '', 'INSTALL' => $addon['install'], 'L_TIP_UPGRADE' => isset($addon['active']) ? makeOverlib(sprintf($roster->locale->act['installer_click_upgrade'], $addon['oldversion'], $addon['version']), $roster->locale->act['installer_upgrade_avail']) : '', 'ACCESS' => ''));
    }
} else {
    $installer->setmessages('No addons available!');
}
$errorstringout = $installer->geterrors();
$messagestringout = $installer->getmessages();
$sqlstringout = $installer->getsql();
// print the error messages
if (!empty($errorstringout)) {
    $roster->set_message($errorstringout, $roster->locale->act['installer_error'], 'error');
}
// Print the update messages
if (!empty($messagestringout)) {
    $roster->set_message($messagestringout, $roster->locale->act['installer_log']);
}
Exemplo n.º 26
0
 /**
  * Controls Output of the Talent Spec Column
  *
  * @param array $row - of character data
  * @return string - Formatted output
  */
 function spec_icon($row)
 {
     global $roster, $addon;
     $cell_value = '';
     // Don't proceed for characters without data
     if (!isset($row['talents']) || $row['talents'] == '') {
         return '<img class="membersRowimg" width="' . $addon['config']['icon_size'] . '" height="' . $addon['config']['icon_size'] . '" src="' . $roster->config['img_url'] . 'pixel.gif" alt="" />';
     }
     $lang = $row['clientLocale'];
     $talents = explode(',', $row['talents']);
     $spec = $specicon = '';
     $tooltip = array();
     $specpoint = 0;
     foreach ($talents as $talent) {
         list($name, $points, $icon) = explode('|', $talent);
         $tooltip[] = $points;
         if ($points > $specpoint) {
             $specpoint = $points;
             $spec = $name;
             $specicon = $icon;
         }
     }
     $tooltip = implode(' / ', $tooltip);
     $specicon = '<img class="membersRowimg" width="' . $addon['config']['icon_size'] . '" height="' . $addon['config']['icon_size'] . '" src="' . $roster->config['img_url'] . 'spec/' . $specicon . '.' . $roster->config['img_suffix'] . '" alt="" ' . makeOverlib($tooltip, $spec, '', 1, '', ',RIGHT,WRAP') . ' />';
     if (active_addon('info')) {
         $cell_value .= '<a href="' . makelink('char-info-talents&amp;a=c:' . $row['member_id']) . '">' . $specicon . '</a>';
     } else {
         $cell_value .= $specicon;
     }
     return $cell_value;
 }
Exemplo n.º 27
0
            $roster->tpl->assign_block_vars('profile.cfg', array('NAME' => $roster->locale->act['user_settings'][substr($val_name, 5)], 'FIELD' => $field));
            $k++;
        }
        $i++;
    }
    $roster->tpl->assign_block_vars('profile.cfg', array('NAME' => $roster->locale->act['user_settings']['main'], 'FIELD' => selectMain($uid)));
    $roster->tpl->assign_block_vars('profile.cfg', array('NAME' => $roster->locale->act['user_settings']['src_gen'], 'FIELD' => selectGen($uid)));
} else {
    $formbody = 'No Data';
}
$tab1 = explode('|', $roster->locale->act['user_settings']['set']);
$tab3 = explode('|', $roster->locale->act['user_main_menu']['my_prof']);
$menu = '
<ul class="tab_menu">
	<li class="selected"><span class="ui-icon ui-icon-help" style="float:left;cursor:help;" ' . makeOverlib($tab1[1], $tab1[0], '', 2, '', ',WRAP') . '></span><a href="' . makelink('ucp-addon-user') . '">' . $tab1[0] . '</a></li>
	<li><span class="ui-icon ui-icon-help" style="float:left;cursor:help;" ' . makeOverlib($tab3[1], $tab3[0], '', 2, '', ',WRAP') . '></span><a href="' . makelink('ucp-addon-user-edit') . '">' . $tab3[0] . '</a></li>
</ul>';
$roster->tpl->set_filenames(array('ucp2' => $addon['basename'] . '/ucp-profile.html'));
$roster->tpl->assign_vars(array('ROSTERCP_TITLE' => !empty($rostercp_title) ? $rostercp_title : $roster->locale->act['roster_cp_ab'], 'PAGE_INFO' => 'Profile Display Settings'));
$body = $roster->tpl->fetch('ucp2');
/**
 * Make select box of characters for main selection
 */
function selectMain($uid)
{
    global $roster, $addon, $user, $uid;
    include_once $addon['inc_dir'] . 'users.lib.php';
    $user = new user();
    $query = "SELECT `users`.`id`, `member`.`name`,`member`.`member_id` FROM `" . $roster->db->table('user_members') . "` AS users LEFT JOIN `" . $roster->db->table('members') . "` AS member ON `users`.`id` = `member`.`account_id` WHERE `users`.`id` = " . $uid . ";";
    $result = $roster->db->query($query);
    if (!$result) {
Exemplo n.º 28
0
}
$existing_data = $roster->db->num_rows($result) > 0 ? true : false;
$data = array('allow' => array(), 'deny' => array());
while ($row = $roster->db->fetch($result)) {
    if ($row['type'] & 1 == 1) {
        $data['deny'][] = $row;
    } else {
        $data['allow'][] = $row;
    }
}
$default_present = $roster->db->query_first("SELECT `name` FROM `" . $roster->db->table('upload') . "` WHERE `default` = 1;");
if (empty($default_present)) {
    $rcp_message .= messagebox($roster->locale->act['no_default_guild'], $roster->locale->act['pagebar_uploadrules'], 'sred');
}
$l_enforce_rules = explode('|', $roster->locale->act['admin']['enforce_rules']);
// OUTPUT
$roster->tpl->assign_vars(array('S_ENFORCE_RULES' => $roster->config['enforce_rules'], 'S_EXISTING_DATA' => $existing_data, 'L_DISALLOW' => $roster->locale->act['disallow'], 'L_ALLOW' => $roster->locale->act['allow'], 'L_ENFORCE_RULES' => $l_enforce_rules[0], 'L_ENFORCE_RULES_HELP' => makeOverlib($l_enforce_rules[1], $l_enforce_rules[0], '', 0, '', ',WRAP'), 'L_DEFAULT' => $roster->locale->act['default'], 'L_NAME' => $roster->locale->act['name'], 'L_NAME_TIP' => makeOverlib($mode == 'guild' ? $roster->locale->act['guildname'] : $roster->locale->act['charname']), 'L_SERVER' => $roster->locale->act['server'], 'L_SERVER_TIP' => makeOverlib($roster->locale->act['realmname']), 'L_REGION' => $roster->locale->act['region'], 'L_REGION_TIP' => makeOverlib($roster->locale->act['regionname']), 'L_ADD' => $roster->locale->act['add'], 'L_DELETE' => $roster->locale->act['delete'], 'L_UPLOAD_RULES' => $roster->locale->act['pagebar_uploadrules'], 'L_UPLOAD_RULES_HELP' => $roster->locale->act['upload_rules_help'], 'MODE' => $mode));
$menu_items = array('guild', 'char');
foreach ($menu_items as $item) {
    $roster->tpl->assign_block_vars('upload_rules_menu', array('SELECTED' => $mode == $item ? true : false, 'LINK' => makelink($roster->pages[0] . '-' . $roster->pages[1] . '-' . $item), 'NAME' => $roster->locale->act[$item]));
}
// Enforce Upload Rules
foreach ($data['deny'] as $row) {
    $roster->tpl->assign_block_vars('deny_list', array('ID' => $row['rule_id'], 'NAME' => $row['name'], 'SERVER' => $row['server'], 'REGION' => $row['region']));
}
foreach ($data['allow'] as $row) {
    $roster->tpl->assign_block_vars('allow_list', array('DEFAULT' => (bool) $row['default'], 'ID' => $row['rule_id'], 'NAME' => $row['name'], 'SERVER' => $row['server'], 'REGION' => $row['region']));
}
$roster->tpl->set_filenames(array('body' => 'admin/upload_rules.html', 'menu' => 'admin/upload_rules_menu.html'));
$body = $roster->tpl->fetch('body');
$menu = $roster->tpl->fetch('menu');
Exemplo n.º 29
0
			<th class="membersHeader" <?php 
echo makeOverlib($roster->locale->act['key_name_use']);
?>
> <?php 
echo $roster->locale->act['key_name'];
?>
 </th>
			<th class="membersHeader" <?php 
echo makeOverlib($roster->locale->act['Type_use']);
?>
> <?php 
echo $roster->locale->act['Type'];
?>
 </th>
			<th class="membersHeader" <?php 
echo makeOverlib($roster->locale->act['order_use']);
?>
> <?php 
echo $roster->locale->act['order'];
?>
 </th>
			<th class="membersHeaderRight">&nbsp;</th>
		</tr>
	</thead>
	<tbody>
<?php 
$query = "SELECT *\n\tFROM `" . $roster->db->table('Key', 'Key_BC') . "`\n\tWHERE `lang`= '" . $roster->config['locale'] . "'\n\tORDER BY `order` ASC";
$result_key = $roster->db->query($query) or die_quietly($roster->db->error(), 'Database Error', basename(__FILE__), __LINE__, $query);
$max = 0;
while ($row = $roster->db->fetch($result_key)) {
    ?>
Exemplo n.º 30
0
/**
 * Controls Output of a Note Column
 *
 * @param array $row - of character data
 * @return string - Formatted output
 */
function note_value($row)
{
    global $roster_conf, $wordings;
    $tooltip = '';
    if (!empty($row['note'])) {
        $note = htmlspecialchars(nl2br($row['note']));
        if ($roster_conf['compress_note']) {
            $note = '<img src="' . $roster_conf['img_url'] . 'note.gif" style="cursor:help;" ' . makeOverlib($note, $wordings[$roster_conf['roster_lang']]['note'], '', 1, '', ',WRAP') . ' alt="[]" />';
        }
    } else {
        $note = '&nbsp;';
        if ($roster_conf['compress_note']) {
            $note = '<img src="' . $roster_conf['img_url'] . 'no_note.gif" alt="[]" />';
        }
    }
    return '<div style="display:none; ">' . $row['note'] . '</div>' . $note;
}