'B_ID' => $row['id'], 'B_IMG' => $row['b_image'], 'B_ACTIVEI' => ( $row['b_active'] == 1 ? 'green' : 'yellow'), 'B_ACTIVET' => ( $row['b_active'] == 1 ? $roster->locale->act['active'] : $roster->locale->act['inactive']), 'B_ACTIVEOP' => ( $row['b_active'] == 1 ? 'deactivate' : 'activate'), 'B_IMAGE' => $addon['url_path'] .'images/thumb-'. $row['b_image'], ) ); } */ /** * Make our menu from the config api */ // ----[ Set the tablename and create the config class ]---- include ROSTER_LIB . 'config.lib.php'; $config = new roster_config($roster->db->table('addon_config'), '`addon_id` = "' . $addon['addon_id'] . '"'); // ----[ Get configuration data ]--------------------------- $config->getConfigData(); // ----[ Build the page items using lib functions ]--------- $menu .= $config->buildConfigMenu('rostercp-addon-' . $addon['basename']); function sksort(&$array, $subkey = "id", $sort_ascending = false) { if (count($array)) { $temp_array[key($array)] = array_shift($array); } foreach ($array as $key => $val) { $offset = 0; $found = false; foreach ($temp_array as $tmp_key => $tmp_val) { if (!$found and strtolower($val[$subkey]) > strtolower($tmp_val[$subkey])) { $temp_array = array_merge((array) array_slice($temp_array, 0, $offset), array($key => $val), array_slice($temp_array, $offset));
/** * WoWRoster.net WoWRoster * * Main Roster configuration * * * @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 * @since File available since Release 1.8.0 * @package WoWRoster * @subpackage RosterCP */ if (!defined('IN_ROSTER') || !defined('IN_ROSTER_ADMIN')) { exit('Detected invalid access to this file!'); } $roster->output['title'] .= $roster->locale->act['pagebar_rosterconf']; // ----[ Set the tablename and create the config class ]---- include ROSTER_LIB . 'config.lib.php'; $config = new roster_config($roster->db->table('config')); // ----[ Include special functions file ]------------------- include ROSTER_ADMIN . 'roster_config_functions.php'; // ----[ Get configuration data ]--------------------------- $config->getConfigData(); // ----[ Process data if available ]------------------------ $config->processData($roster->config); // ----[ Build the page items using lib functions ]--------- $menu = $config->buildConfigMenu(); $config->buildConfigPage(); $body .= $config->form_start . $config->submit_button . $config->formpages . $config->form_end . $config->nonformpages;
// The addon will now assign its output to $body ob_start(); include_once $addon['active_file']; $body .= ob_get_clean(); } elseif ($addon['config'] != '') { if (file_exists($addon['admin_dir'] . 'config.func.php')) { include $addon['admin_dir'] . 'config.func.php'; if (function_exists('topBox')) { $body .= topBox(); } else { $body .= ''; } } // ----[ Set the tablename and create the config class ]---- include ROSTER_LIB . 'config.lib.php'; $config = new roster_config($roster->db->table('plugin_config'), '`addon_id` = "' . $addon['addon_id'] . '"'); // ----[ Include special functions file ]------------------- include ROSTER_ADMIN . 'roster_config_functions.php'; // ----[ Get configuration data ]--------------------------- $config->getConfigData(); // ----[ Process data if available ]------------------------ $config->processData($addon['config']); // ----[ Build the page items using lib functions ]--------- $menu = $config->buildConfigMenu(); $config->buildConfigPage(); $body .= $config->form_start . $config->formpages . $config->submit_button . $config->form_end . $config->nonformpages; $footer .= $config->jscript; } else { $roster->set_message(sprintf($roster->locale->act['addon_no_config'], $addon['basename']), $roster->locale->act['addon_error'], 'error'); } } else {