Exemple #1
0
 public function display()
 {
     //Sort
     $sort = $this->in->get('sort');
     $sort_suffix = '&sort=' . $sort;
     //redirect on member management
     if ($this->in->exists('manage_b') && $this->in->get('manage_b') == $this->user->lang('manage_items')) {
         $manage_link = './admin/listitems.php';
         redirect($manage_link);
     }
     $start = $this->in->get('start', 0);
     $pagination_suffix = $start ? '&start=' . $start : '';
     //Output
     $view_list = $filtered_list = $this->pdh->get('item', 'id_list');
     if ($this->in->exists('search')) {
         $mySearch = $this->in->get('search');
         $searchType = $this->in->get('search_type') ? $this->in->get('search_type') : 'itemname';
         $filtered_list = $this->filter($view_list, $searchType, $mySearch);
     }
     $item_count = count($filtered_list) > 0 ? count($filtered_list) : count($view_list);
     $footer_text = sprintf($this->user->lang('listitems_footcount'), $item_count, $this->user->data['user_ilimit']);
     //init infotooltip
     infotooltip_js();
     $hptt_page_settings = $this->pdh->get_page_settings('listitems', 'hptt_listitems_itemlist');
     $hptt = $this->get_hptt($hptt_page_settings, $view_list, $filtered_list, array('%link_url%' => 'viewitem.php', '%link_url_suffix%' => '', '%raid_link_url%' => 'viewraid.php', '%raid_link_url_suffix%' => '', '%itt_lang%' => false, '%itt_direct%' => 0, '%onlyicon%' => 0, '%noicon%' => 0));
     $this->tpl->assign_vars(array('SEARCH_LINK' => '<input type="image" src="' . $this->root_path . 'images/glyphs/view.png" name="search_b" value="1" alt="' . $this->user->lang('Itemsearch_searchby') . '" title="' . $this->user->lang('Itemsearch_searchby') . '" class="absmiddle" />', 'MANAGE_LINK' => $this->user->check_auth('a_item_', false) ? '<a href="admin/manage_items.php' . $this->SID . '" title="' . $this->user->lang('manage_items') . '"><img src="' . $this->root_path . 'images/glyphs/edit.png" alt="' . $this->user->lang('manage_items') . '" /></a>' : '', 'PAGE_OUT' => $hptt->get_html_table($sort, $pagination_suffix, $start, $this->user->data['user_ilimit'], $footer_text), 'ITEM_PAGINATION' => generate_pagination('listitems.php' . $this->SID . $sort_suffix, $item_count, $this->user->data['user_ilimit'], $start)));
     $this->core->set_vars(array('page_title' => $this->user->lang('listitems_title'), 'template_file' => 'listitems.html', 'display' => true));
 }
Exemple #2
0
 public function display()
 {
     $isort = $this->in->get('isort');
     $rsort = $this->in->get('rsort');
     $ipools = $this->pdh->get('event', 'itempools', array($this->url_id));
     $raid_hptt_settings = $this->pdh->get_page_settings('viewevent', 'hptt_viewevent_raidlist');
     $item_hptt_settings = $this->pdh->get_page_settings('viewevent', 'hptt_viewevent_itemlist');
     $raid_ids = $this->pdh->get('raid', 'raidids4eventid', array($this->url_id));
     $raid_hptt = $this->get_hptt($raid_hptt_settings, $raid_ids, $raid_ids, array('%link_url%' => 'viewraid.php', '%link_url_suffix%' => ''), $this->url_id, 'rsort');
     $item_ids = $this->pdh->get('item', 'itemids4eventid', array($this->url_id));
     $item_hptt = $this->get_hptt($item_hptt_settings, $item_ids, $item_ids, array('%link_url%' => 'viewitem.php', '%link_url_suffix%' => '', '%raid_link_url%' => 'viewraid.php', '%raid_link_url_suffix%' => '', '%itt_lang%' => false, '%itt_direct%' => 0, '%onlyicon%' => 0, '%noicon%' => 0), $this->url_id, 'isort');
     infotooltip_js();
     $this->tpl->assign_vars(array('RAID_LIST' => $raid_hptt->get_html_table($rsort, '&amp;event_id=' . $this->url_id), 'ITEM_LIST' => $item_hptt->get_html_table($isort, '&amp;event_id=' . $this->url_id), 'EVENT_ICON' => $this->game->decorate('events', array($this->url_id, 64)), 'EVENT_NAME' => $this->pdh->get('event', 'name', array($this->url_id)), 'MDKPPOOLS' => $this->pdh->geth('event', 'multidkppools', array($this->url_id)), 'ITEMPOOLS' => $this->pdh->geth('event', 'itempools', array($this->url_id))));
     $this->core->set_vars(array('page_title' => sprintf($this->user->lang('viewevent_title'), $this->pdh->get('event', 'name', array($this->url_id))), 'template_file' => 'viewevent.html', 'display' => true));
 }
 public function output()
 {
     if ($this->config->get('default_game') == 'wow') {
         if ($this->config->get('servername') && $this->config->get('uc_server_loc')) {
             $this->game->new_object('bnet_armory', 'armory', array($this->config->get('uc_server_loc'), $this->config->get('uc_data_lang')));
             $guilddata = $this->game->obj['armory']->guild($this->config->get('guildtag'), $this->config->get('servername'));
             $maxItems = $this->config('maxitems') ? $this->config('maxitems') : 5;
             infotooltip_js();
             chartooltip_js();
             //Guildnews
             $arrNews = $this->pdc->get('portal.module.guildnews.' . $this->user->lang_name);
             if (!$arrNews) {
                 if ($this->config('options')) {
                     $arrOptions = $this->config('options');
                     if (count($arrOptions) < 1) {
                         $arrOptions = false;
                     }
                 } else {
                     $arrOptions = false;
                 }
                 $arrNews = $this->game->callFunc('parseGuildnews', array($guilddata['news'], $maxItems, $arrOptions));
                 $this->pdc->put('portal.module.guildnews.' . $this->user->lang_name, $arrNews, 3600);
             }
             if (is_array($arrNews) && count($arrNews) > 0) {
                 if (count($arrNews) > $maxItems) {
                     $arrNews = array_slice($arrNews, 0, $maxItems);
                 }
                 $out = '<table class="table fullwidth noborder colorswitch hoverrows">';
                 foreach ($arrNews as $news) {
                     if ($this->position == 'middle' || $this->position == 'bottom') {
                         $out .= '<tr><td width="30"><div style="text-align:center;"><img src="' . $news['icon'] . '" alt="" /></div></td><td>' . $news['text'] . '</td><td width="80" class="nowrap">' . $this->time->nice_date($news['date'], 60 * 60 * 24 * 7) . '</td></tr>';
                     } else {
                         $out .= '<tr><td width="30"><div style="text-align:center;"><img src="' . $news['icon'] . '" alt="" /></div></td><td>' . $news['text'] . '<div class="small italic">' . $this->time->nice_date($news['date'], 60 * 60 * 24 * 7) . '</div></td></tr>';
                     }
                 }
                 $out .= '</table>';
             } else {
                 $out = $this->user->lang('guildnews_no_news');
             }
         }
     } else {
         $out = $this->user->lang('guildnews_wrong_game');
     }
     return $out;
 }
 public function display_event()
 {
     $this->url_id = $this->in->get('e', 0);
     $isort = $this->in->get('isort');
     $rsort = $this->in->get('rsort');
     $ipools = $this->pdh->get('event', 'itempools', array($this->url_id));
     $raid_hptt_settings = $this->pdh->get_page_settings('viewevent', 'hptt_viewevent_raidlist');
     $item_hptt_settings = $this->pdh->get_page_settings('viewevent', 'hptt_viewevent_itemlist');
     $raid_ids = $this->pdh->get('raid', 'raidids4eventid', array($this->url_id));
     $raid_hptt = $this->get_hptt($raid_hptt_settings, $raid_ids, $raid_ids, array('%link_url%' => $this->routing->simpleBuild('raids'), '%link_url_suffix%' => '', '%use_controller%' => true), $this->url_id, 'rsort');
     $raid_hptt->setPageRef($this->strPath);
     $item_ids = $this->pdh->get('item', 'itemids4eventid', array($this->url_id));
     $item_hptt = $this->get_hptt($item_hptt_settings, $item_ids, $item_ids, array('%link_url%' => $this->routing->simpleBuild('items'), '%link_url_suffix%' => '', '%raid_link_url%' => $this->routing->simpleBuild('raids'), '%raid_link_url_suffix%' => '', '%itt_lang%' => false, '%itt_direct%' => 0, '%onlyicon%' => 0, '%noicon%' => 0, '%use_controller%' => true), $this->url_id, 'isort');
     $item_hptt->setPageRef($this->strPath);
     infotooltip_js();
     $this->tpl->assign_vars(array('RAID_LIST' => $raid_hptt->get_html_table($rsort, ''), 'ITEM_LIST' => $item_hptt->get_html_table($isort, ''), 'EVENT_ICON' => $this->game->decorate('events', $this->url_id, array(), 64), 'EVENT_NAME' => $this->pdh->get('event', 'name', array($this->url_id)), 'MDKPPOOLS' => $this->pdh->geth('event', 'multidkppools', array($this->url_id)), 'ITEMPOOLS' => $this->pdh->geth('event', 'itempools', array($this->url_id))));
     $this->set_vars(array('page_title' => $this->pdh->get('event', 'name', array($this->url_id)), 'template_file' => 'viewevent.html', 'display' => true));
 }
 public function output()
 {
     $limit = $this->config->get('pk_last_items_limit') > 0 ? $this->config->get('pk_last_items_limit') : '5';
     $allitems = $this->pdh->aget('item', 'date', 0, array($this->pdh->get('item', 'id_list')));
     arsort($allitems);
     $items = array_keys(array_slice($allitems, 0, $limit, true));
     if (is_array($items) && count($items) > 0) {
         $out = '<table width="100%" border="0" cellspacing="1" cellpadding="2" class="noborder colorswitch hoverrows">';
         infotooltip_js();
         foreach ($items as $item) {
             $buyer = $this->pdh->get('item', 'buyer', array($item));
             $out .= '<tr class="nowrap">' . "<td>\n\t\t\t\t\t\t\t\t\t" . $this->pdh->get('item', 'link_itt', array($item, 'viewitem.php')) . ' <br />' . $this->pdh->get('member', 'html_memberlink', array($buyer, $this->root_path . 'viewcharacter.php', '', false, false, true)) . ' (' . $this->pdh->get('item', 'html_value', array($item)) . " " . $this->config->get('dkp_name') . ")\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>";
         }
         $out .= '</table>';
     } else {
         $out = '<table width="100%" border="0" cellspacing="1" cellpadding="2" class="colorswitch"><tr><td>' . $this->user->lang('pk_last_items_noitems') . "</td></tr></table>";
     }
     return $out;
 }
 public function output()
 {
     infotooltip_js();
     $limit = $this->config('limit') > 0 ? $this->config('limit') : 5;
     $show_loot = $this->config('showloot');
     $loot_limit = $this->config('lootLimit') > 0 ? $this->config('lootLimit') : 7;
     $lastraids = $this->pdh->maget('raid', array('event', 'date', 'note', 'value'), 0, array($this->pdh->sort($this->pdh->get('raid', 'id_list'), 'raid', 'date', 'desc')));
     $lastraids = array_slice($lastraids, 0, $limit, true);
     foreach ($lastraids as $raid_id => $raid) {
         $raid_items = $this->pdh->get('item', 'itemsofraid', array($raid_id));
         $raid_items = array_slice($raid_items, 0, $loot_limit, true);
         $this->tpl->assign_block_vars('pm_lr_event', array('ID' => $raid['event'], 'NAME' => $this->pdh->get('raid', 'event_name', array($raid_id)), 'DATE' => $this->time->user_date($raid['date']), 'NOTE' => strlen($raid['note']) > 40 ? substr($raid['note'], 0, 37) . '...' : $raid['note'], 'VALUE' => $raid['value'], 'ICON' => $this->game->decorate('events', $raid['event'], array(), 40), 'LINK' => $this->pdh->get('raid', 'raidlink', array($raid_id, $this->routing->simpleBuild('raids'), '', true))));
         foreach ($raid_items as $item_id) {
             $this->tpl->assign_block_vars('pm_lr_event.item', array('ICON' => $this->pdh->get('item', 'link_itt', array($item_id, $this->routing->simpleBuild('items'), '', false, 0, 16, false, 'icon', true)) . ' '));
         }
     }
     $this->tpl->assign_vars(array('PM_LR_CNF_LIMIT' => $limit, 'PM_LR_CNF_SHOWLOOT' => $show_loot, 'PM_LR_CNF_LOOT_LIMIT' => $loot_limit, 'PM_LR_RAIDS' => count($lastraids)));
     return 'Error: Template file is empty.';
 }
 public function output()
 {
     infotooltip_js();
     $output = $this->pdc->get('dkp.portal.modul.lastraids.' . $this->root_path, false, true);
     if (!$output) {
         $output = '<table width="100%" border="0" cellspacing="1" cellpadding="2" class="colorswitch">';
         $limit = $this->config->get('pk_last_raids_limit') > 0 ? $this->config->get('pk_last_raids_limit') : 5;
         $lastraids = $this->pdh->maget('raid', array('event', 'date', 'note', 'value'), 0, array($this->pdh->sort($this->pdh->get('raid', 'id_list'), 'raid', 'date', 'desc')));
         $lastraids = array_slice($lastraids, 0, $limit, true);
         if (!is_array($lastraids) || count($lastraids) < 1) {
             $output .= '<tr><td>' . $this->user->lang('lastraids_no_raids') . '</td></tr>';
             $lastraids = array();
         }
         foreach ($lastraids as $raid_id => &$raid) {
             //Items
             $raid['items'] = '';
             if (!$this->config->get('pk_set_lastraids_showloot')) {
                 $loot_limit = $this->config->get('pk_lastraids_lootLimit') > 0 ? $this->config->get('pk_lastraids_lootLimit') : 7;
                 $raid_items = $this->pdh->get('item', 'itemsofraid', array($raid_id));
                 if (is_array($raid_items)) {
                     $num = 0;
                     foreach ($raid_items as $item_id) {
                         if ($num > $loot_limit) {
                             break;
                         }
                         $raid['items'] .= $this->pdh->get('item', 'link_itt', array($item_id, '{ROOT_PATH}viewitem.php', '', false, 0, 16, false, 'icon')) . ' ';
                         $num++;
                     }
                 }
             }
             $img = str_replace($this->root_path, '{ROOT_PATH}', $this->game->decorate('events', array($raid['event'], 40)));
             $link = $this->pdh->get('raid', 'raidlink', array($raid_id, '{ROOT_PATH}viewraid.php'));
             $html_link = $this->pdh->geth('raid', 'raidlink', array($raid_id, '{ROOT_PATH}viewraid.php'));
             $raid['note'] = strlen($raid['note']) > 40 ? substr($raid['note'], 0, 37) . '...' : $raid['note'];
             $output .= '<tr><td width="42"><a href="' . $link . '">' . $img . '</a></td>';
             $output .= '<td>' . $html_link . '<br />' . $this->time->user_date($raid['date']) . '<br />' . $raid['note'] . '<br />' . $raid['items'] . '</td></tr>';
         }
         $output .= '</table>';
         $this->pdc->put('dkp.portal.modul.lastraids.' . $this->root_path, $output, 86400, false, true);
     }
     return str_replace('{ROOT_PATH}', $this->root_path, $output);
 }
