コード例 #1
0
ファイル: characterprofile.php プロジェクト: peonso/ZnoteAAC
<?php

require_once 'engine/init.php';
include 'layout/overall/header.php';
if ($config['log_ip']) {
    znote_visitor_insert_detailed_data(4);
}
if (isset($_GET['name']) === true && empty($_GET['name']) === false) {
    $name = $_GET['name'];
    $user_id = user_character_exist($name);
    if ($user_id !== false) {
        if ($config['TFSVersion'] == 'TFS_10') {
            $profile_data = user_character_data($user_id, 'name', 'level', 'vocation', 'lastlogin', 'sex');
            $profile_data['online'] = user_is_online_10($user_id);
            if ($config['Ach'] == true) {
                $achievementPoints = mysql_select_single("SELECT SUM(`value`) AS `sum` FROM `player_storage` WHERE `key` LIKE '30___' AND `player_id`='{$user_id}'");
            }
        } else {
            $profile_data = user_character_data($user_id, 'name', 'level', 'vocation', 'lastlogin', 'online', 'sex');
        }
        $profile_znote_data = user_znote_character_data($user_id, 'created', 'hide_char', 'comment');
        $guild_exist = false;
        if (get_character_guild_rank($user_id) > 0) {
            $guild_exist = true;
            $guild = get_player_guild_data($user_id);
            $guild_name = get_guild_name($guild['guild_id']);
        }
        ?>
		
		<!-- PROFILE MARKUP HERE-->
			<h1><font class="profile_font" name="profile_font_header">Profile: <?php 
コード例 #2
0
ファイル: myaccount.php プロジェクト: l04d/ZnoteAAC
             echo '<font color="red"><b>';
             echo output_errors($errors);
             echo '</b></font>';
         }
     }
     break;
     // end
     // Change character sex
 // end
 // Change character sex
 case 'change_gender':
     if (user_character_account_id($char_name) === $session_user_id) {
         $char_id = (int) user_character_id($char_name);
         $account_id = user_character_account_id($char_name);
         if ($config['TFSVersion'] == 'TFS_10') {
             $chr_data['online'] = user_is_online_10($char_id) ? 1 : 0;
         } else {
             $chr_data = user_character_data($char_id, 'online');
         }
         if ($chr_data['online'] != 1) {
             // Verify that we are not messing around with data
             if ($account_id != $user_data['id']) {
                 die("wtf? Something went wrong, try relogging.");
             }
             // Fetch character tickets
             $tickets = shop_account_gender_tickets($account_id);
             if ($tickets !== false || $config['free_sex_change'] == true) {
                 // They are allowed to change gender
                 $last = false;
                 $infinite = false;
                 $tks = 0;
コード例 #3
0
ファイル: guilds.php プロジェクト: peonso/ZnoteAAC
         header('Location: success.php');
         exit;
     } else {
         echo '<font color="red" size="4">All members must be offline to disband the guild.</font>';
     }
 }
 if (!empty($_POST['new_leader'])) {
     $new_leader = (int) $_POST['new_leader'];
     $old_leader = guild_leader($gid);
     $online = false;
     if ($config['TFSVersion'] !== 'TFS_10') {
         $newData = user_character_data($new_leader, 'online');
         $oldData = user_character_data($old_leader, 'online');
     } else {
         $newData['online'] = user_is_online_10($new_leader) ? 1 : 0;
         $oldData['online'] = user_is_online_10($old_leader) ? 1 : 0;
     }
     if ($newData['online'] == 1 || $oldData['online'] == 1) {
         $online = true;
     }
     if ($online == false) {
         if (guild_change_leader($new_leader, $old_leader)) {
             header('Location: guilds.php?name=' . $_GET['name']);
             exit;
         } else {
             echo '<font color="red" size="4">Something went wrong when attempting to change leadership.</font>';
         }
     } else {
         echo '<font color="red" size="4">The new and old leader must be offline to change leadership.</font>';
     }
 }
コード例 #4
0
ファイル: users.php プロジェクト: niemoralny/ZnoteAAC
function support_list()
{
    $TFS = Config('TFSVersion');
    if ($TFS == 'TFS_10') {
        $staffs = mysql_select_multi("SELECT `id`, `group_id`, `name`, `account_id` FROM `players` WHERE `group_id` > 1 ORDER BY `group_id` ASC;");
    } else {
        $staffs = mysql_select_multi("SELECT `group_id`, `name`, `online`, `account_id` FROM `players` WHERE `group_id` > 1 ORDER BY `group_id` ASC;");
    }
    if ($staffs !== false) {
        for ($i = 0; $i < count($staffs); $i++) {
            // $staffs[$i]['']
            if ($TFS == 'TFS_02' || $TFS == 'TFS_10') {
                $account = mysql_select_single("SELECT `type` FROM `accounts` WHERE `id` ='" . $staffs[$i]['account_id'] . "';");
                $staffs[$i]['group_id'] = $account['type'];
                if ($TFS == 'TFS_10') {
                    // Fix online status on TFS 1.0
                    if (user_is_online_10($staffs[$i]['id'])) {
                        $staffs[$i]['online'] = 1;
                    } else {
                        $staffs[$i]['online'] = 0;
                    }
                    unset($staffs[$i]['id']);
                }
            }
            unset($staffs[$i]['account_id']);
        }
    }
    return $staffs;
}
コード例 #5
0
ファイル: admin_skills.php プロジェクト: l04d/ZnoteAAC
// PREP: Create a function that echos player skills
function playerSkill($skills, $id)
{
    if (!$skills) {
        return 0;
    } else {
        return $skills[$id]['value'];
    }
}
// UPDATE SKILLS POST
if (isset($_POST['pid']) && (int) $_POST['pid'] > 0) {
    $pid = (int) $_POST['pid'];
    if ($config['TFSVersion'] != 'TFS_10') {
        $status = user_is_online($pid);
    } else {
        $status = user_is_online_10($pid);
    }
    if (!$status) {
        // New player level
        $level = (int) $_POST['level'];
        // Fetch stat gain for vocation
        $statgain = $config['vocations_gain'][(int) $_POST['vocation']];
        if ((int) $_POST['vocation'] !== 0) {
            // Fetch base level and stats:
            $baselevel = $config['level'];
            $basehealth = $config['health'];
            $basemana = $config['mana'];
            $basecap = $config['cap'];
        } else {
            // No vocation stats
            // Fetch base level and stats: