Beispiel #1
0
<div id="scroll">
  <a title="Scroll to the top" class="top" href="#"><img src="layout/images/top.png" alt="top" /></a>
</div>
<footer>
<p>&copy; <?php 
echo $config['site_title'];
?>
.
<?php 
echo 'Server date and clock is: ' . getClock(false, true) . ' Page generated in ' . elapsedTime() . ' seconds. Q: ' . $aacQueries;
?>
  <a href="http://www.css3templates.co.uk">Design: css3templates.co.uk</a>. Engine: <a href="credits.php">Znote AAC</a></p>
</footer>
Beispiel #2
0
                            <b>Report ID:</b> #<?php 
            echo $report['id'];
            ?>
                            <br><b>Name:</b> <a href="characterprofile.php?name=<?php 
            echo $report['name'];
            ?>
"><?php 
            echo $report['name'];
            ?>
</a>
                            <br><b>Position:</b> <input type="text" disabled value="/pos <?php 
            echo $report['posx'] . ', ' . $report['posy'] . ', ' . $report['posz'];
            ?>
">
                            <br><b>Reported:</b> <?php 
            echo getClock($report['date'], true, true);
            ?>
                            <br><b>Status:</b> <?php 
            echo $statusTypes[$report['status']];
            ?>
. <a href="?action=edit&name=<?php 
            echo $report['name'] . '&id=' . $report['id'];
            ?>
">Edit</a>
                        </td>
                        <td><?php 
            echo $report['report_description'];
            ?>
</td>
                    </tr>
                </tbody>
Beispiel #3
0
    echo $order['account_id'];
    ?>
</td>
			<td><?php 
    echo $order_types[$order['type']];
    ?>
</td>
			<td><?php 
    echo '(' . $order['itemid'] . ') ', isset($items[$order['itemid']]) ? $items[$order['itemid']] : '';
    ?>
</td>
			<td><?php 
    echo $order['count'];
    ?>
</td>
			<td><?php 
    echo $order['points'];
    ?>
</td>
			<td><?php 
    echo getClock($order['time'], true, false);
    ?>
</td>
		</tr>
		<?php 
}
?>
	</tbody>
