function displayMenu() { global $roster; if (defined('ROSTER_MENU_INC')) { // Create the mini update pop-up // Include update lib require_once ROSTER_LIB . 'update.lib.php'; $mini_update = new update(); // Fetch addon data $mini_update->fetchAddonData(); // Create the file fields $mini_update->makeFileFields('mini_file_fields'); unset($mini_update); //$roster->tpl->set_handle('roster_menu', 'menu.html'); //$roster->tpl->display('roster_menu'); } }
function synchGuildbob($server, $memberId = 0, $memberName = false, $region = false, $data) { global $addon, $roster, $update; $this->server = $server; $this->guildId = $memberId; $roster->data['region'] = $region; $this->memberName = $memberName; $this->active_member['starttimeutc'] = gmdate('Y-m-d H:i:s'); include_once ROSTER_LIB . 'update.lib.php'; $update = new update(); $update->fetchAddonData(); $update->uploadData['wowrcp']['cpProfile'][$server]['Guild'][$memberName] = $this->data; $x = $update->processGuildRoster(); $x .= '' . $this->message . '<br>'; $this->_debug(1, true, 'Synced armory data ' . $this->memberName . ' with roster', 'OK'); return $x; //true; }
} if (!$roster->config['authenticated_user']) { print messagebox($roster->locale->act['update_disabled'], $roster->locale->act['update_errors'], 'sred'); return; } // Include update lib require_once ROSTER_LIB . 'update.lib.php'; $update = new update(); // See if UU is requesting this page if (preg_match('/uniuploader/i', $_SERVER['HTTP_USER_AGENT'])) { $update->textmode = true; } // Set template vars $roster->tpl->assign_vars(array('S_DATA' => false, 'S_RESPONSE' => false, 'S_RESPONSE_ERROR' => false, 'S_PASS' => true, 'U_UPDATE' => makelink('update'), 'S_UPDATE_INS' => (bool) $roster->config['update_inst'], 'PAGE_INFO' => $roster->locale->act['pagebar_update'], 'L_UPLOAD_APP' => $roster->config['uploadapp'], 'L_PROFILER' => $roster->config['profiler'], 'L_PASSWORD_TIP' => makeOverlib($roster->locale->act['roster_upd_pw_help'], $roster->locale->act['password'], '', 2, '', ',WRAP,RIGHT'), 'MESSAGES' => '')); // Fetch addon data $update->fetchAddonData(); // Has data been uploaded? if (isset($_POST['process']) && $_POST['process'] == 'process' || $update->textmode) { $messages = $update->parseFiles(); $messages .= $update->processFiles(); $errors = $update->getErrors(); // Normal upload results if (!$update->textmode) { $roster->tpl->assign_var('S_RESPONSE', true); // print the error messages if (!empty($errors)) { // We have errors $roster->tpl->assign_vars(array('S_RESPONSE_ERROR' => true, 'RESPONSE_ERROR' => $errors, 'RESPONSE_ERROR_LOG' => htmlspecialchars(stripAllHtml($errors)))); } $roster->tpl->assign_vars(array('RESPONSE' => $messages, 'RESPONSE_POST' => htmlspecialchars(stripAllHtml($messages)))); $roster->tpl->set_handle('body', 'update.html');
function synchMemberByID($server, $memberId = 0, $memberName = false, $region = false, $guildId = 0) { global $addon, $roster, $update; $this->server = $server; $this->memberId = $memberId; $this->memberName = $memberName; $roster->data['region'] = $region; $this->guildId = $guildId; // echo '<pre>';print_r($this->data);echo '</pre>'; $this->data = array(); //$this->_getRosterData(); $this->_getCharacterInfo(); $this->_insertGems(); $this->_getSkillInfo(); $this->_getReputationInfo(); $this->_getTalentInfo(); if ($this->status['characterInfo']) { include_once ROSTER_LIB . 'update.lib.php'; $update = new update(); $update->fetchAddonData(); //echo'<pre>'; //print_r($this->data); //echo '<br><hr><br>'.$this->data['Name'].'<br><hr><br>'; $update->uploadData['wowrcp']['cpProfile'][$this->server]['Character'][$this->data['Name']] = $this->data; $this->message = $update->processMyProfile(); $tmp = explode("\n", $this->message); $this->message = implode('', $tmp); //echo "<br><hr><br>".$this->message.'<br>'; if (strpos($this->message, sprintf($roster->locale->act['upload_data'], $roster->locale->act['char'], $memberName, $server, $region))) { $this->_debug(1, true, 'Synced armory data for ' . $this->memberName . ' with roster', 'OK'); return true; } else { $this->_debug(1, false, 'Synced armory data for ' . $this->memberName . ' with roster 192', 'Failed'); return false; } } else { $this->message = "No infos for " . $this->memberName . "<br>Character has probalby not been updated for a while"; $this->_debug(1, false, 'Synced armory data ' . $this->memberName . ' with roster 197', 'Failed'); return false; } }
function synchGuildbob($server, $memberId = 0, $memberName = false, $region = false, $data) { global $addon, $roster, $update; $this->server = $server; $this->guildId = $memberId; $this->region = $region; $this->memberName = $memberName; //$this->_getGuildInfo(); /// if ( $this->status['guildInfo'] ) { include_once ROSTER_LIB . 'update.lib.php'; $update = new update(); $update->fetchAddonData(); $update->uploadData['wowroster']['cpProfile'][$server]['Guild'][$data['GuildName']] = $data; echo $update->processGuildRoster(); //$tmp = explode( "\n", $this->message); //$this->message = implode( '', $tmp); echo '' . $this->message . '<br>'; $this->_debug(1, true, 'Synced armory data ' . $this->memberName . ' with roster', 'OK'); return true; // } // $this->_debug( 0, false, 'Synced armory data '. $this->memberName. ' with roster', 'Failed' ); // return false; }