Exemple #8
0
 public function display()
 {
     // We want to view items by name and not id, so get the name
     $item_name = $this->pdh->get('item', 'name', array($this->url_id));
     if (empty($item_name)) {
         message_die($this->user->lang('error_invalid_item_provided'));
     }
     #search for the gameid
     $game_id = $this->pdh->get('item', 'game_itemid', array($this->url_id));
     //Sort
     $sort = $this->in->get('sort');
     $item_ids = array();
     if ($game_id > 1) {
         $item_ids = $this->pdh->get('item', 'ids_by_ingameid', array($game_id));
     } else {
         $item_ids = $this->pdh->get('item', 'ids_by_name', array($item_name));
     }
     $counter = sizeof($item_ids);
     //default now col
     $colspan = $this->config->get('infotooltip_use') ? 1 : 0;
     #Itemhistory Diagram
     if ($this->config->get('pk_itemhistory_dia')) {
         $colspan++;
     }
     //Comments
     $comm_settings = array('attach_id' => md5(stripslashes($item_name)), 'page' => 'items');
     $this->comments->SetVars($comm_settings);
     $COMMENT = $this->config->get('pk_enable_comments') == 1 ? $this->comments->Show() : '';
     //init infotooltip
     infotooltip_js();
     $hptt_page_settings = $this->pdh->get_page_settings('viewitem', 'hptt_viewitem_buyerslist');
     $hptt = $this->get_hptt($hptt_page_settings, $item_ids, $item_ids, array('%raid_link_url%' => 'viewraid.php', '%raid_link_url_suffix%' => ''), $this->url_id);
     //linechart data
     if ($this->config->get('pk_itemhistory_dia')) {
         $a_items = array();
         foreach ($item_ids as $item_id) {
             $a_items[] = array('name' => $this->time->date("Y-m-d H:i:s", $this->pdh->get('item', 'date', array($item_id))), 'value' => $this->pdh->get('item', 'value', array($item_id)));
         }
     }
     $this->tpl->assign_vars(array('ITEM_STATS' => $this->pdh->get('item', 'itt_itemname', array($this->url_id, 0, 1)), 'ITEM_CHART' => $this->config->get('pk_itemhistory_dia') && count($a_items) > 1 ? $this->jquery->LineChart('item_chart', $a_items, '', 200, 500, '', false, true, 'date') : '', 'ITEM_MODEL' => isset($model3d) ? $model3d : false, 'COMMENT' => $COMMENT, 'SHOW_ITEMSTATS' => $this->config->get('infotooltip_use') ? true : false, 'SHOW_ITEMHISTORYA' => $this->config->get('pk_itemhistory_dia') == 1 ? true : false, 'SHOW_COLSPAN' => $colspan, 'BUYERS_TABLE' => $hptt->get_html_table($sort, '&amp;i=' . $this->url_id, 0, 100, sprintf($this->user->lang('viewitem_footcount'), $counter)), 'L_PURCHASE_HISTORY_FOR' => sprintf($this->user->lang('purchase_history_for'), stripslashes($item_name))));
     $this->core->set_vars(array('page_title' => sprintf($this->user->lang('viewitem_title'), stripslashes($item_name)), 'template_file' => 'viewitem.html', 'display' => true));
 }
 public function output()
 {
     $limit = $this->config('limit') > 0 ? $this->config('limit') : '5';
     $allitems = $this->pdh->aget('item', 'date', 0, array($this->pdh->get('item', 'id_list')));
     arsort($allitems);
     $items = array_keys(array_slice($allitems, 0, $limit, true));
     if (is_array($items) && count($items) > 0) {
         $out = '<table class="table fullwidth colorswitch hoverrows">';
         infotooltip_js();
         foreach ($items as $item) {
             $buyer = $this->pdh->get('item', 'buyer', array($item));
             $out .= '<tr>' . "<td>\n\t\t\t\t\t\t\t\t\t" . $this->pdh->get('item', 'link_itt', array($item, $this->routing->simpleBuild('items'), '', false, false, false, false, false, true)) . ' <br />' . $this->pdh->get('member', 'html_memberlink', array($buyer, $this->routing->simpleBuild('character'), '', false, false, true, true));
             if ($this->config->get('enable_points')) {
                 $out .= ' (' . $this->pdh->get('item', 'html_value', array($item)) . " " . $this->config->get('dkp_name') . ")";
             }
             $out .= "\t\t\t</td>\n\t\t\t\t\t\t\t</tr>";
         }
         $out .= '</table>';
     } else {
         $out = $this->user->lang('pk_last_items_noitems');
     }
     return $out;
 }
 public function display($messages = false)
 {
     if ($messages) {
         $this->pdh->process_hook_queue();
         $this->core->messages($messages);
     }
     infotooltip_js();
     $this->pdh->get('guildbank_auctions', 'counterJS');
     require_once $this->root_path . 'plugins/guildbank/includes/systems/guildbank.esys.php';
     $view_auctions = $this->pdh->get('guildbank_auctions', 'id_list', array(false));
     $hptt_auctions = $this->get_hptt($systems_guildbank['pages']['hptt_guildbank_admin_auctions'], $view_auctions, $view_auctions, array('%itt_lang%' => false, '%itt_direct%' => 0, '%onlyicon%' => 0, '%noicon%' => 0));
     $page_suffix = '&amp;start=' . $this->in->get('start', 0);
     $sort_suffix = '&amp;sort=' . $this->in->get('sort');
     $auctions_count = count($view_auctions);
     $auctions_footer = sprintf($this->user->lang('gb_footer_auction'), $auctions_count, $this->user->data['user_ilimit']);
     $redirect_url = 'manage_auctions.php' . $this->SID;
     $transactions_url = 'manage_auctions.php' . $this->SID . '&simple_head=true&addedit=true';
     $this->jquery->dialog('add_auction', $this->user->lang('gb_auction_head_add'), array('url' => $transactions_url, 'width' => 600, 'height' => 440, 'onclose' => $redirect_url));
     $this->jquery->dialog('edit_auction', $this->user->lang('gb_auction_head_edit'), array('url' => $transactions_url . "&auction='+id+'", 'width' => 600, 'height' => 500, 'onclose' => $redirect_url, 'withid' => 'id'));
     $this->confirm_delete($this->user->lang('gb_confirm_delete_auctions'));
     $this->tpl->assign_vars(array('AUCTION_LIST' => $hptt_auctions->get_html_table($this->in->get('sort'), $page_suffix, $this->in->get('start', 0), $this->user->data['user_ilimit'], $auctions_footer), 'PAGINATION_AUCTION' => generate_pagination('manage_auctions.php' . $this->SID . $sort_suffix, $auctions_count, $this->user->data['user_ilimit'], $this->in->get('start', 0))));
     $this->core->set_vars(array('page_title' => $this->user->lang('gb_manage_auctions'), 'template_path' => $this->pm->get_data('guildbank', 'template_path'), 'template_file' => 'admin/manage_auctions.html', 'display' => true));
 }
<?php