</table>
<?php 
include 'layout/overall/footer.php';
Beispiel #4
0
    $deaths = $cache->load();
}
if ($deaths) {
    ?>
<h1>Latest Deaths</h1>
<table id="deathsTable" class="table table-striped">
	<tr class="yellow">
		<th>Victim</th>
		<th>Time</th>
		<th>Killer</th>
	</tr>
	<?php 
    foreach ($deaths as $death) {
        echo '<tr>';
        echo "<td>At level " . $death['level'] . ": <a href='characterprofile.php?name=" . $death['victim'] . "'>" . $death['victim'] . "</a></td>";
        echo "<td>" . getClock($death['time'], true) . "</td>";
        if ($death['is_player'] == 1) {
            echo "<td>Player: <a href='characterprofile.php?name=" . $death['killed_by'] . "'>" . $death['killed_by'] . "</a></td>";
        } else {
            if ($death['is_player'] == 0) {
                if ($config['TFSVersion'] == 'TFS_03') {
                    echo "<td>Monster: " . ucfirst(str_replace("a ", "", $death['killed_by'])) . "</td>";
                } else {
                    echo "<td>Monster: " . ucfirst($death['killed_by']) . "</td>";
                }
            } else {
                echo "<td>" . $death['killed_by'] . "</td>";
            }
        }
        echo '</tr>';
    }
Beispiel #5
0
// pre stuff
$news = fetchAllNews();
if ($news !== false) {
    ?>
	<table id="news">
		<tr class="yellow">
			<td>Date</td>
			<td>By</td>
			<td>Title</td>
			<td>Edit</td>
			<td>Delete</td>
		</tr>
		<?php 
    foreach ($news as $n) {
        echo '<tr>';
        echo '<td>' . getClock($n['date'], true) . '</td>';
        echo '<td><a href="characterprofile.php?name=' . $n['name'] . '">' . $n['name'] . '</a></td>';
        echo '<td>' . $n['title'] . '</td>';
        echo '<td>';
        // edit
        ?>
			<form action="" method="post">
				<input type="hidden" name="option" value="e!<?php 
        echo $n['id'];
        ?>
">
				<input type="submit" value="Edit">
			</form>
			<?php 
        echo '</td>';
        echo '<td>';
Beispiel #6
0
            ?>
			<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));
                foreach ($deaths as $death) {
                    $killers = gesior_sql_killer((int) $death['id']);
                    $count = count($killers);
Beispiel #7
0
            $file_extension = pathinfo($entity->getFilename(), PATHINFO_EXTENSION);
            if ($file_extension == 'php') {
                $path = explode('/', $entity->getPathname());
                if (count($path) === 1) {
                    $path = explode('\\', $entity->getPathname());
                }
                $plugins[$path[1]] = $path[2];
            }
        }
    }
}
$response['modules'] = $plugins;
$response['data']['title'] = $config['site_title'];
$response['data']['slogan'] = $config['site_title_context'];
$response['data']['time'] = getClock(time(), false, true);
$response['data']['time_formatted'] = getClock(time(), true, true);
// Account count
$accounts = mysql_select_single("SELECT COUNT('id') AS `count` FROM `accounts`;");
$response['data']['accounts'] = $accounts !== false ? $accounts['count'] : 0;
// Player count
$players = mysql_select_single("SELECT COUNT('id') AS `count` FROM `players`;");
$response['data']['players'] = $players !== false ? $players['count'] : 0;
// online player count
if ($config['TFSVersion'] != 'TFS_10') {
    $online = mysql_select_single("SELECT COUNT('id') AS `count` FROM `players` WHERE `status`='1';");
} else {
    $online = mysql_select_single("SELECT COUNT('player_id') AS `count` FROM `players_online`;");
}
$response['data']['online'] = $online !== false ? $online['count'] : 0;
$response['data']['client'] = $config['client'];
$response['data']['port'] = $config['port'];
Beispiel #8
0
		<tr class="yellow">
			<td>Changelogs</td>
			<?php 
    if (user_logged_in()) {
        if (is_admin($user_data)) {
            echo "<td>Delete</td><td>Update</td>";
        }
    }
    ?>
		</tr>
		<?php 
    foreach ($changelogs as $changelog) {
        ?>
		<tr>
			<td><b><?php 
        echo getClock(isset($changelog['time']) ? $changelog['time'] : 0, true, true);
        ?>
</b><br><?php 
        echo $changelog['text'];
        ?>
</td>
			<?php 
        if (user_logged_in()) {
            if (is_admin($user_data)) {
                ?>
					<td>
						<form action="" method="POST">
							<input name="delete" type="hidden" value="<?php 
                echo $changelog['id'];
                ?>
">
Beispiel #9
0
<div id="scroll">
  <a title="Scroll to the top" class="top" href="#"><img src="layout/images/top.png" alt="top" /></a>
</div>
<footer>
<p>&copy; <?php 
echo $config['site_title'];
?>
.
<?php 
$time = microtime();
$time = explode(' ', $time);
$time = $time[1] + $time[0];
$finish = $time;
$total_time = round($finish - $start, 4);
echo 'Server date and clock is: ' . getClock(false, true) . ' Page generated in ' . $total_time . ' seconds. Q: ' . $aacQueries;
?>
  <a href="http://www.css3templates.co.uk">Design: css3templates.co.uk</a>. Engine: <a href="credits.php">Znote AAC</a></p>
</footer>
Beispiel #10
0
function user_character_list($account_id)
{
    //$count = user_character_list_count($account_id);
    $account_id = (int) $account_id;
    if (config('TFSVersion') == 'TFS_10') {
        $characters = mysql_select_multi("SELECT `id`, `name`, `level`, `vocation`, `town_id`, `lastlogin` FROM `players` WHERE `account_id`='{$account_id}' ORDER BY `level` DESC");
        if ($characters !== false) {
            $onlineArray = mysql_select_multi("SELECT `player_id` FROM `players_online`;");
            $onlineIds = array();
            if ($onlineArray !== false) {
                foreach ($onlineArray as $row) {
                    $onlineIds[] = $row['player_id'];
                }
            }
            for ($i = 0; $i < count($characters); $i++) {
                $online = in_array($characters[$i]['id'], $onlineIds);
                if ($online) {
                    $characters[$i]['online'] = 1;
                } else {
                    $characters[$i]['online'] = 0;
                }
                unset($characters[$i]['id']);
            }
        }
    } else {
        $characters = mysql_select_multi("SELECT `name`, `level`, `vocation`, `town_id`, `lastlogin`, `online` FROM `players` WHERE `account_id`='{$account_id}' ORDER BY `level` DESC");
    }
    if ($characters !== false) {
        $count = count($characters);
        for ($i = 0; $i < $count; $i++) {
            $characters[$i]['vocation'] = vocation_id_to_name($characters[$i]['vocation']);
            // Change vocation id to vocation name
            $characters[$i]['town_id'] = town_id_to_name($characters[$i]['town_id']);
            // Change town id to town name
            // Make lastlogin human read-able.
            if ($characters[$i]['lastlogin'] != 0) {
                $characters[$i]['lastlogin'] = getClock($characters[$i]['lastlogin'], true, false);
            } else {
                $characters[$i]['lastlogin'] = '******';
            }
            $characters[$i]['online'] = online_id_to_name($characters[$i]['online']);
            // 0 to "offline", 1 to "ONLINE".
        }
    }
    return $characters;
}
Beispiel #11
0
                            $lastpostdate = $post['updated'];
                            break;
                        }
                    } else {
                        $lastposter = $thread['player_name'];
                        $lastpostdate = $thread['updated'];
                        $newreplies = 0;
                    }
                    $replies = $replies + $newreplies;
                }
                echo "<td>" . $threadscount . "</td>";
                echo "<td>" . $replies . "</td>";
                echo "<td>";
                if ($threadscount > 0) {
                    $url = url("characterprofile.php?name=" . $lastposter);
                    echo "<span style='font-size:75%;'>" . getClock($lastpostdate, true) . "<br>";
                    echo "by <a href='" . $url . "'>" . $lastposter . "</a></span>";
                } else {
                    echo "<span style='font-size:75%;'>no post</span>";
                }
                echo "</td>";
                // Admin columns
                if ($admin) {
                    ?>
						<td style="margin: 0px; padding: 0px; width: 100px;">
							<form action="" method="post">
								<input type="hidden" name="admin_category_id" value="<?php 
                    echo $board['id'];
                    ?>
">
								<input type="submit" name="admin_category_edit" value="Edit" style="margin: 0px; padding: 0px; width: 50px; height: 22px;" class="btn btn-warning">
Beispiel #12
0
		<table>
			<tr class="yellow">
				<td>Attacker:</td>
				<td>Defender:</td>
				<td>status:</td>
				<td>started:</td>
			</tr>
				<?php 
            foreach ($wardata as $wars) {
                if ($wars['guild1'] == $gid || $wars['guild2'] == $gid) {
                    $url = url("guildwar.php?warid=" . $wars['id']);
                    echo '<tr class="special" onclick="javascript:window.location.href=\'' . $url . '\'">';
                    echo '<td>' . $wars['name1'] . '</td>';
                    echo '<td>' . $wars['name2'] . '</td>';
                    echo '<td>' . $config['war_status'][$wars['status']] . '</td>';
                    echo '<td>' . getClock($wars['started'], true) . '</td>';
                    echo '</tr>';
                }
            }
            ?>
		</table>
		<?php 
        }
    }
    ?>
