本文整理汇总了PHP中roster_add_js函数的典型用法代码示例。如果您正苦于以下问题:PHP roster_add_js函数的具体用法?PHP roster_add_js怎么用?PHP roster_add_js使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了roster_add_js函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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();
}
示例2: roster_config
/**
* Constructor. We define the config table to work with here.
*/
function roster_config($tablename, $where = '1', $prefix = 'config_')
{
global $roster;
$this->tablename = $tablename;
$this->where = $where;
$this->prefix = $prefix;
$this->form_start = "<form action=\"\" method=\"post\" enctype=\"multipart/form-data\" id=\"" . $this->prefix . "config\" onsubmit=\"return confirm('" . $roster->locale->act['confirm_config_submit'] . "');\">\n";
$this->submit_button = "<div class=\"config-submit\"><input type=\"submit\" value=\"" . $roster->locale->act['config_submit_button'] . "\" />\n<input type=\"reset\" name=\"Reset\" value=\"" . $roster->locale->act['config_reset_button'] . "\" onclick=\"return confirm('" . $roster->locale->act['confirm_config_reset'] . "')\"/>\n<input type=\"hidden\" name=\"process\" value=\"process\" /></div>\n";
$this->form_end = "</form>\n";
// Color Picker JS
roster_add_js('js/colorpicker.js');
$jscript = '$(function() {
var ' . $this->prefix . 'tabs=new tabcontent(\'' . $this->prefix . 'tabs\');
' . $this->prefix . 'tabs.init();
$(".color-picker").ColorPicker({
onSubmit: function(hsb, hex, rgb, el) {
$(el).val("#" + hex.toUpperCase());
$(el).next().css("background-color", "#" + hex.toUpperCase());
$(el).ColorPickerHide();
},
onShow: function (colpkr) {
$(colpkr).fadeIn(500);
return false;
},
onBeforeShow: function () {
$(this).ColorPickerSetColor(this.value);
},
onHide: function (colpkr) {
$(colpkr).fadeOut(500);
return false;
}
})
.bind("keyup", function(){
$(this).ColorPickerSetColor(this.value);
$(this).next().css("background-color", this.value);
})
.next().click(function(){
$(this).prev().click();
});
});';
roster_add_js($jscript, 'inline', 'footer');
roster_add_css('templates/' . $roster->tpl->tpl . '/style/colorpicker.css', 'theme');
}
示例3: exit
/**
* WoWRoster.net WoWRoster
*
* @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 News
*/
if (!defined('IN_ROSTER')) {
exit('Detected invalid access to this file!');
}
if (!$roster->auth->getAuthorized($addon['config']['forum_start_topic'])) {
echo $roster->auth->getLoginForm($addon['config']['forum_start_topic']);
return;
//To the addon framework
}
include $addon['dir'] . 'inc/function.lib.php';
$functions = new forum();
$x = $functions->getCrumbsa($_GET['id']);
// Assign template vars
$roster->tpl->assign_vars(array('S_ADD_TOPIC' => false, 'CRUMB' => $x, 'U_BACK' => makelink('guild-forum'), 'S_HTML_ENABLE' => false, 'S_TOPIC_HTML' => $addon['config']['forum_html_posts'], 'S_POSTER' => $_COOKIE['roster_user'], 'S_TOPIC_ACCESS' => $roster->auth->rosterAccess(array('name' => 'access', 'value' => '0')), 'U_FORMACTION' => makelink('guild-forum-forum&id=' . $_GET['id'])));
if ($addon['config']['forum_html_posts'] >= 0) {
$roster->tpl->assign_var('S_HTML_ENABLE', true);
}
if ($addon['config']['forum_nicedit'] > 0) {
roster_add_js('js/nicEdit.js');
roster_add_js('bkLib.onDomLoaded(function() { nicEditors.allTextAreas({xhtml : true, fullPanel : true, iconsPath : \'' . $roster->config['img_url'] . 'nicEditorIcons.gif\'}) });', 'inline', 'header', false, false);
}
$roster->tpl->set_filenames(array('topic' => $addon['basename'] . '/topic_new.html'));
$roster->tpl->display('topic');
示例4: exit
* @license http://www.gnu.org/licenses/gpl.html Licensed under the GNU General Public License v3. * @package News
*/
if (!defined('IN_ROSTER')) {
exit('Detected invalid access to this file!');
}
$roster->auth->setAction('&id=' . $_GET['id']);
if (!$roster->auth->getAuthorized($addon['config']['news_edit'])) {
echo $roster->auth->getLoginForm($addon['config']['news_edit']);
return;
//To the addon framework
}
// Display news
$query = "SELECT * " . "FROM `" . $roster->db->table('news', $addon['basename']) . "` news " . "WHERE `news_id` = '" . $_GET['id'] . "';";
$result = $roster->db->query($query);
if ($roster->db->num_rows($result) == 0) {
echo messagebox($roster->locale->act['bad_news_id'], '', 'sred');
return;
}
$news = $roster->db->fetch($result);
// Assign template vars
$roster->tpl->assign_vars(array('S_ADD_NEWS' => false, 'S_HTML_ENABLE' => false, 'S_NEWS_HTML' => (bool) $news['html'], 'U_EDIT_FORMACTION' => makelink('guild-main'), 'U_NEWS_ID' => $news['news_id'], 'CONTENT' => $news['text'], 'AUTHOR' => $news['poster'], 'TITLE' => $news['title']));
if ($addon['config']['news_html'] >= 0) {
$roster->tpl->assign_var('S_HTML_ENABLE', true);
if ($addon['config']['news_nicedit'] > 0) {
roster_add_js('js/ckeditor/ckeditor.js');
}
}
$roster->tpl->set_filenames(array('head' => $addon['basename'] . '/news_head.html', 'body' => $addon['basename'] . '/edit.html', 'foot' => $addon['basename'] . '/news_foot.html'));
$roster->tpl->display('head');
$roster->tpl->display('body');
$roster->tpl->display('foot');
示例5: print_r
$blocks[$xplugin['addon_id']]['location'] = $h;
}
}
}
}
}
/*
echo '<pre>';
print_r($blocks);
echo '</pre>';
*/
foreach ($blocks as $bid => $val) {
$roster->tpl->assign_block_vars('addon_list', array('ROW_CLASS' => $roster->switch_row_class(), 'ID' => isset($val['id']) ? $val['id'] : '', 'ICON' => $val['icon'], 'FULLNAME' => $val['fullname'], 'LOCATION' => $val['block_location'], 'BASENAME' => $val['basename'], 'PARENT' => $val['parent'], 'VERSION' => $val['version'], 'DESCRIPTION' => $val['description']));
}
$jscript = "\n\$(function() {\n \$( '#sortable' ).sortable({\n placeholder: 'ui-state-highlight'\n });\n \$( '#sortable' ).disableSelection();\n \n \$('ul').sortable({\n axis: 'y',\n stop: function (event, ui) {\n\t var data = \$(this).sortable('serialize');\n \$('#yyy').text(data);\n\t\t\t\$('input#order').val(data);\n\n\t}\n });});";
roster_add_js($jscript, 'inline', 'header', FALSE, FALSE);
$roster->tpl->set_handle('plugins', $addon['basename'] . '/admin/plugins.html');
$body .= $roster->tpl->fetch('plugins');
/*
$query = "SELECT * FROM `" . $roster->db->table('slider',$addon['basename']) . "` "
. "ORDER BY `id` ASC;";
$result = $roster->db->query($query);
while( $row = $roster->db->fetch($result) )
{
$roster->tpl->assign_block_vars('slider_row',array(
'ROW_CLASS' => $roster->switch_row_class(),
'B_TITLE' => $row['b_title'],
'B_DESC' => $row['b_desc'],
'B_ACTIVE' => $row['b_active'],
示例6: jQuery
var tab_class = jQuery(".tab-navigation ul li").first().attr("id");
console.log( "first - "+tab_class );
menu = jQuery(".tab-navigation ul").attr("id");
jQuery(".tab-navigation ul#"+menu+" li").each(function() {
var v = jQuery(this).attr("id");
console.log( "hiding - "+v );
jQuery("div#"+v+"").hide();
});
jQuery("."+menu+"#" + tab_class).show();
jQuery(".tab-navigation ul#"+menu+" li#" + tab_class).addClass("selected");
}
var init = first();
});';
roster_add_js($js, 'inline', 'header', false, false);
/**
* Gets the list of currently installed roster addons
*
* @return array
*/
function getAddonList()
{
global $roster, $installer;
// Initialize output
$addons = '';
$output = '';
if ($handle = @opendir(ROSTER_ADDONS)) {
while (false !== ($file = readdir($handle))) {
if ($file != '.' && $file != '..' && $file != '.svn' && substr($file, strrpos($file, '.') + 1) != 'txt') {
$addons[] = $file;
示例7: function
},
onHide: function (colpkr) {
$(colpkr).fadeOut(500);
return false;
}
})
.bind("keyup", function(){
$(this).ColorPickerSetColor(this.value);
$(this).next().css("background-color", this.value);
})
.next().click(function(){
$(this).prev().click();
});
});';
roster_add_js($jscript_head, 'inline', 'header');
roster_add_js($jscript_foot, 'inline', 'footer');
roster_add_css('templates/' . $roster->tpl->tpl . '/style/colorpicker.css', 'theme');
}
// ----[ Clear file status cache ]--------------------------
clearstatcache();
// ----[ Check for required files ]-------------------------
if (!defined('SIGCONFIG_CONF')) {
print errorMode($roster->locale->act['config_notfound'], $roster->locale->act['fatal_error']);
return;
}
$siggen_functions_file = SIGGEN_DIR . 'inc' . DIR_SEP . 'functions.inc';
if (file_exists($siggen_functions_file)) {
require_once $siggen_functions_file;
$functions = new SigConfigClass();
} else {
print errorMode(sprintf($roster->locale->act['functions_notfound'], str_replace(DIR_SEP, '/', $siggen_functions_file)), $roster->locale->act['fatal_error']);
示例8: exit
*
* Functions file for template
*
*
* @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 WoWRoster
* @subpackage Theme
*/
if (!defined('IN_ROSTER')) {
exit('Detected invalid access to this file!');
}
define('R_TPL_VERSION', '2.2.0.0');
roster_add_js('templates/' . $roster->tpl->tpl . '/theme.js');
roster_add_css('templates/' . $roster->tpl->tpl . '/style/jquery-ui.css', 'theme');
roster_add_css('templates/' . $roster->tpl->tpl . '/style/ui.selectmenu.css', 'theme');
roster_add_css('templates/' . $roster->tpl->tpl . '/style/jquery.multiselect.css', 'theme');
roster_add_css('templates/' . $roster->tpl->tpl . '/style/base.css', 'theme');
/**
* Starts or ends fancy bodering containers
*
* @param string $style What bordering style to use
* @param string $mode ( start | end )
* @param string $header_text Place text in a styled header
* @param string $hwidth Set a fixed width for the box
* @return string
*/
function border($style, $mode, $header_text = '', $width = '')
{
示例9: exit
/**
* WoWRoster.net WoWRoster
*
* Overall footer for Roster
*
*
* @copyright 2002-2011 WoWRoster.net
* @license http://www.gnu.org/licenses/gpl.html Licensed under the GNU General Public License v3.
* @package WoWRoster
*/
if (!defined('IN_ROSTER')) {
exit('Detected invalid access to this file!');
}
define('ROSTER_FOOTER_INC', true);
roster_add_js(getAllTooltips(), 'inline', 'footer', FALSE, FALSE);
$totaltime = round(format_microtime() - ROSTER_STARTTIME, 2);
$error_report = $roster->error->stop();
// Assign template vars
$roster->tpl->assign_vars(array('S_PROCESSTIME' => $roster->config['processtime'], 'S_DEBUG_MODE' => $roster->config['debug_mode'] && is_array($error_report), 'S_SQL_WIN' => $roster->config['sql_window'], 'S_DESCRIBE' => $roster->config['sql_window'] == 2, 'U_CREDITS' => makelink('credits'), 'PROCESSTIME' => $totaltime, 'QUERYCOUNT' => $roster->db->query_count, 'ROSTER_PATH' => ROSTER_PATH, 'ROSTER_BODY' => (!empty($roster->config['roster_bg']) ? ' style="background-image:url(' . $roster->config['roster_bg'] . ');"' : '') . (!empty($roster->output['body_attr']) ? ' ' . $roster->output['body_attr'] : ''), 'ROSTER_ONLOAD' => !empty($roster->output['body_onload']) ? $roster->output['body_onload'] : '', 'WEBSITE_ADDRESS' => $roster->config['website_address'], 'HEADER_LOGO' => $roster->config['logo'], 'IMG_URL' => $roster->config['img_url'], 'INTERFACE_URL' => $roster->config['interface_url'], 'ROSTER_VERSION' => $roster->config['version'], 'ROSTER_FOOT_JS' => roster_get_js('footer')));
if ($roster->config['debug_mode']) {
if (is_array($error_report)) {
foreach ($error_report as $file => $errors) {
$roster->tpl->assign_block_vars('php_debug', array('FILE' => substr($file, strlen(ROSTER_BASE))));
foreach ($errors as $error) {
$roster->tpl->assign_block_vars('php_debug.row', array('ROW_CLASS' => $roster->switch_row_class(), 'ERROR' => $error));
}
}
}
}
if ($roster->config['sql_window']) {
示例10: array
$camera_js_config2 = array();
foreach ($addon['config'] as $key => $value) {
if (strpos($key, 'slider_') !== 0 || $key == 'slider_skin') {
continue;
}
$key = str_replace('slider_', '', $key);
if (!is_numeric($value) && $value != 'true' && $value != 'false') {
$value = "'{$value}'";
}
$camera_js_config[] = "{$key}:{$value}";
}
$camera_js_config[] = "imagePath:'" . $addon['tpl_image_path'] . "'";
$camera_js = '$(function() {
$(\'#camera_wrap_1\').camera({' . implode(',', $camera_js_config) . '});
});';
roster_add_js($camera_js, 'inline', 'footer', false, false);
unset($queryb);
$roster->db->free_result($resultsb);
$roster->tpl->assign_vars(array('SLIDER_SKIN' => $addon['config']['slider_skin'], 'FIRST1' => $x, 'FIRST2' => $y, 'S_ADD_NEWS' => $roster->auth->getAuthorized($addon['config']['news_add']), 'S_EDIT_NEWS' => $roster->auth->getAuthorized($addon['config']['news_edit']), 'U_ADD_NEWS' => makelink('guild-' . $addon['basename'] . '-add')));
$query = "SELECT `news`.*, " . "DATE_FORMAT( DATE_ADD(`news`.`date`, INTERVAL " . $roster->config['localtimeoffset'] . " HOUR ), '" . $roster->locale->act['timeformat'] . "' ) AS 'date_format', " . "COUNT(`comments`.`comment_id`) comm_count " . "FROM `" . $roster->db->table('news', $addon['basename']) . "` news " . "LEFT JOIN `" . $roster->db->table('comments', $addon['basename']) . "` comments USING (`news_id`) " . "GROUP BY `news`.`news_id`" . "ORDER BY `news`.`date` DESC;";
$results = $roster->db->query($query);
$numn = 1;
$totaln = $roster->db->num_rows($results);
while ($row = $roster->db->fetch($results)) {
//echo $row['title'].'-'.$row['poster'].'-'.$row['text'].'<br />';
$roster->tpl->assign_block_vars('news', array('POSTER' => $row['poster'], 'NUM' => $numn, 'TEXT' => $row['text'], 'TITLE' => $row['title'], 'DATE' => $row['date_format'], 'U_EDIT' => makelink('guild-' . $addon['basename'] . '-edit&id=' . $row['news_id']), 'U_COMMENT' => makelink('guild-' . $addon['basename'] . '-comment&id=' . $row['news_id']), 'U_EDIT' => makelink('guild-' . $addon['basename'] . '-edit&id=' . $row['news_id']), 'L_COMMENT' => $row['comm_count'] != 1 ? sprintf($roster->locale->act['n_comments'], $row['comm_count']) : sprintf($roster->locale->act['n_comment'], $row['comm_count']), 'NEWS_TYPE' => $row['news_type']));
$numn++;
}
unset($query);
$roster->db->free_result($results);
$roster->tpl->set_filenames(array('main' => $addon['basename'] . '/index_main.html'));
示例11: exit
*/
if (!defined('IN_ROSTER')) {
exit('Detected invalid access to this file!');
}
define('R_TPL_VERSION', '2.2.0.0');
roster_add_js('templates/' . $roster->tpl->tpl . '/theme.js');
roster_add_css('templates/' . $roster->tpl->tpl . '/style/jquery-ui.css', 'theme');
roster_add_css('templates/' . $roster->tpl->tpl . '/style/ui.selectmenu.css', 'theme');
roster_add_css('templates/' . $roster->tpl->tpl . '/style/jquery.multiselect.css', 'theme');
roster_add_css('templates/' . $roster->tpl->tpl . '/style/droplist.css', 'theme');
roster_add_css('templates/' . $roster->tpl->tpl . '/style/base.css', 'theme');
/*
new tooltip functions js files
*/
roster_add_js('js/apitips.js', null, 'footer');
roster_add_js('js/tooltip.js', null, 'footer');
/**
* Starts or ends fancy bodering containers
*
* @param string $style What bordering style to use
* @param string $mode ( start | end )
* @param string $header_text Place text in a styled header
* @param string $hwidth Set a fixed width for the box
* @return string
*/
function border($style, $mode, $header_text = '', $width = '')
{
$backg_css = $style . 'border';
if (substr($style, 0, 1) == 's') {
$style = 'simple';
}
示例12: mt_rand
$numArray[$i] = mt_rand(1, 10);
// if duplicate, generate new random
$j = 0;
// go back through and check new number
}
}
}
}
return $numArray;
}
if ($addon['config']['char_auth']) {
$x = generateUniqueRandoms(0, 18, 3);
$r = implode(':', $x);
list($num1, $num2, $num3) = explode(':', $r);
$s = "\n\t\t\$(document).ready(function () { \n\t\t\t//\$('input#xsubmit').attr('disabled', 'true');\n\t\t\t\$('input#submit_btn').click(function(){\n\t\t\t//\$('#pUsername').keyup(function () {\n\t\t\t\tvar t = this;\n\t\t\t\tvar char = \$('input#pUsername').val();\n\t\t\t\tvar validateUsername = \$('#validateUsername');\n\t\t\t\tvar pUsername = \$('#pUsername');\n\t\t\t\tvar pclass = \$('input#class');\n\t\t\t\tvar plevel = \$('input#level');\n\t\t\t\tvar prank = \$('#rank');\n\t\t\t\tvar pmember_id = \$('#member_id');\n\t\t\t\tvar ptitle = \$('#title');\n\t\t\t\tvar photo = \$('#photo');\n\t\t\t\tvar EQ1 = \$('div#EQ1');\n\t\t\t\tvar EQ2 = \$('div#EQ2');\n\t\t\t\tvar EQ3 = \$('div#EQ3');\n\t\t\t\n\n\t\t\t\t\tif (this.timer) clearTimeout(this.timer);\n\t\t\t\t\tvalidateUsername.removeClass('error').html('<img src=\"" . $roster->config['img_url'] . "canvas-loader.gif\" height=\"18\" width=\"18\" /> checking availability...');\n\t\t\t\t\tthis.timer = setTimeout(function () {\n\t\t\t\t\t\t\$.ajax({\n\t\t\t\t\t\t\turl: 'index.php?p=user-user-ajaxcvar',\n\t\t\t\t\t\t\t//url: 'index.php?p=ajaxcvar',\n\t\t\t\t\t\t\tdata: 'action=check_username&server=" . $roster->data['server'] . "&slot=" . $num1 . '-' . $num2 . '-' . $num3 . "&character=' + char,\n\t\t\t\t\t\t\tdataType: 'json',\n\t\t\t\t\t\t\ttype: 'post',\n\t\t\t\t\t\t\tsuccess: function (j) {\n\t\t\t\t\t\t\t\tif (j.ok)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tvalidateUsername.html(j.msg);\n\t\t\t\t\t\t\t\t\tpUsername.val(char);\n\t\t\t\t\t\t\t\t\t\$('div#EQ1').removeClass(\"RGaccepy RGdenyed RGquestion\").addClass(j.EEQQ1);\n\t\t\t\t\t\t\t\t\t\$('div#EQ2').removeClass(\"RGaccepy RGdenyed RGquestion\").addClass(j.EEQQ2);\n\t\t\t\t\t\t\t\t\t\$('div#EQ3').removeClass(\"RGaccepy RGdenyed RGquestion\").addClass(j.EEQQ3);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tpclass.val(j.cla55);\n\t\t\t\t\t\t\t\t\tplevel.val(j.level);\n\t\t\t\t\t\t\t\t\tprank.val(j.rank);\n\t\t\t\t\t\t\t\t\tpmember_id.val(j.member_id);\n\t\t\t\t\t\t\t\t\tptitle.html(j.title);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tphoto.html('<img src=\"http://us.battle.net/static-render/us/'+j.thumb+'\" height=\"75\" width=\"75\" /></a>');\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\$('#xsubmit').removeAttr('disabled');\n\t\t\t\t\t\t\t\t\t\$('input#submit_btn').attr('disabled', 'true');\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tphoto.html('<img src=\"http://us.battle.net/static-render/us/'+j.thumb+'\" height=\"75\" width=\"75\" /></a>');\n\t\t\t\t\t\t\t\t\tvalidateUsername.html(j.msg);\n\t\t\t\t\t\t\t\t\t\$('div#EQ1').removeClass(\"RGaccepy RGdenyed RGquestion\").addClass(j.EEQQ1);\n\t\t\t\t\t\t\t\t\t\$('div#EQ2').removeClass(\"RGaccepy RGdenyed RGquestion\").addClass(j.EEQQ2);\n\t\t\t\t\t\t\t\t\t\$('div#EQ3').removeClass(\"RGaccepy RGdenyed RGquestion\").addClass(j.EEQQ3);\n\t\t\t\t\t\t\t\t\tpclass.val(j.cla55);\n\t\t\t\t\t\t\t\t\tplevel.val(j.level);\n\t\t\t\t\t\t\t\t\tprank.val(j.rank);\n\t\t\t\t\t\t\t\t\tptitle.html(j.title);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t});\n\t\t\t\t\t}, 200);\n\n\t\t\t});\n\t\t});";
roster_add_js($s, 'inline');
}
function _getItemSlot($value)
{
$ret = '';
switch ($value) {
case 0:
$ret = "Head";
break;
case 1:
$ret = "Neck";
break;
case 2:
$ret = "Shoulder";
break;
case 3:
示例13: foreach
}
foreach ($cats as $achID => $data) {
$ach[$data['cid']]['comp'] = isset($ach[$data['cid']]['comp']) ? $ach[$data['cid']]['comp'] + $data['comp'] : $data['comp'];
}
$achcat = array('15088' => 'General', '15077' => 'Quests', '15078' => 'Player vs. Player', '15079' => 'Dungeons & Raids', '15080' => 'Professions', '15089' => 'Reputation', '15093' => 'Guild Feats of Strength');
$output = '';
$et = 0;
$ct = 0;
foreach ($ach as $cat => $t) {
$text = $t['comp'] . ' / ' . $t['total'];
$per = $t['comp'] / $t['total'] * 100;
$et = $et + $t['total'];
$ct = $ct + $t['comp'];
$roster->tpl->assign_block_vars('cat', array('TITLE' => $t['name'], 'BAR' => $text, 'PERCENT' => 100 - $per, 'PERCENT1' => $per));
}
$xper = $ct / $et * 100;
$roster->tpl->assign_block_vars('cat', array('TITLE' => 'Total Completed', 'BAR' => $ct . ' / ' . $et, 'PERCENT' => 100 - $xper, 'PERCENT1' => $xper));
}
}
$achiv = new achiv();
$sqlquery2 = "SELECT * FROM `" . $roster->db->table('players') . "` WHERE `member_id` = '" . $roster->data['member_id'] . "'";
$result2 = $roster->db->query($sqlquery2);
$row = $roster->db->fetch($result2);
$char = array();
foreach ($row as $var => $value) {
$char[$var] = $value;
}
$body = $achiv->out($char);
$images = implode(",", $achiv->icons);
roster_add_js('addons/' . $addon['basename'] . '/js/achievements.js');
echo $body;
示例14: SET_DHTML
}
$i = 0;
$jscript = '
SET_DHTML(CURSOR_MOVE, TRANSPARENT, SCROLL' . $dhtml_reg . ', "palet" + NO_DRAG, "array" + NO_DRAG, "rec_bin" + NO_DRAG);
var roster_url = "' . ROSTER_URL . '";
var dy = 40;
var margTop = 5;
var dx = 40;
var margLef = 5;
var arrayWidth = ' . $arrayWidth . ';
var arrayHeight = ' . $arrayHeight . ';
var paletHeight = ' . $paletHeight . ';
// Array intended to reflect the order of the draggable items
var aElts = Array();
var palet = Array();
';
foreach ($palet as $id => $button) {
$jscript .= 'palet[' . $i++ . '] = dd.elements.' . $id . ';' . "\n";
}
foreach ($arrayButtons as $pos => $button) {
$jscript .= 'aElts[' . $pos . '] = dd.elements.b' . $button['button_id'] . ';' . "\n";
}
$jscript .= 'updatePositions();' . "\n";
roster_add_js($jscript, 'inline', 'footer', FALSE, FALSE);
$roster->tpl->set_filenames(array('menu' => 'admin/menu_conf_menu.html', 'body' => 'admin/menu_conf.html'));
$menu = $roster->tpl->fetch('menu');
$body = $roster->tpl->fetch('body');
示例15: _link
/**
* Create java reload code
*
* @param string $link
*/
function _link($link = '')
{
global $roster, $addon;
$reloadTime = $addon['config']['rsync_reloadwaittime'] * 500;
$link = ROSTER_URL . 'index.php?p=ajax-addon-rostersync-status_update&cont=doUpdateStatus';
$posts = 'job_id=' . $this->jobid . '&memberlist=' . $this->isMemberList . '&scope=' . $roster->scope . '&page=' . (isset($roster->pages[2]) ? $roster->pages[2] : '') . '&RSYNC_STARTTIME=' . RSYNC_STARTTIME;
$postadd = '';
if ($this->util_type) {
$postadd .= "&util_type=" . $this->util_type;
}
//PAGERELOAD
$header = '
jQuery(document).ready( function($){
function nextMember() {
$( "#rsynclinker" ).submit();
}
setTimeout( nextMember(),' . $reloadTime . ' );
});
';
$this->_debug(1, htmlspecialchars($header), 'Printed reload java code', $header ? 'OK' : 'Failed');
//$this->header .= $header;
roster_add_js($header, 'inline', 'header', false, false);
}