infotooltip_js();
// init infotooltip
// das kommt später raus, wenn alles sauber aufgeteilt und verabeitet ist......
$this->tpl->css_file($this->root_path . 'games/wow_assasinen/profiles/templates/profile.css');
$this->tpl->css_file($this->root_path . 'games/wow_assasinen/profiles/templates/summary.css');
$this->tpl->css_file($this->root_path . 'games/wow_assasinen/profiles/templates/pet.css');
$this->tpl->css_file($this->root_path . 'games/wow_assasinen/profiles/templates/zone.css');
//---------
// fetch and prepare arsenal data
$arrData = $this->pdh->get('arsenal_character', 'data', array($this->url_id));
$arrData['stats'] = json_decode($arrData['stats'], true);
$arrData['titles'] = json_decode($arrData['titles'], true);
$arrData['reputation'] = json_decode($arrData['reputation'], true);
$arrData['currencies'] = json_decode($arrData['currencies'], true);
$arrData['talents'] = json_decode($arrData['talents'], true);
$arrData['professions'] = json_decode($arrData['professions'], true);
$arrData['mounts'] = json_decode($arrData['mounts'], true);
// sollte doch eig als "companions" mit critters gemerged sein??!!
$arrData['critters'] = json_decode($arrData['critters'], true);
$arrData['inventory'] = json_decode($arrData['inventory'], true);
$arrData['faction'] = in_array($arrData['race'], array(0, 5, 6, 7, 8, 10, 12)) ? 'horde' : 'alliance';
// Arsenal Page Controller
switch ($page_name = $this->in->get('page')) {
    case 'professions':
        break;
    default:
        $content = $this->arsenal->character_main_page($arrData);
        $page_name = 'overview';
}
 public function display()
 {
     if (!$this->url_id) {
         $strReferer = $this->env->get_referer();
         if (stripos($strReferer, "ref=mc") !== 0) {
             redirect($this->routing->build('MyCharacters', false, false, true, true));
         } else {
             if ($this->config->get('disable_points')) {
                 redirect($this->routing->build('roster', false, false, true, true));
             } else {
                 redirect($this->routing->build('points', false, false, true, true));
             }
         }
     }
     $member_name = $this->pdh->get('member', 'name', array($this->url_id));
     if ($member_name == '') {
         message_die($this->user->lang('error_invalid_name_provided'));
     }
     $withTwinksDKP = $this->in->exists('with_twinks') ? $this->in->get('with_twinks') : !$this->config->get('show_twinks');
     // Raid Attendance
     $view_list = $this->pdh->get('raid', 'raidids4memberid', array($this->url_id));
     $hptt_page_settings = $this->pdh->get_page_settings('viewmember', 'hptt_viewmember_raidlist');
     $hptt = $this->get_hptt($hptt_page_settings, $view_list, $view_list, array('%link_url%' => $this->routing->simpleBuild('raids'), '%link_url_suffix%' => '', '%with_twink%' => false, '%use_controller%' => true), $this->url_id, 'rsort');
     $hptt->setPageRef($this->strPath);
     $this->tpl->assign_vars(array('RAID_OUT' => $hptt->get_html_table($this->in->get('rsort', ''), $this->vc_build_url('rsort'), $this->in->get('rstart', 0), $this->user->data['user_rlimit']), 'RAID_PAGINATION' => generate_pagination($this->vc_build_url('rstart', true), count($view_list), $this->user->data['user_rlimit'], $this->in->get('rstart', 0), 'rstart')));
     // Item History
     infotooltip_js();
     $view_list = $this->pdh->get('item', 'itemids4memberid', array($this->url_id));
     $hptt_page_settings = $this->pdh->get_page_settings('viewmember', 'hptt_viewmember_itemlist');
     $hptt = $this->get_hptt($hptt_page_settings, $view_list, $view_list, array('%link_url%' => $this->routing->simpleBuild('items'), '%link_url_suffix%' => '', '%itt_lang%' => false, '%itt_direct%' => 0, '%onlyicon%' => 0, '%noicon%' => 0, '%raid_link_url%' => $this->routing->simpleBuild('raids'), '%raid_link_url_suffix%' => '', '%use_controller%' => true), $this->url_id, 'isort');
     $hptt->setPageRef($this->strPath);
     $this->tpl->assign_vars(array('ITEM_OUT' => $hptt->get_html_table($this->in->get('isort', ''), $this->vc_build_url('isort'), $this->in->get('istart', 0), $this->user->data['user_ilimit']), 'ITEM_PAGINATION' => generate_pagination($this->vc_build_url('istart', true), count($view_list), $this->user->data['user_ilimit'], $this->in->get('istart', 0), 'istart')));
     // Individual Adjustment History
     $view_list = $this->pdh->get('adjustment', 'adjsofmember', array($this->url_id));
     $hptt_page_settings = $this->pdh->get_page_settings('viewmember', 'hptt_viewmember_adjlist');
     $hptt = $this->get_hptt($hptt_page_settings, $view_list, $view_list, array('%raid_link_url%' => $this->routing->simpleBuild('raids'), '%raid_link_url_suffix%' => '', '%use_controller%' => true), $this->url_id, 'asort');
     $hptt->setPageRef($this->strPath);
     $this->tpl->assign_vars(array('ADJUSTMENT_OUT' => $hptt->get_html_table($this->in->get('asort', ''), $this->vc_build_url('asort'), $this->in->get('astart', 0), $this->user->data['user_alimit']), 'ADJUSTMENT_PAGINATION' => generate_pagination($this->vc_build_url('astart', true), count($view_list), $this->user->data['user_alimit'], $this->in->get('astart', 0), 'astart')));
     //Event-Attendance
     $view_list = $this->pdh->get('event', 'id_list');
     $hptt_page_settings = $this->pdh->get_page_settings('viewmember', 'hptt_viewmember_eventatt');
     $hptt = $this->get_hptt($hptt_page_settings, $view_list, $view_list, array('%member_id%' => $this->url_id, '%link_url%' => $this->routing->simpleBuild('events'), '%link_url_suffix%' => '', '%with_twinks%' => false, '%use_controller%' => true), $this->url_id, 'esort');
     $hptt->setPageRef($this->strPath);
     $this->tpl->assign_vars(array('EVENT_ATT_OUT' => $hptt->get_html_table($this->in->get('esort', ''), $this->vc_build_url('esort'))));
     // Load member Data to an array
     $member = $this->pdh->get('member', 'array', array($this->url_id));
     $last_update = $this->time->user_date($member['last_update'] ? $member['last_update'] : 0, true);
     // load profile files in the game folder if available
     $profilefolder = $this->root_path . 'games/' . $this->game->get_game() . '/profiles/';
     $profile_tplfile = 'profile_view.html';
     $profile_owntpl = false;
     if (is_file($profilefolder . 'profile_additions.php') || is_file($profilefolder . 'profile_view.html')) {
         if (is_file($profilefolder . 'profile_additions.php')) {
             include $profilefolder . 'profile_additions.php';
         }
         if (is_file($profilefolder . 'profile_view.html')) {
             $profile_tplfile = $profilefolder . 'profile_view.html';
         }
         $profile_owntpl = true;
     }
     $this->comments->SetVars(array('ntfy_user' => array($this->pdh->get('member', 'user', array($this->url_id)))));
     $this->jquery->Tab_header('profile_information', true);
     //Member DKP
     $view_list = $this->pdh->get('multidkp', 'id_list');
     $hptt_page_settings = $this->pdh->get_page_settings('viewmember', 'hptt_viewmember_points');
     if (!$withTwinksDKP) {
         $hptt_page_settings['show_detail_twink'] = false;
     }
     $hptt = $this->get_hptt($hptt_page_settings, $view_list, $view_list, array('%member_id%' => $this->url_id, '%with_twink%' => $withTwinksDKP, '%use_controller%' => true), $this->url_id . '.' . $withTwinksDKP, 'msort');
     $hptt->setPageRef($this->strPath);
     $profile_out = array('PROFILE_OUTPUT' => $profile_tplfile, 'COMMENT' => $this->config->get('enable_comments') == 1 ? $this->comments->Show() : '', 'LAST_UPDATE' => $last_update, 'MEMBER_POINTS' => $hptt->get_html_table($this->in->get('msort', 0), $this->vc_build_url('msort')), 'L_DKP_NAME' => !$this->config->get('disable_points') ? $this->config->get('dkp_name') . " " . $this->user->lang('information') : $this->user->lang('tab_attendance'), 'U_VIEW_MEMBER' => $this->vc_build_url('', true) . '&amp;', 'DATA_GUILDTAG' => $this->config->get('guildtag'), 'CHARDATA_NAME' => $member_name, 'S_CHARDATA_PICTURE' => $this->pdh->get('member', 'picture', array($this->url_id)) != "" ? true : false, 'CHARDATA_PICTURE' => $this->pdh->geth('member', 'picture', array($this->url_id)), 'DATA_CLASSNAME' => $this->pdh->get('member', 'classname', array($this->url_id)), 'NOTES' => isset($member['notes']) && $member['notes'] != '' ? $member['notes'] : $this->user->lang('no_notes'), 'S_WITH_TWINK_DKP' => $withTwinksDKP ? true : false, 'IMG_CLASSICON' => $this->game->decorate('primary', $member[$this->game->get_primary_class(true)], $this->pdh->get('member', 'profiledata', array($this->url_id))), 'IMG_FULLYDECORATED' => $this->game->decorate_character($this->url_id, $char_id));
     // Add the game-specific Fields...
     foreach ($member as $profile_id => $profile_value) {
         $profile_out['DATA_ID_' . strtoupper($profile_id)] = $profile_value;
         $profile_out['DATA_NAME_' . strtoupper($profile_id)] = $this->pdh->geth('member', 'profile_field', array($this->url_id, $profile_id, true));
         $profile_out['DATA_' . strtoupper($profile_id)] = $this->pdh->geth('member', 'profile_field', array($this->url_id, $profile_id));
         $profile_out['L_' . strtoupper($profile_id)] = $this->game->glang($profile_id);
     }
     // the profile fields
     if (!$profile_owntpl) {
         $pfields = $this->pdh->get('profile_fields', 'fields');
         $category = array();
         $this->jquery->Tab_header('profile_field_data', true);
         if (is_array($pfields) && count($pfields) > 0) {
             foreach ($pfields as $pfid => $pfoption) {
                 $pfname = $pfoption['name'];
                 // only relevant data!
                 $category[$pfoption['category']][$pfname] = $pfoption;
             }
             foreach ($category as $catname => $catvalues) {
                 $this->tpl->assign_block_vars('cat_data', array('NAME' => $this->game->glang('uc_cat_' . $catname) ? $this->game->glang('uc_cat_' . $catname) : $this->user->lang('uc_cat_' . $catname), 'ID' => 'id_' . $catname));
                 foreach ($catvalues as $pfname => $pfoption) {
                     if ($pfoption['category'] == $catname && $pfoption['enabled'] == '1' && $pfoption['type'] != 'hidden') {
                         $this->tpl->assign_block_vars('cat_data.pfield_data', array('NAME' => $this->pdh->get('member', 'html_caption_profile_field', array($pfname)), 'VALUE' => $this->pdh->get('member', 'html_profile_field', array($this->url_id, $pfname))));
                     }
                 }
             }
             $this->tpl->assign_var('S_PFIELDS', true);
         } else {
             $this->tpl->assign_var('S_PFIELDS', false);
         }
     } else {
         $pfields = $this->pdh->get('profile_fields', 'fields');
         $custfields = false;
         foreach ($pfields as $pfid => $pfoption) {
             $pfname = $pfoption['name'];
             // only relevant data!
             if ($pfoption['custom'] == '1' && $pfoption['enabled'] == '1' && $pfoption['sort'] != 0) {
                 $custfields = true;
                 $this->tpl->assign_block_vars('pfield_custom', array('NAME' => $this->pdh->get('member', 'html_caption_profile_field', array($pfname)), 'VALUE' => $this->pdh->get('member', 'html_profile_field', array($this->url_id, $pfname))));
             }
         }
         $profile_out['CUSTOM_FIELDS'] = $custfields ? true : false;
     }
     // Start the Output
     $this->tpl->assign_vars($profile_out);
     //=============================================
     //Point History: Alpha
     //=============================================
     $this->set_vars(array('page_title' => $member_name, 'template_file' => 'viewcharacter.html', 'display' => true));
 }
