当前位置: 首页>>代码示例>>PHP>>正文


PHP getaddon函数代码示例

本文整理汇总了PHP中getaddon函数的典型用法代码示例。如果您正苦于以下问题:PHP getaddon函数的具体用法?PHP getaddon怎么用?PHP getaddon使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了getaddon函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: display

 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');
 }
开发者ID:Sajaki,项目名称:wowroster_dev,代码行数:34,代码来源:rb_m.php

示例2: memberslist

 /**
  * Constructor
  *
  * @param array $options
  *		Override any of the default options, like client/server sorting, alt
  *		grouping, or pagination.
  * @param array $addon
  *		If the MembersList addon array has already been loaded, pass it here
  *		for efficiency. if the addon array is not available, omit it, and it
  *		will be loaded automatically.
  */
 function memberslist($options = array(), $addon = array())
 {
     global $roster;
     $basename = basename(dirname(dirname(__FILE__)));
     // --[ Get addon array only if not passed ]--
     if (!empty($addon)) {
         $this->addon = $addon;
     } else {
         // Get our addon name using our file loc.
         $this->addon = getaddon($basename);
     }
     // Select the template to use, so other addons can make their own memberslist templates
     $roster->tpl->set_handle('memberslist', 'memberslist/memberslist.html');
     // Set the js in the roster header
     $roster->output['html_head'] .= '<script type="text/javascript" src="' . ROSTER_PATH . 'addons/' . $basename . '/js/sorttable.js"></script>';
     // Merge in the override options from the calling file
     if (!empty($options)) {
         $this->addon['config'] = array_merge($this->addon['config'], $options);
     }
     // Overwrite some options if they're specified by the client
     if (isset($_GET['style'])) {
         $this->addon['config']['nojs'] = $_GET['style'] == 'server' ? 1 : 0;
     }
     if (isset($_GET['alts'])) {
         $this->addon['config']['group_alts'] = $_GET['alts'] == 'open' ? 2 : $_GET['alts'] == 'close' ? 1 : 0;
     }
 }
开发者ID:Sajaki,项目名称:addons,代码行数:38,代码来源:memberslist.php

示例3: memberslist

 /**
  * Constructor
  *
  * @param array $options
  *		Override any of the default options, like client/server sorting, alt
  *		grouping, or pagination.
  * @param array $addon
  *		If the MembersList addon array has already been loaded, pass it here
  *		for efficiency. if the addon array is not available, omit it, and it
  *		will be loaded automatically.
  */
 function memberslist($options = array(), $addon = array())
 {
     global $roster, $addon;
     $basename = basename(dirname(dirname(__FILE__)));
     // --[ Get addon array only if not passed ]--
     if (!empty($addon)) {
         $this->addon = $addon;
     } else {
         // Get our addon name using our file loc.
         $this->addon = getaddon($basename);
     }
     // Set the js in the roster header
     roster_add_js('addons/' . $basename . '/js/alts.js');
     // Merge in the override options from the calling file
     if (!empty($options)) {
         $this->addon['config'] = array_merge($this->addon['config'], $options);
     }
     // Select the template to use, so other addons can make their own memberslist templates
     if (isset($this->addon['config']['template'])) {
         $roster->tpl->set_handle('memberslist', $this->addon['config']['template']);
     } else {
         $roster->tpl->set_handle('memberslist', $basename . '/memberslist.html');
     }
     // Overwrite some options if they're specified by the client
     if (isset($_GET['alts'])) {
         $this->addon['config']['group_alts'] = $_GET['alts'] == 'open' ? 2 : ($_GET['alts'] == 'close' ? 1 : 0);
     }
     if (isset($_GET['filter'])) {
         $this->addon['config']['openfilter'] = $_GET['filter'] == 'open' ? 1 : 0;
     }
     $this->_initPlugins();
 }
开发者ID:Sajaki,项目名称:wowroster,代码行数:43,代码来源:umemberslist.php