<!-- leave guild with character -->
<?php 
    $bool = false;
    if (user_logged_in() === true) {
        for ($i = 0; $i < $char_count; $i++) {
            foreach ($players as $player) {
Beispiel #13
0
						</table>
						<?php 
                            }
                        }
                        ?>
				<?php 
                        // Display replies... (copy table above and edit each post)
                        $posts = mysql_select_multi("SELECT `id`, `player_name`, `text`, `created`, `updated` FROM `znote_forum_posts` WHERE `thread_id`='" . $threadData['id'] . "' ORDER BY `created`;");
                        if ($posts !== false) {
                            foreach ($posts as $post) {
                                ?>
						<table class="znoteTable ThreadTable table table-striped">
							<tr class="yellow">
								<th>
									<?php 
                                echo getClock($post['created'], true);
                                ?>
									 - Posted by: 
									 <?php 
                                echo "<a href='characterprofile.php?name=" . $post['player_name'] . "'>" . $post['player_name'] . "</a>";
                                ?>
								</th>
							</tr>
							<tr>
								<td>
									<p><?php 
                                echo nl2br(TransformToBBCode($post['text']));
                                ?>
</p>
								</td>
							</tr>
Beispiel #14
0
    ?>
 
	<h1>Latest Tickets</h1>
	<?php 
    $tickets = mysql_select_multi("SELECT id,subject,creation,status FROM znote_tickets ORDER BY creation DESC");
    if ($tickets !== false) {
        ?>
		<table>
			<tr class="yellow">
				<td>ID:</td>
				<td>Subject:</td>
				<td>Creation:</td>
				<td>Status:</td>
			</tr>
				<?php 
        foreach ($tickets as $ticket) {
            echo '<tr class="special">';
            echo '<td>' . $ticket['id'] . '</td>';
            echo '<td><a href="admin_helpdesk.php?view=' . $ticket['id'] . '">' . $ticket['subject'] . '</a></td>';
            echo '<td>' . getClock($ticket['creation'], true) . '</td>';
            echo '<td>' . $ticket['status'] . '</td>';
            echo '</tr>';
        }
        ?>
		</table>
		<?php 
    } else {
        echo 'No helpdesk tickets has been submitted.';
    }
}
include 'layout/overall/footer.php';
Beispiel #15
0
    echo '<font color="red"><b>';
    echo output_errors($errors);
    echo '</b></font>';
}
// end
?>
<h1>Admin Page.</h1>
<p>
<?php 
$basic = user_znote_data('version', 'installed', 'cached');
if ($basic['version'] !== $version) {
    mysql_update("UPDATE `znote` SET `version`='{$version}';");
    $basic = user_znote_data('version', 'installed', 'cached');
}
echo "Running Znote AAC Version: " . $basic['version'] . ".<br>";
echo "Last cached on: " . getClock($basic['cached'], true) . ".<br>";
?>
</p>
<ul>
	<li>
		<b>Permanently Delete/erase character from database:</b> 
		<form type="submit" action="" method="post">
			<input type="text" name="del_name" placeholder="Character name...">
		</form>
	</li>
	<li>
		<b>Ban/violate :3 character and/or his account:</b>
		<form action="" method="post">
			<table style="background-color:lightblue;">
				<!-- row 1 -->
				<tr>
Beispiel #16
0
                            $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>';
                        }
                        ?>
							</ul>
							<?php 
                    } else {
                        echo '<b><font color="green">This player has never died.</font></b>';
                    }
                }
            }
        }
        ?>
				</li>
				
				<!-- END DEATH LIST -->
