<?php $tp = new template(); $tp->add('character'); $character = character($_GET['character']); $tp->assign('category', $_GET['category']); $tp->assign('lastupdate', date("H:i d-m-Y", $character->lastupdate)); if ($character->guid == -1) { $_SYSTEM->error('Character not found!'); } // Ustawianie reputacji include 'sections/char-reputation.php'; // teraz skili include 'sections/char-skills.php'; // Talenty include 'sections/char-talents.php'; // Achievements :) include 'sections/char-achievements.php'; // Ustawianie itemkow for ($i = 0; $i < 19; $i++) { $todo = '<div class="item-bg" onMouseOut="tooltip_hide();" onMouseOver="tooltip(\'' . $_SYSTEM->htmlcode($character->item_tooltips[$i]) . '\');">'; if ($character->get_item_icon($i) !== false) { $todo .= '<img src="' . $character->get_item_icon($i) . '" alt="">'; } $todo .= '</div>'; $tp->assign('ITEM_SLOT_' . $i, $todo); } // Podstawowe informacje $tp->assign('guid', $character->guid); $tp->assign('name', $character->name); $tp->assign('guid', $character->guid);
<?php $_FPREFIX = '../'; include '../init.php'; if ($config['mangos_version'] == 0) { exit; } $character = character($_GET['guid']); $cat = (int) $_GET['cat']; if (!$cat) { $cat = 130; } function getStatisticsList($cat) { global $character, $mysql; $r = $mysql->getRows("select * from achievement where categoryId = ?1 AND (factionFlag = ?2 OR factionFlag = '-1') order by OrderInCategory", $cat, $character->getAlliance(), 'armory'); if (!$r) { exit; } foreach ($r as $row) { $achi[$row['id']]['ref'] = $row['refAchievement'] ? $row['refAchievement'] : $row['id']; $crit .= $achi[$row['id']]['ref'] . ','; $achi[$row['id']]['date'] = $character->achievement[$row['id']]; $achi[$row['id']]['progress'] = $character->achievement_progress; $achi[$row['id']]['name'] = $row['name']; $achi[$row['id']]['sort'] = $row['OrderInCategory']; $achi[$row['id']]['criteria'] = array(); $achi[$row['id']]['show'] = 1; $achi[$row['id']]['parent'] = $row['unk1']; } $r = $mysql->getRows("select * from achievement_criteria where referredAchievement IN (?1-1)", $crit, 'armory');
<?php if ($_GET['name']) { if (!(int) $_GET['name']) { $data = $mysql->getRow("select guid from characters where name = '?1'", $_GET['name'], 'char'); $_GET['name'] = (int) $data['guid']; } } $character = character((int) $_GET['name']); $tp->assign('guid', $character->guid); $tp->assign('name', $character->name); $tp->assign('guid', $character->guid); $tp->assign('level', $character->level); $tp->assign('portrait_type', $character->level == 80 ? '-80' : ($character->level >= 70 ? '-70' : ($character->level >= 60 ? '' : '-default'))); $tp->assign('faction_name', $character->getAlliance() ? 'horde' : 'alliance'); $race = character::raceToString($character->race); $tp->assign('race', $race); if (strtolower($race) == 'undead') { $race = 'scourge'; } $tp->assign('race3D', strtolower(str_replace(' ', '', $race))); $tp->assign('class', $character->classToString($character->class)); $tp->assign('gender_nr', $character->gender); $tp->assign('gender3D', $character->gender ? 'female' : 'male'); $tp->assign('race_nr', $character->race); $tp->assign('class_nr', $character->class); $tp->assign('guild', $character->guild_id ? '<a class="charGuildName" href="guild-info.php?Realm={$realm}&name=' . $character->guild . '&characterName=' . $character->name . '">' . $character->guild . '</a>' : ''); $tp->assign('guildname', $character->guild); $tp->assign('guildtabdisplay', $character->guild_id ? '' : 'style="display:none;"'); $tp->assign('arenatabdisplay', $character->arena_team[2]['name'] || $character->arena_team[3]['name'] || $character->arena_team[5]['name'] ? '' : 'style="display:none;"'); $tp->assign('guild_name', $character->guild_id ? $character->guild : 'None');
function register_new() { $emailName = preg_replace('/([^\\pL \\pN \\.\\ \\@\\ \\_\\ ]+)/u', '', strip_tags($_POST['email'])); if (email_exists($emailName)) { echo 2; exit; } else { $userData = get_user_by('email', $_SESSION['emailActive']); // IF EXIST USER if ($userData) { global $wpdb; $table = $wpdb->prefix . "users"; $wpdb->query("UPDATE {$table} SET user_login='******' WHERE ID=" . $userData->ID); $password = trim($_POST['password']); $displayName = character($_POST['display_name']); $data = array('user_nicename' => $emailName, 'user_email' => $emailName, 'first_name' => character($_POST['first_name']), 'display_name' => $displayName, 'last_name' => character($_POST['last_name']), 'ID' => $userData->ID); $meta = array('user_meta_active_pass' => $password, 'user_meta_refuge_name' => $displayName, 'address' => trim(character($_POST['address'])), 'gender' => $_POST['gender'], 'dob' => $_POST['dob'], 'language' => $_POST['language'], 'user_meta_mailchimp' => $_POST['_mc4wp_subscribe_registration_form']); foreach ($meta as $meta_key => $meta_value) { update_user_meta($userData->ID, $meta_key, $meta_value); } if (wp_update_user($data)) { unset($_SESSION['emailActive']); $_SESSION['emailActive'] = $emailName; resend_activation_code($userData->ID); return true; } } else { $user_id = wp_create_user($emailName, $_POST['password'], $emailName); if ($user_id) { //wp_update_user( array( 'ID' => $user_id, 'role' => 'subscriber' ) ); $firstName = $_POST['first_name']; $displayName = $_POST['display_name']; $lastName = $_POST['last_name']; $address = $_POST['address']; $password = trim($_POST['password']); add_user_meta($user_id, 'user_meta_active_pass', $_POST['password']); update_user_meta($user_id, 'user_meta_refuge_name', $_POST['display_name']); add_user_meta($user_id, 'address', $address); $update = wp_update_user(array('ID' => $user_id, 'first_name' => $firstName, 'display_name' => $displayName, 'last_name' => $lastName)); add_user_meta($user_id, 'gender', $_POST['gender'], true); add_user_meta($user_id, 'dob', $_POST['dob'], true); add_user_meta($user_id, 'language', $_POST['language'], true); update_user_meta($user_id, 'user_meta_mailchimp', $_POST['_mc4wp_subscribe_registration_form']); //$wp_signon = wp_signon(array('user_login' => $user['login'], 'user_password' => $user['password'], 'remember' => true), false); if ($update) { $_SESSION['emailActive'] = $emailName; resend_activation_code($user_id); return true; } else { return false; } } else { return false; } } } }