示例4: fetchAddonData

 /**
  * Collect info on what files are used
  */
 function fetchAddonData()
 {
     global $roster;
     // Add roster-used tables
     $this->files[] = 'wowrcp';
     if (!$roster->config['use_update_triggers']) {
         return;
     }
     if (!empty($roster->addon_data)) {
         foreach ($roster->addon_data as $row) {
             $hookfile = ROSTER_ADDONS . $row['basename'] . DIR_SEP . 'inc' . DIR_SEP . 'update_hook.php';
             if (file_exists($hookfile)) {
                 // Check if this addon is in the process of an upgrade and deny access if it hasn't yet been upgraded
                 $installfile = ROSTER_ADDONS . $row['basename'] . DIR_SEP . 'inc' . DIR_SEP . 'install.def.php';
                 $install_class = $row['basename'] . 'Install';
                 if (file_exists($installfile)) {
                     include_once $installfile;
                     if (class_exists($install_class)) {
                         $addonstuff = new $install_class();
                         // -1 = overwrote newer version
                         //  0 = same version
                         //  1 = upgrade available
                         if (version_compare($addonstuff->version, $row['version'])) {
                             $this->setError(sprintf($roster->locale->act['addon_upgrade_notice'], $row['basename']), $roster->locale->act['addon_error']);
                             continue;
                         }
                         unset($addonstuff);
                     }
                 }
                 $addon = getaddon($row['basename']);
                 include_once $hookfile;
                 $updateclass = $row['basename'] . 'Update';
                 // Save current locale array
                 // Since we add all locales for localization, we save the current locale array
                 // This is in case one addon has the same locale strings as another, and keeps them from overwritting one another
                 $localetemp = $roster->locale->wordings;
                 foreach ($roster->multilanguages as $lang) {
                     $roster->locale->add_locale_file(ROSTER_ADDONS . $addon['basename'] . DIR_SEP . 'locale' . DIR_SEP . $lang . '.php', $lang);
                 }
                 $addon['fullname'] = isset($roster->locale->act[$addon['fullname']]) ? $roster->locale->act[$addon['fullname']] : $addon['fullname'];
                 if (class_exists($updateclass)) {
                     $this->addons[$row['basename']] = new $updateclass($addon);
                     $this->files = array_merge($this->files, $this->addons[$row['basename']]->files);
                 } else {
                     $this->setError('Failed to load update trigger for ' . $row['basename'] . ': Update class did not exist', $roster->locale->act['addon_error']);
                 }
                 // Restore our locale array
                 $roster->locale->wordings = $localetemp;
                 unset($localetemp);
             }
         }
     }
     // Remove duplicates
     $this->files = array_unique($this->files);
     // Make all the file names requested lower case
     $this->files = array_flip($this->files);
     $this->files = array_change_key_case($this->files);
     $this->files = array_flip($this->files);
 }
开发者ID:Sajaki,项目名称:wowroster,代码行数:62,代码来源:update.lib.php

示例5: guild_post

 /**
  * Guild_pre trigger, set out guild id here
  *
  * @param array $guild
  * 		CP.lua guild data
  */
 function guild_post($guild)
 {
     global $roster, $update;
     $addon = getaddon('raidbox');
     //echo '<pre>';
     //print_r($addon);
     //echo '</pre>';
     //build critera data
     $query = "SELECT * FROM `" . $roster->db->table('g_criteria', 'achievements') . "`";
     // WHERE `cid` = '15079'";
     $result = $roster->db->query($query) or die_quietly($roster->db->error(), 'Database Error', basename(__FILE__), __LINE__, $query);
     $crit = array();
     while ($row = $roster->db->fetch($result)) {
         $crit[$row['crit_id']] = array('crit_id' => $row['crit_id'], 'crit_date' => $row['crit_date'], 'crit_value' => $row['crit_value']);
     }
     //build achievement data
     $query1 = "SELECT * FROM `" . $roster->db->table('g_achievements', 'achievements') . "`";
     // WHERE `cid` = '15079'";
     $result1 = $roster->db->query($query1) or die_quietly($roster->db->error(), 'Database Error', basename(__FILE__), __LINE__, $query);
     $achi = array();
     while ($row = $roster->db->fetch($result1)) {
         $achi[$row['achie_id']] = array('achie_id' => $row['achie_id'], 'achie_date' => $row['achie_date']);
     }
     // this loops each raid
     foreach ($this->raids as $raid => $rinfo) {
         $overide = false;
         if (isset($achi[$rinfo['id']]['achie_date'])) {
             $overide = true;
         }
         $this->messages .= '<br/>' . $rinfo['title'] . '<ul>';
         //echo $rinfo['title'].' <img src="'.$roster->config['img_url'].'interface/icons/'.$rinfo['icon'].'"></a><br>';
         foreach ($rinfo['criteria'] as $id => $boss) {
             if (isset($crit[$boss['id']]['crit_value'])) {
                 $down = $crit[$boss['id']]['crit_value'];
             } else {
                 $down = '0';
             }
             if ($overide or $down >= 1) {
                 $down = 1;
             }
             //echo $boss['description'] . ' x' . $down . '<br>';
             $this->messages .= '<li>' . $boss['description'] . ' - ' . $down . '</li>';
             $querystr = "UPDATE `" . $roster->db->table('addon_config') . "` SET `config_value` = '" . $down . "'  WHERE `config_name` = '" . $raid . '_boss_' . ($id + 1) . "'";
             //$this->messages .= $querystr.'<br>';
             $result = $roster->db->query($querystr);
         }
         $this->messages .= '</ul>';
     }
     return true;
 }