Beispiel #17
0
        function TransformToBBCode($string)
        {
            $tags = array('[center]{$1}[/center]' => '<center>$1</center>', '[b]{$1}[/b]' => '<b>$1</b>', '[size={$1}]{$2}[/size]' => '<font size="$1">$2</font>', '[img]{$1}[/img]' => '<a href="$1" target="_BLANK"><img src="$1" alt="image" style="width: 100%"></a>', '[link]{$1}[/link]' => '<a href="$1">$1</a>', '[link={$1}]{$2}[/link]' => '<a href="$1" target="_BLANK">$2</a>', '[color={$1}]{$2}[/color]' => '<font color="$1">$2</font>', '[*]{$1}[/*]' => '<li>$1</li>', '[youtube]{$1}[/youtube]' => '<div class="youtube"><div class="aspectratio"><iframe src="//www.youtube.com/embed/$1" frameborder="0" allowfullscreen></iframe></div></div>');
            foreach ($tags as $tag => $value) {
                $code = preg_replace('/placeholder([0-9]+)/', '(.*?)', preg_quote(preg_replace('/\\{\\$([0-9]+)\\}/', 'placeholder$1', $tag), '/'));
                $string = preg_replace('/' . $code . '/i', $value, $string);
            }
            return $string;
        }
        for ($i = $current; $i < $current + $config['news_per_page']; $i++) {
            if (isset($news[$i])) {
                ?>
					<table id="news">
						<tr class="yellow">
							<td class="zheadline"><?php 
                echo getClock($news[$i]['date'], true) . ' by <a href="characterprofile.php?name=' . $news[$i]['name'] . '">' . $news[$i]['name'] . '</a> - <b>' . TransformToBBCode($news[$i]['title']) . '</b>';
                ?>
</td>
						</tr>
						<tr>
							<td>
								<p><?php 
                echo TransformToBBCode(nl2br($news[$i]['text']));
                ?>
</p>
							</td>
						</tr>
					</table>
					<?php 
            }
        }
