Пример #1
0
                    //data_dump($deaths, false, "Deaths:");
                }
            } else {
                if ($config['TFSVersion'] == 'TFS_03') {
                    //mysql_select_single("SELECT * FROM players WHERE name='TEST DEBUG';");
                    $array = user_fetch_deathlist03($user_id);
                    if ($array) {
                        ?>
							<ul>
								<?php 
                        // Design and present the list
                        foreach ($array as $value) {
                            echo '<li>';
                            $value[3] = user_get_killer_id(user_get_kid($value['id']));
                            if ($value[3] !== false && $value[3] >= 1) {
                                $namedata = user_character_data((int) $value[3], 'name');
                                if ($namedata !== false) {
                                    $value[3] = $namedata['name'];
                                    $value[3] = 'player: <a href="characterprofile.php?name=' . $value[3] . '">' . $value[3] . '</a>';
                                } else {
                                    $value[3] = 'deleted player.';
                                }
                            } else {
                                $value[3] = user_get_killer_m_name(user_get_kid($value['id']));
                                if ($value[3] === false) {
                                    $value[3] = 'deleted player.';
                                }
                            }
                            echo '[' . getClock($value['date'], true) . '] Killed at level ' . $value['level'] . ' by ' . $value[3];
                            echo '</li>';
                        }
Пример #2
0
					<th>Price:</th>
					<th>Owner:</th>
					
				</tr>
					<?php 
            foreach ($array as $value) {
                echo '<tr>';
                echo "<td>" . $value['name'] . "</td>";
                echo "<td>" . $value['size'] . "</td>";
                echo "<td>" . $value['doors'] . "</td>";
                echo "<td>" . $value['beds'] . "</td>";
                echo "<td>" . $value['price'] . "</td>";
                if ($value['owner'] == 0) {
                    echo "<td>None</td>";
                } else {
                    $data = user_character_data($value['owner'], 'name');
                    echo '<td><a href="characterprofile.php?name=' . $data['name'] . '">' . $data['name'] . '</a></td>';
                }
                echo '</tr>';
            }
            ?>
			</table>
			<?php 
        } else {
            echo 'Empty list, it appears no houses are listed in this town.';
        }
        //Done.
    } else {
        echo 'Token appears to be incorrect.<br><br>';
        //Token::debug($_POST['token']);
        echo 'Please clear your web cache/cookies <b>OR</b> use another web browser<br>';
Пример #3
0
	<table id="highscoresTable" class="table table-striped table-hover">
		<tr class="yellow">
			<td>Rank</td>
			<td>Name</td>
			<td>Vocation</td>
			<td>Level</td>
			<?php 
    if ($type === 7) {
        echo "<td>Points</td>";
    }
    ?>
		</tr>
		<?php 
    for ($i = 0; $i < count($scores[$type]); $i++) {
        if (pageCheck($i, $page, $rowsPerPage)) {
            $profile_data = user_character_data($scores[$type][$i]['id'], 'account_id');
            $account_data = user_znote_account_data($profile_data['account_id'], 'flag');
            ?>
				<tr>
					<td><?php 
            echo $i + 1;
            ?>
</td>
					<td><?php 
            echo '<img src="\\flags\\' . $account_data['flag'] . '.png">  ';
            ?>
<a href="characterprofile.php?name=<?php 
            echo $scores[$type][$i]['name'];
            ?>
"><?php 
            echo $scores[$type][$i]['name'];
Пример #4
0
             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;
                 // Do we have any infinite tickets?
                 foreach ($tickets as $ticket) {
Пример #5
0
function set_rule_violation($charname, $typeid, $actionid, $reasonid, $time, $comment)
{
    $charid = user_character_id($charname);
    $typeid = (int) $typeid;
    $actionid = (int) $actionid;
    $reasonid = (int) $reasonid;
    $time = (int) ($time + time());
    $data = user_character_data($charid, 'account_id', 'lastip');
    $accountid = $data['account_id'];
    $charip = $data['lastip'];
    $comment = sanitize($comment);
    // ...
    $bannedby = config('website_char');
    if (user_character_exist($bannedby)) {
        $bannedby = user_character_id($bannedby);
        if (Config('TFSVersion') === 'TFS_02') {
            mysql_insert("INSERT INTO `bans` (`type` ,`ip` ,`mask` ,`player` ,`account` ,`time` ,`reason_id` ,`action_id` ,`comment` ,`banned_by`) VALUES ('{$typeid}', '{$charip}', '4294967295', '{$charid}', '{$accountid}', '{$time}', '{$reasonid}', '{$actionid}', '{$comment}', '{$bannedby}');");
        } elseif (Config('TFSVersion') === 'TFS_03') {
            $now = time();
            switch ($typeid) {
                case 1:
                    // IP ban
                    mysql_insert("INSERT INTO `bans` (`type`, `value`, `param`, `active`, `expires`, `added`, `admin_id`, `comment`) VALUES ('{$typeid}', '{$charip}', '4294967295', '1', '{$time}', '{$now}', '{$bannedby}', '{$comment}');");
                    break;
                case 2:
                    // namelock
                    mysql_insert("INSERT INTO `bans` (`type`, `value`, `param`, `active`, `expires`, `added`, `admin_id`, `comment`) VALUES ('{$typeid}', '{$charid}', '4294967295', '1', '{$time}', '{$now}', '{$bannedby}', '{$comment}');");
                    break;
                case 3:
                    // acc ban
                    mysql_insert("INSERT INTO `bans` (`type`, `value`, `param`, `active`, `expires`, `added`, `admin_id`, `comment`) VALUES ('{$typeid}', '{$accountid}', '4294967295', '1', '{$time}', '{$now}', '{$bannedby}', '{$comment}');");
                    break;
                case 4:
                    // notation
                    mysql_insert("INSERT INTO `bans` (`type`, `value`, `param`, `active`, `expires`, `added`, `admin_id`, `comment`) VALUES ('{$typeid}', '{$charid}', '4294967295', '1', '{$time}', '{$now}', '{$bannedby}', '{$comment}');");
                    break;
                case 5:
                    // deletion
                    mysql_insert("INSERT INTO `bans` (`type`, `value`, `param`, `active`, `expires`, `added`, `admin_id`, `comment`) VALUES ('{$typeid}', '{$charid}', '4294967295', '1', '{$time}', '{$now}', '{$bannedby}', '{$comment}');");
                    break;
            }
        } elseif (Config('TFSVersion') === 'TFS_10') {
            $now = time();
            switch ($typeid) {
                case 1:
                    // IP ban
                    mysql_insert("INSERT INTO `ip_bans` (`ip`, `reason`, `banned_at`, `expires_at`, `banned_by`) VALUES ('{$charip}', '{$comment}', '{$now}', '{$time}', '{$bannedby}');");
                    break;
                case 2:
                    // namelock
                    mysql_insert("INSERT INTO `player_namelocks` (`player_id`, `reason`, `namelocked_at`, `namelocked_by`) VALUES ('{$charid}', 'comment', '{$now}', '{$bannedby}');");
                    break;
                case 3:
                    // acc ban
                    mysql_insert("INSERT INTO `account_bans` (`account_id`, `reason`, `banned_at`, `expires_at`, `banned_by`) VALUES ('{$accountid}', '{$comment}', '{$now}', '{$time}', '{$bannedby}');");
                    break;
                case 4:
                    // notation
                    data_dump(false, array('status' => false), "Function deprecated. Ban option does not exist in TFS 1.0.");
                    die;
                    break;
                case 5:
                    // deletion
                    data_dump(false, array('status' => false), "Function deprecated. Ban option does not exist in TFS 1.0.");
                    die;
                    break;
            }
        }
        return true;
    } else {
        return false;
    }
}
Пример #6
0
         }
         // Then remove the guild itself.
         guild_delete($gidd);
         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 {
Пример #7
0
    if ($action === 'a') {
        // fetch data
        $char_array = user_character_list($user_data['id']);
        ?>

		<script src="engine/js/nicedit.js" type="text/javascript"></script>
		<script type="text/javascript">bkLib.onDomLoaded(nicEditors.allTextAreas);</script>
		<form action="" method="post">
			<input type="hidden" name="option" value="i!0">
			Select character:<select name="selected_char">
			<?php 
        $count = 0;
        if ($char_array !== false) {
            foreach ($char_array as $name) {
                $name = $name['name'];
                $charD = user_character_data(user_character_id($name), 'group_id', 'id');
                if ($charD['group_id'] > 1) {
                    echo '<option value="' . user_character_id($name) . '">' . $name . '</option>';
                    $count++;
                }
            }
        }
        ?>
			</select>		
			<input type="text" name="title" value="" placeholder="Title"><br />
			<textarea name="text" id="area1" cols="75" rows="10" placeholder="Contents..." style="width: 100%"></textarea><br />
			<input type="submit" value="Create News">
		</form>

		<?php 
        if ($count === 0) {