Exemple #13
0
 public function parse_shorttags($text, $filter = array())
 {
     $tags = preg_split('/{{([^}]+)}}/', $text, -1, PREG_SPLIT_DELIM_CAPTURE);
     $strBuffer = '';
     for ($rit = 0; $rit < count($tags); $rit = $rit + 2) {
         $strBuffer .= $tags[$rit];
         if (!isset($tags[$rit + 1])) {
             break;
         }
         $strTag = $tags[$rit + 1];
         $arrCache = array();
         // Load value from cache array
         if (isset($arrCache[$strTag])) {
             $strBuffer .= $arrCache[$strTag];
             continue;
         }
         $elements = explode('::', $strTag);
         //Check Filter
         if (is_array($filter) && count($filter) > 0 && !in_array(strtolower($elements[0]), $filter)) {
             continue;
         }
         // Replace tag
         switch (strtolower($elements[0])) {
             case 'article_url':
                 $strPath = $this->controller_path . $this->pdh->get('articles', 'path', array($elements[1]));
                 $arrCache[$strTag] = $strPath ? $strPath : '';
                 break;
             case 'article_url_plain':
                 $strPath = $this->controller_path_plain . $this->pdh->get('articles', 'path', array($elements[1]));
                 $arrCache[$strTag] = $strPath ? $strPath : '';
                 break;
             case 'category_url':
                 $strPath = $this->controller_path . $this->pdh->get('article_categories', 'path', array($elements[1]));
                 $arrCache[$strTag] = $strPath ? $strPath : '';
                 break;
             case 'category_url_plain':
                 $strPath = $this->controller_path_plain . $this->pdh->get('article_categories', 'path', array($elements[1]));
                 $arrCache[$strTag] = $strPath ? $strPath : '';
                 break;
             case 'server':
                 switch ($elements[1]) {
                     case 'name':
                         $arrCache[$strTag] = $this->config->get('servername');
                         break;
                     case 'location':
                         $arrCache[$strTag] = $this->config->get('uc_server_loc');
                         break;
                 }
                 break;
             case 'user':
                 switch ($elements[1]) {
                     case 'name':
                         $this->username = !$this->user->is_signedin() ? $this->user->lang('guest') : $this->pdh->get('user', 'name', array($this->user->data['user_id']));
                         $arrCache[$strTag] = $this->username;
                         break;
                 }
                 break;
             case 'guild':
                 switch ($elements[1]) {
                     case 'name':
                         $arrCache[$strTag] = $this->config->get('guildtag');
                         break;
                 }
                 break;
             case 'char':
                 if (is_numeric($elements[1])) {
                     $member_id = intval($elements[1]);
                 } else {
                     $member_id = $this->pdh->get('member', 'id', array($elements[1]));
                 }
                 if ($member_id) {
                     $arrCache[$strTag] = $this->pdh->get('member', 'memberlink_decorated', array($member_id, $this->routing->simpleBuild('character'), '', true));
                 }
                 break;
             case 'itemid':
                 infotooltip_js();
                 $item = "";
                 $game_id = strip_tags($elements[1]);
                 $str = infotooltip($item, $game_id);
                 $arrCache[$strTag] = $str;
                 break;
             case 'item':
                 infotooltip_js();
                 $item = strip_tags($elements[1]);
                 if (strpos('id:', $item) === 0) {
                     $game_id = substr($item, 3);
                     $str = infotooltip("", $game_id);
                     $arrCache[$strTag] = $str;
                 } else {
                     $game_id = is_numeric($item) ? intval($item) : 0;
                     $str = infotooltip($item, $game_id);
                     $arrCache[$strTag] = $str;
                 }
                 break;
         }
         $strBuffer .= $arrCache[$strTag];
     }
     return $strBuffer;
 }
 public function display($messages = false, $banker = false)
 {
     $bankerID = $banker > 0 ? $banker : $this->in->get('g', 0);
     $banker_name = $this->pdh->get('guildbank_banker', 'name', array($bankerID));
     //init infotooltip
     infotooltip_js();
     $this->money->loadMoneyClass();
     require_once $this->root_path . 'plugins/guildbank/includes/systems/guildbank.esys.php';
     // -- display entries ITEMS ------------------------------------------------
     $view_items = $this->pdh->get('guildbank_items', 'id_list', array($bankerID));
     $hptt_items = $this->get_hptt($systems_guildbank['pages']['hptt_guildbank_admin_items'], $view_items, $view_items, array('%itt_lang%' => false, '%itt_direct%' => 0, '%onlyicon%' => 0, '%noicon%' => 0));
     $page_suffix = '&amp;start=' . $this->in->get('start', 0);
     $sort_suffix = '&amp;sort=' . $this->in->get('sort');
     $item_count = count($view_items);
     $item_footer = sprintf($this->user->lang('listitems_footcount'), $item_count, $this->user->data['user_ilimit']);
     // -- display entries TRANSACTIONS -----------------------------------------
     $ta_list = $this->pdh->get('guildbank_transactions', 'id_list', array($bankerID));
     $hptt_transa = $this->get_hptt($systems_guildbank['pages']['hptt_guildbank_admin_transactions'], $ta_list, $ta_list, array('%itt_lang%' => false, '%itt_direct%' => 0, '%onlyicon%' => 0, '%noicon%' => 0));
     $ta_count = count($ta_list);
     $footer_transa = sprintf($this->user->lang('listitems_footcount'), $ta_count, $this->user->data['user_ilimit']);
     // start ouptut
     $this->jquery->Tab_header('guildbank_tab');
     // build the url for the dialogs
     $redirect_url = 'manage_bank_details.php' . $this->SID . '&g=' . $bankerID . '&details=true';
     $transactions_url = 'manage_bank_details.php' . $this->SID . '&simple_head=true&addedit=true&g=' . $bankerID;
     $payout_url = 'manage_bank_details.php' . $this->SID . '&simple_head=true&g=' . $bankerID;
     $this->jquery->dialog('add_transaction', $this->user->lang('gb_manage_bank_transa'), array('url' => $transactions_url . '&mode=1', 'width' => 600, 'height' => 450, 'onclose' => $redirect_url));
     $this->jquery->dialog('edit_transaction', $this->user->lang('gb_manage_bank_transa'), array('url' => $transactions_url . "&mode=1&t='+id+'", 'width' => 600, 'height' => 450, 'onclose' => $redirect_url, 'withid' => 'id'));
     $this->jquery->dialog('add_item', $this->user->lang('gb_ta_head_item'), array('url' => $transactions_url . '&mode=0', 'width' => 600, 'height' => 580, 'onclose' => $redirect_url));
     $this->jquery->dialog('edit_item', $this->user->lang('gb_ta_head_item'), array('url' => $transactions_url . "&mode=0&i='+id+'", 'width' => 600, 'height' => 580, 'onclose' => $redirect_url, 'withid' => 'id'));
     $this->jquery->dialog('payout_item', $this->user->lang('gb_ta_head_payout'), array('url' => $payout_url . "&payout=true", 'width' => 600, 'height' => 400, 'onclose' => $redirect_url));
     $this->confirm_delete($this->user->lang('confirm_delete_items'));
     $this->tpl->assign_vars(array('BANKID' => $bankerID, 'SID' => $this->SID, 'BANKNAME' => $this->pdh->get('guildbank_banker', 'name', array($bankerID)), 'ITEM_LIST' => $hptt_items->get_html_table($this->in->get('sort'), $page_suffix, $this->in->get('start', 0), $this->user->data['user_ilimit'], $item_footer), 'PAGINATION_ITEMS' => generate_pagination('manage_bank_details.php' . $this->SID . '&g=' . $bankerID . $sort_suffix, $item_count, $this->user->data['user_ilimit'], $this->in->get('start', 0)), 'ITEMS_COLUMN_COUNT' => $hptt_items->get_column_count(), 'TRANSA_LIST' => $hptt_transa->get_html_table($this->in->get('sort'), $page_suffix, $this->in->get('start', 0), $this->user->data['user_ilimit'], $footer_transa), 'TRANSA_PAGINATION' => generate_pagination('manage_bank_details.php' . $this->SID . '&g=' . $bankerID . $sort_suffix, $ta_count, $this->user->data['user_ilimit'], $this->in->get('start', 0)), 'TRANSA_COLUMN_COUNT' => $hptt_transa->get_column_count(), 'L_BC_CURRENTPAGE' => sprintf($this->user->lang('gb_manage_bank_items_title'), $banker_name)));
     $this->core->set_vars(array('page_title' => sprintf($this->user->lang('gb_manage_bank_items_title'), $banker_name), 'template_file' => 'admin/manage_banker_items.html', 'template_path' => $this->pm->get_data('guildbank', 'template_path'), 'display' => true));
 }
