mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-29 18:59:21 +02:00
Merge branch 'develop' into feature/phpstan
This commit is contained in:
commit
dbae1ccd04
@ -1,6 +1,6 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
## [1.0-beta - 28.01.2024]
|
## [1.0-beta - 02.02.2024]
|
||||||
|
|
||||||
Minimum PHP version for this release is 8.1.
|
Minimum PHP version for this release is 8.1.
|
||||||
|
|
||||||
@ -57,7 +57,7 @@ Minimum PHP version for this release is 8.1.
|
|||||||
* Highscores
|
* Highscores
|
||||||
* frags works for TFS 1.x
|
* frags works for TFS 1.x
|
||||||
* cached
|
* cached
|
||||||
* creatures
|
* Monsters
|
||||||
* moved pages to Twig:
|
* moved pages to Twig:
|
||||||
* experience stages
|
* experience stages
|
||||||
* update player_deaths entries on name change
|
* update player_deaths entries on name change
|
||||||
|
@ -8,7 +8,11 @@ Fernando Matos <fernando@pixele.com.br>
|
|||||||
Lee <42119604+Leesneaks@users.noreply.github.com>
|
Lee <42119604+Leesneaks@users.noreply.github.com>
|
||||||
caio <caio.zucoli@gmail.com>
|
caio <caio.zucoli@gmail.com>
|
||||||
slawkens <slawkens@gmail.com>
|
slawkens <slawkens@gmail.com>
|
||||||
tobi132 <52947952+tobi132@users.noreply.github.com>
|
tobi132 <tobi132@gmx.net>
|
||||||
vankk <nwtr.otland@hotmail.com>
|
vankk <nwtr.otland@hotmail.com>
|
||||||
whiteblXK <krzys16001@gmail.com>
|
whiteblXK <krzys16001@gmail.com>
|
||||||
xitobuh <jonas.hockert92@gmail.com>
|
xitobuh <jonas.hockert92@gmail.com>
|
||||||
|
Danilo Pucci <dnlps@hotmail.com>
|
||||||
|
gpedro <gpedro831@gmail.com>
|
||||||
|
Matheus Collier <matheuscollier@gmail.com>
|
||||||
|
SRNT-GG <95472530+SRNT-GG@users.noreply.github.com>
|
||||||
|
@ -27,7 +27,7 @@ if (version_compare(phpversion(), '8.1', '<')) die('PHP version 8.1 or higher is
|
|||||||
|
|
||||||
const MYAAC = true;
|
const MYAAC = true;
|
||||||
const MYAAC_VERSION = '1.0-beta';
|
const MYAAC_VERSION = '1.0-beta';
|
||||||
const DATABASE_VERSION = 39;
|
const DATABASE_VERSION = 40;
|
||||||
const TABLE_PREFIX = 'myaac_';
|
const TABLE_PREFIX = 'myaac_';
|
||||||
define('START_TIME', microtime(true));
|
define('START_TIME', microtime(true));
|
||||||
define('MYAAC_OS', stripos(PHP_OS, 'WIN') === 0 ? 'WINDOWS' : (strtoupper(PHP_OS) === 'DARWIN' ? 'MAC' : 'LINUX'));
|
define('MYAAC_OS', stripos(PHP_OS, 'WIN') === 0 ? 'WINDOWS' : (strtoupper(PHP_OS) === 'DARWIN' ? 'MAC' : 'LINUX'));
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
SET @myaac_database_version = 39;
|
SET @myaac_database_version = 40;
|
||||||
|
|
||||||
CREATE TABLE `myaac_account_actions`
|
CREATE TABLE `myaac_account_actions`
|
||||||
(
|
(
|
||||||
|
@ -38,7 +38,7 @@ if [ $1 = "prepare" ]; then
|
|||||||
cd $dir || exit
|
cd $dir || exit
|
||||||
|
|
||||||
# dependencies
|
# dependencies
|
||||||
composer install --no-dev --prefer-dist --optimize-autoloader
|
composer install --prefer-dist --optimize-autoloader
|
||||||
|
|
||||||
echo "Now you can make changes to $dir. When you are ready, type 'release.sh pack'"
|
echo "Now you can make changes to $dir. When you are ready, type 'release.sh pack'"
|
||||||
exit
|
exit
|
||||||
|
@ -74,4 +74,7 @@ function fieldExist($field, $table)
|
|||||||
global $db;
|
global $db;
|
||||||
return $db->hasColumn($table, $field);
|
return $db->hasColumn($table, $field);
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
|
function getCreatureImgPath($creature): string {
|
||||||
|
return getMonsterImgPath($creature);
|
||||||
|
}
|
||||||
|
@ -105,7 +105,7 @@ function getPlayerLink($name, $generate = true): string
|
|||||||
|
|
||||||
function getMonsterLink($name, $generate = true): string
|
function getMonsterLink($name, $generate = true): string
|
||||||
{
|
{
|
||||||
$url = BASE_URL . (setting('core.friendly_urls') ? '' : 'index.php/') . 'creatures/' . urlencode($name);
|
$url = BASE_URL . (setting('core.friendly_urls') ? '' : 'index.php/') . 'monsters/' . urlencode($name);
|
||||||
|
|
||||||
if(!$generate) return $url;
|
if(!$generate) return $url;
|
||||||
return generateLink($url, $name);
|
return generateLink($url, $name);
|
||||||
@ -1559,18 +1559,19 @@ function right($str, $length) {
|
|||||||
return substr($str, -$length);
|
return substr($str, -$length);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getCreatureImgPath($creature){
|
function getMonsterImgPath($monster): string
|
||||||
$creature_path = setting('core.monsters_images_url');
|
{
|
||||||
$creature_gfx_name = trim(strtolower($creature)) . setting('core.monsters_images_extension');
|
$monster_path = setting('core.monsters_images_url');
|
||||||
if (!file_exists($creature_path . $creature_gfx_name)) {
|
$monster_gfx_name = trim(strtolower($monster)) . setting('core.monsters_images_extension');
|
||||||
$creature_gfx_name = str_replace(" ", "", $creature_gfx_name);
|
if (!file_exists($monster_path . $monster_gfx_name)) {
|
||||||
if (file_exists($creature_path . $creature_gfx_name)) {
|
$monster_gfx_name = str_replace(" ", "", $monster_gfx_name);
|
||||||
return $creature_path . $creature_gfx_name;
|
if (file_exists($monster_path . $monster_gfx_name)) {
|
||||||
|
return $monster_path . $monster_gfx_name;
|
||||||
} else {
|
} else {
|
||||||
return $creature_path . 'nophoto.png';
|
return $monster_path . 'nophoto.png';
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return $creature_path . $creature_gfx_name;
|
return $monster_path . $monster_gfx_name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
12
system/migrations/40.php
Normal file
12
system/migrations/40.php
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
// 2024-02-03
|
||||||
|
// update pages links
|
||||||
|
|
||||||
|
use MyAAC\Models\Menu;
|
||||||
|
|
||||||
|
Menu::where('link', 'lastkills')->update(['link' => 'last-kills']);
|
||||||
|
Menu::where('link', 'serverInfo')->update(['link' => 'server-info']);
|
||||||
|
Menu::where('link', 'experienceStages')->update(['link' => 'exp-stages']);
|
||||||
|
Menu::where('link', 'experienceTable')->update(['link' => 'exp-table']);
|
||||||
|
Menu::where('link', 'creatures')->update(['link' => 'monsters']);
|
@ -106,7 +106,7 @@ else
|
|||||||
</form>
|
</form>
|
||||||
</td>
|
</td>
|
||||||
<td align=right>
|
<td align=right>
|
||||||
<form action="?subtopic=accountmanagement" method="post" >
|
<form action="' . getLink('account/manage') . '" method="post" >
|
||||||
' . csrf(true) . '
|
' . csrf(true) . '
|
||||||
' . $twig->render('buttons.back.html.twig') . '
|
' . $twig->render('buttons.back.html.twig') . '
|
||||||
</form>
|
</form>
|
||||||
@ -164,7 +164,7 @@ if(isset($_POST['emailchangecancel']) && $_POST['emailchangecancel'] == 1) {
|
|||||||
$account_logged->setCustomField("email_new", "");
|
$account_logged->setCustomField("email_new", "");
|
||||||
$account_logged->setCustomField("email_new_time", 0);
|
$account_logged->setCustomField("email_new_time", 0);
|
||||||
|
|
||||||
$custom_buttons = '<div style="text-align:center"><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" >' . $twig->render('buttons.back.html.twig') . '</td></tr></form></table></div>';
|
$custom_buttons = '<div style="text-align:center"><table border="0" cellspacing="0" cellpadding="0" ><form action="' . getLink('account/manage') . '" method="post" ><tr><td style="border:0px;" >' . $twig->render('buttons.back.html.twig') . '</td></tr></form></table></div>';
|
||||||
|
|
||||||
$twig->display('success.html.twig', array(
|
$twig->display('success.html.twig', array(
|
||||||
'title' => 'Email Address Change Cancelled',
|
'title' => 'Email Address Change Cancelled',
|
||||||
|
@ -304,7 +304,7 @@ elseif($action == 'step3')
|
|||||||
$account->setCustomField('salt', $salt);
|
$account->setCustomField('salt', $salt);
|
||||||
|
|
||||||
echo 'Your account name, new password and new e-mail.<BR>
|
echo 'Your account name, new password and new e-mail.<BR>
|
||||||
<FORM ACTION="?subtopic=accountmanagement" onsubmit="return validate_form(this)" METHOD=post>
|
<FORM ACTION="' . getLink('account/manage') . '" onsubmit="return validate_form(this)" METHOD=post>
|
||||||
<INPUT TYPE=hidden NAME="character" VALUE="">
|
<INPUT TYPE=hidden NAME="character" VALUE="">
|
||||||
<TABLE CELLSPACING=1 CELLPADDING=4 BORDER=0 WIDTH=100%>
|
<TABLE CELLSPACING=1 CELLPADDING=4 BORDER=0 WIDTH=100%>
|
||||||
<TR><TD BGCOLOR="'.$config['vdarkborder'].'" class="white"><B>Your account name, new password and new e-mail</B></TD></TR>
|
<TR><TD BGCOLOR="'.$config['vdarkborder'].'" class="white"><B>Your account name, new password and new e-mail</B></TD></TR>
|
||||||
@ -518,7 +518,7 @@ elseif($action == 'setnewpassword')
|
|||||||
</TABLE>
|
</TABLE>
|
||||||
<BR>
|
<BR>
|
||||||
<TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0 WIDTH=100%><TR><TD><div style="text-align:center">
|
<TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0 WIDTH=100%><TR><TD><div style="text-align:center">
|
||||||
<FORM ACTION="?subtopic=accountmanagement" METHOD=post>
|
<FORM ACTION="' . getLink('account/manage') . '" METHOD=post>
|
||||||
<INPUT TYPE=image NAME="Login" ALT="Login" SRC="'.$template_path.'/images/global/buttons/sbutton_login.gif" BORDER=0 WIDTH=120 HEIGHT=18></div>
|
<INPUT TYPE=image NAME="Login" ALT="Login" SRC="'.$template_path.'/images/global/buttons/sbutton_login.gif" BORDER=0 WIDTH=120 HEIGHT=18></div>
|
||||||
</TD></TR></FORM></TABLE></TABLE>';
|
</TD></TR></FORM></TABLE></TABLE>';
|
||||||
}
|
}
|
||||||
|
@ -1,86 +1,3 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
|
||||||
* Creatures
|
|
||||||
*
|
|
||||||
* @package MyAAC
|
|
||||||
* @author Gesior <jerzyskalski@wp.pl>
|
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
|
||||||
* @author Lee
|
|
||||||
* @copyright 2020 MyAAC
|
|
||||||
* @link https://my-aac.org
|
|
||||||
*/
|
|
||||||
|
|
||||||
use MyAAC\Models\Monster;
|
require 'monsters.php';
|
||||||
|
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
|
||||||
$title = 'Creatures';
|
|
||||||
|
|
||||||
if (empty($_REQUEST['name'])) {
|
|
||||||
// display list of monsters
|
|
||||||
$preview = setting('core.monsters_images_preview');
|
|
||||||
$creatures = Monster::where('hide', '!=', 1)->when(!empty($_REQUEST['boss']), function ($query) {
|
|
||||||
$query->where('rewardboss', 1);
|
|
||||||
})->get()->toArray();
|
|
||||||
|
|
||||||
if ($preview) {
|
|
||||||
foreach($creatures as $key => &$creature)
|
|
||||||
{
|
|
||||||
$creature['img_link'] = getCreatureImgPath($creature['name']);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$twig->display('creatures.html.twig', array(
|
|
||||||
'creatures' => $creatures,
|
|
||||||
'preview' => $preview
|
|
||||||
));
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// display monster
|
|
||||||
$creature_name = urldecode(stripslashes(ucwords(strtolower($_REQUEST['name']))));
|
|
||||||
$creature = Monster::where('hide', '!=', 1)->where('name', $creature_name)->first()->toArray();
|
|
||||||
|
|
||||||
if (isset($creature['name'])) {
|
|
||||||
function sort_by_chance($a, $b)
|
|
||||||
{
|
|
||||||
if ($a['chance'] == $b['chance']) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
return ($a['chance'] > $b['chance']) ? -1 : 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
$title = $creature['name'] . " - Creatures";
|
|
||||||
|
|
||||||
$creature['img_link']= getCreatureImgPath($creature_name);
|
|
||||||
|
|
||||||
$voices = json_decode($creature['voices'], true);
|
|
||||||
$summons = json_decode($creature['summons'], true);
|
|
||||||
$elements = json_decode($creature['elements'], true);
|
|
||||||
$immunities = json_decode($creature['immunities'], true);
|
|
||||||
$loot = json_decode($creature['loot'], true);
|
|
||||||
usort($loot, 'sort_by_chance');
|
|
||||||
|
|
||||||
foreach ($loot as &$item) {
|
|
||||||
$item['name'] = getItemNameById($item['id']);
|
|
||||||
$item['rarity_chance'] = round($item['chance'] / 1000, 2);
|
|
||||||
$item['rarity'] = getItemRarity($item['chance']);
|
|
||||||
$item['tooltip'] = ucfirst($item['name']) . '<br/>Chance: ' . $item['rarity'] . (setting('core.monsters_loot_percentage') ? ' ('. $item['rarity_chance'] .'%)' : '') . '<br/>Max count: ' . $item['count'];
|
|
||||||
}
|
|
||||||
|
|
||||||
$creature['loot'] = isset($loot) ? $loot : null;
|
|
||||||
$creature['voices'] = isset($voices) ? $voices : null;
|
|
||||||
$creature['summons'] = isset($summons) ? $summons : null;
|
|
||||||
$creature['elements'] = isset($elements) ? $elements : null;
|
|
||||||
$creature['immunities'] = isset($immunities) ? $immunities : null;
|
|
||||||
|
|
||||||
$twig->display('creature.html.twig', array(
|
|
||||||
'creature' => $creature,
|
|
||||||
));
|
|
||||||
|
|
||||||
} else {
|
|
||||||
echo "Creature with name <b>" . $creature_name . "</b> doesn't exist.";
|
|
||||||
}
|
|
||||||
|
|
||||||
// back button
|
|
||||||
$twig->display('creatures.back_button.html.twig');
|
|
||||||
|
@ -13,90 +13,107 @@ use MyAAC\Forum;
|
|||||||
|
|
||||||
defined('MYAAC') or exit('Direct access not allowed!');
|
defined('MYAAC') or exit('Direct access not allowed!');
|
||||||
|
|
||||||
$canEdit = Forum::isModerator();
|
if(!$canEdit) {
|
||||||
if($canEdit) {
|
return;
|
||||||
$groups = new OTS_Groups_List();
|
}
|
||||||
|
|
||||||
if(!empty($action)) {
|
$groupsList = new OTS_Groups_List();
|
||||||
if($action == 'delete_board' || $action == 'edit_board' || $action == 'hide_board' || $action == 'moveup_board' || $action == 'movedown_board')
|
$groups = [
|
||||||
$id = $_REQUEST['id'];
|
['id' => 0, 'name' => 'Guest'],
|
||||||
|
];
|
||||||
|
|
||||||
if(isset($_REQUEST['access'])) {
|
foreach ($groupsList as $group) {
|
||||||
$access = $_REQUEST['access'];
|
$groups[] = [
|
||||||
}
|
'id' => $group->getId(),
|
||||||
|
'name' => $group->getName()
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
if(isset($_REQUEST['guild'])) {
|
if(!empty($action)) {
|
||||||
$guild = $_REQUEST['guild'];
|
if($action == 'delete_board' || $action == 'edit_board' || $action == 'hide_board' || $action == 'moveup_board' || $action == 'movedown_board')
|
||||||
}
|
$id = $_REQUEST['id'];
|
||||||
|
|
||||||
if(isset($_REQUEST['name'])) {
|
if(isset($_REQUEST['access'])) {
|
||||||
$name = $_REQUEST['name'];
|
$access = $_REQUEST['access'];
|
||||||
}
|
|
||||||
|
|
||||||
if(isset($_REQUEST['description'])) {
|
|
||||||
$description = stripslashes($_REQUEST['description']);
|
|
||||||
}
|
|
||||||
|
|
||||||
$errors = [];
|
|
||||||
|
|
||||||
if($action == 'add_board') {
|
|
||||||
if(Forum::add_board($name, $description, $access, $guild, $errors)) {
|
|
||||||
$action = $name = $description = '';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if($action == 'delete_board') {
|
|
||||||
Forum::delete_board($id, $errors);
|
|
||||||
$action = '';
|
|
||||||
}
|
|
||||||
else if($action == 'edit_board')
|
|
||||||
{
|
|
||||||
if(isset($id) && !isset($name)) {
|
|
||||||
$board = Forum::get_board($id);
|
|
||||||
$name = $board['name'];
|
|
||||||
$access = $board['access'];
|
|
||||||
$guild = $board['guild'];
|
|
||||||
$description = $board['description'];
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
Forum::update_board($id, $name, $access, $guild, $description);
|
|
||||||
$action = $name = $description = '';
|
|
||||||
$access = $guild = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if($action == 'hide_board') {
|
|
||||||
Forum::toggleHide_board($id, $errors);
|
|
||||||
$action = '';
|
|
||||||
}
|
|
||||||
else if($action == 'moveup_board') {
|
|
||||||
Forum::move_board($id, -1, $errors);
|
|
||||||
$action = '';
|
|
||||||
}
|
|
||||||
else if($action == 'movedown_board') {
|
|
||||||
Forum::move_board($id, 1, $errors);
|
|
||||||
$action = '';
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!empty($errors)) {
|
|
||||||
$twig->display('error_box.html.twig', array('errors' => $errors));
|
|
||||||
$action = '';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(empty($action) || $action == 'edit_board') {
|
if(isset($_REQUEST['guild'])) {
|
||||||
$guilds = $db->query('SELECT `id`, `name` FROM `guilds`')->fetchAll();
|
$guild = $_REQUEST['guild'];
|
||||||
$twig->display('forum.add_board.html.twig', array(
|
}
|
||||||
'link' => getLink('forum', ($action == 'edit_board' ? 'edit_board' : 'add_board')),
|
|
||||||
'action' => $action,
|
|
||||||
'id' => isset($id) ? $id : null,
|
|
||||||
'name' => isset($name) ? $name : null,
|
|
||||||
'description' => isset($description) ? $description : null,
|
|
||||||
'access' => isset($access) ? $access : 0,
|
|
||||||
'guild' => isset($guild) ? $guild : null,
|
|
||||||
'groups' => $groups,
|
|
||||||
'guilds' => $guilds
|
|
||||||
));
|
|
||||||
|
|
||||||
if($action == 'edit_board')
|
if(isset($_REQUEST['name'])) {
|
||||||
$action = '';
|
$name = $_REQUEST['name'];
|
||||||
|
}
|
||||||
|
|
||||||
|
if(isset($_REQUEST['description'])) {
|
||||||
|
$description = stripslashes($_REQUEST['description']);
|
||||||
|
}
|
||||||
|
|
||||||
|
$errors = [];
|
||||||
|
|
||||||
|
if($action == 'add_board') {
|
||||||
|
if(Forum::add_board($name, $description, $access, $guild, $errors)) {
|
||||||
|
$action = $name = $description = '';
|
||||||
|
header('Location: ' . getLink('forum'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if($action == 'delete_board') {
|
||||||
|
Forum::delete_board($id, $errors);
|
||||||
|
header('Location: ' . getLink('forum'));
|
||||||
|
$action = '';
|
||||||
|
}
|
||||||
|
else if($action == 'edit_board')
|
||||||
|
{
|
||||||
|
if(isset($id) && !isset($name)) {
|
||||||
|
$board = Forum::get_board($id);
|
||||||
|
$name = $board['name'];
|
||||||
|
$access = $board['access'];
|
||||||
|
$guild = $board['guild'];
|
||||||
|
$description = $board['description'];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Forum::update_board($id, $name, $access, $guild, $description);
|
||||||
|
header('Location: ' . getLink('forum'));
|
||||||
|
$action = $name = $description = '';
|
||||||
|
$access = $guild = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if($action == 'hide_board') {
|
||||||
|
Forum::toggleHide_board($id, $errors);
|
||||||
|
header('Location: ' . getLink('forum'));
|
||||||
|
$action = '';
|
||||||
|
}
|
||||||
|
else if($action == 'moveup_board') {
|
||||||
|
Forum::move_board($id, -1, $errors);
|
||||||
|
header('Location: ' . getLink('forum'));
|
||||||
|
$action = '';
|
||||||
|
}
|
||||||
|
else if($action == 'movedown_board') {
|
||||||
|
Forum::move_board($id, 1, $errors);
|
||||||
|
header('Location: ' . getLink('forum'));
|
||||||
|
$action = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!empty($errors)) {
|
||||||
|
$twig->display('error_box.html.twig', array('errors' => $errors));
|
||||||
|
$action = '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(empty($action) || $action == 'edit_board') {
|
||||||
|
$guilds = $db->query('SELECT `id`, `name` FROM `guilds`')->fetchAll();
|
||||||
|
$twig->display('forum.add_board.html.twig', array(
|
||||||
|
'link' => getLink('forum', ($action == 'edit_board' ? 'edit_board' : 'add_board')),
|
||||||
|
'action' => $action,
|
||||||
|
'id' => $id ?? null,
|
||||||
|
'name' => $name ?? null,
|
||||||
|
'description' => $description ?? null,
|
||||||
|
'access' => $access ?? 0,
|
||||||
|
'guild' => $guild ?? null,
|
||||||
|
'groups' => $groups,
|
||||||
|
'guilds' => $guilds
|
||||||
|
));
|
||||||
|
|
||||||
|
if($action == 'edit_board')
|
||||||
|
$action = '';
|
||||||
|
}
|
||||||
|
@ -8,6 +8,9 @@
|
|||||||
* @copyright 2021 MyAAC
|
* @copyright 2021 MyAAC
|
||||||
* @link https://my-aac.org
|
* @link https://my-aac.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
use MyAAC\Forum;
|
||||||
|
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
$title = 'Forum';
|
$title = 'Forum';
|
||||||
|
|
||||||
@ -24,10 +27,7 @@ if(strtolower($forumSetting) != 'site') {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!$logged) {
|
$canEdit = Forum::isModerator();
|
||||||
echo 'You are not logged in. <a href="?subtopic=accountmanagement&redirect=' . BASE_URL . urlencode('?subtopic=forum') . '">Log in</a> to post on the forum.<br /><br />';
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
$sections = array();
|
$sections = array();
|
||||||
foreach(getForumBoards() as $section) {
|
foreach(getForumBoards() as $section) {
|
||||||
|
@ -18,6 +18,11 @@ if ($ret === false) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!$logged) {
|
||||||
|
echo 'You are not logged in. <a href="' . getLink('account/manage') . '?redirect=' . BASE_URL . urlencode(getLink('forum')) . '">Log in</a> to post on the forum.<br /><br />';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if(Forum::canPost($account_logged))
|
if(Forum::canPost($account_logged))
|
||||||
{
|
{
|
||||||
$post_id = isset($_REQUEST['id']) ? (int) $_REQUEST['id'] : false;
|
$post_id = isset($_REQUEST['id']) ? (int) $_REQUEST['id'] : false;
|
||||||
|
@ -18,6 +18,11 @@ if ($ret === false) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!$logged) {
|
||||||
|
echo 'You are not logged in. <a href="' . getLink('account/manage') . '?redirect=' . BASE_URL . urlencode(getLink('forum')) . '">Log in</a> to post on the forum.<br /><br />';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if(!Forum::isModerator()) {
|
if(!Forum::isModerator()) {
|
||||||
echo 'You are not logged in or you are not moderator.';
|
echo 'You are not logged in or you are not moderator.';
|
||||||
}
|
}
|
||||||
|
@ -21,10 +21,10 @@ if ($ret === false) {
|
|||||||
if(!$logged) {
|
if(!$logged) {
|
||||||
$extra_url = '';
|
$extra_url = '';
|
||||||
if(isset($_GET['thread_id'])) {
|
if(isset($_GET['thread_id'])) {
|
||||||
$extra_url = '&action=new_post&thread_id=' . $_GET['thread_id'];
|
$extra_url = '?action=new_post&thread_id=' . $_GET['thread_id'];
|
||||||
}
|
}
|
||||||
|
|
||||||
header('Location: ' . BASE_URL . '?subtopic=accountmanagement&redirect=' . BASE_URL . urlencode('?subtopic=forum' . $extra_url));
|
echo 'You are not logged in. <a href="' . getLink('account/manage') . '?redirect=' . BASE_URL . urlencode(getLink('forum') . $extra_url) . '">Log in</a> to post on the forum.<br /><br />';
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -18,6 +18,16 @@ if ($ret === false) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!$logged) {
|
||||||
|
$extra_url = '';
|
||||||
|
if(isset($_GET['section_id'])) {
|
||||||
|
$extra_url = '?action=new_thread§ion_id=' . $_GET['section_id'];
|
||||||
|
}
|
||||||
|
|
||||||
|
echo 'You are not logged in. <a href="' . getLink('account/manage') . '?redirect=' . BASE_URL . urlencode(getLink('forum') . $extra_url) . '">Log in</a> to post on the forum.<br /><br />';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if(Forum::canPost($account_logged)) {
|
if(Forum::canPost($account_logged)) {
|
||||||
$players_from_account = $db->query('SELECT `players`.`name`, `players`.`id` FROM `players` WHERE `players`.`account_id` = '.(int) $account_logged->getId())->fetchAll();
|
$players_from_account = $db->query('SELECT `players`.`name`, `players`.`id` FROM `players` WHERE `players`.`account_id` = '.(int) $account_logged->getId())->fetchAll();
|
||||||
$section_id = $_REQUEST['section_id'] ?? null;
|
$section_id = $_REQUEST['section_id'] ?? null;
|
||||||
|
@ -18,6 +18,11 @@ if ($ret === false) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!$logged) {
|
||||||
|
echo 'You are not logged in. <a href="' . getLink('account/manage') . '?redirect=' . BASE_URL . urlencode(getLink('forum')) . '">Log in</a> to post on the forum.<br /><br />';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if(Forum::isModerator()) {
|
if(Forum::isModerator()) {
|
||||||
$id = (int) $_REQUEST['id'];
|
$id = (int) $_REQUEST['id'];
|
||||||
$post = $db->query("SELECT `id`, `first_post`, `section` FROM `" . FORUM_TABLE_PREFIX . "forum` WHERE `id` = ".$id." LIMIT 1")->fetch();
|
$post = $db->query("SELECT `id`, `first_post`, `section` FROM `" . FORUM_TABLE_PREFIX . "forum` WHERE `id` = ".$id." LIMIT 1")->fetch();
|
||||||
|
@ -46,7 +46,7 @@ echo '<a href="' . getLink('forum') . '">Boards</a> >> <b>'.$sections[$section_i
|
|||||||
|
|
||||||
if(!$sections[$section_id]['closed'] || Forum::isModerator()) {
|
if(!$sections[$section_id]['closed'] || Forum::isModerator()) {
|
||||||
echo '<br /><br />
|
echo '<br /><br />
|
||||||
<a href="?subtopic=forum&action=new_thread§ion_id='.$section_id.'"><img src="images/forum/topic.gif" border="0" /></a>';
|
<a href="' . getLink('forum') . '?action=new_thread§ion_id='.$section_id.'"><img src="images/forum/topic.gif" border="0" /></a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
echo '<br /><br />Page: '.$links_to_pages.'<br />';
|
echo '<br /><br />Page: '.$links_to_pages.'<br />';
|
||||||
@ -67,8 +67,8 @@ if(isset($last_threads[0])) {
|
|||||||
foreach($last_threads as $thread) {
|
foreach($last_threads as $thread) {
|
||||||
echo '<tr bgcolor="' . getStyle($number_of_rows++) . '"><td>';
|
echo '<tr bgcolor="' . getStyle($number_of_rows++) . '"><td>';
|
||||||
if(Forum::isModerator()) {
|
if(Forum::isModerator()) {
|
||||||
echo '<a href="?subtopic=forum&action=move_thread&id='.$thread['id'].'"\')"><span style="color:darkgreen">[MOVE]</span></a>';
|
echo '<a href="' . getLink('forum') . '?action=move_thread&id='.$thread['id'].'"\')"><span style="color:darkgreen">[MOVE]</span></a>';
|
||||||
echo '<a href="?subtopic=forum&action=remove_post&id='.$thread['id'].'" onclick="return confirm(\'Are you sure you want remove thread > '.$thread['post_topic'].' <?\')"><span style="color: red">[REMOVE]</span></a> ';
|
echo '<a href="' . getLink('forum') . '?action=remove_post&id='.$thread['id'].'" onclick="return confirm(\'Are you sure you want remove thread > '.$thread['post_topic'].' <?\')"><span style="color: red">[REMOVE]</span></a> ';
|
||||||
}
|
}
|
||||||
|
|
||||||
$player->load($thread['player_id']);
|
$player->load($thread['player_id']);
|
||||||
@ -95,7 +95,7 @@ if(isset($last_threads[0])) {
|
|||||||
|
|
||||||
echo '</table>';
|
echo '</table>';
|
||||||
if(!$sections[$section_id]['closed'] || Forum::isModerator()) {
|
if(!$sections[$section_id]['closed'] || Forum::isModerator()) {
|
||||||
echo '<br /><a href="?subtopic=forum&action=new_thread§ion_id=' . $section_id . '"><img src="images/forum/topic.gif" border="0" /></a>';
|
echo '<br /><a href="' . getLink('forum') . '?action=new_thread§ion_id=' . $section_id . '"><img src="images/forum/topic.gif" border="0" /></a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -49,7 +49,7 @@ if(empty($errors)) {
|
|||||||
$new_rank->setLevel(1);
|
$new_rank->setLevel(1);
|
||||||
$new_rank->setName($rank_name);
|
$new_rank->setName($rank_name);
|
||||||
$new_rank->save();
|
$new_rank->save();
|
||||||
header("Location: ?subtopic=guilds&guild=".$guild->getName()."&action=manager");
|
header("Location: " . getLink('guilds') . "?guild=".$guild->getName()."&action=manager");
|
||||||
echo 'New rank added. Redirecting...';
|
echo 'New rank added. Redirecting...';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -61,7 +61,7 @@ if(empty($errors)) {
|
|||||||
|
|
||||||
$twig->display('guilds.back_button.html.twig', array(
|
$twig->display('guilds.back_button.html.twig', array(
|
||||||
'new_line' => true,
|
'new_line' => true,
|
||||||
'action' => '?subtopic=guilds&guild='.$guild_name.'&action=show'
|
'action' => getLink('guilds') . '?guild='.$guild_name.'&action=show'
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -69,6 +69,6 @@ if(!empty($errors)) {
|
|||||||
|
|
||||||
$twig->display('guilds.back_button.html.twig', array(
|
$twig->display('guilds.back_button.html.twig', array(
|
||||||
'new_line' => true,
|
'new_line' => true,
|
||||||
'action' => '?subtopic=guilds'
|
'action' => getLink('guilds')
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
@ -121,7 +121,7 @@ if(!empty($errors)) {
|
|||||||
|
|
||||||
$twig->display('guilds.back_button.html.twig', array(
|
$twig->display('guilds.back_button.html.twig', array(
|
||||||
'new_line' => true,
|
'new_line' => true,
|
||||||
'action' => '?subtopic=guilds'
|
'action' => getLink('guilds')
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
@ -72,6 +72,6 @@ if(!empty($errors)) {
|
|||||||
|
|
||||||
$twig->display('guilds.back_button.html.twig', array(
|
$twig->display('guilds.back_button.html.twig', array(
|
||||||
'new_line' => true,
|
'new_line' => true,
|
||||||
'action' => '?subtopic=guilds'
|
'action' => getLink('guilds')
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
@ -45,7 +45,7 @@ if(empty($errors)) {
|
|||||||
$twig->display('success.html.twig', array(
|
$twig->display('success.html.twig', array(
|
||||||
'title' => 'Delete Guild',
|
'title' => 'Delete Guild',
|
||||||
'description' => 'Are you sure you want delete guild <b>' . $guild_name . '</b>?<br/>
|
'description' => 'Are you sure you want delete guild <b>' . $guild_name . '</b>?<br/>
|
||||||
<form action="?subtopic=guilds&guild=' . $guild->getName() . '&action=delete_by_admin" METHOD="post"><input type="hidden" name="todo" value="save"><input type="submit" value="Yes, delete"></form>',
|
<form action="' . getLink('guilds') . '?guild=' . $guild->getName() . '&action=delete_by_admin" METHOD="post"><input type="hidden" name="todo" value="save"><input type="submit" value="Yes, delete"></form>',
|
||||||
'custom_buttons' => $twig->render('guilds.back_button.html.twig')
|
'custom_buttons' => $twig->render('guilds.back_button.html.twig')
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
@ -63,6 +63,6 @@ if(!empty($errors)) {
|
|||||||
|
|
||||||
$twig->display('guilds.back_button.html.twig', array(
|
$twig->display('guilds.back_button.html.twig', array(
|
||||||
'new_line' => true,
|
'new_line' => true,
|
||||||
'action' => '?subtopic=guilds'
|
'action' => getLink('guilds')
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
@ -96,7 +96,7 @@ if(!empty($errors))
|
|||||||
{
|
{
|
||||||
$twig->display('error_box.html.twig', array('errors' => $errors));
|
$twig->display('error_box.html.twig', array('errors' => $errors));
|
||||||
|
|
||||||
$twig->display('guilds.back_button.html.twig', array('action' => '?subtopic=guilds&action=show&guild=' . $guild_name));
|
$twig->display('guilds.back_button.html.twig', array('action' => getLink('guilds') . '?action=show&guild=' . $guild_name));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -106,7 +106,7 @@ else
|
|||||||
$twig->display('success.html.twig', array(
|
$twig->display('success.html.twig', array(
|
||||||
'title' => 'Deleted player invitation',
|
'title' => 'Deleted player invitation',
|
||||||
'description' => 'Player with name <b>' . $player->getName() . '</b> has been deleted from invites list.',
|
'description' => 'Player with name <b>' . $player->getName() . '</b> has been deleted from invites list.',
|
||||||
'custom_buttons' => $twig->render('guilds.back_button.html.twig', array('action' => '?subtopic=guilds&action=show&guild=' . $guild_name))
|
'custom_buttons' => $twig->render('guilds.back_button.html.twig', array('action' => getLink('guilds') . '?action=show&guild=' . $guild_name))
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -104,7 +104,7 @@ if(empty($guild_errors)) {
|
|||||||
|
|
||||||
$twig->display('guilds.back_button.html.twig', array(
|
$twig->display('guilds.back_button.html.twig', array(
|
||||||
'new_line' => true,
|
'new_line' => true,
|
||||||
'action' => '?subtopic=guilds&guild='.$guild->getName().'&action=manager'
|
'action' => getLink('guilds') . '?guild='.$guild->getName().'&action=manager'
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -122,6 +122,6 @@ if(!empty($guild_errors)) {
|
|||||||
|
|
||||||
$twig->display('guilds.back_button.html.twig', array(
|
$twig->display('guilds.back_button.html.twig', array(
|
||||||
'new_line' => true,
|
'new_line' => true,
|
||||||
'action' => '?subtopic=guilds'
|
'action' => getLink('guilds')
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
@ -109,7 +109,7 @@ if(empty($guild_errors) && empty($guild_errors2)) {
|
|||||||
if(empty($guild_errors) && !empty($guild_errors2)) {
|
if(empty($guild_errors) && !empty($guild_errors2)) {
|
||||||
$twig->display('error_box.html.twig', array('errors' => $guild_errors2));
|
$twig->display('error_box.html.twig', array('errors' => $guild_errors2));
|
||||||
|
|
||||||
echo '<br/><div style="text-align:center"><form action="?subtopic=guilds&guild='.$guild->getName().'&action=pass_leadership" method="post">' . $twig->render('buttons.back.html.twig') . '</form></div>';
|
echo '<br/><div style="text-align:center"><form action="' . getLink('guilds') . '?guild='.$guild->getName().'&action=pass_leadership" method="post">' . $twig->render('buttons.back.html.twig') . '</form></div>';
|
||||||
}
|
}
|
||||||
if(!empty($guild_errors)) {
|
if(!empty($guild_errors)) {
|
||||||
if(!empty($guild_errors2)) {
|
if(!empty($guild_errors2)) {
|
||||||
@ -117,5 +117,5 @@ if(!empty($guild_errors)) {
|
|||||||
}
|
}
|
||||||
$twig->display('error_box.html.twig', array('errors' => $guild_errors));
|
$twig->display('error_box.html.twig', array('errors' => $guild_errors));
|
||||||
|
|
||||||
echo '<br/><div style="text-align:center"><form action="?subtopic=guilds" method="post">' . $twig->render('buttons.back.html.twig') . '</form></div>';
|
echo '<br/><div style="text-align:center"><form action="' . getLink('guilds') . '" method="post">' . $twig->render('buttons.back.html.twig') . '</form></div>';
|
||||||
}
|
}
|
||||||
|
@ -63,7 +63,7 @@ if(empty($errors)) {
|
|||||||
}
|
}
|
||||||
//show errors or redirect
|
//show errors or redirect
|
||||||
if(empty($errors)) {
|
if(empty($errors)) {
|
||||||
header("Location: ?subtopic=guilds&action=manager&guild=".$guild->getName());
|
header("Location: " . getLink('guilds') . "?action=manager&guild=".$guild->getName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
86
system/pages/monsters.php
Normal file
86
system/pages/monsters.php
Normal file
@ -0,0 +1,86 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Monsters
|
||||||
|
*
|
||||||
|
* @package MyAAC
|
||||||
|
* @author Gesior <jerzyskalski@wp.pl>
|
||||||
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
|
* @author Lee
|
||||||
|
* @copyright 2020 MyAAC
|
||||||
|
* @link https://my-aac.org
|
||||||
|
*/
|
||||||
|
|
||||||
|
use MyAAC\Models\Monster;
|
||||||
|
|
||||||
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
$title = 'Monsters';
|
||||||
|
|
||||||
|
if (empty($_REQUEST['name'])) {
|
||||||
|
// display list of monsters
|
||||||
|
$preview = setting('core.monsters_images_preview');
|
||||||
|
$monsters = Monster::where('hide', '!=', 1)->when(!empty($_REQUEST['boss']), function ($query) {
|
||||||
|
$query->where('rewardboss', 1);
|
||||||
|
})->get()->toArray();
|
||||||
|
|
||||||
|
if ($preview) {
|
||||||
|
foreach($monsters as $key => &$monster)
|
||||||
|
{
|
||||||
|
$monster['img_link'] = getMonsterImgPath($monster['name']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$twig->display('monsters.html.twig', array(
|
||||||
|
'monsters' => $monsters,
|
||||||
|
'preview' => $preview
|
||||||
|
));
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// display monster
|
||||||
|
$monster_name = urldecode(stripslashes(ucwords(strtolower($_REQUEST['name']))));
|
||||||
|
$monster = Monster::where('hide', '!=', 1)->where('name', $monster_name)->first()->toArray();
|
||||||
|
|
||||||
|
if (isset($monster['name'])) {
|
||||||
|
function sort_by_chance($a, $b)
|
||||||
|
{
|
||||||
|
if ($a['chance'] == $b['chance']) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return ($a['chance'] > $b['chance']) ? -1 : 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
$title = $monster['name'] . " - Monsters";
|
||||||
|
|
||||||
|
$monster['img_link']= getMonsterImgPath($monster_name);
|
||||||
|
|
||||||
|
$voices = json_decode($monster['voices'], true);
|
||||||
|
$summons = json_decode($monster['summons'], true);
|
||||||
|
$elements = json_decode($monster['elements'], true);
|
||||||
|
$immunities = json_decode($monster['immunities'], true);
|
||||||
|
$loot = json_decode($monster['loot'], true);
|
||||||
|
usort($loot, 'sort_by_chance');
|
||||||
|
|
||||||
|
foreach ($loot as &$item) {
|
||||||
|
$item['name'] = getItemNameById($item['id']);
|
||||||
|
$item['rarity_chance'] = round($item['chance'] / 1000, 2);
|
||||||
|
$item['rarity'] = getItemRarity($item['chance']);
|
||||||
|
$item['tooltip'] = ucfirst($item['name']) . '<br/>Chance: ' . $item['rarity'] . (setting('core.monsters_loot_percentage') ? ' ('. $item['rarity_chance'] .'%)' : '') . '<br/>Max count: ' . $item['count'];
|
||||||
|
}
|
||||||
|
|
||||||
|
$monster['loot'] = $loot ?? null;
|
||||||
|
$monster['voices'] = $voices ?? null;
|
||||||
|
$monster['summons'] = $summons ?? null;
|
||||||
|
$monster['elements'] = $elements ?? null;
|
||||||
|
$monster['immunities'] = $immunities ?? null;
|
||||||
|
|
||||||
|
$twig->display('monster.html.twig', array(
|
||||||
|
'monster' => $monster,
|
||||||
|
));
|
||||||
|
|
||||||
|
} else {
|
||||||
|
echo "Monster with name <b>" . $monster_name . "</b> doesn't exist.";
|
||||||
|
}
|
||||||
|
|
||||||
|
// back button
|
||||||
|
$twig->display('monsters.back_button.html.twig');
|
@ -26,77 +26,77 @@ function getColorByPercent($percent)
|
|||||||
}
|
}
|
||||||
$number_of_rows = 0;
|
$number_of_rows = 0;
|
||||||
$showed = false;
|
$showed = false;
|
||||||
$link = "polls"; // your link to polls in index.php
|
$link = getLink('polls'); // your link to polls in index.php
|
||||||
$dark = $config['darkborder'];
|
$dark = $config['darkborder'];
|
||||||
$light = $config['lightborder'];
|
$light = $config['lightborder'];
|
||||||
$time = time();
|
$time = time();
|
||||||
$POLLS = $db->query('SELECT * FROM '.$db->tableName('z_polls').'');
|
$POLLS = $db->query('SELECT * FROM '.$db->tableName('z_polls').'');
|
||||||
$level = 20; // need level to vote
|
$level = 20; // need level to vote
|
||||||
|
|
||||||
if(empty($_REQUEST['id']) and (!isset($_REQUEST['control']) || $_REQUEST['control'] != "true")) // list of polls
|
if(empty($_REQUEST['id']) and (!isset($_REQUEST['control']) || $_REQUEST['control'] != "true")) // list of polls
|
||||||
{
|
{
|
||||||
$active = $db->query('SELECT * FROM `z_polls` where `end` > '.$time.''); // active polls
|
$active = $db->query('SELECT * FROM `z_polls` where `end` > '.$time.''); // active polls
|
||||||
$closed = $db->query('SELECT * FROM `z_polls` where `end` < '.$time.' order by `end` desc'); // closed polls
|
$closed = $db->query('SELECT * FROM `z_polls` where `end` < '.$time.' order by `end` desc'); // closed polls
|
||||||
/* Active Polls */
|
/* Active Polls */
|
||||||
echo '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['vdarkborder'].'><TD COLSPAN=2 class=white><B>Active Polls</B></TD></TR>';
|
echo '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['vdarkborder'].'><TD COLSPAN=2 class=white><B>Active Polls</B></TD></TR>';
|
||||||
echo '<TR BGCOLOR="' . getStyle($number_of_rows++) . '"><td width=75%><b>Topic</b></td><td><b>End</b></td></tr>';
|
echo '<TR BGCOLOR="' . getStyle($number_of_rows++) . '"><td width=75%><b>Topic</b></td><td><b>End</b></td></tr>';
|
||||||
$bgcolor = getStyle($number_of_rows++);
|
$bgcolor = getStyle($number_of_rows++);
|
||||||
$empty_active = false;
|
$empty_active = false;
|
||||||
foreach($active as $poll)
|
foreach($active as $poll)
|
||||||
{
|
{
|
||||||
echo '
|
echo '
|
||||||
<tr BGCOLOR="'.$bgcolor.'">
|
<tr BGCOLOR="'.$bgcolor.'">
|
||||||
<td>
|
<td>
|
||||||
<a href="';
|
<a href="';
|
||||||
if($logged)
|
if($logged)
|
||||||
echo '?subtopic='.$link.'&id='.$poll['id'];
|
echo $link.'?id='.$poll['id'];
|
||||||
else
|
else
|
||||||
echo '?subtopic=accountmanagement&redirect=' . BASE_URL . urlencode('?subtopic='.$link.'&id='.$poll['id']);
|
echo getLink('account/manage') . '?redirect=' . BASE_URL . urlencode($link.'?id='.$poll['id']);
|
||||||
|
|
||||||
echo '">'.$poll['question'] . '</a>
|
echo '">'.$poll['question'] . '</a>
|
||||||
</td>
|
</td>
|
||||||
<td>'.date("M j Y", $poll['end']).'</td>
|
<td>'.date("M j Y", $poll['end']).'</td>
|
||||||
</tr>';
|
</tr>';
|
||||||
$empty_active = true;
|
$empty_active = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!$empty_active)
|
if(!$empty_active)
|
||||||
{
|
{
|
||||||
echo '<tr BGCOLOR="'.$bgcolor.'"><td colspan=2><div style="text-align:center"><i>There are no active polls.</i></div></td></tr>';
|
echo '<tr BGCOLOR="'.$bgcolor.'"><td colspan=2><div style="text-align:center"><i>There are no active polls.</i></div></td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "</table><br><br>";
|
echo "</table><br><br>";
|
||||||
/* Closed Polls */
|
/* Closed Polls */
|
||||||
echo '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['vdarkborder'].'><TD COLSPAN=2 class=white><B>Closed Polls</B></TD></TR>';
|
echo '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['vdarkborder'].'><TD COLSPAN=2 class=white><B>Closed Polls</B></TD></TR>';
|
||||||
echo '<TR BGCOLOR="' . getStyle($number_of_rows++) . '"><td width=75%><b>Topic</b></td><td><b>End</b></td></tr>';
|
echo '<TR BGCOLOR="' . getStyle($number_of_rows++) . '"><td width=75%><b>Topic</b></td><td><b>End</b></td></tr>';
|
||||||
$bgcolor = getStyle($number_of_rows++);
|
$bgcolor = getStyle($number_of_rows++);
|
||||||
$empty_closed = false;
|
$empty_closed = false;
|
||||||
foreach($closed as $poll)
|
foreach($closed as $poll)
|
||||||
{
|
{
|
||||||
echo '
|
echo '
|
||||||
<tr BGCOLOR="'.$bgcolor.'">
|
<tr BGCOLOR="'.$bgcolor.'">
|
||||||
<td>
|
<td>
|
||||||
<a href="';
|
<a href="';
|
||||||
if($logged)
|
if($logged)
|
||||||
echo '?subtopic='.$link.'&id='.$poll['id'];
|
echo $link.'?id='.$poll['id'];
|
||||||
else
|
else
|
||||||
echo '?subtopic=accountmanagement&redirect=' . BASE_URL . urlencode('?subtopic='.$link.'&id='.$poll['id']);
|
echo getLink('account/manage') . '?redirect=' . BASE_URL . urlencode($link.'?id='.$poll['id']);
|
||||||
|
|
||||||
echo '">'.$poll['question'] . '</a>
|
echo '">'.$poll['question'] . '</a>
|
||||||
</td>
|
</td>
|
||||||
<td>'.date("M j Y", $poll['end']).'</td>
|
<td>'.date("M j Y", $poll['end']).'</td>
|
||||||
</tr>';
|
</tr>';
|
||||||
$empty_closed = true;
|
$empty_closed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!$empty_closed)
|
if(!$empty_closed)
|
||||||
{
|
{
|
||||||
echo '<tr BGCOLOR="'.$bgcolor.'"><td colspan=2><div style="text-align:center"><i>There are no closed polls.</i></div></td></tr>';
|
echo '<tr BGCOLOR="'.$bgcolor.'"><td colspan=2><div style="text-align:center"><i>There are no closed polls.</i></div></td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "</table>";
|
echo "</table>";
|
||||||
$showed=true;
|
$showed=true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!$logged)
|
if(!$logged)
|
||||||
{
|
{
|
||||||
@ -104,43 +104,43 @@ function getColorByPercent($percent)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Checking Account */
|
/* Checking Account */
|
||||||
$allow = false;
|
$allow = false;
|
||||||
$account_players = $account_logged->getPlayers();
|
$account_players = $account_logged->getPlayers();
|
||||||
foreach($account_players as $player)
|
foreach($account_players as $player)
|
||||||
{
|
{
|
||||||
$player = $player->getLevel();
|
$player = $player->getLevel();
|
||||||
if($player >= $level)
|
if($player >= $level)
|
||||||
$allow=true;
|
$allow=true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!empty($_REQUEST['id']) and (!isset($_REQUEST['control']) || $_REQUEST['control'] != "true"))
|
if(!empty($_REQUEST['id']) and (!isset($_REQUEST['control']) || $_REQUEST['control'] != "true"))
|
||||||
{
|
{
|
||||||
foreach($POLLS as $POLL)
|
foreach($POLLS as $POLL)
|
||||||
{
|
{
|
||||||
if($_REQUEST['id'] == $POLL['id'])
|
if($_REQUEST['id'] == $POLL['id'])
|
||||||
{
|
{
|
||||||
$ANSWERS = $db->query('SELECT * FROM '.$db->tableName('z_polls_answers').' where `poll_id` = '.addslashes(htmlspecialchars(trim($_REQUEST['id']))).' order by `answer_id`');
|
$ANSWERS = $db->query('SELECT * FROM '.$db->tableName('z_polls_answers').' where `poll_id` = '.addslashes(htmlspecialchars(trim($_REQUEST['id']))).' order by `answer_id`');
|
||||||
$votes_all = $POLL['votes_all'];
|
$votes_all = $POLL['votes_all'];
|
||||||
|
|
||||||
if($votes_all == 0)
|
if($votes_all == 0)
|
||||||
{
|
{
|
||||||
$i=1;
|
$i=1;
|
||||||
foreach($ANSWERS as $answer)
|
foreach($ANSWERS as $answer)
|
||||||
{
|
{
|
||||||
$percent[$i] = 0;
|
$percent[$i] = 0;
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$i=1;
|
$i=1;
|
||||||
foreach($ANSWERS as $answer)
|
foreach($ANSWERS as $answer)
|
||||||
{
|
{
|
||||||
$percent[$i] = round(((100*$answer['votes'])/$votes_all),2);
|
$percent[$i] = round(((100*$answer['votes'])/$votes_all),2);
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<style type="text/css" media="screen">
|
<style type="text/css" media="screen">
|
||||||
div.progress-container {
|
div.progress-container {
|
||||||
@ -166,51 +166,51 @@ function getColorByPercent($percent)
|
|||||||
</div>';
|
</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if($POLL['end'] > $time) // active poll
|
if($POLL['end'] > $time) // active poll
|
||||||
{
|
{
|
||||||
if(isset($_REQUEST['vote']) && $_REQUEST['vote'] == true and $allow == true)
|
if(isset($_REQUEST['vote']) && $_REQUEST['vote'] == true and $allow == true)
|
||||||
{
|
{
|
||||||
if($account_logged->getCustomField('vote') < $_REQUEST['id'] and !empty($_POST['answer']))
|
if($account_logged->getCustomField('vote') < $_REQUEST['id'] and !empty($_POST['answer']))
|
||||||
{
|
{
|
||||||
if(isset($_POST['continue']))
|
if(isset($_POST['continue']))
|
||||||
{
|
{
|
||||||
$vote = addslashes(htmlspecialchars(trim($_REQUEST['id'])));
|
$vote = addslashes(htmlspecialchars(trim($_REQUEST['id'])));
|
||||||
$account_logged->setCustomField("vote", $vote);
|
$account_logged->setCustomField("vote", $vote);
|
||||||
$UPDATE_poll = $db->query('UPDATE `z_polls` SET `votes_all` = `votes_all` + 1 where `id` = '.addslashes(htmlspecialchars(trim($_REQUEST['id']))).'');
|
$UPDATE_poll = $db->query('UPDATE `z_polls` SET `votes_all` = `votes_all` + 1 where `id` = '.addslashes(htmlspecialchars(trim($_REQUEST['id']))).'');
|
||||||
$UPDATE_answer = $db->query('UPDATE `z_polls_answers` SET `votes` = `votes` + 1 where `answer_id` = '.addslashes(htmlspecialchars($_POST['answer'])).' and`poll_id` = '.addslashes(htmlspecialchars(trim($_REQUEST['id']))).'');
|
$UPDATE_answer = $db->query('UPDATE `z_polls_answers` SET `votes` = `votes` + 1 where `answer_id` = '.addslashes(htmlspecialchars($_POST['answer'])).' and`poll_id` = '.addslashes(htmlspecialchars(trim($_REQUEST['id']))).'');
|
||||||
header('Location: ?subtopic='.$link.'&id='.$_REQUEST['id'].'');
|
header('Location: ' . $link.'?id='.$_REQUEST['id'].'');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
header('Location: ?subtopic='.$link.'&id='.$_REQUEST['id'].'');
|
header('Location: ' . $link.'?id='.$_REQUEST['id'].'');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if($account_logged->getCustomField('vote') < $_REQUEST['id'] and $allow == true)
|
if($account_logged->getCustomField('vote') < $_REQUEST['id'] and $allow == true)
|
||||||
{
|
{
|
||||||
echo '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['vdarkborder'].'><TD COLSPAN=2 class=white><B>Vote</B></TD></TR>';
|
echo '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['vdarkborder'].'><TD COLSPAN=2 class=white><B>Vote</B></TD></TR>';
|
||||||
echo '<TR BGCOLOR="'.$dark.'"><td COLSPAN=2><b>'.$POLL['question'].'</b><br/>' . $POLL['description'] . '</td></tr>
|
echo '<TR BGCOLOR="'.$dark.'"><td COLSPAN=2><b>'.$POLL['question'].'</b><br/>' . $POLL['description'] . '</td></tr>
|
||||||
<form action="?subtopic='.$link.'&id='.$_REQUEST['id'].'&vote=true" method="POST"> ';
|
<form action="' . $link . '?id='.$_REQUEST['id'].'&vote=true" method="POST"> ';
|
||||||
$ANSWERS_input = $db->query('SELECT * FROM '.$db->tableName('z_polls_answers').' where `poll_id` = '.$_REQUEST['id'].' order by `answer_id`');
|
$ANSWERS_input = $db->query('SELECT * FROM '.$db->tableName('z_polls_answers').' where `poll_id` = '.$_REQUEST['id'].' order by `answer_id`');
|
||||||
$i=1;
|
$i=1;
|
||||||
foreach($ANSWERS_input as $answer)
|
foreach($ANSWERS_input as $answer)
|
||||||
{
|
{
|
||||||
if(is_int($i / 2)) {
|
if(is_int($i / 2)) {
|
||||||
$bgcolor = $dark;
|
$bgcolor = $dark;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$bgcolor = $light;
|
$bgcolor = $light;
|
||||||
}
|
}
|
||||||
echo '<tr BGCOLOR="'.$bgcolor.'"><td><input type=radio name=answer value="'.$i.'">'.$answer['answer'].'</td></tr>';
|
echo '<tr BGCOLOR="'.$bgcolor.'"><td><input type=radio name=answer value="'.$i.'">'.$answer['answer'].'</td></tr>';
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
echo '</table><input type="submit" name="continue" value="Submit" class="input2" /></form><br><br>';
|
echo '</table><input type="submit" name="continue" value="Submit" class="input2" /></form><br><br>';
|
||||||
}
|
}
|
||||||
elseif($account_logged->getCustomField('vote') >= $_REQUEST['id'])
|
elseif($account_logged->getCustomField('vote') >= $_REQUEST['id'])
|
||||||
{
|
{
|
||||||
$result[] = '<br><b>You have already voted.</b><br>';
|
$result[] = '<br><b>You have already voted.</b><br>';
|
||||||
|
|
||||||
echo '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['vdarkborder'].'><TD COLSPAN=3 class=white><B>Results</B></TD></TR>';
|
echo '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['vdarkborder'].'><TD COLSPAN=3 class=white><B>Results</B></TD></TR>';
|
||||||
echo '<TR BGCOLOR="'.$dark.'"><td COLSPAN=3><b>'.$POLL['question'].'</b><br/>' . $POLL['description'] . '</td></tr>';
|
echo '<TR BGCOLOR="'.$dark.'"><td COLSPAN=3><b>'.$POLL['question'].'</b><br/>' . $POLL['description'] . '</td></tr>';
|
||||||
@ -239,31 +239,31 @@ function getColorByPercent($percent)
|
|||||||
}
|
}
|
||||||
|
|
||||||
$result[] = '<br>All players with a character of at least level ' . $level . ' may vote.<br>';
|
$result[] = '<br>All players with a character of at least level ' . $level . ' may vote.<br>';
|
||||||
foreach($result as $error)
|
foreach($result as $error)
|
||||||
{
|
{
|
||||||
echo $error;
|
echo $error;
|
||||||
}
|
}
|
||||||
|
|
||||||
echo '<br>The poll started at '.date("M j Y", $POLL['start']).'<br>';
|
echo '<br>The poll started at '.date("M j Y", $POLL['start']).'<br>';
|
||||||
echo 'The poll will end at '.date("M j Y", $POLL['end']).'<br>';
|
echo 'The poll will end at '.date("M j Y", $POLL['end']).'<br>';
|
||||||
echo '<br>Total votes <b>'.$POLL['votes_all'].'</b><br>';
|
echo '<br>Total votes <b>'.$POLL['votes_all'].'</b><br>';
|
||||||
|
|
||||||
}
|
}
|
||||||
else // closed poll
|
else // closed poll
|
||||||
{
|
{
|
||||||
echo '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['vdarkborder'].'><TD COLSPAN=3 class=white><B>Results</B></TD></TR>';
|
echo '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['vdarkborder'].'><TD COLSPAN=3 class=white><B>Results</B></TD></TR>';
|
||||||
echo '<TR BGCOLOR="'.$dark.'"><td COLSPAN=3><b>'.$POLL['question'].'</b></td></tr>';
|
echo '<TR BGCOLOR="'.$dark.'"><td COLSPAN=3><b>'.$POLL['question'].'</b></td></tr>';
|
||||||
$ANSWERS_show = $db->query('SELECT * FROM '.$db->tableName('z_polls_answers').' where `poll_id` = '.$_REQUEST['id'].' order by `answer_id`');
|
$ANSWERS_show = $db->query('SELECT * FROM '.$db->tableName('z_polls_answers').' where `poll_id` = '.$_REQUEST['id'].' order by `answer_id`');
|
||||||
$i=1;
|
$i=1;
|
||||||
foreach($ANSWERS_show as $answer)
|
foreach($ANSWERS_show as $answer)
|
||||||
{
|
{
|
||||||
if(is_int($i / 2)) {
|
if(is_int($i / 2)) {
|
||||||
$bgcolor = $dark;
|
$bgcolor = $dark;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$bgcolor = $light;
|
$bgcolor = $light;
|
||||||
}
|
}
|
||||||
|
|
||||||
echo '<TR BGCOLOR="'.$bgcolor.'">
|
echo '<TR BGCOLOR="'.$bgcolor.'">
|
||||||
<td width=60%>'.$answer['answer'].'</td>
|
<td width=60%>'.$answer['answer'].'</td>
|
||||||
@ -272,64 +272,64 @@ function getColorByPercent($percent)
|
|||||||
</td>
|
</td>
|
||||||
<td>' . $answer['votes'] . '(<span style="color:' . getColorByPercent($percent[$i]) . '"><b>' . $percent[$i] . '%</b></span>)</td>
|
<td>' . $answer['votes'] . '(<span style="color:' . getColorByPercent($percent[$i]) . '"><b>' . $percent[$i] . '%</b></span>)</td>
|
||||||
</tr>';
|
</tr>';
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
echo '</table><br><br>';
|
echo '</table><br><br>';
|
||||||
|
|
||||||
echo '<br>The poll started at '.date("M j Y", $POLL['start']).'<br>';
|
echo '<br>The poll started at '.date("M j Y", $POLL['start']).'<br>';
|
||||||
echo 'The poll ended at '.date("M j Y", $POLL['end']).'<br>';
|
echo 'The poll ended at '.date("M j Y", $POLL['end']).'<br>';
|
||||||
echo '<br>Total votes <b>'.$POLL['votes_all'].'</b><br>';
|
echo '<br>Total votes <b>'.$POLL['votes_all'].'</b><br>';
|
||||||
|
|
||||||
}
|
}
|
||||||
$showed=true;
|
$showed=true;
|
||||||
echo '<div class=\'hr1\'></div><a href="?subtopic='.$link.'"><span style="font-size: 13px"><b>Go to list of polls</b></span></a>';
|
echo '<div class=\'hr1\'></div><a href="'.$link.'"><span style="font-size: 13px"><b>Go to list of polls</b></span></a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(admin() && (!isset($_REQUEST['control']) || $_REQUEST['control'] != "true"))
|
if(admin() && (!isset($_REQUEST['control']) || $_REQUEST['control'] != "true"))
|
||||||
{
|
{
|
||||||
echo '<br><a href="?subtopic='.$link.'&control=true"><b>Panel Control</b></a><br><br>';
|
echo '<br><a href="'.$link.'?control=true"><b>Panel Control</b></a><br><br>';
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Control Panel - Only Add Poll Function */
|
/* Control Panel - Only Add Poll Function */
|
||||||
|
|
||||||
if(admin() && isset($_REQUEST['control']) && $_REQUEST['control'] == "true")
|
if(admin() && isset($_REQUEST['control']) && $_REQUEST['control'] == "true")
|
||||||
{
|
{
|
||||||
$show = false;
|
$show = false;
|
||||||
if(isset($_POST['submit']))
|
if(isset($_POST['submit']))
|
||||||
{
|
{
|
||||||
setSession('answers', $_POST['answers']);
|
setSession('answers', $_POST['answers']);
|
||||||
echo '<form method="post" action=""><b><span style="font-size: 16px">Adding Poll</span></b><br><br>
|
echo '<form method="post" action=""><b><span style="font-size: 16px">Adding Poll</span></b><br><br>
|
||||||
<input type=text name=question value="" /> Question<br>
|
<input type=text name=question value="" /> Question<br>
|
||||||
<input type=text name=description value="" /> Description<br>
|
<input type=text name=description value="" /> Description<br>
|
||||||
<input type=text name=end value="" /> Time to end, in days<br>';
|
<input type=text name=end value="" /> Time to end, in days<br>';
|
||||||
|
|
||||||
for( $x = 1; $x <= getSession('answers'); $x++ )
|
for( $x = 1; $x <= getSession('answers'); $x++ )
|
||||||
{
|
{
|
||||||
echo '<input type=text name='.$x.' value="" /> Answer no. '.$x.'<br>';
|
echo '<input type=text name='.$x.' value="" /> Answer no. '.$x.'<br>';
|
||||||
}
|
}
|
||||||
echo '<input type="submit" name="finish" value="Submit" class="input2"/></form><br><br>';
|
echo '<input type="submit" name="finish" value="Submit" class="input2"/></form><br><br>';
|
||||||
$show=true;
|
$show=true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($_POST['finish']))
|
if(isset($_POST['finish']))
|
||||||
{
|
{
|
||||||
$id = $db->query('SELECT MAX(id) FROM `z_polls`')->fetch();
|
$id = $db->query('SELECT MAX(id) FROM `z_polls`')->fetch();
|
||||||
$id_next = $id[0] + 1;
|
$id_next = $id[0] + 1;
|
||||||
|
|
||||||
for( $x = 1; $x <= getSession('answers'); $x++ )
|
for( $x = 1; $x <= getSession('answers'); $x++ )
|
||||||
{
|
{
|
||||||
$db->insert('z_polls_answers', array(
|
$db->insert('z_polls_answers', array(
|
||||||
'poll_id' => $id_next,
|
'poll_id' => $id_next,
|
||||||
'answer_id' => $x,
|
'answer_id' => $x,
|
||||||
'answer' => $_POST[$x],
|
'answer' => $_POST[$x],
|
||||||
'votes' => 0
|
'votes' => 0
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
$end = $time+24*60*60*$_POST['end'];
|
$end = $time+24*60*60*$_POST['end'];
|
||||||
$db->insert('z_polls', array(
|
$db->insert('z_polls', array(
|
||||||
'id' => $id_next,
|
'id' => $id_next,
|
||||||
'question' => $_POST['question'],
|
'question' => $_POST['question'],
|
||||||
'description' => $_POST['description'],
|
'description' => $_POST['description'],
|
||||||
'end' => $end,
|
'end' => $end,
|
||||||
@ -337,35 +337,35 @@ function getColorByPercent($percent)
|
|||||||
'start' => $time,
|
'start' => $time,
|
||||||
'votes_all' => 0
|
'votes_all' => 0
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
$POLLS_check = $db->query('SELECT MAX(end) FROM '.$db->tableName('z_polls').'');
|
$POLLS_check = $db->query('SELECT MAX(end) FROM '.$db->tableName('z_polls').'');
|
||||||
foreach($POLLS_check as $checked)
|
foreach($POLLS_check as $checked)
|
||||||
{
|
{
|
||||||
if($checked[0] > $time)
|
if($checked[0] > $time)
|
||||||
$check=true;
|
$check=true;
|
||||||
else
|
else
|
||||||
$check=false;
|
$check=false;
|
||||||
}
|
}
|
||||||
if(!$show)
|
if(!$show)
|
||||||
{
|
{
|
||||||
if(!$check)
|
if(!$check)
|
||||||
{
|
{
|
||||||
echo '<form method="post" action=""><b><span style="font-size: 16px">Adding Poll</span></b><br><br>
|
echo '<form method="post" action=""><b><span style="font-size: 16px">Adding Poll</span></b><br><br>
|
||||||
<input type=text name=answers value="" /> Number of Answers<br>
|
<input type=text name=answers value="" /> Number of Answers<br>
|
||||||
<input type="submit" name="submit" value="Submit" class="input2"/></form><br><br>';
|
<input type="submit" name="submit" value="Submit" class="input2"/></form><br><br>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
echo '<b><span style="font-size: 16px"><br>Cannot be two and more active polls.<br><br></span></b>';
|
echo '<b><span style="font-size: 16px"><br>Cannot be two and more active polls.<br><br></span></b>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$showed=true;
|
$showed=true;
|
||||||
echo '<br><div class=\'hr1\'></div><a href="?subtopic='.$link.'"><span style="font-size: 13px"><b>Go to list of polls</b></span></a>';
|
echo '<br><div class=\'hr1\'></div><a href="'.$link.'"><span style="font-size: 13px"><b>Go to list of polls</b></span></a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!$showed)
|
if(!$showed)
|
||||||
{
|
{
|
||||||
echo 'This poll doesn\'t exist.<br>';
|
echo 'This poll doesn\'t exist.<br>';
|
||||||
echo '<div class=\'hr1\'></div><a href="?subtopic='.$link.'"><span style="font-size: 13px"><b>Go to list of polls</b></span></a>';
|
echo '<div class=\'hr1\'></div><a href="'.$link.'"><span style="font-size: 13px"><b>Go to list of polls</b></span></a>';
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,7 @@ return [
|
|||||||
['GET', 'bans/{page:int}[/]', 'bans.php'],
|
['GET', 'bans/{page:int}[/]', 'bans.php'],
|
||||||
[['GET', 'POST'], 'characters[/{name:string}]', 'characters.php'],
|
[['GET', 'POST'], 'characters[/{name:string}]', 'characters.php'],
|
||||||
['GET', 'changelog[/{page:int}]', 'changelog.php'],
|
['GET', 'changelog[/{page:int}]', 'changelog.php'],
|
||||||
[['GET', 'POST'], 'creatures[/{name:string}]', 'creatures.php'],
|
[['GET', 'POST'], 'monsters[/{name:string}]', 'monsters.php'],
|
||||||
|
|
||||||
[['GET', 'POST'], 'faq[/{action:string}]', 'faq.php'],
|
[['GET', 'POST'], 'faq[/{action:string}]', 'faq.php'],
|
||||||
|
|
||||||
|
@ -46,16 +46,16 @@ class DataLoader
|
|||||||
|
|
||||||
self::$startTime = microtime(true);
|
self::$startTime = microtime(true);
|
||||||
|
|
||||||
if(Creatures::loadFromXML()) {
|
if(Monsters::loadFromXML()) {
|
||||||
success(self::$locale['step_database_loaded_monsters'] . self::getLoadedTime());
|
success(self::$locale['step_database_loaded_monsters'] . self::getLoadedTime());
|
||||||
|
|
||||||
if(Creatures::getMonstersList()->hasErrors()) {
|
if(Monsters::getMonstersList()->hasErrors()) {
|
||||||
self::$locale['step_database_error_monsters'] = str_replace('$LOG$', 'system/logs/error.log', self::$locale['step_database_error_monsters']);
|
self::$locale['step_database_error_monsters'] = str_replace('$LOG$', 'system/logs/error.log', self::$locale['step_database_error_monsters']);
|
||||||
warning(self::$locale['step_database_error_monsters']);
|
warning(self::$locale['step_database_error_monsters']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
error(Creatures::getLastError());
|
error(Monsters::getLastError());
|
||||||
}
|
}
|
||||||
|
|
||||||
self::$startTime = microtime(true);
|
self::$startTime = microtime(true);
|
||||||
|
@ -13,7 +13,7 @@ namespace MyAAC;
|
|||||||
|
|
||||||
use MyAAC\Models\Monster;
|
use MyAAC\Models\Monster;
|
||||||
|
|
||||||
class Creatures {
|
class Monsters {
|
||||||
/**
|
/**
|
||||||
* @var \OTS_MonstersList
|
* @var \OTS_MonstersList
|
||||||
*/
|
*/
|
@ -114,7 +114,7 @@ $template['link_account_logout'] = getLink('account/logout');
|
|||||||
|
|
||||||
$template['link_news_archive'] = getLink('news/archive');
|
$template['link_news_archive'] = getLink('news/archive');
|
||||||
|
|
||||||
$links = array('news', 'changelog', 'rules', 'downloads', 'characters', 'online', 'highscores', 'powergamers', 'lastkills' => 'last-kills', 'houses', 'guilds', 'wars', 'polls', 'bans', 'team', 'creatures', 'spells', 'commands', 'exp-stages', 'freeHouses', 'serverInfo', 'exp-table', 'faq', 'points', 'gifts', 'bugtracker', 'gallery');
|
$links = array('news', 'changelog', 'rules', 'downloads', 'characters', 'online', 'highscores', 'powergamers', 'lastkills' => 'last-kills', 'houses', 'guilds', 'wars', 'polls', 'bans', 'team', 'creatures' => 'monsters', 'monsters', 'spells', 'commands', 'exp-stages', 'freeHouses', 'serverInfo', 'exp-table', 'faq', 'points', 'gifts', 'bugtracker', 'gallery');
|
||||||
foreach($links as $key => $value) {
|
foreach($links as $key => $value) {
|
||||||
$key = is_string($key) ? $key : $value;
|
$key = is_string($key) ? $key : $value;
|
||||||
$template['link_' . $key] = getLink($value);
|
$template['link_' . $key] = getLink($value);
|
||||||
|
@ -29,7 +29,7 @@ Please enter your account {{ account|lower }} and your password.<br/><a href="{{
|
|||||||
<td class="LabelV" >
|
<td class="LabelV" >
|
||||||
<span{% if error is not null %} class="red"{% endif %}>{{ account_login_by }}:</span>
|
<span{% if error is not null %} class="red"{% endif %}>{{ account_login_by }}:</span>
|
||||||
</td>
|
</td>
|
||||||
<td style="width:100%;" ><input type="text" name="account_login" size="30" maxlength="30" autofocus/></td>
|
<td style="width:100%;" ><input type="text" name="account_login" size="30" maxlength="{{ setting('core.account_login_by_email') ? '255' : '30' }}" autofocus/></td>
|
||||||
</tr>
|
</tr>
|
||||||
{{ hook('HOOK_ACCOUNT_LOGIN_AFTER_ACCOUNT') }}
|
{{ hook('HOOK_ACCOUNT_LOGIN_AFTER_ACCOUNT') }}
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text"><i class="fa fa-lock"></i></span>
|
<span class="input-group-text"><i class="fa fa-lock"></i></span>
|
||||||
</div>
|
</div>
|
||||||
<input type="text" class="form-control" id="account-name-input" name="account_login" placeholder="{{ account_login_by }}" required autofocus>
|
<input type="text" class="form-control" id="account-name-input" name="account_login" maxlength="{{ setting('core.account_login_by_email') ? '255' : '30' }}" placeholder="{{ account_login_by }}" required autofocus>
|
||||||
</div>
|
</div>
|
||||||
{{ hook('HOOK_ADMIN_LOGIN_AFTER_ACCOUNT') }}
|
{{ hook('HOOK_ADMIN_LOGIN_AFTER_ACCOUNT') }}
|
||||||
<div class="input-group mb-3">
|
<div class="input-group mb-3">
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
<td>
|
<td>
|
||||||
<select name="access">
|
<select name="access">
|
||||||
{% for id, group in groups %}
|
{% for id, group in groups %}
|
||||||
<option value="{{ group.getId() }}"{% if access == group.getId() %} selected{% endif %}>{{ group.getName() }}</option>
|
<option value="{{ group.id }}"{% if access == group.id %} selected{% endif %}>{{ group.name }}</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
|
@ -37,22 +37,22 @@
|
|||||||
</td>
|
</td>
|
||||||
{% if canEdit %}
|
{% if canEdit %}
|
||||||
<td>
|
<td>
|
||||||
<a href="?subtopic=forum&action=edit_board&id={{ board.id }}" title="Edit">
|
<a href="{{ getLink('forum') }}?action=edit_board&id={{ board.id }}" title="Edit">
|
||||||
<img src="images/edit.png"/>Edit
|
<img src="images/edit.png"/>Edit
|
||||||
</a>
|
</a>
|
||||||
<a id="delete" href="?subtopic=forum&action=delete_board&id={{ board.id }}" onclick="return confirm('Are you sure?');" title="Delete">
|
<a id="delete" href="{{ getLink('forum') }}?action=delete_board&id={{ board.id }}" onclick="return confirm('Are you sure?');" title="Delete">
|
||||||
<img src="images/del.png"/>Delete
|
<img src="images/del.png"/>Delete
|
||||||
</a>
|
</a>
|
||||||
<a href="?subtopic=forum&action=hide_board&id={{ board.id }}" title="{% if board.hide != 1 %}Hide{% else %}Show{% endif %}">
|
<a href="{{ getLink('forum') }}?action=hide_board&id={{ board.id }}" title="{% if board.hide != 1 %}Hide{% else %}Show{% endif %}">
|
||||||
<img src="images/{% if board.hide != 1 %}success{% else %}error{% endif %}.png"/>{% if board.hide != 1 %}Hide{% else %}Show{% endif %}
|
<img src="images/{% if board.hide != 1 %}success{% else %}error{% endif %}.png"/>{% if board.hide != 1 %}Hide{% else %}Show{% endif %}
|
||||||
</a>
|
</a>
|
||||||
{% if i != 1 %}
|
{% if i != 1 %}
|
||||||
<a href="?subtopic=forum&action=moveup_board&id={{ board.id }}" title="Move up">
|
<a href="{{ getLink('forum') }}?action=moveup_board&id={{ board.id }}" title="Move up">
|
||||||
<img src="images/icons/arrow_up.gif"/>Move up
|
<img src="images/icons/arrow_up.gif"/>Move up
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if i != last %}
|
{% if i != last %}
|
||||||
<a href="?subtopic=forum&action=movedown_board&id={{ board.id }}" title="Move down">
|
<a href="{{ getLink('forum') }}?action=movedown_board&id={{ board.id }}" title="Move down">
|
||||||
<img src="images/icons/arrow_down.gif"/>Move down
|
<img src="images/icons/arrow_down.gif"/>Move down
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
</select>
|
</select>
|
||||||
<input type="submit" value="Move Thread">
|
<input type="submit" value="Move Thread">
|
||||||
</form>
|
</form>
|
||||||
<form action="{{ section_link }}" method="post">
|
<form action="{{ section_link }}">
|
||||||
{{ csrf() }}
|
{{ csrf() }}
|
||||||
<input type="submit" value="Cancel">
|
<input type="submit" value="Cancel">
|
||||||
</form>
|
</form>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<a href="{{ getLink('forum') }}">Boards</a> >> <a href="{{ getLink('forum/board/' ~ section.id) }}">{{ section.name }}</a> >> <b>{{ thread_starter.post_topic }}</b>
|
<a href="{{ getLink('forum') }}">Boards</a> >> <a href="{{ getLink('forum/board/' ~ section.id) }}">{{ section.name }}</a> >> <b>{{ thread_starter.post_topic }}</b>
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
<a href="?subtopic=forum&action=new_post&thread_id={{ thread_id }}"><img src="images/forum/post.gif" border="0" /></a><br/>
|
<a href="{{ getLink('forum') }}?action=new_post&thread_id={{ thread_id }}"><img src="images/forum/post.gif" border="0" /></a><br/>
|
||||||
<br/>
|
<br/>
|
||||||
Page: {{ links_to_pages|raw }}<br/>
|
Page: {{ links_to_pages|raw }}<br/>
|
||||||
<table width="100%">
|
<table width="100%">
|
||||||
@ -53,18 +53,18 @@ Page: {{ links_to_pages|raw }}<br/>
|
|||||||
<td>
|
<td>
|
||||||
{% if is_moderator %}
|
{% if is_moderator %}
|
||||||
{% if post.first_post != post.id %}
|
{% if post.first_post != post.id %}
|
||||||
<a href="?subtopic=forum&action=remove_post&id={{ post.id }}" title="Remove Post" onclick="return confirm('Are you sure you want remove post of {{ post.player.getName() }}?')"><img src="images/del.png"/></a>
|
<a href="{{ getLink('forum') }}?action=remove_post&id={{ post.id }}" title="Remove Post" onclick="return confirm('Are you sure you want remove post of {{ post.player.getName() }}?')"><img src="images/del.png"/></a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<a href="?subtopic=forum&action=move_thread&id={{ post.id }}" title="Move Thread"><img src="images/icons/arrow_right.gif"/></a>
|
<a href="{{ getLink('forum') }}?action=move_thread&id={{ post.id }}" title="Move Thread"><img src="images/icons/arrow_right.gif"/></a>
|
||||||
<a href="?subtopic=forum&action=remove_post&id={{ post.id }}" title="Remove Thread" target="_blank" onclick="return confirm('Are you sure you want remove thread > {{ post.post_topic}} <?')"><img src="images/del.png"/></a>
|
<a href="{{ getLink('forum') }}?action=remove_post&id={{ post.id }}" title="Remove Thread" target="_blank" onclick="return confirm('Are you sure you want remove thread > {{ post.post_topic}} <?')"><img src="images/del.png"/></a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if logged and (post.player.getAccount().getId() == account_logged.getId() or is_moderator) %}
|
{% if logged and (post.player.getAccount().getId() == account_logged.getId() or is_moderator) %}
|
||||||
<a href="?subtopic=forum&action=edit_post&id={{ post.id }}" title="Edit Post" target="_blank">
|
<a href="{{ getLink('forum') }}?action=edit_post&id={{ post.id }}" title="Edit Post" target="_blank">
|
||||||
<img src="images/edit.png"/></a>
|
<img src="images/edit.png"/></a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if logged %}
|
{% if logged %}
|
||||||
<a href="?subtopic=forum&action=new_post&thread_id={{ thread_id }}"e={{ post.id }}" title="Quote Post"><img src="images/icons/comment_add.png"/></a>
|
<a href="{{ getLink('forum') }}?action=new_post&thread_id={{ thread_id }}"e={{ post.id }}" title="Quote Post"><img src="images/icons/comment_add.png"/></a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -72,4 +72,4 @@ Page: {{ links_to_pages|raw }}<br/>
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
<br/>
|
<br/>
|
||||||
<a href="?subtopic=forum&action=new_post&thread_id={{ thread_id }}"><img src="images/forum/post.gif" border="0" /></a>
|
<a href="{{ getLink('forum') }}?action=new_post&thread_id={{ thread_id }}"><img src="images/forum/post.gif" border="0" /></a>
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr bgcolor="{{ config.darkborder }}">
|
<tr bgcolor="{{ config.darkborder }}">
|
||||||
<td>
|
<td>
|
||||||
<form action="?subtopic=guilds&action=accept_invite&guild={{ guild_name }}&todo=save" method="post">
|
<form action="{{ getLink('guilds') }}?action=accept_invite&guild={{ guild_name }}&todo=save" method="post">
|
||||||
{{ csrf() }}
|
{{ csrf() }}
|
||||||
{% set i = 0 %}
|
{% set i = 0 %}
|
||||||
{% for player in invited_players %}
|
{% for player in invited_players %}
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
<div style="text-align:center"><h2>Change guild description</h2></div>
|
<div style="text-align:center"><h2>Change guild description</h2></div>
|
||||||
Here you can change description of your guild.<br/>
|
Here you can change description of your guild.<br/>
|
||||||
<form enctype="multipart/form-data" action="?subtopic=guilds&guild={{ guild.getName() }}&action=change_description" method="post">
|
<form enctype="multipart/form-data" action="{{ getLink('guilds') }}?guild={{ guild.getName() }}&action=change_description" method="post">
|
||||||
{{ csrf() }}
|
{{ csrf() }}
|
||||||
<input type="hidden" name="todo" value="save"/>
|
<input type="hidden" name="todo" value="save"/>
|
||||||
<textarea name="description" cols="60" rows="{{ setting('core.guild_description_lines_limit') - 1 }}">{{ guild.getCustomField('description')|raw }}</textarea><br>
|
<textarea name="description" cols="60" rows="{{ setting('core.guild_description_lines_limit') - 1 }}">{{ guild.getCustomField('description')|raw }}</textarea><br>
|
||||||
(max. {{ setting('core.guild_description_lines_limit') }} lines, max. {{ setting('core.guild_description_chars_limit') }} chars) <input type="submit" value="Save description"/></form><br/>
|
(max. {{ setting('core.guild_description_lines_limit') }} lines, max. {{ setting('core.guild_description_chars_limit') }} chars) <input type="submit" value="Save description"/></form><br/>
|
||||||
<br/>
|
<br/>
|
||||||
<div style="text-align:center">
|
<div style="text-align:center">
|
||||||
<form action="?subtopic=guilds&guild={{ guild.getName() }}&action=manager" method="post">
|
<form action="{{ getLink('guilds') }}?guild={{ guild.getName() }}&action=manager" method="post">
|
||||||
{{ csrf() }}
|
{{ csrf() }}
|
||||||
{{ include('buttons.back.html.twig') }}
|
{{ include('buttons.back.html.twig') }}
|
||||||
</form>
|
</form>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<div style="text-align:center"><h2>Change guild logo</h2></div>
|
<div style="text-align:center"><h2>Change guild logo</h2></div>
|
||||||
Here you can change logo of your guild.<br/>Actuall logo: <img src="{{ constant('GUILD_IMAGES_DIR') }}{{ guild_logo }}" height="64" width="64"><br/><br/>
|
Here you can change logo of your guild.<br/>Actuall logo: <img src="{{ constant('GUILD_IMAGES_DIR') }}{{ guild_logo }}" height="64" width="64"><br/><br/>
|
||||||
<form enctype="multipart/form-data" action="?subtopic=guilds&guild={{ guild.getName() }}&action=change_logo" method="post" id="upload_form">
|
<form enctype="multipart/form-data" action="{{ getLink('guilds') }}?guild={{ guild.getName() }}&action=change_logo" method="post" id="upload_form">
|
||||||
{{ csrf() }}
|
{{ csrf() }}
|
||||||
<input type="hidden" name="todo" value="save" />
|
<input type="hidden" name="todo" value="save" />
|
||||||
<input type="hidden" name="MAX_FILE_SIZE" value="{{ max_image_size_b }}" />
|
<input type="hidden" name="MAX_FILE_SIZE" value="{{ max_image_size_b }}" />
|
||||||
@ -10,7 +10,7 @@ Here you can change logo of your guild.<br/>Actuall logo: <img src="{{ constant(
|
|||||||
Only <b>jpg, gif, png, bmp</b> pictures. Max. size: <b>{{ setting('core.guild_image_size_kb') }} KB</b><br>
|
Only <b>jpg, gif, png, bmp</b> pictures. Max. size: <b>{{ setting('core.guild_image_size_kb') }} KB</b><br>
|
||||||
<br/>
|
<br/>
|
||||||
<div style="text-align:center">
|
<div style="text-align:center">
|
||||||
<form action="?subtopic=guilds&guild={{ guild.getName() }}&action=manager" method="post">
|
<form action="{{ getLink('guilds') }}?guild={{ guild.getName() }}&action=manager" method="post">
|
||||||
{{ csrf() }}
|
{{ csrf() }}
|
||||||
{{ include('buttons.back.html.twig') }}
|
{{ include('buttons.back.html.twig') }}
|
||||||
</form>
|
</form>
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
<div style="text-align:center"><h2>Change guild MOTD</h2></div>
|
<div style="text-align:center"><h2>Change guild MOTD</h2></div>
|
||||||
Here you can change MOTD (Message of the Day, showed in game!) of your guild.<br/>
|
Here you can change MOTD (Message of the Day, showed in game!) of your guild.<br/>
|
||||||
<form enctype="multipart/form-data" action="?subtopic=guilds&guild={{ guild.getName() }}&action=change_motd" method="post">
|
<form enctype="multipart/form-data" action="{{ getLink('guilds') }}?guild={{ guild.getName() }}&action=change_motd" method="post">
|
||||||
{{ csrf() }}
|
{{ csrf() }}
|
||||||
<input type="hidden" name="todo" value="save"/>
|
<input type="hidden" name="todo" value="save"/>
|
||||||
<textarea name="motd" cols="60" rows="3">{{ guild.getCustomField('motd')|raw }}</textarea><br/>
|
<textarea name="motd" cols="60" rows="3">{{ guild.getCustomField('motd')|raw }}</textarea><br/>
|
||||||
(max. {{ setting('core.guild_motd_chars_limit') }} chars) <input type="submit" value="Save MOTD" /></form><br/>
|
(max. {{ setting('core.guild_motd_chars_limit') }} chars) <input type="submit" value="Save MOTD" /></form><br/>
|
||||||
<br/>
|
<br/>
|
||||||
<div style="text-align:center">
|
<div style="text-align:center">
|
||||||
<form action="?subtopic=guilds&guild={{ guild.getName() }}&action=manager" method="post">
|
<form action="{{ getLink('guilds') }}?guild={{ guild.getName() }}&action=manager" method="post">
|
||||||
{{ csrf() }}
|
{{ csrf() }}
|
||||||
{{ include('buttons.back.html.twig') }}
|
{{ include('buttons.back.html.twig') }}
|
||||||
</form>
|
</form>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<form action="?subtopic=guilds&action=change_rank&guild={{ guild_name }}&todo=save" method="post">
|
<form action="{{ getLink('guilds') }}?action=change_rank&guild={{ guild_name }}&todo=save" method="post">
|
||||||
{{ csrf() }}
|
{{ csrf() }}
|
||||||
<table border="0" cellspacing="1" cellpadding="4" width="100%">
|
<table border="0" cellspacing="1" cellpadding="4" width="100%">
|
||||||
<tr bgcolor="{{ config.vdarkborder }}"><td class="white"><b>Change Rank</b></td></tr>
|
<tr bgcolor="{{ config.vdarkborder }}"><td class="white"><b>Change Rank</b></td></tr>
|
||||||
@ -29,7 +29,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<div style="text-align:center">
|
<div style="text-align:center">
|
||||||
<form action="?subtopic=guilds&action=show&guild={{ guild_name }}" method="post">
|
<form action="{{ getLink('guilds') }}?action=show&guild={{ guild_name }}" method="post">
|
||||||
{{ csrf() }}
|
{{ csrf() }}
|
||||||
{{ include('buttons.back.html.twig') }}
|
{{ include('buttons.back.html.twig') }}
|
||||||
</form>
|
</form>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<form action="?subtopic=guilds&action=create&todo=save" method="post">
|
<form action="{{ getLink('guilds') }}?action=create&todo=save" method="post">
|
||||||
{{ csrf() }}
|
{{ csrf() }}
|
||||||
<table width="100%" border="0" cellspacing="1" cellpadding="4">
|
<table width="100%" border="0" cellspacing="1" cellpadding="4">
|
||||||
<tr>
|
<tr>
|
||||||
@ -47,7 +47,7 @@
|
|||||||
</form>
|
</form>
|
||||||
</td>
|
</td>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
<form action="?subtopic=guilds" method="post">
|
<form action="{{ getLink('guilds') }}" method="post">
|
||||||
{{ csrf() }}
|
{{ csrf() }}
|
||||||
{{ include('buttons.back.html.twig') }}
|
{{ include('buttons.back.html.twig') }}
|
||||||
</form>
|
</form>
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
<table style="width:100%;" >
|
<table style="width:100%;" >
|
||||||
<tr>
|
<tr>
|
||||||
<td>Are you sure you want delete guild <b>{{ guild.getName() }}</b>?<br/>
|
<td>Are you sure you want delete guild <b>{{ guild.getName() }}</b>?<br/>
|
||||||
<form action="?subtopic=guilds&guild={{ guild.getName() }}&action=delete_guild" method="post">
|
<form action="{{ getLink('guilds') }}?guild={{ guild.getName() }}&action=delete_guild" method="post">
|
||||||
{{ csrf() }}
|
{{ csrf() }}
|
||||||
<input type="hidden" name="todo" value="save"/>
|
<input type="hidden" name="todo" value="save"/>
|
||||||
<input type="submit" value="Yes, delete"/>
|
<input type="submit" value="Yes, delete"/>
|
||||||
@ -34,7 +34,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<br/>
|
<br/>
|
||||||
<div style="text-align:center">
|
<div style="text-align:center">
|
||||||
<form action="?subtopic=guilds&guild={{ guild.getName() }}&action=manager" method="post">
|
<form action="{{ getLink('guilds') }}?guild={{ guild.getName() }}&action=manager" method="post">
|
||||||
{{ csrf() }}
|
{{ csrf() }}
|
||||||
{{ include('buttons.back.html.twig') }}
|
{{ include('buttons.back.html.twig') }}
|
||||||
</form>
|
</form>
|
||||||
|
@ -7,14 +7,14 @@
|
|||||||
<table border="0" cellspacing="0" cellpadding="0" width="100%">
|
<table border="0" cellspacing="0" cellpadding="0" width="100%">
|
||||||
<tr>
|
<tr>
|
||||||
<td align="right" width="50%">
|
<td align="right" width="50%">
|
||||||
<form action="?subtopic=guilds&action=delete_invite&guild={{ guild_name }}&name={{ player_name }}&todo=save" method="post">
|
<form action="{{ getLink('guilds') }}?action=delete_invite&guild={{ guild_name }}&name={{ player_name }}&todo=save" method="post">
|
||||||
{{ csrf() }}
|
{{ csrf() }}
|
||||||
{{ include('buttons.submit.html.twig') }}
|
{{ include('buttons.submit.html.twig') }}
|
||||||
</form>
|
</form>
|
||||||
</td>
|
</td>
|
||||||
<td style="width: 10px; "></td>
|
<td style="width: 10px; "></td>
|
||||||
<td>
|
<td>
|
||||||
<form action="?subtopic=guilds&action=show&guild={{ guild_name }}" method="post">
|
<form action="{{ getLink('guilds') }}?action=show&guild={{ guild_name }}" method="post">
|
||||||
{{ csrf() }}
|
{{ csrf() }}
|
||||||
{{ include('buttons.back.html.twig') }}
|
{{ include('buttons.back.html.twig') }}
|
||||||
</form>
|
</form>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<form action="?subtopic=guilds&action=invite&guild={{ guild_name }}&todo=save" method="post">
|
<form action="{{ getLink('guilds') }}?action=invite&guild={{ guild_name }}&todo=save" method="post">
|
||||||
{{ csrf() }}
|
{{ csrf() }}
|
||||||
Invite player with name: <input type="text" name="name">
|
Invite player with name: <input type="text" name="name">
|
||||||
{{ include('buttons.submit.html.twig') }}
|
{{ include('buttons.submit.html.twig') }}
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<table border="0" cellspacing="0" cellpadding="0" width="100%">
|
<table border="0" cellspacing="0" cellpadding="0" width="100%">
|
||||||
<tr>
|
<tr>
|
||||||
<td align="right" width="50%">
|
<td align="right" width="50%">
|
||||||
<form action="?subtopic=guilds&action=kick_player&guild={{ guild_name }}&name={{ player_name }}&todo=save" method="post">
|
<form action="{{ getLink('guilds') }}?action=kick_player&guild={{ guild_name }}&name={{ player_name }}&todo=save" method="post">
|
||||||
{{ csrf() }}
|
{{ csrf() }}
|
||||||
{{ include('buttons.submit.html.twig') }}
|
{{ include('buttons.submit.html.twig') }}
|
||||||
</form>
|
</form>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<form action="?subtopic=guilds&action=leave&guild={{ guild_name }}&todo=save" METHOD="post">
|
<form action="{{ getLink('guilds') }}?action=leave&guild={{ guild_name }}&todo=save" METHOD="post">
|
||||||
{{ csrf() }}
|
{{ csrf() }}
|
||||||
<table border="0" cellspacing="1" cellpadding="4" width="100%">
|
<table border="0" cellspacing="1" cellpadding="4" width="100%">
|
||||||
<tr bgcolor="{{ config.vdarkborder }}">
|
<tr bgcolor="{{ config.vdarkborder }}">
|
||||||
@ -27,7 +27,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
</form>
|
</form>
|
||||||
<td>
|
<td>
|
||||||
<form action="?subtopic=guilds&action=show&guild={{ guild_name }}" method="post">
|
<form action="{{ getLink('guilds') }}?action=show&guild={{ guild_name }}" method="post">
|
||||||
{{ csrf() }}
|
{{ csrf() }}
|
||||||
{{ include('buttons.back.html.twig') }}
|
{{ include('buttons.back.html.twig') }}
|
||||||
</form>
|
</form>
|
||||||
|
@ -46,7 +46,7 @@
|
|||||||
|
|
||||||
<td style="word-break: break-all">
|
<td style="word-break: break-all">
|
||||||
<span{% if guild.description is not empty %} valign="top"{% endif %}>
|
<span{% if guild.description is not empty %} valign="top"{% endif %}>
|
||||||
<b>{{ guild.name }}</b>{% if isAdmin %}<a href="?subtopic=guilds&action=delete_by_admin&guild={{ guild.name }}"> - Delete this guild (for ADMIN only!)</a>{% endif %}
|
<b>{{ guild.name }}</b>{% if isAdmin %}<a href="{{ getLink('guilds') }}?action=delete_by_admin&guild={{ guild.name }}"> - Delete this guild (for ADMIN only!)</a>{% endif %}
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
{% if guild.description is not empty %}
|
{% if guild.description is not empty %}
|
||||||
@ -82,7 +82,7 @@
|
|||||||
{% if logged %}
|
{% if logged %}
|
||||||
<td>
|
<td>
|
||||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||||
<form action="?subtopic=guilds&action=create" method="post">
|
<form action="{{ getLink('guilds') }}?action=create" method="post">
|
||||||
{{ csrf() }}
|
{{ csrf() }}
|
||||||
{% set button_name = 'Found Guild' %}
|
{% set button_name = 'Found Guild' %}
|
||||||
{% set button_image = '_sbutton_foundguild' %}
|
{% set button_image = '_sbutton_foundguild' %}
|
||||||
@ -127,7 +127,7 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
{% if logged %}
|
{% if logged %}
|
||||||
No guild found that suits your needs?
|
No guild found that suits your needs?
|
||||||
<form action="?subtopic=guilds&action=create" method="post">
|
<form action="{{ getLink('guilds') }}?action=create" method="post">
|
||||||
{{ csrf() }}
|
{{ csrf() }}
|
||||||
{% set button_name = 'Found Guild' %}
|
{% set button_name = 'Found Guild' %}
|
||||||
{% set button_image = '_sbutton_foundguild' %}
|
{% set button_image = '_sbutton_foundguild' %}
|
||||||
@ -148,9 +148,9 @@
|
|||||||
<br/>
|
<br/>
|
||||||
If you have any problem with guilds try:
|
If you have any problem with guilds try:
|
||||||
<br/>
|
<br/>
|
||||||
<a href="?subtopic=guilds&action=cleanup_players">Cleanup players</a> - can't join guild/be invited? Can't create guild? Try cleanup players.
|
<a href="{{ getLink('guilds') }}?action=cleanup_players">Cleanup players</a> - can't join guild/be invited? Can't create guild? Try cleanup players.
|
||||||
<br/>
|
<br/>
|
||||||
<a href="?subtopic=guilds&action=cleanup_guilds">Cleanup guilds</a> - made guild, you are a leader, but you are not on players list? Cleanup guilds!
|
<a href="{{ getLink('guilds') }}?action=cleanup_guilds">Cleanup guilds</a> - made guild, you are a leader, but you are not on players list? Cleanup guilds!
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ Here you can change names of ranks, delete and add ranks, pass leadership to oth
|
|||||||
</tr>
|
</tr>
|
||||||
<tr bgcolor="{{ config.lightborder }}">
|
<tr bgcolor="{{ config.lightborder }}">
|
||||||
<td width="170">
|
<td width="170">
|
||||||
<b><a href="?subtopic=guilds&guild={{ guild.getName() }}&action=pass_leadership">Pass Leadership</a></b>
|
<b><a href="{{ getLink('guilds') }}?guild={{ guild.getName() }}&action=pass_leadership">Pass Leadership</a></b>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<b>Pass leadership of guild to other guild member.</b>
|
<b>Pass leadership of guild to other guild member.</b>
|
||||||
@ -20,7 +20,7 @@ Here you can change names of ranks, delete and add ranks, pass leadership to oth
|
|||||||
</tr>
|
</tr>
|
||||||
<tr bgcolor="{{ config.darkborder }}">
|
<tr bgcolor="{{ config.darkborder }}">
|
||||||
<td width="170">
|
<td width="170">
|
||||||
<b><a href="?subtopic=guilds&guild={{ guild.getName() }}&action=delete_guild">Delete Guild</a></b>
|
<b><a href="{{ getLink('guilds') }}?guild={{ guild.getName() }}&action=delete_guild">Delete Guild</a></b>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<b>Delete guild, kick all members.</b>
|
<b>Delete guild, kick all members.</b>
|
||||||
@ -28,7 +28,7 @@ Here you can change names of ranks, delete and add ranks, pass leadership to oth
|
|||||||
</tr>
|
</tr>
|
||||||
<tr bgcolor="{{ config.lightborder }}">
|
<tr bgcolor="{{ config.lightborder }}">
|
||||||
<td width="170">
|
<td width="170">
|
||||||
<b><a href="?subtopic=guilds&guild={{ guild.getName() }}&action=change_description">Change Description</a></b>
|
<b><a href="{{ getLink('guilds') }}?guild={{ guild.getName() }}&action=change_description">Change Description</a></b>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<b>Change description of guild.</b>
|
<b>Change description of guild.</b>
|
||||||
@ -37,7 +37,7 @@ Here you can change names of ranks, delete and add ranks, pass leadership to oth
|
|||||||
{% if constant('MOTD_EXISTS') %}
|
{% if constant('MOTD_EXISTS') %}
|
||||||
<tr bgcolor="{{ config.darkborder }}">
|
<tr bgcolor="{{ config.darkborder }}">
|
||||||
<td width="170">
|
<td width="170">
|
||||||
<b><a href="?subtopic=guilds&guild={{ guild.getName() }}&action=change_motd">Change MOTD</a></b>
|
<b><a href="{{ getLink('guilds') }}?guild={{ guild.getName() }}&action=change_motd">Change MOTD</a></b>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<b>Change MOTD of guild.</b>
|
<b>Change MOTD of guild.</b>
|
||||||
@ -46,7 +46,7 @@ Here you can change names of ranks, delete and add ranks, pass leadership to oth
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
<tr bgcolor="{{ config.lightborder }}">
|
<tr bgcolor="{{ config.lightborder }}">
|
||||||
<td width="170">
|
<td width="170">
|
||||||
<b><a href="?subtopic=guilds&guild={{ guild.getName() }}&action=change_logo">Change guild logo</a></b>
|
<b><a href="{{ getLink('guilds') }}?guild={{ guild.getName() }}&action=change_logo">Change guild logo</a></b>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<b>Upload new guild logo.</b>
|
<b>Upload new guild logo.</b>
|
||||||
@ -75,7 +75,7 @@ Here you can change names of ranks, delete and add ranks, pass leadership to oth
|
|||||||
<tr>
|
<tr>
|
||||||
<td width="120" valign="top">New rank name:</td>
|
<td width="120" valign="top">New rank name:</td>
|
||||||
<td>
|
<td>
|
||||||
<form action="?subtopic=guilds&guild={{ guild.getName() }}&action=add_rank" method="post">
|
<form action="{{ getLink('guilds') }}?guild={{ guild.getName() }}&action=add_rank" method="post">
|
||||||
{{ csrf() }}
|
{{ csrf() }}
|
||||||
<input type="text" name="rank_name" size="20"/>
|
<input type="text" name="rank_name" size="20"/>
|
||||||
<input type="submit" value="Add"/>
|
<input type="submit" value="Add"/>
|
||||||
@ -89,7 +89,7 @@ Here you can change names of ranks, delete and add ranks, pass leadership to oth
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div style="text-align:center"><h3>Change rank names and levels</h3></div>
|
<div style="text-align:center"><h3>Change rank names and levels</h3></div>
|
||||||
<form action="?subtopic=guilds&action=save_ranks&guild={{ guild.getName() }}" method="post">
|
<form action="{{ getLink('guilds') }}?action=save_ranks&guild={{ guild.getName() }}" method="post">
|
||||||
{{ csrf() }}
|
{{ csrf() }}
|
||||||
<table style="clear:both" border="0" cellpadding="0" cellspacing="0" width="100%">
|
<table style="clear:both" border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||||
<tr bgcolor="{{ config.vdarkborder }}">
|
<tr bgcolor="{{ config.vdarkborder }}">
|
||||||
@ -117,7 +117,7 @@ Here you can change names of ranks, delete and add ranks, pass leadership to oth
|
|||||||
{% set i = 0 %}
|
{% set i = 0 %}
|
||||||
{% for rank in rank_list %}
|
{% for rank in rank_list %}
|
||||||
<tr bgcolor="{{ getStyle(i) }}">
|
<tr bgcolor="{{ getStyle(i) }}">
|
||||||
<td align="center">{{ rank.getId() }} // <a href="?subtopic=guilds&guild={{ guild.getName() }}&action=delete_rank&rankid={{ rank.getId() }}" border="0"><img src="/images/news/delete.png" border="0" alt="Delete Rank"></a>
|
<td align="center">{{ rank.getId() }} // <a href="{{ getLink('guilds') }}?guild={{ guild.getName() }}&action=delete_rank&rankid={{ rank.getId() }}" border="0"><img src="/images/news/delete.png" border="0" alt="Delete Rank"></a>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<input type="text" name="{{ rank.getId() }}_name" value="{{ rank.getName() }}" size="35"/>
|
<input type="text" name="{{ rank.getId() }}_name" value="{{ rank.getName() }}" size="35"/>
|
||||||
@ -164,7 +164,7 @@ Here you can change names of ranks, delete and add ranks, pass leadership to oth
|
|||||||
<li>Be a member of guild
|
<li>Be a member of guild
|
||||||
<br/>
|
<br/>
|
||||||
<div style="text-align:center">
|
<div style="text-align:center">
|
||||||
<form action="?subtopic=guilds&action=show&guild={{ guild.getName() }}" method="post">
|
<form action="{{ getLink('guilds') }}?action=show&guild={{ guild.getName() }}" method="post">
|
||||||
{{ csrf() }}
|
{{ csrf() }}
|
||||||
{{ include('buttons.back.html.twig') }}
|
{{ include('buttons.back.html.twig') }}
|
||||||
</form>
|
</form>
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
<table style="width:100%;">
|
<table style="width:100%;">
|
||||||
<tr>
|
<tr>
|
||||||
<td>Pass leadership to: </b><br>
|
<td>Pass leadership to: </b><br>
|
||||||
<form action="?subtopic=guilds&guild={{ guild.getName() }}&action=pass_leadership" method="post">
|
<form action="{{ getLink('guilds') }}?guild={{ guild.getName() }}&action=pass_leadership" method="post">
|
||||||
{{ csrf() }}
|
{{ csrf() }}
|
||||||
<input type="hidden" name="todo" value="save"/>
|
<input type="hidden" name="todo" value="save"/>
|
||||||
<input type="text" size="40" name="player"/>
|
<input type="text" size="40" name="player"/>
|
||||||
@ -35,7 +35,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<br/>
|
<br/>
|
||||||
<div style="text-align:center">
|
<div style="text-align:center">
|
||||||
<form action="?subtopic=guilds&guild={{ guild.getName() }}&action=manager" method="post">
|
<form action="{{ getLink('guilds') }}?guild={{ guild.getName() }}&action=manager" method="post">
|
||||||
{{ csrf() }}
|
{{ csrf() }}
|
||||||
{{ include('buttons.back.html.twig') }}
|
{{ include('buttons.back.html.twig') }}
|
||||||
</form>
|
</form>
|
||||||
|
@ -67,7 +67,7 @@
|
|||||||
|
|
||||||
The guild was founded on {{ config.lua.serverName }} on {{ guild_creation_date|date("j F Y") }}.
|
The guild was founded on {{ config.lua.serverName }} on {{ guild_creation_date|date("j F Y") }}.
|
||||||
{% if isLeader %}
|
{% if isLeader %}
|
||||||
<a href="?subtopic=guilds&action=manager&guild={{ guild_name }}" style="float: right;">
|
<a href="{{ getLink('guilds') }}?action=manager&guild={{ guild_name }}" style="float: right;">
|
||||||
<img src="{{ template_path }}/images/global/buttons/sbutton_manageguild.png" style="width: 120px; height: 20px;" alt="Manage Guild">
|
<img src="{{ template_path }}/images/global/buttons/sbutton_manageguild.png" style="width: 120px; height: 20px;" alt="Manage Guild">
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -141,7 +141,7 @@
|
|||||||
|
|
||||||
<td>
|
<td>
|
||||||
{% set playerName = player.getName() %}
|
{% set playerName = player.getName() %}
|
||||||
<form action="?subtopic=guilds&action=change_nick&name={{ playerName }}&guild={{ guild_name }}" method="post">
|
<form action="{{ getLink('guilds') }}?action=change_nick&name={{ playerName }}&guild={{ guild_name }}" method="post">
|
||||||
{{ csrf() }}
|
{{ csrf() }}
|
||||||
{{ getPlayerLink(playerName, true)|raw }}
|
{{ getPlayerLink(playerName, true)|raw }}
|
||||||
|
|
||||||
@ -161,7 +161,7 @@
|
|||||||
{% if level_in_guild > rank.rank_level or isLeader %}
|
{% if level_in_guild > rank.rank_level or isLeader %}
|
||||||
{% if guildOwnerName != playerName %}
|
{% if guildOwnerName != playerName %}
|
||||||
<span style="font-size: 10px; float: right">
|
<span style="font-size: 10px; float: right">
|
||||||
{<a href="?subtopic=guilds&action=kick_player&guild={{ guild_name|url_encode }}&name={{ playerName|url_encode }}">KICK</a>}
|
{<a href="{{ getLink('guilds') }}?action=kick_player&guild={{ guild_name|url_encode }}&name={{ playerName|url_encode }}">KICK</a>}
|
||||||
</span>
|
</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -245,7 +245,7 @@
|
|||||||
|
|
||||||
{% if isVice %}
|
{% if isVice %}
|
||||||
<div style="float: right">
|
<div style="float: right">
|
||||||
{<a href="?subtopic=guilds&action=delete_invite&guild={{ guild_name|url_encode }}&name={{ invited_player.getName()|url_encode }}">Cancel Invitation</a>}
|
{<a href="{{ getLink('guilds') }}?action=delete_invite&guild={{ guild_name|url_encode }}&name={{ invited_player.getName()|url_encode }}">Cancel Invitation</a>}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
@ -298,7 +298,7 @@
|
|||||||
</form>
|
</form>
|
||||||
{% else %}
|
{% else %}
|
||||||
{% if show_accept_invite > 0 %}
|
{% if show_accept_invite > 0 %}
|
||||||
<form action="?subtopic=guilds&action=accept_invite&guild={{ guild_name|url_encode }}" method="post">
|
<form action="{{ getLink('guilds') }}?action=accept_invite&guild={{ guild_name|url_encode }}" method="post">
|
||||||
{{ csrf() }}
|
{{ csrf() }}
|
||||||
<td>
|
<td>
|
||||||
<input type="image" name="Accept Invite" alt="Accept Invite" src="{{ template_path }}/images/global/buttons/sbutton_acceptinvite.png" style="width: 120px; height: 20px;">
|
<input type="image" name="Accept Invite" alt="Accept Invite" src="{{ template_path }}/images/global/buttons/sbutton_acceptinvite.png" style="width: 120px; height: 20px;">
|
||||||
@ -307,7 +307,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if isVice %}
|
{% if isVice %}
|
||||||
<form action="?subtopic=guilds&action=invite&guild={{ guild_name|url_encode }}" method="post">
|
<form action="{{ getLink('guilds') }}?action=invite&guild={{ guild_name|url_encode }}" method="post">
|
||||||
{{ csrf() }}
|
{{ csrf() }}
|
||||||
<td>
|
<td>
|
||||||
{% set button_name = 'Invite Character' %}
|
{% set button_name = 'Invite Character' %}
|
||||||
@ -316,7 +316,7 @@
|
|||||||
</td>
|
</td>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<form action="?subtopic=guilds&action=change_rank&guild={{ guild_name|url_encode }}" method="post">
|
<form action="{{ getLink('guilds') }}?action=change_rank&guild={{ guild_name|url_encode }}" method="post">
|
||||||
{{ csrf() }}
|
{{ csrf() }}
|
||||||
<td>
|
<td>
|
||||||
{% set button_name = 'Edit Ranks' %}
|
{% set button_name = 'Edit Ranks' %}
|
||||||
@ -327,7 +327,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if players_from_account_in_guild|length > 0 %}
|
{% if players_from_account_in_guild|length > 0 %}
|
||||||
<form action="?subtopic=guilds&action=leave&guild={{ guild_name|url_encode }}" method="post">
|
<form action="{{ getLink('guilds') }}?action=leave&guild={{ guild_name|url_encode }}" method="post">
|
||||||
{{ csrf() }}
|
{{ csrf() }}
|
||||||
<td>
|
<td>
|
||||||
{% set button_name = 'Leave Guild' %}
|
{% set button_name = 'Leave Guild' %}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<script type="text/javascript" src="tools/js/tipped.js"></script>
|
<script type="text/javascript" src="tools/js/tipped.js"></script>
|
||||||
<link rel="stylesheet" type="text/css" href="tools/css/tipped.css"/>
|
<link rel="stylesheet" type="text/css" href="tools/css/tipped.css"/>
|
||||||
<style>
|
<style>
|
||||||
.creature_img {
|
.monster_img {
|
||||||
background-position: center center;
|
background-position: center center;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
width: 64px;
|
width: 64px;
|
||||||
@ -9,7 +9,7 @@
|
|||||||
padding: 5px;
|
padding: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.creature_name {
|
.monster_name {
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@ -20,7 +20,7 @@
|
|||||||
padding-bottom: 15px;
|
padding-bottom: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.creature_voice {
|
.monster_voice {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size: 8pt;
|
font-size: 8pt;
|
||||||
color: #FE6500;
|
color: #FE6500;
|
||||||
@ -63,8 +63,8 @@
|
|||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="creature_name">{{ creature.name }}</div>
|
<div class="monster_name">{{ monster.name }}</div>
|
||||||
<table class="CreatureInfo" border="0" cellspacing="0" cellpadding="4" width="100%">
|
<table class="MonsterInfo" border="0" cellspacing="0" cellpadding="4" width="100%">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th align="center" colspan="4"><b>General information</b></th>
|
<th align="center" colspan="4"><b>General information</b></th>
|
||||||
@ -73,50 +73,50 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="10%">
|
<td width="10%">
|
||||||
<div class="creature_img" style="background-image: url({{ creature.img_link }}"></div>
|
<div class="monster_img" style="background-image: url({{ monster.img_link }}"></div>
|
||||||
</td>
|
</td>
|
||||||
<td align="center" width="30%">
|
<td align="center" width="30%">
|
||||||
<strong>Health:</strong> {{ creature.health }}<br>
|
<strong>Health:</strong> {{ monster.health }}<br>
|
||||||
<strong>Experience:</strong> {{ creature.exp }}<br>
|
<strong>Experience:</strong> {{ monster.exp }}<br>
|
||||||
<strong>Speed:</strong> {{ creature.speed_lvl }} {{ (creature.use_haste) ? ' (+haste)' : '' }}
|
<strong>Speed:</strong> {{ monster.speed_lvl }} {{ (monster.use_haste) ? ' (+haste)' : '' }}
|
||||||
</td>
|
</td>
|
||||||
<td align="center" width="30%">
|
<td align="center" width="30%">
|
||||||
<b>Summonable:</b> {{ (creature.summonable) ? creature.mana ~ ' mana' : 'Impossible' }}<br>
|
<b>Summonable:</b> {{ (monster.summonable) ? monster.mana ~ ' mana' : 'Impossible' }}<br>
|
||||||
<b>Convinceable:</b> {{ (creature.convinceable) ? creature.mana ~ ' mana' : 'Impossible' }}
|
<b>Convinceable:</b> {{ (monster.convinceable) ? monster.mana ~ ' mana' : 'Impossible' }}
|
||||||
</td>
|
</td>
|
||||||
<td width="30%" align="center">
|
<td width="30%" align="center">
|
||||||
<strong>Armor:</strong> {{ creature.armor }}<br>
|
<strong>Armor:</strong> {{ monster.armor }}<br>
|
||||||
<strong>Defense:</strong> {{ creature.defense }}
|
<strong>Defense:</strong> {{ monster.defense }}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table><br>
|
</table><br>
|
||||||
|
|
||||||
{% if ( creature.voices is not empty or creature.summons is not empty) %}
|
{% if ( monster.voices is not empty or monster.summons is not empty) %}
|
||||||
<table class="CreatureVoice" border="0" cellspacing="0" cellpadding="4" width="100%">
|
<table class="MonsterVoice" border="0" cellspacing="0" cellpadding="4" width="100%">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
{% if ( creature.summons is not empty) %}
|
{% if ( monster.summons is not empty) %}
|
||||||
<th width="50%"><b>Summons</b></th>
|
<th width="50%"><b>Summons</b></th>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if ( creature.voices is not empty) %}
|
{% if ( monster.voices is not empty) %}
|
||||||
<th width="50%"><b>Voices</b></th>
|
<th width="50%"><b>Voices</b></th>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
{% if ( creature.summons is not empty) %}
|
{% if ( monster.summons is not empty) %}
|
||||||
<td>
|
<td>
|
||||||
{% for summon in creature.summons %}
|
{% for summon in monster.summons %}
|
||||||
<span>{{ summon.chance }}% chance to summon a <b>{{ getMonsterLink(summon.name, true)|raw }}</b><br/></span>
|
<span>{{ summon.chance }}% chance to summon a <b>{{ getMonsterLink(summon.name, true)|raw }}</b><br/></span>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</td>
|
</td>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if ( creature.voices is not empty) %}
|
{% if ( monster.voices is not empty) %}
|
||||||
<td align="center">
|
<td align="center">
|
||||||
<span class="creature_voice">
|
<span class="monster_voice">
|
||||||
{% for voice in creature.voices %}
|
{% for voice in monster.voices %}
|
||||||
"{{ voice }}"<br/>
|
"{{ voice }}"<br/>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</span>
|
</span>
|
||||||
@ -127,30 +127,30 @@
|
|||||||
</table><br/>
|
</table><br/>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if (creature.elements|length > 0 or creature.immunities|length > 0 ) %}
|
{% if (monster.elements|length > 0 or monster.immunities|length > 0 ) %}
|
||||||
<table class="CreatureElements" border="0" cellspacing="0" cellpadding="4" width="100%">
|
<table class="MonsterElements" border="0" cellspacing="0" cellpadding="4" width="100%">
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="{{ creature.elements|length }}">Elements and Immunities</th>
|
<th colspan="{{ monster.elements|length }}">Elements and Immunities</th>
|
||||||
</tr>
|
</tr>
|
||||||
{% if (creature.elements|length > 0) %}
|
{% if (monster.elements|length > 0) %}
|
||||||
<tr>{% for element in creature.elements %}
|
<tr>{% for element in monster.elements %}
|
||||||
<td align="center"><b> {{ element.name }}</b><br/>{{ element.percent }}%</td>
|
<td align="center"><b> {{ element.name }}</b><br/>{{ element.percent }}%</td>
|
||||||
{% endfor %}</tr>
|
{% endfor %}</tr>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if (creature.immunities|length > 0 ) %}
|
{% if (monster.immunities|length > 0 ) %}
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="{{ creature.elements|length }}"><b>Immunities:</b> {{ creature.immunities|join(' | ') }}</td>
|
<td colspan="{{ monster.elements|length }}"><b>Immunities:</b> {{ monster.immunities|join(' | ') }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</table><br/>
|
</table><br/>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if (not creature.loot is empty) %}
|
{% if (not monster.loot is empty) %}
|
||||||
<table class="CreatureLoot" border="0" cellspacing="0" cellpadding="4" width="100%">
|
<table class="MonsterLoot" border="0" cellspacing="0" cellpadding="4" width="100%">
|
||||||
<tr><th>Loot</th></tr>
|
<tr><th>Loot</th></tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
{% for item in creature.loot %}
|
{% for item in monster.loot %}
|
||||||
<span class="loot_bg">
|
<span class="loot_bg">
|
||||||
{% if (item.count > 1) %}
|
{% if (item.count > 1) %}
|
||||||
<span class="loot_amount">{{ item.count }}</span>
|
<span class="loot_amount">{{ item.count }}</span>
|
@ -1,6 +1,6 @@
|
|||||||
<br/></br>
|
<br/><br/>
|
||||||
<div style="text-align:center">
|
<div style="text-align:center">
|
||||||
<form action="{{ getLink('creatures') }}" method="post">
|
<form action="{{ getLink('monsters') }}" method="post">
|
||||||
{{ include('buttons.back.html.twig') }}
|
{{ include('buttons.back.html.twig') }}
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
@ -1,15 +1,15 @@
|
|||||||
{% if creatures is not empty %}
|
{% if monsters is not empty %}
|
||||||
|
|
||||||
{% if preview %}
|
{% if preview %}
|
||||||
<style>
|
<style>
|
||||||
.creatureImages {
|
.monsterImages {
|
||||||
width: 100px;
|
width: 100px;
|
||||||
height: 100px;
|
height: 100px;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
.creatureBoss {
|
.monsterBoss {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
border: 1px rgba(179, 179, 179, 0.50) solid;
|
border: 1px rgba(179, 179, 179, 0.50) solid;
|
||||||
@ -20,7 +20,7 @@
|
|||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
$("#ciSearch").on("keyup", function () {
|
$("#ciSearch").on("keyup", function () {
|
||||||
var value = $(this).val().toLowerCase();
|
var value = $(this).val().toLowerCase();
|
||||||
$("#creatureiTable div").filter(function () {
|
$("#monsteriTable div").filter(function () {
|
||||||
$(this).toggle($(this).text().toLowerCase().indexOf(value) > -1)
|
$(this).toggle($(this).text().toLowerCase().indexOf(value) > -1)
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -28,15 +28,15 @@
|
|||||||
</script>
|
</script>
|
||||||
<div style="float: right;"><input id="ciSearch" type="text" placeholder="Search.."></div>
|
<div style="float: right;"><input id="ciSearch" type="text" placeholder="Search.."></div>
|
||||||
<div style="display: table; width: 100%; ">
|
<div style="display: table; width: 100%; ">
|
||||||
<div style="text-align: center; " id="creatureiTable">
|
<div style="text-align: center; " id="monsteriTable">
|
||||||
{% for creature in creatures %}
|
{% for monster in monsters %}
|
||||||
{% set i = i + 1 %}
|
{% set i = i + 1 %}
|
||||||
<div class="creatureImages">
|
<div class="monsterImages">
|
||||||
<a href="{{ getMonsterLink(creature.name, false)|raw }}">
|
<a href="{{ getMonsterLink(monster.name, false)|raw }}">
|
||||||
<div class="creature_img " style="background-image: url({{ creature.img_link }}"></div>
|
<div class="monster_img " style="background-image: url({{ monster.img_link }}"></div>
|
||||||
<img class=" {{ (creature.rewardboss ? 'creatureBoss' : '') }}" src="{{ creature.img_link }}" border="0"/>
|
<img class=" {{ (monster.rewardboss ? 'monsterBoss' : '') }}" src="{{ monster.img_link }}" border="0"/>
|
||||||
</a>
|
</a>
|
||||||
<div>{{ creature.name }}</div>
|
<div>{{ monster.name }}</div>
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
@ -46,14 +46,14 @@
|
|||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
$("#cSearch").on("keyup", function () {
|
$("#cSearch").on("keyup", function () {
|
||||||
var value = $(this).val().toLowerCase();
|
var value = $(this).val().toLowerCase();
|
||||||
$("#creatureTable tr").filter(function () {
|
$("#monsterTable tr").filter(function () {
|
||||||
$(this).toggle($(this).text().toLowerCase().indexOf(value) > -1)
|
$(this).toggle($(this).text().toLowerCase().indexOf(value) > -1)
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
{{ generateLink(getLink('creatures'), 'All', false)|raw }} - <a href="?subtopic=creatures&boss=view">Bosses</a>
|
{{ generateLink(getLink('monsters'), 'All', false)|raw }} - <a href="{{ getLink('monsters') }}?boss=view">Bosses</a>
|
||||||
<table width="100%" id="creaturestb">
|
<table width="100%" id="monsters_datatable">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Name</th>
|
<th>Name</th>
|
||||||
@ -65,18 +65,18 @@
|
|||||||
<th>Race</th>
|
<th>Race</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody id="creatureTable">
|
<tbody id="monsterTable">
|
||||||
{% set i = 0 %}
|
{% set i = 0 %}
|
||||||
{% for creature in creatures %}
|
{% for monster in monsters %}
|
||||||
{% set i = i + 1 %}
|
{% set i = i + 1 %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ getMonsterLink(creature.name, true)|raw }}</td>
|
<td>{{ getMonsterLink(monster.name, true)|raw }}</td>
|
||||||
<td>{{ (creature.rewardboss) ? 'Yes' : '---' }}</td>
|
<td>{{ (monster.rewardboss) ? 'Yes' : '---' }}</td>
|
||||||
<td>{{ creature.health|number_format(0, '.', ',') }}</td>
|
<td>{{ monster.health|number_format(0, '.', ',') }}</td>
|
||||||
<td>{{ creature.exp|number_format(0, '.', ',') }}</td>
|
<td>{{ monster.exp|number_format(0, '.', ',') }}</td>
|
||||||
<td>{{ (creature.convinceable) ? creature.mana : '---' }} </td>
|
<td>{{ (monster.convinceable) ? monster.mana : '---' }} </td>
|
||||||
<td>{{ (creature.summonable) ? creature.mana : '---' }} </td>
|
<td>{{ (monster.summonable) ? monster.mana : '---' }} </td>
|
||||||
<td>{{ creature.race|title }}</td>
|
<td>{{ monster.race|title }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
@ -84,7 +84,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
$('#creaturestb').DataTable();
|
$('#monsters_datatable').DataTable();
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
@ -94,10 +94,10 @@
|
|||||||
{% else %}
|
{% else %}
|
||||||
<table width="100%">
|
<table width="100%">
|
||||||
<tr>
|
<tr>
|
||||||
<th>Creatures</th>
|
<th>Monsters</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>No Creatures on the server.</td>
|
<td>No Monsters on the server.</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
{% endif %}
|
{% endif %}
|
@ -38,7 +38,7 @@
|
|||||||
<td class="LabelV">
|
<td class="LabelV">
|
||||||
<span{% if error is not null %} class="red"{% endif %}>{{ account_login_by }}:</span>
|
<span{% if error is not null %} class="red"{% endif %}>{{ account_login_by }}:</span>
|
||||||
</td>
|
</td>
|
||||||
<td><input type="text" name="account_login" size="35" maxlength="30" autofocus /></td>
|
<td><input type="text" name="account_login" size="35" maxlength="{{ setting('core.account_login_by_email') ? '255' : '30' }}" autofocus /></td>
|
||||||
</tr>
|
</tr>
|
||||||
{{ hook('HOOK_ACCOUNT_LOGIN_AFTER_ACCOUNT') }}
|
{{ hook('HOOK_ACCOUNT_LOGIN_AFTER_ACCOUNT') }}
|
||||||
<tr>
|
<tr>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user