예제 #1
0
        if ($deleteAccount == 2) {
            SESSION::set('delete_attempts', 1);
            $error = 'Deleting of account failed, please email ' . SUPPORT_EMAIL;
        } else {
            $confirm_delete = true;
        }
    }
} else {
    if ($changeprofile == 1) {
        // Limit the profile length.
        if ($newprofile != "") {
            $sql->Update("UPDATE players SET messages = '" . sql($newprofile) . "' WHERE uname = '" . sql($username) . "'");
            $affected_rows = $sql->a_rows;
            $profile_changed = true;
        } else {
            $error = "Can not enter a blank profile.";
        }
    }
}
$level_and_cat = render_level_and_category($player['level']);
$status_list = render_status_section();
$avatar_display = render_avatar_section($player['player_id']);
// include and render from player.php
$rank_display = get_rank($username, $sql);
// rank display.
$health_section = render_health_section($player['health']);
$profile_editable = $player['messages'];
$profile_display = out($profile_editable);
$parts = get_certain_vars(get_defined_vars(), array('player'));
echo render_template("stats.tpl", $parts);
include SERVER_ROOT . "interface/footer.php";
예제 #2
0
$section_only = in('section_only');
// Check whether it's an ajax section.
$command = in('command');
$health = $players_health;
$strength = $players_strength;
$gold = $players_gold;
$kills = $players_kills;
$turns = $players_turns;
$level = $players_level;
$class = $players_class;
$bounty = $players_bounty;
$status = $players_status;
//The status variable is an array, of course.
$username = get_username();
$status_output_list = render_status_list();
$health_section = render_health_section($health);
$viewinv = $command == 'viewinv' ? true : false;
$sql->Query("SELECT item, amount FROM inventory WHERE owner = '" . sql($username) . "' ORDER BY item");
$items_section = '';
// TODO: Change this and the template to be using dl/dd/dt instead of a table.
foreach ($sql->FetchAll() as $loopItem) {
    if ($loopItem['amount']) {
        // Skip zero counts.
        $items_section .= "\n\t          <tr><td> {$loopItem['item']}: </td>\n\t          <td> {$loopItem['amount']}</td></tr>\n";
    }
}
$parts = get_certain_vars(get_defined_vars());
// Pull current flat vars into the template.
echo render_template('quickstats.tpl', $parts);
if (!$section_only) {
    ?>