Exemple #15
0
 public function display_member_history()
 {
     $intMemberID = $this->in->get('member', 0);
     $strMembername = $this->pdh->get('member', 'name', array($intMemberID));
     $withTwinksDKP = false;
     // Raids
     $view_list = $this->pdh->get('raid', 'raidids4memberid', array($intMemberID));
     $hptt_page_settings = $this->pdh->get_page_settings('admin_manage_raids', 'hptt_admin_manage_raids_raidlist');
     $hptt_page_settings['selectbox_name'] = 'raid_ids';
     $hptt = $this->get_hptt($hptt_page_settings, $view_list, $view_list, array('%link_url%' => 'manage_raids.php', '%link_url_suffix%' => '&amp;upd=true', '%with_twink%' => false, '%use_controller%' => false), 'history_' . $intMemberID, 'rsort');
     $hptt->setPageRef($this->root_path . 'admin/manage_members.php');
     $this->tpl->assign_vars(array('RAID_OUT' => $hptt->get_html_table($this->in->get('rsort', ''), $this->vc_build_url('rsort'), $this->in->get('rstart', 0), $this->user->data['user_rlimit']), 'RAID_PAGINATION' => generate_pagination($this->vc_build_url('rstart', true), count($view_list), $this->user->data['user_rlimit'], $this->in->get('rstart', 0), 'rstart')));
     // Item History
     infotooltip_js();
     $view_list = $this->pdh->get('item', 'itemids4memberid', array($intMemberID));
     $hptt_page_settings = $this->pdh->get_page_settings('admin_manage_items', 'hptt_admin_manage_items_itemlist');
     $hptt_page_settings['selectbox_name'] = 'item_ids';
     $hptt = $this->get_hptt($hptt_page_settings, $view_list, $view_list, array('%link_url%' => 'manage_items.php', '%link_url_suffix%' => '&amp;upd=true', '%raid_link_url%' => 'manage_raids.php', '%raid_link_url_suffix%' => '&amp;upd=true', '%itt_lang%' => false, '%itt_direct%' => 0, '%onlyicon%' => 0, '%noicon%' => 0), 'history_' . $intMemberID, 'isort');
     $hptt->setPageRef($this->root_path . 'admin/manage_members.php');
     $this->tpl->assign_vars(array('ITEM_OUT' => $hptt->get_html_table($this->in->get('isort', ''), $this->vc_build_url('isort'), $this->in->get('istart', 0), $this->user->data['user_ilimit']), 'ITEM_PAGINATION' => generate_pagination($this->vc_build_url('istart', true), count($view_list), $this->user->data['user_ilimit'], $this->in->get('istart', 0), 'istart')));
     // Individual Adjustment History
     $view_list = $this->pdh->get('adjustment', 'adjsofmember', array($intMemberID));
     $hptt_page_settings = $this->pdh->get_page_settings('admin_manage_adjustments', 'hptt_admin_manage_adjustments_adjlist');
     $hptt_page_settings['selectbox_name'] = 'adj_ids';
     $hptt = $this->get_hptt($hptt_page_settings, $view_list, $view_list, array('%link_url%' => 'manage_adjustments.php', '%link_url_suffix%' => '&amp;upd=true', '%raid_link_url%' => 'manage_raids.php', '%raid_link_url_suffix%' => '&amp;upd=true'), 'history_' . $intMemberID, 'asort');
     $hptt->setPageRef($this->root_path . 'admin/manage_members.php');
     $this->tpl->assign_vars(array('ADJUSTMENT_OUT' => $hptt->get_html_table($this->in->get('asort', ''), $this->vc_build_url('asort'), $this->in->get('astart', 0), $this->user->data['user_alimit']), 'ADJUSTMENT_PAGINATION' => generate_pagination($this->vc_build_url('astart', true), count($view_list), $this->user->data['user_alimit'], $this->in->get('astart', 0), 'astart')));
     $this->jquery->Tab_header('profile_information', true);
     $this->tpl->assign_vars(array('MEMBER_NAME' => $strMembername, 'MEMBER_ID' => $intMemberID));
     $this->core->set_vars(array('page_title' => $this->user->lang('manage_members_title') . ': ' . $strMembername, 'template_file' => 'admin/manage_members_history.html', 'header_format' => $this->simple_head, 'display' => true));
 }
 public function display()
 {
     $bankerID = $this->in->get('banker', 0);
     $rarityID = $this->in->get('rarity', '');
     $typeID = $this->in->get('type', 0);
     require_once $this->root_path . 'plugins/guildbank/includes/systems/guildbank.esys.php';
     //init infotooltip
     infotooltip_js();
     //caching parameter
     $caching_parameter = 'nofilter';
     $filter_suffix = '';
     if ($bankerID > 0 || $typeID > 0 || $rarityID != '') {
         $caching_parameter = 'banker' . $bankerID . '_type' . $typeID . '_rarity' . $rarityID;
         $filter_suffix = '&amp;banker=' . $bankerID . '&amp;type=' . $typeID . '&amp;rarity=' . $rarityID;
     }
     foreach ($this->pdh->get('guildbank_banker', 'id_list') as $banker_id) {
         $bankchar = $this->pdh->get('guildbank_banker', 'bankchar', array($banker_id));
         // the tooltip
         $myTooltip = $this->user->lang('gb_bankchar_name') . ": " . addslashes($this->pdh->get('guildbank_banker', 'bankchar', array($banker_id))) . "<br/>";
         $myTooltip .= "" . $this->user->lang('note') . ": " . addslashes($this->pdh->get('guildbank_banker', 'note', array($banker_id, true)));
         $this->tpl->assign_block_vars('banker_row', array('NAME' => $this->pdh->get('guildbank_banker', 'name', array($banker_id)), 'TOOLTIP' => $myTooltip, 'BANKCHAR' => $bankchar != "" ? "(" . addslashes($bankchar) . ")" : '', 'UPDATE' => $this->pdh->get('guildbank_banker', 'refresh_date', array($banker_id))));
         // The Money per char..
         foreach ($this->money->get_data() as $monName => $monValue) {
             $this->tpl->assign_block_vars('banker_row.cmoney_row', array('VALUE' => $this->money->output($this->pdh->get('guildbank_transactions', 'money_summ', array($banker_id)), $monValue)));
         }
     }
     // the money row
     foreach ($this->money->get_data() as $monName => $monValue) {
         $this->tpl->assign_block_vars('money_row', array('NAME' => $monName, 'IMAGE' => $this->money->image($monValue, true, '22'), 'VALUE' => $this->money->output($this->pdh->get('guildbank_transactions', 'money_summ_all'), $monValue), 'LANGUAGE' => $monValue['language']));
     }
     $dd_type = array_merge(array(0 => '--'), $this->pdh->get('guildbank_items', 'itemtype'));
     $dd_rarity = array_merge(array(0 => '--'), $this->pdh->get('guildbank_items', 'itemrarity'));
     $dd_banker = array_merge(array(0 => '--'), $this->pdh->aget('guildbank_banker', 'name', 0, array($this->pdh->get('guildbank_banker', 'id_list'))));
     $guildbank_ids = $guildbank_out = array();
     // -- display entries ITEMS ------------------------------------------------
     $items_list = $this->pdh->get('guildbank_items', 'id_list', array($bankerID, 0, $typeID, $rarityID));
     $hptt_items = $this->get_hptt($systems_guildbank['pages']['hptt_guildbank_items'], $items_list, $items_list, array('%itt_lang%' => false, '%itt_direct%' => 0, '%onlyicon%' => 0, '%noicon%' => 0), $caching_parameter);
     $page_suffix = '&amp;start=' . $this->in->get('start', 0);
     $page_suffix .= $filter_suffix;
     $sort_suffix = '&amp;sort=' . $this->in->get('sort');
     $item_count = count($items_list);
     $footer_item = sprintf($this->user->lang('listitems_footcount'), $item_count, $this->user->data['user_ilimit']);
     // -- display entries TRANSACTIONS -----------------------------------------
     $ta_list = $this->pdh->get('guildbank_transactions', 'id_list', array($bankerID));
     $hptt_transa = $this->get_hptt($systems_guildbank['pages']['hptt_guildbank_transactions'], $ta_list, $ta_list, array('%itt_lang%' => false, '%itt_direct%' => 0, '%onlyicon%' => 0, '%noicon%' => 0), $caching_parameter);
     //$page_suffix	= '&amp;start='.$this->in->get('start', 0);
     //$sort_suffix	= '&amp;sort='.$this->in->get('sort');
     $ta_count = count($ta_list);
     $footer_transa = sprintf($this->user->lang('listitems_footcount'), $ta_count, $this->user->data['user_ilimit']);
     // -- display entries AUCTIONS -----------------------------------------
     if ($this->user->check_auth('u_guildbank_auction', false)) {
         $this->pdh->get('guildbank_auctions', 'counterJS');
         // init the auction clock
         $auction_list = $this->pdh->get('guildbank_auctions', 'id_list', array());
         $hptt_auction = $this->get_hptt($systems_guildbank['pages']['hptt_guildbank_auctions'], $auction_list, $auction_list, array('%itt_lang%' => false, '%itt_direct%' => 0, '%onlyicon%' => 0, '%noicon%' => 0), $caching_parameter);
         $page_suffix_a = '&amp;astart=' . $this->in->get('astart', 0);
         $sort_suffix_a = '&amp;asort=' . $this->in->get('asort');
         $page_suffix_a .= $filter_suffix;
         $auction_count = count($auction_list);
         $footer_auction = sprintf($this->user->lang('listitems_footcount'), $auction_list, $this->user->data['user_ilimit']);
         $this->tpl->assign_vars(array('AUCTION_TABLE' => $hptt_auction->get_html_table($this->in->get('sort'), $page_suffix_a, $this->in->get('astart', 0), $this->user->data['user_ilimit'], $footer_auction), 'PAGINATION_AUCTION' => generate_pagination($this->strPath . $this->SID . $sort_suffix_a, $auction_count, $this->user->data['user_ilimit'], $this->in->get('astart', 0))));
     }
     $this->jquery->dialog('open_shop', $this->user->lang('gb_shop_window'), array('url' => $this->routing->build('bankshop') . "&simple_head=true&item='+id+'", 'width' => 600, 'height' => 400, 'onclose' => $this->routing->build('guildbank'), 'withid' => 'id'));
     $this->jquery->Tab_header('guildbank_tab', true);
     $this->tpl->assign_vars(array('MERGE_BANKERS' => $this->config->get('merge_bankers', 'guildbank') == 1 ? true : false, 'SHOW_MONEY' => $this->config->get('show_money', 'guildbank') == 1 ? true : false, 'SHOW_AUCTIONS' => $this->user->check_auth('u_guildbank_auction', false), 'ROUTING_BANKER' => $this->routing->build('guildbank'), 'ITEMS_TABLE' => $hptt_items->get_html_table($this->in->get('sort'), $page_suffix, $this->in->get('start', 0), $this->user->data['user_ilimit'], $footer_item), 'PAGINATION_ITEM' => generate_pagination($this->strPath . $this->SID . $sort_suffix, $item_count, $this->user->data['user_ilimit'], $this->in->get('start', 0)), 'TRANSA_TABLE' => $hptt_transa->get_html_table($this->in->get('sort'), $page_suffix, $this->in->get('start', 0), $this->user->data['user_ilimit'], $footer_transa), 'PAGINATION_TRANSA' => generate_pagination($this->strPath . $this->SID . $sort_suffix, $ta_count, $this->user->data['user_ilimit'], $this->in->get('start', 0)), 'DD_BANKER' => new hdropdown('banker', array('options' => $dd_banker, 'value' => $bankerID, 'js' => 'onchange="javascript:form.submit();"')), 'DD_RARITY' => new hdropdown('rarity', array('options' => $dd_rarity, 'value' => $rarityID, 'js' => 'onchange="javascript:form.submit();"')), 'DD_TYPE' => new hdropdown('type', array('options' => $dd_type, 'value' => $typeID, 'js' => 'onchange="javascript:form.submit();"')), 'CREDITS' => sprintf($this->user->lang('gb_credits'), $this->pm->get_data('guildbank', 'version'))));
     $this->core->set_vars(array('page_title' => $this->user->lang('gb_title_page'), 'template_path' => $this->pm->get_data('guildbank', 'template_path'), 'template_file' => 'bank.html', 'display' => true));
 }
 public function parse_shorttags($text, $filter = array())
 {
     $tags = preg_split('/{{([^}]+)}}/', $text, -1, PREG_SPLIT_DELIM_CAPTURE);
     $strBuffer = '';
     for ($rit = 0; $rit < count($tags); $rit = $rit + 2) {
         $strBuffer .= $tags[$rit];
         if (!isset($tags[$rit + 1])) {
             break;
         }
         $strTag = $tags[$rit + 1];
         $arrCache = array();
         // Load value from cache array
         if (isset($arrCache[$strTag])) {
             $strBuffer .= $arrCache[$strTag];
             continue;
         }
         $elements = explode('::', $strTag);
         //Check Filter
         if (is_array($filter) && count($filter) > 0 && !in_array(strtolower($elements[0]), $filter)) {
             continue;
         }
         // Replace tag
         switch (strtolower($elements[0])) {
             // Date
             case 'page':
                 $arrCache[$strTag] = $this->pdh->get('pages', 'page_exists', array($elements[1])) ? '<a href="' . $this->pdh->get('pages', 'url', array($elements[1])) . '">' . $this->pdh->get('pages', 'title', array($elements[1])) . '</a>' : '';
                 break;
             case 'page_url':
                 $arrCache[$strTag] = $this->pdh->get('pages', 'page_exists', array($elements[1])) ? $this->pdh->get('pages', 'url', array($elements[1])) : '';
                 break;
             case 'server':
                 switch ($elements[1]) {
                     case 'name':
                         $arrCache[$strTag] = $this->config->get('uc_servername');
                         break;
                     case 'location':
                         $arrCache[$strTag] = $this->config->get('uc_server_loc');
                         break;
                 }
                 break;
             case 'user':
                 switch ($elements[1]) {
                     case 'name':
                         $this->username = !$this->user->is_signedin() ? $this->user->lang('guest') : $this->pdh->get('user', 'name', array($this->user->data['user_id']));
                         $arrCache[$strTag] = $this->username;
                         break;
                 }
                 break;
             case 'guild':
                 switch ($elements[1]) {
                     case 'name':
                         $arrCache[$strTag] = $this->config->get('guildtag');
                         break;
                 }
                 break;
             case 'char':
                 $member_id = $this->pdh->get('member', 'id', array($elements[1]));
                 if ($member_id) {
                     $arrCache[$strTag] = $this->pdh->get('member', 'html_memberlink', array($member_id, 'viewcharacter.php', '', false, false, true));
                 }
                 break;
         }
         //Infotooltips
         if (strpos('item', strtolower($elements[0])) === 0) {
             infotooltip_js();
             $item = strip_tags($elements[1]);
             $game_id = is_numeric($item) ? intval($item) : 0;
             $str = infotooltip($item, $game_id);
             $arrCache[$strTag] = $str;
         }
         $strBuffer .= $arrCache[$strTag];
     }
     return $strBuffer;
 }
 public function get_html_last_item_name($member_id, $mdkp_id = null, $with_twink = true)
 {
     $with_twink = $with_twink ? 'multi' : 'single';
     infotooltip_js();
     if ($mdkp_id == null and isset($this->fl_item_dates[$with_twink][$member_id]['total']['last']['item_id'])) {
         return $this->pdh->get('item', 'itt_itemname', array($this->fl_item_dates[$with_twink][$member_id]['total']['last']['item_id']));
     } elseif ($mdkp_id and isset($this->fl_item_dates[$with_twink][$member_id]['mdkp'][$mdkp_id]['last']['item_id'])) {
         return $this->pdh->get('item', 'itt_itemname', array($this->fl_item_dates[$with_twink][$member_id]['mdkp'][$mdkp_id]['last']['item_id']));
     }
     return false;
 }
 public function display_raid()
 {
     infotooltip_js();
     $raid_id = $this->in->get('r', 0);
     if ($raid_id) {
         if (!in_array($raid_id, $this->pdh->get('raid', 'id_list'))) {
             message_die($this->user->lang('error_invalid_raid_provided'));
         }
         // Attendees
         $attendees_ids = $this->pdh->get('raid', 'raid_attendees', array($raid_id));
         $attendee_copy = $attendees = array();
         foreach ($attendees_ids as $attendee_id) {
             $attendees[$attendee_id] = sanitize($this->pdh->get('member', 'name', array($attendee_id)));
         }
         $attendee_copy = $attendees;
         // Get each attendee's rank
         foreach ($attendees as $attendee_id => $attendee_name) {
             $ranks[$attendee_name] = array('prefix' => $this->pdh->get('rank', 'prefix', array($this->pdh->get('member', 'rankid', array($attendee_id)))), 'suffix' => $this->pdh->get('rank', 'suffix', array($this->pdh->get('member', 'rankid', array($attendee_id)))));
         }
         if (count($attendees) > 0) {
             // First get rid of duplicates and resort them just in case,
             // so we're sure they're displayed correctly
             $attendees = array_unique($attendees);
             sort($attendees);
             reset($attendees);
             $rows = ceil(sizeof($attendees) / $this->user->style['attendees_columns']);
             // First loop: iterate through the rows
             // Second loop: iterate through the columns as defined in template_config,
             // then "add" an array to $block_vars that contains the column definitions,
             // then assign the block vars.
             // Prevents one column from being assigned and the rest of the columns for
             // that row being blank
             for ($i = 0; $i < $rows; $i++) {
                 $block_vars = array();
                 for ($j = 0; $j < $this->user->style['attendees_columns']; $j++) {
                     $offset = $i + $rows * $j;
                     $attendee = isset($attendees_ids[$offset]) ? $attendees_ids[$offset] : '';
                     if ($attendee != '') {
                         $block_vars += array('COLUMN' . $j . '_NAME' => $this->pdh->get('member', 'html_memberlink', array($attendee, $this->routing->simpleBuild('character'), '', false, false, true, true)));
                     } else {
                         $block_vars += array('COLUMN' . $j . '_NAME' => '');
                     }
                     // Are we showing this column?
                     $s_column = 's_column' . $j;
                     ${$s_column} = true;
                 }
                 $this->tpl->assign_block_vars('attendees_row', $block_vars);
             }
             $column_width = floor(100 / $this->user->style['attendees_columns']);
         } else {
             message_die('Could not get raid attendee information.', 'Critical Error');
         }
         // Drops
         $loot_dist = array();
         $items = $this->pdh->get('item', 'itemsofraid', array($raid_id));
         $chartcolorsLootdisti = array();
         foreach ($items as $item_id) {
             $buyer_id = (int) $this->pdh->get('item', 'buyer', array($item_id));
             $class_name = $this->pdh->get('member', 'classname', array($buyer_id));
             $class_id = (int) $this->pdh->get('member', 'classid', array($buyer_id));
             if (isset($loot_dist[$class_id])) {
                 $loot_dist[$class_id]['value']++;
             } else {
                 $loot_dist[$class_id] = array('value' => 1, 'name' => $class_name);
                 $tmp_classcolor = $this->game->get_class_color($class_id);
                 $chartcolorsLootdisti[$class_id] = $tmp_classcolor != '' ? $tmp_classcolor : 'gray';
             }
             $this->tpl->assign_block_vars('items_row', array('BUYER' => $this->pdh->get('member', 'html_memberlink', array($buyer_id, $this->routing->simpleBuild('character'), '', false, false, true, true)), 'ITEM' => $this->pdh->get('item', 'link_itt', array($item_id, $this->routing->simpleBuild('items'), '', false, false, false, false, false, true)), 'VALUE' => runden($this->pdh->get('item', 'value', array($item_id)))));
         }
         ksort($loot_dist);
         ksort($chartcolorsLootdisti);
         // Class distribution
         $class_dist = array();
         $total_attendee_count = sizeof($attendee_copy);
         foreach ($attendee_copy as $member_id => $member_name) {
             $member_class = $this->pdh->get('member', 'classname', array($member_id));
             $member_class_id = $this->pdh->get('member', 'classid', array($member_id));
             if ($member_name != '') {
                 $html_prefix = isset($ranks[$member_name]) ? $ranks[$member_name]['prefix'] : '';
                 $html_suffix = isset($ranks[$member_name]) ? $ranks[$member_name]['suffix'] : '';
                 if (isset($class_dist[$member_class_id]['names']) && isset($class_dist[$member_class_id]['count'])) {
                     $class_dist[$member_class_id]['names'] .= ", " . $html_prefix . $member_name . $html_suffix;
                     $class_dist[$member_class_id]['count']++;
                 } else {
                     $class_dist[$member_class_id] = array('names' => $html_prefix . $member_name . $html_suffix, 'count' => 1);
                 }
             }
         }
         unset($ranks);
         #Class distribution
         $chartarray = array();
         $chartcolors = array();
         foreach ($class_dist as $class_id => $details) {
             $percentage = $total_attendee_count > 0 ? round($details['count'] / $total_attendee_count * 100) : 0;
             $class = $this->game->get_name('primary', $class_id);
             $chartarray[] = array('value' => $percentage, 'name' => ($class ? $class : $this->user->lang('unknown')) . " (" . $class_dist[$class_id]['count'] . " - " . $percentage . "%)");
             $chartcolors[] = strlen($this->game->get_class_color($class_id)) ? $this->game->get_class_color($class_id) : "gray";
             $this->tpl->assign_block_vars('class_row', array('CLASS' => $this->game->decorate('primary', $class_id) . ' <span class="class_' . $class_id . '">' . ($class_id > 0 ? $class : $this->user->lang('unknown')) . '</span>', 'BAR' => $this->jquery->progressbar('bar_' . md5($class), $percentage, array('text' => '%percentage%')), 'ATTENDEES' => $class_dist[$class_id]['names']));
         }
         $chartoptions = array('border' => '0.0', 'piemargin' => 2, 'datalabels' => true, 'legend' => true, 'background' => 'rgba(255, 255, 255, 0.1)');
         $chartoptionsLootDistri = $chartoptions;
         if ($this->game->get_class_color(1) != '') {
             $chartoptions['color_array'] = $chartcolors;
             $chartoptionsLootDistri['color_array'] = $chartcolorsLootdisti;
         }
         unset($eq_classes);
         $vpre = $this->pdh->pre_process_preset('rvalue', array(), 0);
         $vpre[2][0] = $raid_id;
         //Items
         $arrItemListSettings = array('name' => 'hptt_viewmember_itemlist', 'table_main_sub' => '%item_id%', 'table_subs' => array('%item_id%', '%link_url%', '%link_url_suffix%', '%raid_link_url%', '%raid_link_url_suffix%', '%itt_lang%', '%itt_direct%', '%onlyicon%', '%noicon%'), 'page_ref' => 'viewcharacter.php', 'show_numbers' => false, 'show_select_boxes' => false, 'show_detail_twink' => false, 'table_sort_col' => 0, 'table_sort_dir' => 'asc', 'table_presets' => array(array('name' => 'ibuyerlink', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'ilink_itt', 'sort' => true, 'th_add' => '', 'td_add' => 'style="height:21px;"'), array('name' => 'ipoolname', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'idroprate', 'sort' => true, 'th_add' => '', 'td_add' => '')));
         if (!$this->config->get('disable_points')) {
             $arrItemListSettings['table_presets'][] = array('name' => 'ivalue', 'sort' => true, 'th_add' => '', 'td_add' => '');
         }
         $hptt_page_settings = $arrItemListSettings;
         $hptt = $this->get_hptt($hptt_page_settings, $items, $items, array('%link_url%' => $this->routing->simpleBuild('items'), '%link_url_suffix%' => '', '%itt_lang%' => false, '%itt_direct%' => 0, '%onlyicon%' => 0, '%noicon%' => 0, '%raid_link_url%' => $this->routing->simpleBuild('raids'), '%raid_link_url_suffix%' => '', '%use_controller%' => true, '%member_link_url_suffix%' => '', '%member_link_url%' => $this->routing->simpleBuild('character')), 'raid_' . $this->url_id, 'isort');
         $hptt->setPageRef($this->strPath);
         $this->tpl->assign_vars(array('ITEM_OUT' => $hptt->get_html_table($this->in->get('isort'), '', null, false, sprintf($this->user->lang('viewitem_footcount'), count($items)))));
         //Adjustments
         if (!$this->config->get('disable_points')) {
             $arrAdjListSettings = array('name' => 'hptt_viewmember_adjlist', 'table_main_sub' => '%adjustment_id%', 'table_subs' => array('%adjustment_id%', '%raid_link_url%', '%raid_link_url_suffix%'), 'page_ref' => 'viewcharacter.php', 'show_numbers' => false, 'show_select_boxes' => false, 'show_detail_twink' => false, 'table_sort_col' => 0, 'table_sort_dir' => 'desc', 'table_presets' => array(array('name' => 'adj_reason', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'adj_members', 'sort' => true, 'th_add' => 'width="70%"', 'td_add' => ''), array('name' => 'adj_value', 'sort' => true, 'th_add' => '', 'td_add' => 'nowrap="nowrap"')));
             $arrAdjustments = $this->pdh->get('adjustment', 'adjsofraid', array($raid_id, true));
             $hptt_page_settings = $arrAdjListSettings;
             $hptt = $this->get_hptt($hptt_page_settings, $arrAdjustments, $arrAdjustments, array('%raid_link_url%' => $this->routing->simpleBuild('raids'), '%raid_link_url_suffix%' => '', '%use_controller%' => true), 'raid_' . $this->url_id, 'asort');
             $hptt->setPageRef($this->strPath);
             $this->tpl->assign_vars(array('ADJUSTMENT_OUT' => $hptt->get_html_table($this->in->get('asort', ''), ''), 'S_ADJUSTMENTS' => count($arrAdjustments)));
         }
         $this->tpl->assign_vars(array('L_MEMBERS_PRESENT_AT' => sprintf($this->user->lang('members_present_at'), $this->time->user_date($this->pdh->get('raid', 'date', array($raid_id)), false, false, true), $this->time->user_date($this->pdh->get('raid', 'date', array($raid_id)), false, true)), 'EVENT_ICON' => $this->game->decorate('events', $this->pdh->get('raid', 'event', array($raid_id)), array(), 40), 'EVENT_NAME' => stripslashes($this->pdh->get('raid', 'event_name', array($raid_id))), 'S_COLUMN0' => isset($s_column0) ? true : false, 'S_COLUMN1' => isset($s_column1) ? true : false, 'S_COLUMN2' => isset($s_column2) ? true : false, 'S_COLUMN3' => isset($s_column3) ? true : false, 'S_COLUMN4' => isset($s_column4) ? true : false, 'S_COLUMN5' => isset($s_column5) ? true : false, 'S_COLUMN6' => isset($s_column6) ? true : false, 'S_COLUMN7' => isset($s_column7) ? true : false, 'S_COLUMN8' => isset($s_column8) ? true : false, 'S_COLUMN9' => isset($s_column9) ? true : false, 'COLUMN_WIDTH' => isset($column_width) ? $column_width : 0, 'COLSPAN' => $this->user->style['attendees_columns'], 'RAID_ADDED_BY' => $this->pdh->get('raid', 'added_by', array($raid_id)) != '' ? stripslashes($this->pdh->get('raid', 'added_by', array($raid_id))) : 'N/A', 'RAID_UPDATED_BY' => $this->pdh->get('raid', 'updated_by', array($raid_id)) != '' ? stripslashes($this->pdh->get('raid', 'updated_by', array($raid_id))) : 'N/A', 'S_RAID_UPDATED' => strlen($this->pdh->get('raid', 'updated_by', array($raid_id))), 'RAID_NOTE' => $this->pdh->get('raid', 'note', array($raid_id)) != '' ? sanitize($this->pdh->get('raid', 'note', array($raid_id))) : '&nbsp;', 'DKP_NAME' => $this->config->get('dkp_name'), 'RAID_VALUE' => $this->pdh->geth($vpre[0], $vpre[1], $vpre[2]), 'ATTENDEES_FOOTCOUNT' => sprintf($this->user->lang('viewraid_attendees_footcount'), sizeof($attendees)), 'ITEM_FOOTCOUNT' => sprintf($this->user->lang('viewitem_footcount'), sizeof($items)), 'CLASS_PERCENT_CHART' => $this->jquery->charts('pie', 'class_dist', $chartarray, $chartoptions), 'LOOT_PERCENT_CHART' => count($loot_dist) > 0 ? $this->jquery->charts('pie', 'loot_dist', $loot_dist, $chartoptionsLootDistri) : '', 'RAID_DATE' => $this->time->user_date($this->pdh->get('raid', 'date', array($raid_id)), true, false, true), 'U_RAIDLIST' => $this->routing->build('raids'), 'RAID_ID' => $raid_id, 'S_ADDITIONAL_DATA' => strlen($this->pdh->get('raid', 'additional_data', array($raid_id))) ? true : false, 'RAID_ADDITIONAL_DATA' => $this->pdh->geth('raid', 'additional_data', array($raid_id)), 'S_PERM_RAID_ADMIN' => $this->user->check_auth('a_raid_upd', false)));
         if ($this->user->check_auth('a_raid_upd', false)) {
             $this->jquery->dialog('editRaid', $this->user->lang('raidevent_raid_edit'), array('url' => $this->server_path . "admin/manage_raids.php" . $this->SID . "&r=" . $raid_id . "&upd=true&simple_head=simple", 'width' => 920, 'height' => 740, 'onclose' => $this->env->link . $this->controller_path_plain . $this->page_path . $this->SID));
         }
         chartooltip_js();
         $this->set_vars(array('page_title' => $this->pdh->get('raid', 'event_name', array($raid_id)) . ', ' . $this->time->user_date($this->pdh->get('raid', 'date', array($raid_id))), 'template_file' => 'viewraid.html', 'display' => true));
     } else {
         redirect($this->routing->build('raids', false, false, true, true));
     }
 }