开发者ID:Sajaki,项目名称:wowroster_dev,代码行数:56,代码来源:update_hook.php

示例6: memberslist

 /**
  * Constructor
  *
  * @param array $options
  *		Override any of the default options, like client/server sorting, alt
  *		grouping, or pagination.
  * @param array $addon
  *		If the SortMembers addon array has already been loaded, pass it here
  *		for efficiency. if the addon array is not available, omit it, and it
  *		will be loaded automatically.
  */
 function memberslist($options = array(), $addon = array())
 {
     global $roster;
     $basename = 'memberslist';
     // --[ Get addon array ]--
     $this->addon = getaddon($basename);
     // Set the js in the roster header
     $roster->output['html_head'] .= '<script type="text/javascript" src="' . ROSTER_PATH . 'addons/' . $basename . '/js/sorttable.js"></script>';
     // Merge in the override options from the calling file
     if (!empty($options)) {
         $this->addon['config'] = array_merge($this->addon['config'], $options);
     }
     // Overwrite some options if they're specified by the client
     if (isset($_GET['style'])) {
         $this->addon['config']['nojs'] = $_GET['style'] == 'server' ? 1 : 0;
     }
     if (isset($_GET['alts'])) {
         $this->addon['config']['group_alts'] = $_GET['alts'] == 'open' ? 2 : $_GET['alts'] == 'close' ? 1 : 0;
     }
 }
开发者ID:Sajaki,项目名称:wowroster_dev,代码行数:31,代码来源:memberslist.php

示例7: RosterLogin

 /**
  * Constructor for Roster Login class
  * Accepts an action for the form
  * And an array of additional fields
  *
  * @param string $script_filename
  * @param array $fields
  * @return RosterLogin
  */
 function RosterLogin($script_filename = '')
 {
     global $roster;
     $this->setAction($script_filename);
     $this->allow_login = 0;
     $this->message = '<span style="font-size:10px;color:red;">Not logged in</span><br />';
     $query = "SELECT `account_id`, `name` FROM `" . $roster->db->table('account') . "`;";
     $result = $roster->db->query($query);
     if (!$result) {
         die_quietly($roster->db->error, 'Roster Auth', __FILE__, __LINE__, $query);
     }
     $this->levels[0] = 'Public';
     $this->login_levels['Public'] = 0;
     while ($row = $roster->db->fetch($result)) {
         $this->levels[$row['account_id']] = $row['name'];
         $this->login_levels[$row['name']] = $row['account_id'];
     }
     $addon_data = getaddon('phpBB_login');
     $this->roster_phpbb_admin_groups = $addon_data['config']['phpbb_admin_groups'];
     $this->roster_phpbb_officer_groups = $addon_data['config']['phpbb_officer_groups'];
     $this->roster_phpbb_guild_groups = $addon_data['config']['phpbb_guild_groups'];
     $this->checkLogin();
     $this->checkLogout();
 }
开发者ID:Sajaki,项目名称:addons,代码行数:33,代码来源:login.php

