示例#1
0
<?php

$ide = new IDE();
try {
    $ide->loadInjections("view_news");
} catch (Exception $e) {
    error($e->getMessage());
}
echo "<div class='news'>";
echo "<div class='newsTitle'>" . $news[0]['title'] . "</div>";
echo "<div class='newsBody'>" . $news[0]['body'] . "</div>";
echo "<div class='newsFooter'>Posted on: " . UNIX_TimeStamp($news[0]['time']) . " </div>";
echo "</div>";
echo "<h1>Comments</h1>";
if (!$ide->isLogged()) {
    alert("You need to be logged in to write comments.");
} else {
    if (count($characters) == 0) {
        error("You need to have a character on the server to comment on the news.");
    } else {
        echo error(validation_errors());
        echo form_open(WEBSITE . "/index.php/home/view/" . $id);
        echo "<br /><label>Character</label><select name='character'>";
        foreach ($characters as $character) {
            echo "<option value='" . $character['name'] . "'>" . $character['name'] . "</option>";
        }
        echo "</select><br /><br />";
        echo "<textarea style='width: 99%;' name='body'>" . @$_POST['body'] . "</textarea>";
        echo "<input type='submit' value='Comment'>";
        echo "</form>";
    }
示例#2
0
<?php

require "config.php";
$ide = new IDE();
try {
    $ide->loadInjections("highscores");
} catch (Exception $e) {
    error($e->getMessage());
}
echo form_open('highscores');
if (count($config['worlds']) > 1) {
    echo "<b>World</b>&nbsp;&nbsp;";
    echo "<select name='world'>";
    foreach ($config['worlds'] as $id => $name) {
        echo "<option value='{$id}'>{$name}</option>";
    }
    echo "</select>";
}
echo "&nbsp;&nbsp;<b>Rank of</b>&nbsp;&nbsp;";
echo "<select name='skill'>";
echo "<option class='skill' value='1'>Experience</option>";
echo "<option class='skill' value='2'>Fist fighting</option>";
echo "<option class='skill' value='3'>Club fighting</option>";
echo "<option class='skill' value='4'>Sword fighting</option>";
echo "<option class='skill' value='5'>Axe fighting</option>";
echo "<option class='skill' value='6'>Distance fighting</option>";
echo "<option class='skill' value='7'>Shield fighting</option>";
echo "<option class='skill' value='8'>Fishing fighting</option>";
echo "<option class='skill' value='9'>Magic level</option>";
echo "</select>";
echo " <input type='submit' value='Show'>";
示例#3
0
<?php

require "config.php";
$ide = new IDE();
try {
    $ide->loadInjections("home");
} catch (Exception $e) {
    error($e->getMessage());
}
foreach ($news['news'] as $value) {
    echo "<div class='news'>";
    echo "<div class='newsTitle'>" . $value['title'] . "</div>";
    echo "<div class='newsBody'>" . $value['body'] . "</div>";
    echo "<div class='newsFooter'>Posted on: " . UNIX_TimeStamp($value['time']) . " </div>";
    echo "<div class='viewComments'><a href='" . WEBSITE . "/index.php/home/view/" . $value['id'] . "'>View comments</a></div>";
    echo "</div>";
}
echo "<div class='readArchive'><a href='" . WEBSITE . "/index.php/home/archive'>Go to archive posts</a></div>";
示例#4
0
<?php

$GLOBALS['characters'] = $characters;
$ide = new IDE();
try {
    $ide->loadInjections("account");
} catch (Exception $e) {
    error($e->getMessage());
}
echo "<h2>Hello {$loggedUser}</h2>";
echo "<a href='" . WEBSITE . "/index.php/character/create_character'>Create character</a> | ";
echo "<a href='" . WEBSITE . "/index.php/account/logout'>Logout</a>";
echo "<table width='100%'>";
echo "<tr><td><center><b>Name</b></center></td><td><center><b>Level</b></center></td></tr>";
foreach ($characters as $row) {
    echo "<tr><td><center><a href='" . WEBSITE . "/index.php/character/view/{$row->name}'>{$row->name}</a></center></td><td><center>{$row->level}</center></td></tr>";
}
echo "</table>";
示例#5
0
</td></tr>
	<tr><td width='30%'>Comment</td><td><?php 
    echo $player->getComment();
    ?>
</td></tr>
	<tr><td width='30%'>Account Status</td><td><?php 
    echo $status = $account->isPremium() ? "Premium" : "Free";
    ?>
</td></tr>
	<tr><td width='30%'>Group</td><td><?php 
    echo $config['groups'][$player->getGroup()];
    ?>
</td></tr>
	<tr><td width='30%'>Status</td><td><?php 
    echo $status = $player->isOnline() ? "<font color='green'>Online</font>" : "<font color='red'>Offline</font>";
    ?>
</td></tr>
	<tr><td width='30%'>Created</td><td><?php 
    echo UNIX_TimeStamp($player->getCreated());
    ?>
</td></tr>
</table>
<?php 
    $GLOBALS['player'] = $player;
    $ide = new IDE();
    try {
        $ide->loadInjections("character_view");
    } catch (Exception $e) {
        error($e->getMessage());
    }
}
示例#6
0
<?php