Exemple #20
0
 public function raidloot($intRaidID, $blnWithChars = false)
 {
     //Get Raid-Infos:
     $intEventID = $this->pdh->get('raid', 'event', array($intRaidID));
     if ($intEventID) {
         $strOut = '<div class="raidloot"><h3>' . $this->user->lang('loot') . ' ' . $this->pdh->get('event', 'html_icon', array($intEventID)) . $this->pdh->get('raid', 'html_raidlink', array($intRaidID, register('routing')->simpleBuild('raids'), '', true));
         $strRaidNote = $this->pdh->get('raid', 'html_note', array($intRaidID));
         if ($strRaidNote != "") {
             $strOut .= ' (' . $strRaidNote . ')';
         }
         $strOut .= ', ' . $this->pdh->get('raid', 'html_date', array($intRaidID)) . '</h3>';
         //Get Items from the Raid
         $arrItemlist = $this->pdh->get('item', 'itemsofraid', array($intRaidID));
         infotooltip_js();
         if (count($arrItemlist)) {
             foreach ($arrItemlist as $item) {
                 $buyer = $this->pdh->get('item', 'buyer', array($item));
                 $strOut .= $this->pdh->get('item', 'link_itt', array($item, register('routing')->simpleBuild('items'), '', false, false, false, false, false, true)) . ' - ' . $this->pdh->geth('member', 'memberlink_decorated', array($buyer, register('routing')->simpleBuild('character'), '', true)) . ', ' . round($this->pdh->get('item', 'value', array($item))) . ' ' . $this->config->get('dkp_name') . '<br />';
             }
         }
         if ($blnWithChars) {
             $attendees_ids = $this->pdh->get('raid', 'raid_attendees', array($intRaidID));
             if (count($attendees_ids)) {
                 $strOut .= '<br /><h3>' . $this->user->lang('attendees') . '</h3>';
                 foreach ($attendees_ids as $intAttendee) {
                     $strOut .= $this->pdh->get('member', 'memberlink_decorated', array($intAttendee, $this->routing->simpleBuild('character'), '', true)) . '<br/>';
                 }
             }
         }
         return $strOut . '</div>';
     }
     return '';
 }