示例8: header

            if ($roster->output['show_footer']) {
                include_once ROSTER_BASE . 'footer.php';
            }
            exit;
        } else {
            // Send a 404. Then the browser knows what's going on as well.
            header('HTTP/1.0 404 Not Found');
            roster_die(sprintf($roster->locale->act['module_not_exist'], ROSTER_PAGE_NAME), $roster->locale->act['roster_error']);
        }
}
if (empty($roster->pages[1])) {
    // Send a 404. Then the browser knows what's going on as well.
    header('HTTP/1.0 404 Not Found');
    roster_die(sprintf($roster->locale->act['module_not_exist'], ROSTER_PAGE_NAME), $roster->locale->act['roster_error']);
}
$addon = getaddon($roster->pages[1]);
//---[ Check if the module exists ]-----------------------
if (!file_exists($path)) {
    // Send a 404. Then the browser knows what's going on as well.
    header('HTTP/1.0 404 Not Found');
    roster_die(sprintf($roster->locale->act['module_not_exist'], ROSTER_PAGE_NAME), $roster->locale->act['roster_error']);
}
if (!$roster->auth->getAuthorized($addon['access'])) {
    roster_die(sprintf($roster->locale->act['addon_no_access'], $addon['basename']), $roster->locale->act['addon_error']);
}
if ($addon['active'] == '1') {
    // Check if this addon is in the process of an upgrade and deny access if it hasn't yet been upgraded
    $installfile = $addon['inc_dir'] . 'install.def.php';
    $install_class = $addon['basename'] . 'Install';
    if (file_exists($installfile)) {
        include_once $installfile;
开发者ID:Sajaki,项目名称:wowroster,代码行数:31,代码来源:index.php

示例9: charsPage

 function charsPage()
 {
     global $roster, $addon, $accounts;
     // Disallow viewing of the page
     if (!$roster->auth->getAuthorized($addon['config']['acc_min_access'])) {
         print '<span class="title_text">' . $roster->locale->act['acc_page']['chars'] . '</span><br />' . $roster->auth->getMessage() . $roster->auth->getLoginForm();
     } else {
         include_once 'memberslist.php';
         $charlist = new memberslist(array('group_alts' => -1));
         $uid = $accounts->session->getVal('uid');
         $mainQuery = 'SELECT ' . '`user_link`.`uid`, ' . '`user_link`.`member_id`, ' . '`members`.`member_id`, ' . '`members`.`name`, ' . '`members`.`class`, ' . '`members`.`level`, ' . '`members`.`zone`, ' . '`members`.`online`, ' . '`members`.`last_online`, ' . "UNIX_TIMESTAMP(`members`.`last_online`) AS 'last_online_stamp', " . "DATE_FORMAT(  DATE_ADD(`members`.`last_online`, INTERVAL " . $roster->config['localtimeoffset'] . " HOUR ), '" . $roster->locale->act['timeformat'] . "' ) AS 'last_online_format', " . '`members`.`note`, ' . '`members`.`guild_title`, ' . '`guild`.`update_time`, ' . "IF( `members`.`note` IS NULL OR `members`.`note` = '', 1, 0 ) AS 'nisnull', " . '`members`.`officer_note`, ' . "IF( `members`.`officer_note` IS NULL OR `members`.`officer_note` = '', 1, 0 ) AS 'onisnull', " . '`members`.`guild_rank`, ' . '`players`.`server`, ' . '`players`.`race`, ' . '`players`.`sex`, ' . '`players`.`exp`, ' . '`players`.`clientLocale`, ' . '`players`.`lifetimeRankName`, ' . '`players`.`lifetimeHighestRank`, ' . "IF( `players`.`lifetimeHighestRank` IS NULL OR `players`.`lifetimeHighestRank` = '0', 1, 0 ) AS 'risnull', " . '`players`.`hearth`, ' . "IF( `players`.`hearth` IS NULL OR `players`.`hearth` = '', 1, 0 ) AS 'hisnull', " . "UNIX_TIMESTAMP( `players`.`dateupdatedutc`) AS 'last_update_stamp', " . "DATE_FORMAT(  DATE_ADD(`players`.`dateupdatedutc`, INTERVAL " . $roster->config['localtimeoffset'] . " HOUR ), '" . $roster->locale->act['timeformat'] . "' ) AS 'last_update_format', " . "IF( `players`.`dateupdatedutc` IS NULL OR `players`.`dateupdatedutc` = '', 1, 0 ) AS 'luisnull', " . '`proftable`.`professions`, ' . '`talenttable`.`talents` ' . 'FROM `' . $roster->db->table('user_link', 'accounts') . '` AS user_link ' . 'LEFT JOIN `' . $roster->db->table('members') . '` AS members ON `user_link`.`member_id` = `members`.`member_id` ' . 'LEFT JOIN `' . $roster->db->table('players') . '` AS players ON `members`.`member_id` = `players`.`member_id` ' . "LEFT JOIN (SELECT `member_id` , GROUP_CONCAT( CONCAT( `skill_name` , '|', `skill_level` ) ORDER BY `skill_order`) AS 'professions' " . 'FROM `' . $roster->db->table('skills') . '` ' . 'GROUP BY `member_id`) AS proftable ON `members`.`member_id` = `proftable`.`member_id` ' . "LEFT JOIN (SELECT `member_id` , GROUP_CONCAT( CONCAT( `tree` , '|', `pointsspent` , '|', `background` ) ORDER BY `order`) AS 'talents' " . 'FROM `' . $roster->db->table('talenttree') . '` ' . 'GROUP BY `member_id`) AS talenttable ON `members`.`member_id` = `talenttable`.`member_id` ' . 'LEFT JOIN `' . $roster->db->table('guild') . '` AS guild ON `members`.`guild_id` = `guild`.`guild_id` ' . 'WHERE `user_link`.`uid` = "' . $uid . '"' . 'ORDER BY IF(`members`.`member_id` = `user_link`.`member_id`,1,0), ';
         $always_sort = ' `members`.`level` DESC, `members`.`name` ASC';
         $addon = getaddon('memberslist');
         $FIELD['name'] = array('lang_field' => 'name', 'order' => array('`members`.`name` ASC'), 'order_d' => array('`members`.`name` DESC'), 'value' => 'name_value', 'js_type' => 'ts_string', 'display' => 3);
         $FIELD['class'] = array('lang_field' => 'class', 'order' => array('`members`.`class` ASC'), 'order_d' => array('`members`.`class` DESC'), 'value' => 'class_value', 'js_type' => 'ts_string', 'display' => $addon['config']['member_class']);
         $FIELD['level'] = array('lang_field' => 'level', 'order_d' => array('`members`.`level` ASC'), 'value' => 'level_value', 'js_type' => 'ts_number', 'display' => $addon['config']['member_level']);
         $FIELD['guild_title'] = array('lang_field' => 'title', 'order' => array('`members`.`guild_rank` ASC'), 'order_d' => array('`members`.`guild_rank` DESC'), 'js_type' => 'ts_number', 'jsort' => 'guild_rank', 'display' => $addon['config']['member_gtitle']);
         $FIELD['lifetimeRankName'] = array('lang_field' => 'currenthonor', 'order' => array('risnull', '`players`.`lifetimeHighestRank` DESC'), 'order_d' => array('risnull', '`players`.`lifetimeHighestRank` ASC'), 'value' => 'honor_value', 'js_type' => 'ts_number', 'display' => $addon['config']['member_hrank']);
         $FIELD['professions'] = array('lang_field' => 'professions', 'value' => 'tradeskill_icons', 'js_type' => '', 'display' => $addon['config']['member_prof']);
         $FIELD['hearth'] = array('lang_field' => 'hearthed', 'order' => array('hisnull', 'hearth ASC'), 'order_d' => array('hisnull', 'hearth DESC'), 'js_type' => 'ts_string', 'display' => $addon['config']['member_hearth']);
         $FIELD['zone'] = array('lang_field' => 'lastzone', 'order' => array('`members`.`zone` ASC'), 'order_d' => array('`members`.`zone` DESC'), 'js_type' => 'ts_string', 'display' => $addon['config']['member_zone']);
         $FIELD['last_online'] = array('lang_field' => 'lastonline', 'order' => array('`members`.`last_online` DESC'), 'order_d' => array('`members`.`last_online` ASC'), 'value' => 'last_online_value', 'js_type' => 'ts_date', 'display' => $addon['config']['member_online']);
         $FIELD['last_update_format'] = array('lang_field' => 'lastupdate', 'order' => array('luisnull', '`players`.`dateupdatedutc` DESC'), 'order_d' => array('luisnull', '`players`.`dateupdatedutc` ASC'), 'jsort' => 'last_update_stamp', 'js_type' => 'ts_date', 'display' => $addon['config']['member_update']);
         $FIELD['note'] = array('lang_field' => 'note', 'order' => array('nisnull', '`members`.`note` ASC'), 'order_d' => array('nisnull', '`members`.`note` DESC'), 'value' => 'note_value', 'js_type' => 'ts_string', 'display' => $addon['config']['member_note']);
         $FIELD['officer_note'] = array('lang_field' => 'onote', 'order' => array('onisnull', '`members`.`note` ASC'), 'order_d' => array('onisnull', '`members`.`note` DESC'), 'value' => 'note_value', 'js_type' => 'ts_string', 'display' => $addon['config']['member_onote']);
         $charlist->prepareData($mainQuery, $always_sort, $FIELD, 'charlist');
         $addon = getaddon('accounts');
         $roster->output['show_menu']['acc_menu'] = 1;
         // Display the button listing
         $roster->tpl->assign_block_vars('accounts_chars', array('MESSAGE' => $accounts->message, 'BORDER_START' => border('sblue', 'start', $roster->locale->act['acc_page']['chars']), 'CHARS_LIST' => $charlist->makeMembersList(), 'BORDER_END' => border('sblue', 'end')));
         $roster->tpl->set_filenames(array('accounts_chars' => $addon['basename'] . '/chars.html'));
         $roster->tpl->display('accounts_chars');
     }
 }
开发者ID:Sajaki,项目名称:addons,代码行数:34,代码来源:page.lib.php

示例10: faction_value

 /**
  * Controls Output of the Faction Column
  *
  * @param array $row
  * @return string - Formatted output
  */
 function faction_value($row, $field)
 {
     global $roster;
     $addon = getaddon('memberslist');
     if ($row['factionEn']) {
         $faction = isset($row['factionEn']) ? $row['factionEn'] : '';
         switch (substr($faction, 0, 1)) {
             case 'A':
                 $icon = '<img src="' . $roster->config['img_url'] . 'icon_alliance.png" alt="" width="' . $addon['config']['icon_size'] . '" height="' . $addon['config']['icon_size'] . '"/> ';
                 break;
             case 'H':
                 $icon = '<img src="' . $roster->config['img_url'] . 'icon_horde.png" alt="" width="' . $addon['config']['icon_size'] . '" height="' . $addon['config']['icon_size'] . '"/> ';
                 break;
             default:
                 $icon = '<img src="' . $roster->config['img_url'] . 'icon_neutral.png" alt="" width="' . $addon['config']['icon_size'] . '" height="' . $addon['config']['icon_size'] . '"/> ';
                 break;
         }
     } else {
         $icon = '';
     }
     $cell_value = $icon . $row['faction'];
     return '<div style="display:none; ">' . $row['faction'] . '</div><center>' . $cell_value . '</center>';
 }
开发者ID:Sajaki,项目名称:addons,代码行数:29,代码来源:memberslist.php

示例11: messagebox

    }
} else {
    $body = messagebox($roster->locale->act['roster_cp_invalid'], $roster->locale->act['roster_cp'], 'sred');
}
// Build the pagebar from admin/pages.php
foreach ($config_pages as $pindex => $data) {
    $pagename = $roster->pages[0] . ($page != 'roster' ? '-' . $page : '');
    if (!isset($data['special']) || $data['special'] != 'hidden') {
        $roster->tpl->assign_block_vars('pagebar', array('SPECIAL' => isset($data['special']) ? $data['special'] : '', 'SELECTED' => isset($data['href']) ? $pagename == $data['href'] ? true : false : '', 'LINK' => isset($data['href']) ? makelink($data['href']) : '', 'NAME' => isset($data['title']) ? isset($roster->locale->act[$data['title']]) ? $roster->locale->act[$data['title']] : $data['title'] : ''));
    }
}
// Refresh the addon list because we may have installed/uninstalled something
$roster->get_addon_data();
$roster->tpl->assign_var('ADDON_PAGEBAR', (bool) count($roster->addon_data));
foreach ($roster->addon_data as $row) {
    $addon = getaddon($row['basename']);
    updateCheck($addon);
    if (file_exists($addon['ucp_dir'] . 'index.php')) {
        // Save current locale array
        // Since we add all locales for localization, we save the current locale array
        // This is in case one addon has the same locale strings as another, and keeps them from overwritting one another
        $localetemp = $roster->locale->wordings;
        foreach ($roster->multilanguages as $lang) {
            $roster->locale->add_locale_file(ROSTER_ADDONS . $row['basename'] . DIR_SEP . 'locale' . DIR_SEP . $lang . '.php', $lang);
        }
        $roster->tpl->assign_block_vars('addon_pagebar', array('SELECTED' => isset($roster->pages[2]) && $roster->pages[2] == $row['basename'] ? true : false, 'LINK' => makelink('ucp-addon-' . $row['basename']), 'NAME' => isset($roster->locale->act[$row['fullname']]) ? $roster->locale->act[$row['fullname']] : $row['fullname']));
        // Restore our locale array
        $roster->locale->wordings = $localetemp;
        unset($localetemp);
    }
}
开发者ID:Sajaki,项目名称:wowroster_dev,代码行数:31,代码来源:ucp.php

