示例#1
0
    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 
        echo $profile_data['name'];
        ?>
</font></h1>
			<ul class="unstyled">
				
				<li><font class="profile_font" name="profile_font_level">Sex:<?php 
        if ($profile_data['sex'] == 1) {
            echo 'Male';
        } else {
            echo 'Female';
示例#2
0
function guild_war_invitation($cid, $gid)
{
    $cid = (int) $cid;
    $gid = (int) $gid;
    $gname = get_guild_name($cid);
    $ename = get_guild_name($gid);
    $time = time();
    mysql_insert("INSERT INTO `guild_wars` (`guild1`, `guild2`, `name1`, `name2`, `status`, `started`, `ended`) VALUES ('{$cid}', '{$gid}', '{$gname}', '{$ename}', '0', '{$time}', '0');");
}
示例#3
0
		</ul>
		<?php 
        if ($config['TFSVersion'] == 'TFS_02' || $config['TFSVersion'] == 'TFS_10') {
            ?>
			<table id="guildwarTable" class="table table-striped table-hover">
				<tr class="yellow">
					<th>Killer's guild:</th>
					<th>Killer:</th>
					<th>Victim:</th>
					<th>Time:</th>
				</tr>
					<?php 
            foreach ($kills ? $kills : array() as $kill) {
                echo '<tr>';
                //echo '<td>'. get_guild_name($kill['killerguild']) .'</td>';
                echo '<td><a href="guilds.php?name=' . get_guild_name($kill['killerguild']) . '">' . get_guild_name($kill['killerguild']) . '</a></td>';
                echo '<td><a href="characterprofile.php?name=' . $kill['killer'] . '">' . $kill['killer'] . '</a></td>';
                echo '<td><a href="characterprofile.php?name=' . $kill['target'] . '">' . $kill['target'] . '</a></td>';
                echo '<td>' . getClock($kill['time'], true) . '</td>';
                echo '</tr>';
            }
            ?>
			</table>
		<?php 
        }
        if ($config['TFSVersion'] == 'TFS_03') {
            // BORROWED FROM GESIOR (and ported to work on Znote AAC).
            $main_content = "";
            $deaths = gesior_sql_death($warid);
            if ($deaths !== false) {
                //die(print_r($deaths));
示例#4
0
     }
 }
 if ($config['TFSVersion'] == 'TFS_02' || $config['TFSVersion'] == 'TFS_10' && $config['guildwar_enabled'] === true) {
     if (!empty($_POST['warinvite'])) {
         if (get_guild_id($_POST['warinvite'])) {
             $status = false;
             $war_invite = mysql_select_single("SELECT `id` FROM `guilds` WHERE `id` = '{$gid}';");
             $targetGuild = get_guild_id($_POST['warinvite']);
             if ($war_invite !== false) {
                 foreach ($war_invite as $inv) {
                     if ($inv['id'] == $targetGuild) {
                         $status = true;
                     }
                 }
             }
             $check_guild = get_guild_name($gid);
             foreach ($check_guild as $guild) {
                 if ($guild['name'] == $_POST['warinvite']) {
                     $status = true;
                 }
             }
             $wars = mysql_select_multi("SELECT `id`, `guild1`, `guild2`, `status` FROM `guild_wars` WHERE (`guild1` = '{$gid}' OR `guild1` = '{$targetGuild}') AND (`guild2` = '{$gid}' OR `guild2` = '{$targetGuild}') AND `status` IN (0, 1);");
             if ($status == false && $wars == false) {
                 guild_war_invitation($gid, $targetGuild);
                 $limit = empty($_POST['limit']) ? 100 : (int) $_POST['limit'];
                 mysql_insert("INSERT INTO `znote_guild_wars` (`limit`) VALUES ('{$limit}');");
                 header('Location: guilds.php?name=' . $_GET['name']);
                 exit;
             } else {
                 echo '<font color="red" size="4">This guild has already been invited to war(or you\'re trying to invite your own).</FONT>';
             }