require "system/application/config/create_character.php";
$GLOBALS['players'] = $players;
$ide = new IDE();
try {
    $ide->loadInjections("players_online");
} catch (Exception $e) {
    error($e->getMessage());
}
echo form_open("character/online", array('method' => 'get'));
if (count($config['worlds']) > 1) {
    echo "<b>World </b> &nbsp; <select name='world'>";
    echo "<option value=''>All</optino>";
    foreach ($config['worlds'] as $key => $value) {
        echo "<option value='{$key}'>{$value}</optino>";
    }
    echo "</select>&nbsp; &nbsp;";
}
echo "<b>Sort by </b> &nbsp; <select name='sort'>";
echo "<option value=''>None</option>";
echo "<option value='level'>Level</option>";
echo "<option value='Vocation'>Profession</option>";
echo "<option value='name'>Name</option>";
echo "</select>";
echo "&nbsp; <input type='submit' value='Order'>";
echo "</form>";
echo "</form>";
if (count($players) > 0) {
    echo "<table width='100%'>";
    echo "<tr><td><center><b>Name</b></center></td><td><center><b>Level</b></center></td><td><center><b>Vocation</b></center></td><td><center><b>World</b></center></td></tr>";
示例#7
0
<?php

require_once "system/application/config/create_character.php";
/*Setting global to alllow plugins to access guild list.*/
$GLOBALS['guilds'] = $guilds;
$ide = new IDE();
try {
    $ide->loadInjections("guilds_index");
} catch (Exception $e) {
    error($e->getMessage());
}
if (!$ide->isLogged()) {
    alert("You need to be logged in to create guild.");
} else {
    echo "<a class='createGuildLink' href='guilds/create'>Create Guild</a>";
}
if (count($config['worlds'] > 1)) {
    echo form_open("guilds", array('method' => 'post'));
    echo "<label>World:</label>";
    echo "<select name='world_id'>";
    foreach ($config['worlds'] as $id => $world) {
        echo "<option value='{$id}'>{$world}</option>";
    }
    echo "</select>";
    echo "<input type='submit' value='Sort'>";
    echo "</form>";
}
if (count($guilds) == 0) {
    alert("There is no guilds.");
} else {
    echo "<table width='100%'>";
示例#8
0
<?php

$ide = new IDE();
try {
    $ide->loadInjections('guild_view');
} catch (Exception $e) {
    error($e->getMessage());
}
$logo = file_exists("public/guild_logos/" . $guild->getId() . ".gif") ? "<img src='" . WEBSITE . "/public/guild_logos/" . $guild->getId() . ".gif' width='64' height='64'>" : "<img src='" . WEBSITE . "/public/guild_logos/default.gif'>";
echo "<div style='float: left; padding-right: 10px;'>{$logo}</div>";
echo "<h1>" . $guild->getName() . "</h1>";
echo $guild->getCustomField("motd");
echo "<br /><br />Guild owner: <b><a href='" . WEBSITE . "/index.php/character/view/" . $guild->getOwner() . "'>" . $guild->getOwner() . "</a></b><br /><br />";
$rank_list = $guild->getGuildRanksList();
$rank_list->orderBy('level', POT::ORDER_DESC);
$showed_players = 1;
echo "<table width='100%'>";
foreach ($rank_list as $rank) {
    $players_with_rank = $rank->getPlayersList();
    $players_with_rank->orderBy('name');
    $players_with_rank_number = count($players_with_rank);
    if ($players_with_rank_number > 0) {
        echo "<tr class='rankBar'><td><b>" . $rank->getName() . "</b></td></tr>";
        foreach ($players_with_rank as $player) {
            $guild_nick = $player->getGuildNick();
            if (!empty($guild_nick)) {
                $guild_nick = "({$guild_nick})";
            } else {
                $guild_nick = "";
            }
            echo "<tr class='playerGuildBar'><td><a href='" . WEBSITE . "/index.php/character/view/" . $player->getName() . "'>" . $player->getName() . "</a> {$guild_nick}</td></tr>";