示例12: exit

 * @license    http://www.gnu.org/licenses/gpl.html   Licensed under the GNU General Public License v3.
 * @package    WoWRoster
 * @subpackage Search
*/
if (!defined('IN_ROSTER')) {
    exit('Detected invalid access to this file!');
}
require_once ROSTER_BASE . 'settings.php';
$roster->output['title'] = $roster->locale->act['search'];
$roster->tpl->assign_vars(array('S_NO_RESULTS' => false, 'S_RESULT' => false, 'U_SEARCH_LINK' => makelink('search'), 'SEARCH' => ''));
/**
 * We need all the addon data for search
 * So we inject the full addon data into the global array
 */
foreach ($roster->addon_data as $name => $data) {
    $roster->addon_data[$name] = getaddon($name);
    // Save current locale array
    // Since we add all locales for localization, we save the current locale array
    // This is in case one addon has the same locale strings as another, and keeps them from overwritting one another
    $localetemp = $roster->locale->wordings;
    foreach ($roster->multilanguages as $lang) {
        $roster->locale->add_locale_file(ROSTER_ADDONS . $data['basename'] . DIR_SEP . 'locale' . DIR_SEP . $lang . '.php', $lang);
    }
    $roster->addon_data[$name]['fullname'] = isset($roster->locale->act[$data['fullname']]) ? $roster->locale->act[$data['fullname']] : $data['fullname'];
    // Restore our locale array
    $roster->locale->wordings = $localetemp;
    unset($localetemp);
    if ($roster->auth->getAuthorized($roster->addon_data[$name]['access']) && file_exists($roster->addon_data[$name]['search_file'])) {
        include_once $roster->addon_data[$name]['search_file'];
    }
    // Open the lib/search directory for roster core search files
开发者ID:Sajaki,项目名称:wowroster_dev,代码行数:31,代码来源:search.php

示例13: exit

 *
 *
 * @copyright  2002-2011 WoWRoster.net
 * @license    http://www.gnu.org/licenses/gpl.html   Licensed under the GNU General Public License v3.
 * @version    SVN: $Id$
 * @link       http://www.wowroster.net
 * @package    IntanceKeys
 */
if (!defined('IN_ROSTER')) {
    exit('Detected invalid access to this file!');
}
if (!active_addon('memberslist')) {
    // Memberslist not installed. Just die for now.
    roster_die("You will need to install memberslist to use the keys addon display component");
}
$memberslist_addon = getaddon('memberslist');
// Include addon's locale files if they exist
foreach ($roster->multilanguages as $lang) {
    $roster->locale->add_locale_file($memberslist_addon['locale_dir'] . $lang . '.php', $lang);
}
// Apply memberslist style
roster_add_css($memberslist_addon['tpl_css_url'], 'theme');
include_once $memberslist_addon['inc_dir'] . 'memberslist.php';
include_once ROSTER_LIB . 'item.php';
$memberlist = new memberslist(array(), $memberslist_addon);
// First define static data
$mainSelect = 'SELECT ' . '`members`.`member_id`, ' . '`members`.`name`, ' . '`members`.`class`, ' . '`members`.`level`, ' . '`members`.`zone`, ' . '`members`.`online`, ' . '`members`.`last_online`, ' . "UNIX_TIMESTAMP(`members`.`last_online`) AS 'last_online_stamp', " . "DATE_FORMAT(  DATE_ADD(`members`.`last_online`, INTERVAL " . $roster->config['localtimeoffset'] . " HOUR ), '" . $roster->locale->act['timeformat'] . "' ) AS 'last_online_format', " . '`members`.`note`, ' . '`members`.`guild_title`, ' . '`alts`.`main_id`, ' . '`guild`.`update_time`, ' . "IF( `members`.`note` IS NULL OR `members`.`note` = '', 1, 0 ) AS 'nisnull', " . '`members`.`officer_note`, ' . "IF( `members`.`officer_note` IS NULL OR `members`.`officer_note` = '', 1, 0 ) AS 'onisnull', " . '`members`.`guild_rank`, ' . '`players`.`server`, ' . '`players`.`race`, ' . '`players`.`sex`, ' . '`players`.`exp`, ' . '`players`.`clientLocale`, ' . '`players`.`lifetimeRankName`, ' . '`players`.`lifetimeHighestRank`, ' . "IF( `players`.`lifetimeHighestRank` IS NULL OR `players`.`lifetimeHighestRank` = '0', 1, 0 ) AS 'risnull', " . '`players`.`hearth`, ' . "IF( `players`.`hearth` IS NULL OR `players`.`hearth` = '', 1, 0 ) AS 'hisnull', " . "UNIX_TIMESTAMP( `players`.`dateupdatedutc`) AS 'last_update_stamp', " . "DATE_FORMAT(  DATE_ADD(`players`.`dateupdatedutc`, INTERVAL " . $roster->config['localtimeoffset'] . " HOUR ), '" . $roster->locale->act['timeformat'] . "' ) AS 'last_update_format', " . "IF( `players`.`dateupdatedutc` IS NULL OR `players`.`dateupdatedutc` = '', 1, 0 ) AS 'luisnull', ";
$mainTables = 'FROM `' . $roster->db->table('members') . '` AS members ' . 'LEFT JOIN `' . $roster->db->table('alts', $memberslist_addon['basename']) . '` AS alts ON `members`.`member_id` = `alts`.`member_id` ' . 'INNER JOIN `' . $roster->db->table('players') . '` AS players ON `members`.`member_id` = `players`.`member_id` ' . 'INNER JOIN `' . $roster->db->table('guild') . '` AS guild ON `members`.`guild_id` = `guild`.`guild_id` ' . 'INNER JOIN `' . $roster->db->table('keycache', $addon['basename']) . '` AS keycache ON `members`.`member_id` = `keycache`.`member_id` ';
$where[] = '`members`.`guild_id` = "' . $roster->data['guild_id'] . '"';
$group[] = '`members`.`member_id`';
$order_last[] = '`members`.`level` DESC';
开发者ID:Sajaki,项目名称:wowroster,代码行数:31,代码来源:index.php

示例14: exit

<?php

/** 
 * 
 */
if (!defined('IN_ROSTER')) {
    exit('Detected invalid access to this file!');
}
if (!isset($addon)) {
    $addon = getaddon('user');
}
if (!isset($user)) {
    include_once $addon['inc_dir'] . 'users.lib.php';
    $user = new user();
    /*
    	if( !isset($user->form))
    	{
    		include_once( $addon['inc_dir'] . 'form.lib.php');
    		$user->form = new userForm;
    	}
    /*
    	if( !isset($user->admin))
    	{
    		include_once( $addon['inc_dir'] . 'admin.lib.php');
    		$user->admin = new userAdmin;
    	}
    
    	if( !isset($user->page))
    	{
    		include_once( $addon['inc_dir'] . 'page.lib.php');
    		$user->page = new userPage;
开发者ID:Sajaki,项目名称:wowroster,代码行数:31,代码来源:conf.php

示例15: exit

 * 
 * LICENSE: Licensed under the Creative Commons 
 *          "Attribution-NonCommercial-ShareAlike 2.5" license 
 * 
 * @copyright  2005-2007 Pretty Kitty Development 
 * @author	   mdeshane
 * @license    http://creativecommons.org/licenses/by-nc-sa/2.5   Creative Commons "Attribution-NonCommercial-ShareAlike 2.5" 
 * @link       http://dev.pkcomp.net 
 * @package    Accounts 
 * @subpackage Conf File
 */
if (!defined('IN_ROSTER')) {
    exit('Detected invalid access to this file!');
}
if (!isset($addon)) {
    $addon = getaddon('accounts');
}
if (!isset($accounts)) {
    include_once $addon['inc_dir'] . 'accounts.lib.php';
    $accounts = new accounts();
    if (!isset($accounts->plugin)) {
        include_once $addon['inc_dir'] . 'plugin.lib.php';
        $accounts->plugin = new accountsPlugin();
    }
    if (!isset($accounts->session)) {
        include_once $addon['inc_dir'] . 'session.lib.php';
        $accounts->session = new accountsSession();
    }
    if (!isset($accounts->form)) {
        include_once $addon['inc_dir'] . 'form.lib.php';
        $accounts->form = new accountsForm();
开发者ID:Sajaki,项目名称:addons,代码行数:31,代码来源:conf.php


注:本文中的getaddon函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。