Exemple #21
0
 public function display($messages = false)
 {
     if ($messages) {
         $this->pdh->process_hook_queue();
         $this->core->messages($messages);
     }
     //init infotooltip
     infotooltip_js();
     $view_list = $this->pdh->aget('item', 'group_key', 0, array($this->pdh->get('item', 'id_list', array())));
     $view_list = array_flip($view_list);
     $hptt_page_settings = $this->pdh->get_page_settings('admin_manage_items', 'hptt_admin_manage_items_itemlist');
     $hptt = $this->get_hptt($hptt_page_settings, $view_list, $view_list, array('%link_url%' => 'manage_items.php', '%link_url_suffix%' => '&amp;upd=true', '%raid_link_url%' => 'manage_raids.php', '%raid_link_url_suffix%' => '&amp;upd=true', '%itt_lang%' => false, '%itt_direct%' => 0, '%onlyicon%' => 0, '%noicon%' => 0));
     $page_suffix = '&amp;start=' . $this->in->get('start', 0);
     $sort_suffix = '?sort=' . $this->in->get('sort');
     $item_count = count($view_list);
     $footer_text = sprintf($this->user->lang('listitems_footcount'), $item_count, $this->user->data['user_ilimit']);
     $this->confirm_delete($this->user->lang('confirm_delete_items'));
     $this->tpl->assign_vars(array('SID' => $this->SID, 'ITEM_LIST' => $hptt->get_html_table($this->in->get('sort'), $page_suffix, $this->in->get('start', 0), $this->user->data['user_ilimit'], $footer_text), 'PAGINATION' => generate_pagination('manage_items.php' . $sort_suffix, $item_count, $this->user->data['user_ilimit'], $this->in->get('start', 0)), 'HPTT_COLUMN_COUNT' => $hptt->get_column_count()));
     $this->core->set_vars(array('page_title' => $this->user->lang('manitems_title'), 'template_file' => 'admin/manage_items.html', 'display' => true));
 }
 public function viewuser()
 {
     include_once $this->root_path . 'core/country_states.php';
     $user_id = $this->in->get('u');
     $row = $this->pdh->get('user', 'data', array($user_id));
     if (!$row) {
         $this->display();
         return;
     }
     $arrUserCustomFieldsData = $this->pdh->get('user', 'custom_fields', array($user_id));
     //Gender
     switch ($row['gender']) {
         case '1':
             $strGender = $this->user->lang('gender_m') . ', ';
             break;
         case '2':
             $strGender = $this->user->lang('gender_f') . ', ';
             break;
         default:
             $strGender = "";
     }
     $this->jquery->Tab_header('userprofile_tabs', true);
     $this->tpl->assign_vars(array('USER_PROFILE_ID' => $user_id, 'USER_PROFILE_AVATAR' => $this->pdh->get('user', 'avatarimglink', array($user_id)) ? $this->pfh->FileLink($this->pdh->get('user', 'avatarimglink', array($user_id)), false, 'absolute') : $this->server_path . 'images/global/avatar-default.svg', 'USER_PROFILE_USERNAME' => sanitize($row['username']), 'USER_PROFILE_GENDER' => $strGender, 'USER_PROFILE_REGISTERED' => $this->pdh->geth('user', 'regdate', array($user_id)), 'USER_PROFILE_LAST_ACTIVITY' => $this->pdh->geth('user', 'last_visit', array($user_id)), 'USER_PROFILE_USERGROUPS' => str_replace(', ', '', $this->pdh->geth('user', 'groups', array($user_id, true)))));
     //Wall Permissions
     $blnWallRead = $this->pdh->get('user', 'check_privacy', array($user_id, 'priv_wall_posts_read'));
     $blnWallWrite = $this->pdh->get('user', 'check_privacy', array($user_id, 'priv_wall_posts_write'));
     //Wall
     $this->comments->SetVars(array('attach_id' => $user_id, 'page' => 'userwall', 'auth' => 'a_users_man', 'userauth' => $blnWallWrite ? 'u_userlist' : 'a_something', 'replies' => true));
     $this->tpl->assign_vars(array('USER_WALL' => $this->comments->Show(), 'S_SHOW_WALL' => $blnWallRead));
     //Personal Profile Information
     $blnPersonal = $blnContact = false;
     if ($this->pdh->get('user', 'check_privacy', array($user_id, 'priv_userprofile_age'))) {
         $age = $this->time->age($row['birthday']) !== 0 ? $this->time->age($row['birthday']) : '';
         if (strlen($age)) {
             $val = $this->pdh->get('user', 'check_privacy', array($user_id, 'priv_bday')) ? $this->time->user_date($row['birthday']) . ' (' . $age . ')' : $age;
             $this->tpl->assign_block_vars('profile_personal_row', array('NAME' => $this->user->lang("user_sett_f_priv_userprofile_age"), 'TEXT' => $val));
             $this->tpl->assign_var('USER_PROFILE_AGE', $val);
             $blnPersonal = true;
         }
     }
     if ($this->pdh->get('user', 'check_privacy', array($user_id, 'priv_userprofile_country'))) {
         if (strlen($row['country'])) {
             $val = '<img src="' . $this->server_path . 'images/flags/' . strtolower($row['country']) . '.svg" alt="' . $row['country'] . '" /> ' . sanitize(ucfirst(strtolower($country_array[$row['country']])));
             $this->tpl->assign_block_vars('profile_personal_row', array('NAME' => $this->user->lang("user_sett_f_priv_userprofile_country"), 'TEXT' => $val));
             $this->tpl->assign_var('USER_PROFILE_COUNTRY', $val);
             $blnPersonal = true;
         }
     }
     $arrProfileFields = $this->pdh->get('user_profilefields', 'usersettings_fields', array(true));
     foreach ($arrProfileFields as $intFieldID) {
         $blnPerm = $this->pdh->get('user', 'check_privacy', array($user_id, 'priv_userprofile_' . $intFieldID));
         if (!$blnPerm) {
             continue;
         }
         $val = $this->pdh->geth('user_profilefields', 'display_field', array($intFieldID, $user_id));
         if ($val == "") {
             continue;
         }
         $this->tpl->assign_block_vars('profile_personal_row', array('NAME' => $this->pdh->geth('user_profilefields', 'name', array($intFieldID)), 'TEXT' => $val));
         $blnPersonal = true;
         $this->tpl->assign_var('USER_PROFILE_' . strtoupper($intFieldID), $val);
     }
     //Contact Information
     if ($this->pdh->get('user', 'check_privacy', array($user_id, 'priv_userprofile_email'))) {
         $strEmail = $this->pdh->geth('user', 'email', array($user_id, true));
         if ($strEmail != "") {
             $this->tpl->assign_block_vars('profile_contact_row', array('NAME' => $this->user->lang("email_address"), 'TEXT' => $strEmail));
             $blnContact = true;
         }
     }
     $arrContactFields = $this->pdh->get('user_profilefields', 'contact_fields', array(true));
     foreach ($arrContactFields as $intFieldID) {
         $blnPerm = $this->pdh->get('user', 'check_privacy', array($user_id, 'priv_userprofile_' . $intFieldID));
         if (!$blnPerm) {
             continue;
         }
         $val = $this->pdh->geth('user_profilefields', 'display_field', array($intFieldID, $user_id));
         if ($val == "") {
             continue;
         }
         $this->tpl->assign_block_vars('profile_contact_row', array('NAME' => $this->pdh->geth('user_profilefields', 'name', array($intFieldID)), 'TEXT' => $val));
         if ($this->pdh->get('user_profilefields', 'is_contact', array($intFieldID))) {
             $blnContact = true;
         } else {
             $blnPersonal = true;
         }
         $this->tpl->assign_var('USER_PROFILE_' . strtoupper($intFieldID), $val);
     }
     $hptt_page_settings = $this->pdh->get_page_settings('userprofile', 'hptt_userprofile_memberlist_overview');
     $arrMemberList = $this->pdh->get('member', 'mainchar', array($user_id)) ? array($this->pdh->get('member', 'mainchar', array($user_id))) : array();
     $hptt = $this->get_hptt($hptt_page_settings, $arrMemberList, $arrMemberList, array('%link_url%' => $this->routing->simpleBuild('character'), '%link_url_suffix%' => '', '%with_twink%' => false, '%use_controller%' => true), 'userprofile_' . $user_id);
     $hptt->setPageRef($this->strPath);
     $this->tpl->assign_vars(array('S_PROFILE_PERSONAL_ROW' => $blnPersonal, 'S_PROFILE_CONTACT_ROW' => $blnContact, 'PROFILE_CHARS' => $hptt->get_html_table($this->in->get('sort'), '', null, 1, sprintf($this->user->lang('listmembers_footcount'), count($this->pdh->get('member', 'connection_id', array($user_id))))), 'S_PROFILE_CHARACTERS' => count($arrMemberList)));
     //Custom Tabs
     $arrHooks = $this->hooks->process('userprofile_customtabs', array('user_id' => $user_id));
     if (is_array($arrHooks)) {
         foreach ($arrHooks as $plugin => $value) {
             $title = $value['title'];
             $id = substr(md5($title), 0, 9);
             $content = $value['content'];
             $this->tpl->assign_block_vars('custom_tabs', array('ID' => $id, 'NAME' => $title, 'CONTENT' => $content));
         }
     }
     $this->jquery->Tab_header('userprofile_dkp_tabs', true);
     // Item History
     $arrItemListSettings = array('name' => 'hptt_viewmember_itemlist', 'table_main_sub' => '%item_id%', 'table_subs' => array('%item_id%', '%link_url%', '%link_url_suffix%', '%raid_link_url%', '%raid_link_url_suffix%', '%itt_lang%', '%itt_direct%', '%onlyicon%', '%noicon%'), 'page_ref' => 'viewcharacter.php', 'show_numbers' => false, 'show_select_boxes' => false, 'show_detail_twink' => false, 'table_sort_col' => 0, 'table_sort_dir' => 'desc', 'table_presets' => array(array('name' => 'idate', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'ibuyerlink', 'sort' => true, 'th_add' => 'class="hiddenSmartphone"', 'td_add' => 'class="hiddenSmartphone"'), array('name' => 'ilink_itt', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'iraidlink', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'ipoolname', 'sort' => true, 'th_add' => 'class="hiddenSmartphone"', 'td_add' => 'class="hiddenSmartphone"'), array('name' => 'ivalue', 'sort' => true, 'th_add' => '', 'td_add' => '')));
     if ($this->config->get('disable_points')) {
         unset($arrItemListSettings['table_presets'][5]);
     }
     infotooltip_js();
     $view_list = $this->pdh->get('item', 'itemids4userid', array($user_id));
     $hptt_page_settings = $arrItemListSettings;
     $hptt = $this->get_hptt($hptt_page_settings, $view_list, $view_list, array('%link_url%' => $this->routing->simpleBuild('item'), '%link_url_suffix%' => '', '%itt_lang%' => false, '%itt_direct%' => 0, '%onlyicon%' => 0, '%noicon%' => 0, '%raid_link_url%' => $this->routing->simpleBuild('raids'), '%raid_link_url_suffix%' => '', '%use_controller%' => true, '%member_link_url_suffix%' => '', '%member_link_url%' => $this->routing->simpleBuild('character')), 'userprofile_' . $user_id, 'isort');
     $hptt->setPageRef($this->strPath);
     $this->tpl->assign_vars(array('ITEM_OUT' => $hptt->get_html_table($this->in->get('isort', ''), $this->vc_build_url('isort'), $this->in->get('istart', 0), $this->user->data['user_ilimit']), 'ITEM_PAGINATION' => generate_pagination($this->vc_build_url('istart', true), count($view_list), $this->user->data['user_ilimit'], $this->in->get('istart', 0), 'istart')));
     // Individual Adjustment History
     if (!$this->config->get('disable_points')) {
         $arrAdjListSettings = array('name' => 'hptt_viewmember_adjlist', 'table_main_sub' => '%adjustment_id%', 'table_subs' => array('%adjustment_id%', '%raid_link_url%', '%raid_link_url_suffix%'), 'page_ref' => 'viewcharacter.php', 'show_numbers' => false, 'show_select_boxes' => false, 'show_detail_twink' => false, 'table_sort_col' => 0, 'table_sort_dir' => 'desc', 'table_presets' => array(array('name' => 'adj_date', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'adj_members', 'sort' => true, 'th_add' => 'class="hiddenSmartphone"', 'td_add' => 'class="hiddenSmartphone"'), array('name' => 'adj_reason', 'sort' => true, 'th_add' => 'width="70%"', 'td_add' => ''), array('name' => 'adj_value', 'sort' => true, 'th_add' => '', 'td_add' => 'nowrap="nowrap"')));
         $view_list = $this->pdh->get('adjustment', 'adjsofuser', array($user_id));
         $hptt_page_settings = $arrAdjListSettings;
         $hptt = $this->get_hptt($hptt_page_settings, $view_list, $view_list, array('%raid_link_url%' => $this->routing->simpleBuild('raids'), '%raid_link_url_suffix%' => '', '%use_controller%' => true), 'userprofile_' . $user_id, 'asort');
         $hptt->setPageRef($this->strPath);
         $this->tpl->assign_vars(array('ADJUSTMENT_OUT' => $hptt->get_html_table($this->in->get('asort', ''), $this->vc_build_url('asort'), $this->in->get('astart', 0), $this->user->data['user_alimit']), 'ADJUSTMENT_PAGINATION' => generate_pagination($this->vc_build_url('astart', true), count($view_list), $this->user->data['user_alimit'], $this->in->get('astart', 0), 'astart')));
     }
     // Raid Attendance
     $arrRaidListSettings = array('name' => 'hptt_viewmember_raidlist', 'table_main_sub' => '%raid_id%', 'table_subs' => array('%raid_id%', '%link_url%', '%link_url_suffix%'), 'page_ref' => 'viewcharacter.php', 'show_numbers' => false, 'show_select_boxes' => false, 'show_detail_twink' => false, 'table_sort_col' => 0, 'table_sort_dir' => 'desc', 'table_presets' => array(array('name' => 'rdate', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'rlink', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'rnote', 'sort' => true, 'th_add' => 'class="hiddenSmartphone"', 'td_add' => 'class="hiddenSmartphone"'), array('name' => 'rvalue', 'sort' => true, 'th_add' => '', 'td_add' => '')));
     if ($this->config->get('disable_points')) {
         unset($arrRaidListSettings['table_presets'][3]);
     }
     $view_list = $this->pdh->get('raid', 'raidids4userid', array($user_id));
     $hptt_page_settings = $arrRaidListSettings;
     $hptt = $this->get_hptt($hptt_page_settings, $view_list, $view_list, array('%link_url%' => $this->routing->simpleBuild('raids'), '%link_url_suffix%' => '', '%with_twink%' => true, '%use_controller%' => true), 'userprofile_' . $user_id, 'rsort');
     $hptt->setPageRef($this->strPath);
     $this->tpl->assign_vars(array('RAID_OUT' => $hptt->get_html_table($this->in->get('rsort', ''), $this->vc_build_url('rsort'), $this->in->get('rstart', 0), $this->user->data['user_rlimit']), 'RAID_PAGINATION' => generate_pagination($this->vc_build_url('rstart', true), count($view_list), $this->user->data['user_rlimit'], $this->in->get('rstart', 0), 'rstart')));
     //Event-Attendance
     $arrEventAttSettings = array('table_main_sub' => '%event_id%', 'table_subs' => array('%event_id%', '%member_id%', '%link_url%', '%link_url_suffix%'), 'page_ref' => 'viewcharacter.php', 'show_numbers' => false, 'show_select_boxes' => false, 'show_detail_twink' => false, 'table_sort_col' => 0, 'table_sort_dir' => 'desc', 'table_presets' => array(array('name' => 'eicon', 'sort' => false, 'th_add' => 'class="hiddenSmartphone"', 'td_add' => 'class="hiddenSmartphone"'), array('name' => 'elink', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'event_attendance', 'sort' => true, 'th_add' => '', 'td_add' => 'width="80%"')));
     $view_list = $this->pdh->get('event', 'id_list');
     $hptt_page_settings = $arrEventAttSettings;
     $hptt = $this->get_hptt($hptt_page_settings, $view_list, $view_list, array('%member_id%' => $this->pdh->get('member', 'mainchar', array($user_id)), '%link_url%' => $this->routing->simpleBuild('events'), '%link_url_suffix%' => '', '%with_twink%' => true, '%use_controller%' => true), 'userprofile_' . $user_id, 'esort');
     $hptt->setPageRef($this->strPath);
     $this->tpl->assign_vars(array('EVENT_ATT_OUT' => $hptt->get_html_table($this->in->get('esort', ''), $this->vc_build_url('esort'))));
     $this->jquery->Dialog('usermailer', $this->user->lang('adduser_send_mail'), array('url' => $this->server_path . "email.php" . $this->SID . "&user="******"canonical" href="' . $this->env->link . $this->routing->build('User', $row['username'], 'u' . $row['user_id'], false, true) . '" />');
     $this->core->set_vars(array('page_title' => $this->user->lang('user') . ': ' . sanitize($row['username']), 'template_file' => 'userprofile.html', 'display' => true));
 }
 public function display()
 {
     //Sort
     $sort = $this->in->get('sort');
     $sort_suffix = '&amp;sort=' . $sort;
     $start = $this->in->get('start', 0);
     $pagination_suffix = $start ? '&amp;start=' . $start : '';
     //Output
     $view_list = $filtered_list = $this->pdh->get('item', 'id_list');
     if ($this->in->exists('search')) {
         $mySearch = $this->in->get('search');
         $searchType = $this->in->get('search_type') ? $this->in->get('search_type') : 'itemname';
         $filtered_list = $this->filter($view_list, $searchType, $mySearch);
     }
     $item_count = count($filtered_list) > 0 ? count($filtered_list) : count($view_list);
     $footer_text = sprintf($this->user->lang('listitems_footcount'), $item_count, $this->user->data['user_ilimit']);
     //init infotooltip
     infotooltip_js();
     $hptt_page_settings = $this->pdh->get_page_settings('listitems', 'hptt_listitems_itemlist');
     $hptt = $this->get_hptt($hptt_page_settings, $view_list, $filtered_list, array('%link_url%' => $this->routing->simpleBuild('items'), '%link_url_suffix%' => '', '%raid_link_url%' => $this->routing->simpleBuild('raids'), '%raid_link_url_suffix%' => '', '%itt_lang%' => false, '%itt_direct%' => 0, '%onlyicon%' => 0, '%noicon%' => 0, '%use_controller%' => true), md5($searchType . $mySearch));
     $hptt->setPageRef($this->strPath);
     $this->tpl->assign_vars(array('PAGE_OUT' => $hptt->get_html_table($sort, $pagination_suffix, $start, $this->user->data['user_ilimit'], $footer_text), 'ITEM_PAGINATION' => generate_pagination($this->strPath . $this->SID . $sort_suffix, $item_count, $this->user->data['user_ilimit'], $start)));
     $this->jquery->Collapse('#toggleItemsearch', true);
     $this->set_vars(array('template_file' => 'listitems.html', 'display' => true));
 }
Exemple #24
0
 private function newsloot($showRaids_id)
 {
     $raid_ids = explode(",", $showRaids_id);
     $message = "";
     foreach ($raid_ids as $raid_ID) {
         $loot = "";
         $raid_info = "";
         if ($raid_ID) {
             $event_id = $this->pdh->get('raid', 'event', array($raid_ID));
             //Get Raid-Infos:
             $raid_info = $this->pdh->get('event', 'html_icon', array($event_id)) . $this->pdh->get('raid', 'html_raidlink', array($raid_ID, 'viewraid.php', ''));
             $raid_info .= ' (' . $this->pdh->get('raid', 'html_note', array($raid_ID)) . ') &nbsp;';
             $raid_info .= $this->pdh->get('raid', 'html_date', array($raid_ID));
             //Get Items from the Raid
             $itemlist = $this->pdh->get('item', 'itemsofraid', array($raid_ID));
             //Shorten the array
             if ($this->config->get('pk_newsloot_limit') > 0) {
                 $itemlist = array_slice($itemlist, 0, $this->config->get('pk_newsloot_limit'), true);
             }
             infotooltip_js();
             foreach ($itemlist as $item) {
                 $loot .= $this->pdh->get('item', 'link_itt', array($item, 'viewitem.php'));
                 $buyer = $this->pdh->get('item', 'buyer', array($item));
                 $loot .= ' &raquo; <a href="' . $this->root_path . 'viewcharacter.php' . $this->SID . '&amp;member_id=' . $buyer . '">';
                 $loot .= $this->pdh->get('member', 'html_name', array($buyer)) . "</a> (" . round($this->pdh->get('item', 'value', array($item))) . " " . $this->config->get('dkp_name') . ") <br />";
             }
             if (strlen($loot) > 1) {
                 $message .= '<br /><hr />' . $raid_info . ' ' . $this->user->lang('loot') . ':<br /><br />' . $loot;
             }
         }
         //end if
     }
     // forech
     return $message;
 }