Beispiel #18
0
</li>
	</ul>
	<?php 
    // AUCTION MARKUP INIT
    if ($house['owner'] == 0) {
        ?>
		<h2>This house is up on auction!</h2>
		<?php 
        if ($house['highest_bidder'] == 0) {
            echo "<b>This house don't have any bidders yet.</b>";
        } else {
            $bidder = mysql_select_single("SELECT `name` FROM `players` WHERE `id`='" . $house['highest_bidder'] . "' LIMIT 1;");
            echo "<b>This house have bidders! If you want this house, now is your chance!</b>";
            echo "<br><b>Active bid:</b> " . $house['last_bid'] . "gp";
            echo "<br><b>Active bid by:</b> <a href='characterprofile.php?name=" . $bidder['name'] . "' target='_BLANK'>" . $bidder['name'] . "</a>";
            echo "<br><b>Bid will end on:</b> " . getClock($house['bid_end'], true);
        }
        if ($house['bid_end'] == 0 || $house['bid_end'] > time()) {
            if (user_logged_in()) {
                // Your characters, indexed by char_id
                $yourChars = mysql_select_multi("SELECT `id`, `name`, `balance` FROM `players` WHERE `account_id`='" . $user_data['id'] . "';");
                if ($yourChars !== false) {
                    $charData = array();
                    foreach ($yourChars as $char) {
                        $charData[$char['id']] = $char;
                    }
                    ?>
					<form action="" method="post">
						<select name="char">
							<?php 
                    foreach ($charData as $id => $char) {
Beispiel #19
0
    foreach ($historyOffers ? $historyOffers : array() as $o) {
        ?>
		<tr>
			<td><?php 
        getItemNameById($o['item_id']);
        ?>
</td>
			<td><img src="<?php 
        echo "http://" . $server . "/" . $o['item_id'] . "." . $imageType;
        ?>
" alt="Item Image"></td>
			<td><?php 
        echo $o['amount'];
        ?>
</td>
			<td><?php 
        echo number_format($o['price'], 0, "", " ");
        ?>
</td>
			<td><?php 
        echo getClock($o['inserted'], true, true);
        ?>
</td>
		</tr>
		<?php 
    }
    ?>
	</table>
	<?php 
}
include 'layout/overall/footer.php';