mirror of
https://github.com/slawkens/myaac.git
synced 2025-09-14 04:23:34 +02:00
Compare commits
2 Commits
v1.0-beta
...
feature-ta
Author | SHA1 | Date | |
---|---|---|---|
![]() |
da18629d16 | ||
![]() |
41c3d9ad21 |
5
.github/workflows/phpstan.yml
vendored
5
.github/workflows/phpstan.yml
vendored
@@ -36,8 +36,9 @@ jobs:
|
||||
with:
|
||||
path: ${{ steps.composer-cache.outputs.dir }}
|
||||
# Use composer.json for key, if composer.lock is not committed.
|
||||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||
restore-keys: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
||||
#key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||
restore-keys: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
||||
|
||||
- name: "Install composer dependencies"
|
||||
run: "composer install"
|
||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@@ -7,6 +7,7 @@ Thumbs.db
|
||||
|
||||
# composer
|
||||
composer.phar
|
||||
composer.lock
|
||||
vendor
|
||||
|
||||
# npm
|
||||
|
@@ -1,6 +1,6 @@
|
||||
# Changelog
|
||||
|
||||
## [1.0-beta - 18.05.2024]
|
||||
## [1.0-beta - 02.02.2024]
|
||||
|
||||
Minimum PHP version for this release is 8.1.
|
||||
|
||||
@@ -22,7 +22,7 @@ Minimum PHP version for this release is 8.1.
|
||||
* list of open source libraries used in project page
|
||||
* auto-loading of themes, commands & pages from plugins/ folder. You need just to place them in correct folder and they will be loaded automatically - this allows better customization, without interfering with core AAC folders. This will allow in the future automatic updates for plugins as well the AAC as whole.
|
||||
* config.php moved to Admin Panel -> Settings page
|
||||
* new console script: aac - using symfony/console
|
||||
* new console script: aac (comes from MyAAC) - using symfony/console
|
||||
* usage: `php aac` (will list all commands by default)
|
||||
* example: `php aac cache:clear`
|
||||
* example: `php aac plugin:install theme-example.zip`
|
||||
@@ -46,7 +46,7 @@ Minimum PHP version for this release is 8.1.
|
||||
* phpdebug bar (http://phpdebugbar.com/). Activated if env == 'dev', can be also activated in production by enabling "enable_debugbar" in local config
|
||||
|
||||
### Changed
|
||||
* Composer and NPM is now used for external libraries like: Twig, PHPMailer, fast-route, jQuery, Bootstrap etc.
|
||||
* Composer is now used for external libraries like: Twig, PHPMailer, fast-route etc.
|
||||
* mail support is disabled on fresh install, can be manually enabled by user
|
||||
* disable add php pages in admin panel for security. Option to disable plugins upload
|
||||
* visitors counter shows now user browser, and also if its bot
|
||||
|
@@ -404,7 +404,6 @@ else if (isset($_REQUEST['search'])) {
|
||||
autocomplete="off" maxlength="20"
|
||||
value="<?php echo $account->getLocation(); ?>"/>
|
||||
</div>
|
||||
<?php if(setting('core.account_country')): ?>
|
||||
<div class="col-12 col-sm-12 col-lg-4">
|
||||
<label for="rl_country">Country:</label>
|
||||
<select name="rl_country" id="rl_country" class="form-control">
|
||||
@@ -413,7 +412,6 @@ else if (isset($_REQUEST['search'])) {
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<div class="col-12 col-sm-12 col-lg-6">
|
||||
|
@@ -15,12 +15,11 @@
|
||||
"illuminate/database": "^10.18",
|
||||
"peppeocchi/php-cron-scheduler": "4.*",
|
||||
"symfony/console": "^6.4",
|
||||
"symfony/string": "^6.4",
|
||||
"symfony/var-dumper": "^6.4",
|
||||
"filp/whoops": "^2.15",
|
||||
"maximebf/debugbar": "dev-master"
|
||||
"symfony/string": "^6.4"
|
||||
},
|
||||
"require-dev": {
|
||||
"filp/whoops": "^2.15",
|
||||
"maximebf/debugbar": "dev-master",
|
||||
"phpstan/phpstan": "^1.10"
|
||||
},
|
||||
"autoload": {
|
||||
|
2922
composer.lock
generated
2922
composer.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -67,7 +67,7 @@ describe('Install MyAAC', () => {
|
||||
|
||||
cy.get('form').submit()
|
||||
|
||||
cy.contains('[class="alert alert-success"]', 'Congratulations', { timeout: 60000 }).should('be.visible')
|
||||
cy.contains('[class="alert alert-success"]', 'Congratulations', { timeout: 30000 }).should('be.visible')
|
||||
|
||||
cy.wait(2000);
|
||||
|
||||
|
@@ -22,7 +22,7 @@ describe('Create Account Page', () => {
|
||||
cy.get('#vocation1').check()
|
||||
cy.get('#accept_rules').check()
|
||||
|
||||
cy.get('#form').submit()
|
||||
cy.get('#createaccount').submit()
|
||||
|
||||
// no errors please
|
||||
cy.contains('The Following Errors Have Occurred:').should('not.exist')
|
||||
|
@@ -13,16 +13,9 @@ server {
|
||||
return 404;
|
||||
}
|
||||
|
||||
location /vendor {
|
||||
# block .htaccess
|
||||
location ~ /\.ht {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
# block .htaccess, CHANGELOG.md, composer.json etc.
|
||||
# this is to prevent finding software versions
|
||||
location ~\.(ht|md|json|dist)$ {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
# block git files and folders
|
||||
|
@@ -38,11 +38,7 @@ if [ $1 = "prepare" ]; then
|
||||
cd $dir || exit
|
||||
|
||||
# dependencies
|
||||
composer install --no-dev --prefer-dist --optimize-autoloader
|
||||
npm install
|
||||
|
||||
# node_modules is useless, we already have copy in tools/ext
|
||||
rm -R node_modules
|
||||
composer install --prefer-dist --optimize-autoloader
|
||||
|
||||
echo "Now you can make changes to $dir. When you are ready, type 'release.sh pack'"
|
||||
exit
|
||||
|
@@ -87,29 +87,18 @@ function getForumBoardLink($board_id, $page = NULL): string {
|
||||
return BASE_URL . (setting('core.friendly_urls') ? '' : 'index.php/') . 'forum/board/' . (int)$board_id . (isset($page) ? '/' . $page : '');
|
||||
}
|
||||
|
||||
function getPlayerLink($name, $generate = true, bool $colored = false): string
|
||||
function getPlayerLink($name, $generate = true): string
|
||||
{
|
||||
$player = new OTS_Player();
|
||||
|
||||
if(is_numeric($name)) {
|
||||
if(is_numeric($name))
|
||||
{
|
||||
$player = new OTS_Player();
|
||||
$player->load((int)$name);
|
||||
if($player->isLoaded())
|
||||
$name = $player->getName();
|
||||
}
|
||||
else {
|
||||
$player->find($name);
|
||||
}
|
||||
|
||||
if (!$player->isLoaded()) {
|
||||
return '(error)';
|
||||
}
|
||||
|
||||
$name = $player->getName();
|
||||
|
||||
$url = BASE_URL . (setting('core.friendly_urls') ? '' : 'index.php/') . 'characters/' . urlencode($name);
|
||||
|
||||
if ($colored) {
|
||||
$name = '<span style="color: ' . ($player->isOnline() ? 'green' : 'red') . ';">' . $name . '</span>';
|
||||
}
|
||||
|
||||
if(!$generate) return $url;
|
||||
return generateLink($url, $name);
|
||||
}
|
||||
@@ -1634,7 +1623,7 @@ function removeIfFirstSlash(&$text) {
|
||||
};
|
||||
|
||||
function escapeHtml($html) {
|
||||
return htmlspecialchars($html);
|
||||
return htmlentities($html, ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8');
|
||||
}
|
||||
|
||||
function getGuildNameById($id)
|
||||
|
@@ -1229,13 +1229,6 @@ class OTS_Player extends OTS_Row_DAO
|
||||
$this->data['direction'] = (int) $direction;
|
||||
}
|
||||
|
||||
public function getOutfit(): string
|
||||
{
|
||||
$hasLookAddons = $this->db->hasColumn('players', 'lookaddons');
|
||||
|
||||
return setting('core.outfit_images_url') . '?id=' . $this->getLookType() . ($hasLookAddons ? '&addons=' . $this->getLookAddons() : '') . '&head=' . $this->getLookHead() . '&body=' . $this->getLookBody() . '&legs=' . $this->getLookLegs() . '&feet=' . $this->getLookFeet();
|
||||
}
|
||||
|
||||
/**
|
||||
* Body color.
|
||||
*
|
||||
|
@@ -22,5 +22,11 @@ if(isset($account_logged) && $account_logged->isLoaded()) {
|
||||
|
||||
$logged = false;
|
||||
unset($account_logged);
|
||||
|
||||
if(isset($_REQUEST['redirect']))
|
||||
{
|
||||
header('Location: ' . urldecode($_REQUEST['redirect']));
|
||||
exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -26,13 +26,12 @@ if(setting('core.account_country'))
|
||||
$account = Account::find($account_logged->getId());
|
||||
|
||||
$show_form = true;
|
||||
$new_rlname = isset($_POST['info_rlname']) ? htmlspecialchars(stripslashes($_POST['info_rlname'])) : '';
|
||||
$new_location = isset($_POST['info_location']) ? htmlspecialchars(stripslashes($_POST['info_location'])) : '';
|
||||
$new_country = isset($_POST['info_country']) ? htmlspecialchars(stripslashes($_POST['info_country'])) : '';
|
||||
$new_rlname = isset($_POST['info_rlname']) ? htmlspecialchars(stripslashes($_POST['info_rlname'])) : NULL;
|
||||
$new_location = isset($_POST['info_location']) ? htmlspecialchars(stripslashes($_POST['info_location'])) : NULL;
|
||||
$new_country = isset($_POST['info_country']) ? htmlspecialchars(stripslashes($_POST['info_country'])) : NULL;
|
||||
if(isset($_POST['changeinfosave']) && $_POST['changeinfosave'] == 1) {
|
||||
if(setting('core.account_country') && !isset($config['countries'][$new_country])) {
|
||||
if(!isset($config['countries'][$new_country]))
|
||||
$errors[] = 'Country is not correct.';
|
||||
}
|
||||
|
||||
if(empty($errors)) {
|
||||
//save data from form
|
||||
@@ -40,14 +39,7 @@ if(isset($_POST['changeinfosave']) && $_POST['changeinfosave'] == 1) {
|
||||
$account->location = $new_location;
|
||||
$account->country = $new_country;
|
||||
$account->save();
|
||||
|
||||
$log = 'Changed Real Name to <b>' . $new_rlname . '</b>, Location to <b>' . $new_location . '</b>';
|
||||
if(setting('core.account_country')) {
|
||||
$log .= ' and Country to <b>' . $config['countries'][$new_country] . '</b>';
|
||||
}
|
||||
$log .= '.';
|
||||
|
||||
$account_logged->logAction($log);
|
||||
$account_logged->logAction('Changed Real Name to <b>' . $new_rlname . '</b>, Location to <b>' . $new_location . '</b> and Country to <b>' . $config['countries'][$new_country] . '</b>.');
|
||||
$twig->display('success.html.twig', array(
|
||||
'title' => 'Public Information Changed',
|
||||
'description' => 'Your public information has been changed.'
|
||||
|
@@ -22,12 +22,6 @@ if(isset($_REQUEST['redirect']))
|
||||
{
|
||||
$redirect = urldecode($_REQUEST['redirect']);
|
||||
|
||||
// should never happen, unless hacker modify the URL
|
||||
if (!str_contains($redirect, BASE_URL)) {
|
||||
error('Fatal error: Cannot redirect outside the website.');
|
||||
return;
|
||||
}
|
||||
|
||||
$twig->display('account.redirect.html.twig', array(
|
||||
'redirect' => $redirect
|
||||
));
|
||||
|
@@ -12,12 +12,6 @@ defined('MYAAC') or die('Direct access not allowed!');
|
||||
|
||||
$redirect = urldecode($_REQUEST['redirect']);
|
||||
|
||||
// should never happen, unless hacker modify the URL
|
||||
if (!str_contains($redirect, BASE_URL)) {
|
||||
error('Fatal error: Cannot redirect outside the website.');
|
||||
return;
|
||||
}
|
||||
|
||||
$twig->display('account.redirect.html.twig', array(
|
||||
'redirect' => $redirect
|
||||
));
|
||||
|
@@ -19,7 +19,7 @@ if ($ret === false) {
|
||||
}
|
||||
|
||||
if(!$logged) {
|
||||
echo 'You are not logged in. <a href="' . getLink('account/manage') . '?redirect=' . urlencode(getLink('forum')) . '">Log in</a> to post on the forum.<br /><br />';
|
||||
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;
|
||||
}
|
||||
|
||||
|
@@ -19,7 +19,7 @@ if ($ret === false) {
|
||||
}
|
||||
|
||||
if(!$logged) {
|
||||
echo 'You are not logged in. <a href="' . getLink('account/manage') . '?redirect=' . urlencode(getLink('forum')) . '">Log in</a> to post on the forum.<br /><br />';
|
||||
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;
|
||||
}
|
||||
|
||||
|
@@ -24,7 +24,7 @@ if(!$logged) {
|
||||
$extra_url = '?action=new_post&thread_id=' . $_GET['thread_id'];
|
||||
}
|
||||
|
||||
echo 'You are not logged in. <a href="' . getLink('account/manage') . '?redirect=' . urlencode(getLink('forum') . $extra_url) . '">Log in</a> to post on the forum.<br /><br />';
|
||||
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;
|
||||
}
|
||||
|
||||
|
@@ -24,7 +24,7 @@ if(!$logged) {
|
||||
$extra_url = '?action=new_thread§ion_id=' . $_GET['section_id'];
|
||||
}
|
||||
|
||||
echo 'You are not logged in. <a href="' . getLink('account/manage') . '?redirect=' . urlencode(getLink('forum') . $extra_url) . '">Log in</a> to post on the forum.<br /><br />';
|
||||
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;
|
||||
}
|
||||
|
||||
|
@@ -19,7 +19,7 @@ if ($ret === false) {
|
||||
}
|
||||
|
||||
if(!$logged) {
|
||||
echo 'You are not logged in. <a href="' . getLink('account/manage') . '?redirect=' . urlencode(getLink('forum')) . '">Log in</a> to post on the forum.<br /><br />';
|
||||
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;
|
||||
}
|
||||
|
||||
|
@@ -60,7 +60,7 @@ foreach($posts as &$post) {
|
||||
}
|
||||
|
||||
if($config['characters']['outfit']) {
|
||||
$post['outfit'] = $player->getOutfit();
|
||||
$post['outfit'] = setting('core.outfit_images_url') . '?id=' . $player->getLookType() . ($lookaddons ? '&addons=' . $player->getLookAddons() : '') . '&head=' . $player->getLookHead() . '&body=' . $player->getLookBody() . '&legs=' . $player->getLookLegs() . '&feet=' . $player->getLookFeet();
|
||||
}
|
||||
|
||||
$groupName = '';
|
||||
|
@@ -79,7 +79,7 @@ if (isset($monster['name'])) {
|
||||
));
|
||||
|
||||
} else {
|
||||
echo "Monster with name <b>" . htmlspecialchars($monster_name) . "</b> doesn't exist.";
|
||||
echo "Monster with name <b>" . $monster_name . "</b> doesn't exist.";
|
||||
}
|
||||
|
||||
// back button
|
||||
|
@@ -51,7 +51,7 @@ function getColorByPercent($percent)
|
||||
if($logged)
|
||||
echo $link.'?id='.$poll['id'];
|
||||
else
|
||||
echo getLink('account/manage') . '?redirect=' . urlencode($link.'?id='.$poll['id']);
|
||||
echo getLink('account/manage') . '?redirect=' . BASE_URL . urlencode($link.'?id='.$poll['id']);
|
||||
|
||||
echo '">'.$poll['question'] . '</a>
|
||||
</td>
|
||||
@@ -80,7 +80,7 @@ function getColorByPercent($percent)
|
||||
if($logged)
|
||||
echo $link.'?id='.$poll['id'];
|
||||
else
|
||||
echo getLink('account/manage') . '?redirect=' . urlencode($link.'?id='.$poll['id']);
|
||||
echo getLink('account/manage') . '?redirect=' . BASE_URL . urlencode($link.'?id='.$poll['id']);
|
||||
|
||||
echo '">'.$poll['question'] . '</a>
|
||||
</td>
|
||||
|
@@ -23,9 +23,6 @@ class Plugins {
|
||||
|
||||
$routes = [];
|
||||
foreach(self::getAllPluginsJson() as $plugin) {
|
||||
//
|
||||
// Get all plugins/*/pages/*.php pages
|
||||
//
|
||||
$pluginPages = glob(PLUGINS . $plugin['filename'] . '/pages/*.php');
|
||||
foreach ($pluginPages as $file) {
|
||||
$file = str_replace(PLUGINS, 'plugins/', $file);
|
||||
@@ -34,22 +31,6 @@ class Plugins {
|
||||
$routes[] = [['get', 'post'], $name, $file, 1000];
|
||||
}
|
||||
|
||||
//
|
||||
// Get all plugins/*/pages/subFolder/*.php pages
|
||||
//
|
||||
$pluginPagesSubFolders = glob(PLUGINS . $plugin['filename'] . '/pages/*', GLOB_ONLYDIR);
|
||||
foreach ($pluginPagesSubFolders as $folder) {
|
||||
$folderName = pathinfo($folder, PATHINFO_FILENAME);
|
||||
|
||||
$subFiles = glob(PLUGINS . $plugin['filename'] . '/pages/' . $folderName . '/*.php');
|
||||
foreach ($subFiles as $file) {
|
||||
$file = str_replace(PLUGINS, 'plugins/', $file);
|
||||
$name = $folderName . '/' . pathinfo($file, PATHINFO_FILENAME);
|
||||
|
||||
$routes[] = [['get', 'post'], $name, $file, 1000];
|
||||
}
|
||||
}
|
||||
|
||||
$warningPreTitle = 'Plugin: ' . $plugin['name'] . ' - ';
|
||||
|
||||
if (isset($plugin['routes'])) {
|
||||
|
@@ -1,36 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace MyAAC\Twig\Extension;
|
||||
|
||||
use Twig\Extension\AbstractExtension;
|
||||
use Twig\TwigFilter;
|
||||
|
||||
final class TypeCastingExtension extends AbstractExtension
|
||||
{
|
||||
/** @return array<int, TwigFilter> */
|
||||
public function getFilters(): array
|
||||
{
|
||||
return [
|
||||
new TwigFilter('int', function ($value) {
|
||||
return (int)$value;
|
||||
}),
|
||||
new TwigFilter('float', function ($value) {
|
||||
return (float)$value;
|
||||
}),
|
||||
new TwigFilter('string', function ($value) {
|
||||
return (string)$value;
|
||||
}),
|
||||
new TwigFilter('bool', function ($value) {
|
||||
return (bool)$value;
|
||||
}),
|
||||
new TwigFilter('array', function (object $value) {
|
||||
return (array)$value;
|
||||
}),
|
||||
new TwigFilter('object', function (array $value) {
|
||||
return (object)$value;
|
||||
}),
|
||||
];
|
||||
}
|
||||
}
|
@@ -1,313 +1,330 @@
|
||||
{{ hook('HOOK_ACCOUNT_CREATE_BEFORE_FORM') }}
|
||||
{% set title = 'Create ' ~ config.lua.serverName ~ ' Account' %}
|
||||
{% set background = config('darkborder') %}
|
||||
{% set tableClass = 'Table5' %}
|
||||
{% set content %}
|
||||
<table style="width:100%;" >
|
||||
{{ hook('HOOK_ACCOUNT_CREATE_BEFORE_BOXES') }}
|
||||
<tr>
|
||||
<td>
|
||||
<div class="TableShadowContainerRightTop"> <div class="TableShadowRightTop" style="background-image:url({{ template_path }}/images/global/content/table-shadow-rt.gif);"></div></div>
|
||||
<div class="TableContentAndRightShadow" style="background-image:url({{ template_path }}/images/global/content/table-shadow-rm.gif);">
|
||||
<div class="TableContentContainer">
|
||||
<table class="TableContent" width="100%" style="border:1px solid #faf0d7;">
|
||||
<tbody>
|
||||
|
||||
{{ hook('HOOK_ACCOUNT_CREATE_BEFORE_ACCOUNT') }}
|
||||
|
||||
{% if not config.account_login_by_email %}
|
||||
<tr>
|
||||
<td class="LabelV" style="width: 150px">
|
||||
<span{% if errors.account is defined %} class="red"{% endif %}>Account {% if constant('USE_ACCOUNT_NAME') %}Name{% else %}Number{% endif %}:</span>
|
||||
{% if not constant('USE_ACCOUNT_NAME') %}
|
||||
<div id="SuggestAccountNumber">[<a href="#">suggest number</a>]</div>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<input form="form" type="text" name="account" id="account_input" size="30" maxlength="{% if constant('USE_ACCOUNT_NAME') %}30{% else %}10{% endif %}" value="{{ account }}" autofocus/>
|
||||
<img id="account_indicator" src="images/global/general/{% if not save or errors.account is defined %}n{% endif %}ok.gif" style="display: none;" />
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
<tr><td></td><td><span id="account_error" class="FormFieldError">{% if errors.account is defined %}{{ errors.account }}{% endif %}</span></td></tr>
|
||||
{{ hook('HOOK_ACCOUNT_CREATE_AFTER_ACCOUNT') }}
|
||||
<tr>
|
||||
<td class="LabelV" style="width: 150px">
|
||||
<span{% if errors.email is defined %} class="red"{% endif %}>Email Address:</span>
|
||||
</td>
|
||||
<td>
|
||||
<input form="form" type="text" name="email" id="email" size="30" maxlength="50" value="{{ email }}" />
|
||||
<img id="email_indicator" src="images/global/general/{% if not save or errors.email is defined %}n{% endif %}ok.gif" style="display: none;" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td><td><span id="email_error" class="FormFieldError">{% if errors.email is defined %}{{ errors.email }}{% endif %}</span></td>
|
||||
</tr>
|
||||
|
||||
{% if setting('core.mail_enabled') and setting('core.account_mail_verify') %}
|
||||
<tr><td></td><td><span><strong>Please use real address!<br/>We will send a link to validate your Email.</strong></span></td></tr>
|
||||
{% endif %}
|
||||
|
||||
{{ hook('HOOK_ACCOUNT_CREATE_AFTER_EMAIL') }}
|
||||
|
||||
{% if setting('core.account_country') %}
|
||||
<form action="{{ getLink('account/create') }}" method="post" id="createaccount">
|
||||
{{ csrf() }}
|
||||
<div class="TableContainer" >
|
||||
<table class="Table5" cellpadding="0" cellspacing="0" >
|
||||
<div class="CaptionContainer" >
|
||||
<div class="CaptionInnerContainer" >
|
||||
<span class="CaptionEdgeLeftTop" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);" /></span>
|
||||
<span class="CaptionEdgeRightTop" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);" /></span>
|
||||
<span class="CaptionBorderTop" style="background-image:url({{ template_path }}/images/content/table-headline-border.gif);" ></span>
|
||||
<span class="CaptionVerticalLeft" style="background-image:url({{ template_path }}/images/content/box-frame-vertical.gif);" /></span>
|
||||
<div class="Text" >Create {{ config.lua.serverName }} Account</div>
|
||||
<span class="CaptionVerticalRight" style="background-image:url({{ template_path }}/images/content/box-frame-vertical.gif);" /></span>
|
||||
<span class="CaptionBorderBottom" style="background-image:url({{ template_path }}/images/content/table-headline-border.gif);" ></span>
|
||||
<span class="CaptionEdgeLeftBottom" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);" /></span>
|
||||
<span class="CaptionEdgeRightBottom" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);" /></span>
|
||||
</div>
|
||||
</div>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="InnerTableContainer" >
|
||||
<table style="width:100%;" >
|
||||
{{ hook('HOOK_ACCOUNT_CREATE_BEFORE_BOXES') }}
|
||||
<tr>
|
||||
<td class="LabelV" style="width: 150px">
|
||||
<span{% if errors.country[0] is defined %} class="red"{% endif %}>Country:</span>
|
||||
</td>
|
||||
<td>
|
||||
<select form="form" name="country" id="account_country">
|
||||
{% for code, country_ in countries %}
|
||||
<option value="{{ code }}"{% if(country is defined and country == code) or (country is null and country_recognized == code) %}selected{% endif %}>{{ country_ }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<img src="" id="account_country_img"/>
|
||||
<div class="TableShadowContainerRightTop"> <div class="TableShadowRightTop" style="background-image:url({{ template_path }}/images/global/content/table-shadow-rt.gif);"></div></div>
|
||||
<div class="TableContentAndRightShadow" style="background-image:url({{ template_path }}/images/global/content/table-shadow-rm.gif);">
|
||||
<div class="TableContentContainer">
|
||||
<table class="TableContent" width="100%" style="border:1px solid #faf0d7;">
|
||||
<tbody>
|
||||
|
||||
{{ hook('HOOK_ACCOUNT_CREATE_BEFORE_ACCOUNT') }}
|
||||
|
||||
{% if not config.account_login_by_email %}
|
||||
<tr>
|
||||
<td class="LabelV" style="width: 150px">
|
||||
<span{% if errors.account is defined %} class="red"{% endif %}>Account {% if constant('USE_ACCOUNT_NAME') %}Name{% else %}Number{% endif %}:</span>
|
||||
{% if not constant('USE_ACCOUNT_NAME') %}
|
||||
<div id="SuggestAccountNumber">[<a href="#">suggest number</a>]</div>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="account" id="account_input" size="30" maxlength="{% if constant('USE_ACCOUNT_NAME') %}30{% else %}10{% endif %}" value="{{ account }}" autofocus/>
|
||||
<img id="account_indicator" src="images/global/general/{% if not save or errors.account is defined %}n{% endif %}ok.gif" style="display: none;" />
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
<tr><td></td><td><span id="account_error" class="FormFieldError">{% if errors.account is defined %}{{ errors.account }}{% endif %}</span></td></tr>
|
||||
{{ hook('HOOK_ACCOUNT_CREATE_AFTER_ACCOUNT') }}
|
||||
<tr>
|
||||
<td class="LabelV" style="width: 150px">
|
||||
<span{% if errors.email is defined %} class="red"{% endif %}>Email Address:</span>
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="email" id="email" size="30" maxlength="50" value="{{ email }}" />
|
||||
<img id="email_indicator" src="images/global/general/{% if not save or errors.email is defined %}n{% endif %}ok.gif" style="display: none;" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td><td><span id="email_error" class="FormFieldError">{% if errors.email is defined %}{{ errors.email }}{% endif %}</span></td>
|
||||
</tr>
|
||||
|
||||
{% if setting('core.mail_enabled') and setting('core.account_mail_verify') %}
|
||||
<tr><td></td><td><span><strong>Please use real address!<br/>We will send a link to validate your Email.</strong></span></td></tr>
|
||||
{% endif %}
|
||||
|
||||
{{ hook('HOOK_ACCOUNT_CREATE_AFTER_EMAIL') }}
|
||||
|
||||
{% if setting('core.account_country') %}
|
||||
<tr>
|
||||
<td class="LabelV" style="width: 150px">
|
||||
<span{% if errors.country[0] is defined %} class="red"{% endif %}>Country:</span>
|
||||
</td>
|
||||
<td>
|
||||
<select name="country" id="account_country">
|
||||
{% for code, country_ in countries %}
|
||||
<option value="{{ code }}"{% if(country is defined and country == code) or (country is null and country_recognized == code) %}selected{% endif %}>{{ country_ }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<img src="" id="account_country_img"/>
|
||||
</td>
|
||||
</tr>
|
||||
{% if errors.country is defined %}
|
||||
<tr><td></td><td><span class="FormFieldError">{{ errors.country }}</span></td></tr>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{{ hook('HOOK_ACCOUNT_CREATE_AFTER_COUNTRY') }}
|
||||
|
||||
<tr>
|
||||
<td class="LabelV" style="width: 150px">
|
||||
<span{% if errors.password is defined %} class="red"{% endif %}>Password:</span>
|
||||
</td>
|
||||
<td>
|
||||
<input type="password" name="password" id="password" value="" size="30" maxlength="29" />
|
||||
<img id="password_indicator" src="images/global/general/{% if not save or errors.password is defined %}n{% endif %}ok.gif" style="display: none;" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td></td><td><span id="password_error" class="FormFieldError">{% if errors.password is defined %}{{ errors.password }}{% endif %}</span></td></tr>
|
||||
|
||||
{{ hook('HOOK_ACCOUNT_CREATE_AFTER_PASSWORD') }}
|
||||
|
||||
<tr>
|
||||
<td class="LabelV" style="width: 150px">
|
||||
<span{% if errors.password is defined %} class="red"{% endif %}>Repeat password:</span>
|
||||
</td>
|
||||
<td>
|
||||
<input type="password" name="password_confirm" id="password_confirm" value="" size="30" maxlength="29" />
|
||||
<img id="password_confirm_indicator" src="images/global/general/{% if not save or errors.password is defined %}n{% endif %}ok.gif" style="display: none;" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td></td><td><span id="password_confirm_error" class="FormFieldError">{% if errors.password is defined %}{{ errors.password }}{% endif %}</span></td></tr>
|
||||
|
||||
{{ hook('HOOK_ACCOUNT_CREATE_AFTER_PASSWORDS') }}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="TableShadowContainer">
|
||||
<div class="TableBottomShadow" style="background-image:url({{ template_path }}/images/global/content/table-shadow-bm.gif);"> <div class="TableBottomLeftShadow" style="background-image:url({{ template_path }}/images/global/content/table-shadow-bl.gif);"></div> <div class="TableBottomRightShadow" style="background-image:url({{ template_path }}/images/global/content/table-shadow-br.gif);"></div> </div></div>
|
||||
</td>
|
||||
</tr>
|
||||
{% if errors.country is defined %}
|
||||
<tr><td></td><td><span class="FormFieldError">{{ errors.country }}</span></td></tr>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{{ hook('HOOK_ACCOUNT_CREATE_AFTER_COUNTRY') }}
|
||||
{{ hook('HOOK_ACCOUNT_CREATE_BETWEEN_BOXES_1') }}
|
||||
|
||||
<tr>
|
||||
<td class="LabelV" style="width: 150px">
|
||||
<span{% if errors.password is defined %} class="red"{% endif %}>Password:</span>
|
||||
</td>
|
||||
<td>
|
||||
<input form="form" type="password" name="password" id="password" value="" size="30" maxlength="29" />
|
||||
<img id="password_indicator" src="images/global/general/{% if not save or errors.password is defined %}n{% endif %}ok.gif" style="display: none;" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td></td><td><span id="password_error" class="FormFieldError">{% if errors.password is defined %}{{ errors.password }}{% endif %}</span></td></tr>
|
||||
|
||||
{{ hook('HOOK_ACCOUNT_CREATE_AFTER_PASSWORD') }}
|
||||
|
||||
<tr>
|
||||
<td class="LabelV" style="width: 150px">
|
||||
<span{% if errors.password is defined %} class="red"{% endif %}>Repeat password:</span>
|
||||
</td>
|
||||
<td>
|
||||
<input form="form" type="password" name="password_confirm" id="password_confirm" value="" size="30" maxlength="29" />
|
||||
<img id="password_confirm_indicator" src="images/global/general/{% if not save or errors.password is defined %}n{% endif %}ok.gif" style="display: none;" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td></td><td><span id="password_confirm_error" class="FormFieldError">{% if errors.password is defined %}{{ errors.password }}{% endif %}</span></td></tr>
|
||||
|
||||
{{ hook('HOOK_ACCOUNT_CREATE_AFTER_PASSWORDS') }}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="TableShadowContainer">
|
||||
<div class="TableBottomShadow" style="background-image:url({{ template_path }}/images/global/content/table-shadow-bm.gif);"> <div class="TableBottomLeftShadow" style="background-image:url({{ template_path }}/images/global/content/table-shadow-bl.gif);"></div> <div class="TableBottomRightShadow" style="background-image:url({{ template_path }}/images/global/content/table-shadow-br.gif);"></div> </div></div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
{{ hook('HOOK_ACCOUNT_CREATE_BETWEEN_BOXES_1') }}
|
||||
|
||||
{% if (not setting('core.mail_enabled') or not setting('core.account_mail_verify')) and setting('core.account_create_character_create') %}
|
||||
<tr>
|
||||
<td>
|
||||
<div class="TableShadowContainerRightTop">
|
||||
<div class="TableShadowRightTop" style="background-image:url({{ template_path }}/images/global/content/table-shadow-rt.gif);"></div>
|
||||
</div>
|
||||
<div class="TableContentAndRightShadow" style="background-image:url({{ template_path }}/images/global/content/table-shadow-rm.gif);">
|
||||
<div class="TableContentContainer">
|
||||
<table class="TableContent" width="100%" style="border:1px solid #faf0d7;">
|
||||
<tbody>
|
||||
|
||||
{{ hook('HOOK_ACCOUNT_CREATE_BEFORE_CHARACTER_NAME') }}
|
||||
|
||||
<tr>
|
||||
<td class="LabelV" style="width: 150px">
|
||||
<span{% if errors.name is defined %} class="red"{% endif %}>Character Name:</span>
|
||||
</td>
|
||||
<td>
|
||||
<input form="form" id="character_name" name="name" size="{{ setting('core.create_character_name_max_length') }}" maxlength="{{ setting('core.create_character_name_max_length') }}" value="{{ name }}"/>
|
||||
<img id="character_indicator" src="images/global/general/{% if not save or errors.name is defined %}n{% endif %}ok.gif" style="display: none;" />
|
||||
<br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>
|
||||
<span id="character_error" class="FormFieldError">{% if errors.name is defined %}{{ errors.name }}{% endif %}</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
{{ hook('HOOK_ACCOUNT_CREATE_AFTER_CHARACTER_NAME') }}
|
||||
|
||||
<tr>
|
||||
<td class="LabelV" style="width: 150px">
|
||||
<span{% if errors.sex is defined %} class="red"{% endif %}>Sex:</span>
|
||||
</td>
|
||||
<td>
|
||||
<table width="100%">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
{% set i = 0 %}
|
||||
{% for id, gender in config.genders|reverse(true) %}
|
||||
{% set i = i + 1 %}
|
||||
<span style="margin-right:15px;" class="OptionContainer">
|
||||
<input form="form" type="radio" name="sex" id="sex{{ i }}" value="{{ id }}"{% if sex is not null and sex == id %} checked="checked"{% endif %}>
|
||||
<label for="sex{{ i }}">{{ gender|lower }}</label>
|
||||
</span>
|
||||
{% endfor %}
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>
|
||||
<span id="sex_error" class="FormFieldError">{% if errors.sex is defined %}{{ errors.sex }}{% endif %}</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
{{ hook('HOOK_ACCOUNT_CREATE_AFTER_SEX') }}
|
||||
|
||||
{% if config.character_samples|length > 1 %}
|
||||
<tr>
|
||||
<td class="LabelV" style="width: 150px">
|
||||
<span{% if errors.vocation is defined %} class="red"{% endif %}>Vocation:</span>
|
||||
</td>
|
||||
<td>
|
||||
<table width="100%" >
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
{% for key, sample_char in config.character_samples %}
|
||||
<span style="margin-right:15px;" class="OptionContainer">
|
||||
<input form="form" type="radio" name="vocation" id="vocation{{ key }}" value="{{ key }}"
|
||||
{% if vocation is not null and vocation == key %} checked="checked"{% endif %}>
|
||||
<label for="vocation{{ key }}">{{ config['vocations'][key] }}</label>
|
||||
</span>
|
||||
{% endfor %}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>
|
||||
<span id="vocation_error" class="FormFieldError">{% if errors.vocation is defined %}{{ errors.vocation }}{% endif %}</span>
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
|
||||
{{ hook('HOOK_ACCOUNT_CREATE_AFTER_VOCATION') }}
|
||||
|
||||
{% if config.character_towns|length > 1 %}
|
||||
<tr>
|
||||
<td class="LabelV" style="width: 150px">
|
||||
<span{% if errors.town is defined %} class="red"{% endif %}>Select your town:</span>
|
||||
</td>
|
||||
<td>
|
||||
<table width="100%" >
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
{% for town_id in config.character_towns %}
|
||||
<span style="margin-right:15px;" class="OptionContainer">
|
||||
<input form="form" type="radio" name="town" id="town{{ town_id }}" value="{{ town_id }}"
|
||||
{% if town is not null and town == town_id %} checked="checked"{% endif %}>
|
||||
<label for="town{{ town_id }}">{{ config.towns[town_id] }}</label>
|
||||
</span>
|
||||
{% endfor %}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
|
||||
{{ hook('HOOK_ACCOUNT_CREATE_AFTER_TOWNS') }}
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="TableShadowContainer">
|
||||
<div class="TableBottomShadow" style="background-image:url({{ template_path }}/images/global/content/table-shadow-bm.gif);">
|
||||
<div class="TableBottomLeftShadow" style="background-image:url({{ template_path }}/images/global/content/table-shadow-bl.gif);"></div>
|
||||
<div class="TableBottomRightShadow" style="background-image:url({{ template_path }}/images/global/content/table-shadow-br.gif);"></div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
|
||||
{{ hook('HOOK_ACCOUNT_CREATE_BETWEEN_BOXES_2') }}
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<div class="TableShadowContainerRightTop">
|
||||
<div class="TableShadowRightTop" style="background-image:url({{ template_path }}/images/global/content/table-shadow-rt.gif);"></div>
|
||||
</div>
|
||||
<div class="TableContentAndRightShadow" style="background-image:url({{ template_path }}/images/global/content/table-shadow-rm.gif);">
|
||||
<div class="TableContentContainer">
|
||||
<table class="TableContent" width="100%" style="border:1px solid #faf0d7;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td colspan="2" ><b>Please select the following check box:</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" >
|
||||
<span><input form="form" type="checkbox" id="accept_rules" name="accept_rules" value="true"{% if accept_rules %}checked{% endif %}/> <label for="accept_rules">I agree to the <a href="?subtopic=rules" target="_blank">{{ config.lua.serverName }} Rules</a>.</label></span>
|
||||
</td>
|
||||
</tr>
|
||||
{% if errors.accept_rules is defined %}
|
||||
{% if (not setting('core.mail_enabled') or not setting('core.account_mail_verify')) and setting('core.account_create_character_create') %}
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<span class="FormFieldError">{{ errors.accept_rules }}</span>
|
||||
<td>
|
||||
<div class="TableShadowContainerRightTop">
|
||||
<div class="TableShadowRightTop" style="background-image:url({{ template_path }}/images/global/content/table-shadow-rt.gif);"></div>
|
||||
</div>
|
||||
<div class="TableContentAndRightShadow" style="background-image:url({{ template_path }}/images/global/content/table-shadow-rm.gif);">
|
||||
<div class="TableContentContainer">
|
||||
<table class="TableContent" width="100%" style="border:1px solid #faf0d7;">
|
||||
<tbody>
|
||||
|
||||
{{ hook('HOOK_ACCOUNT_CREATE_BEFORE_CHARACTER_NAME') }}
|
||||
|
||||
<tr>
|
||||
<td class="LabelV" style="width: 150px">
|
||||
<span{% if errors.name is defined %} class="red"{% endif %}>Character Name:</span>
|
||||
</td>
|
||||
<td>
|
||||
<input id="character_name" name="name" size="{{ setting('core.create_character_name_max_length') }}" maxlength="{{ setting('core.create_character_name_max_length') }}" value="{{ name }}"/>
|
||||
<img id="character_indicator" src="images/global/general/{% if not save or errors.name is defined %}n{% endif %}ok.gif" style="display: none;" />
|
||||
<br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>
|
||||
<span id="character_error" class="FormFieldError">{% if errors.name is defined %}{{ errors.name }}{% endif %}</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
{{ hook('HOOK_ACCOUNT_CREATE_AFTER_CHARACTER_NAME') }}
|
||||
|
||||
<tr>
|
||||
<td class="LabelV" style="width: 150px">
|
||||
<span{% if errors.sex is defined %} class="red"{% endif %}>Sex:</span>
|
||||
</td>
|
||||
<td>
|
||||
<table width="100%">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
{% set i = 0 %}
|
||||
{% for id, gender in config.genders|reverse(true) %}
|
||||
{% set i = i + 1 %}
|
||||
<span style="margin-right:15px;" class="OptionContainer">
|
||||
<input type="radio" name="sex" id="sex{{ i }}" value="{{ id }}"{% if sex is not null and sex == id %} checked="checked"{% endif %}>
|
||||
<label for="sex{{ i }}">{{ gender|lower }}</label>
|
||||
</span>
|
||||
{% endfor %}
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>
|
||||
<span id="sex_error" class="FormFieldError">{% if errors.sex is defined %}{{ errors.sex }}{% endif %}</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
{{ hook('HOOK_ACCOUNT_CREATE_AFTER_SEX') }}
|
||||
|
||||
{% if config.character_samples|length > 1 %}
|
||||
<tr>
|
||||
<td class="LabelV" style="width: 150px">
|
||||
<span{% if errors.vocation is defined %} class="red"{% endif %}>Vocation:</span>
|
||||
</td>
|
||||
<td>
|
||||
<table width="100%" >
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
{% for key, sample_char in config.character_samples %}
|
||||
<span style="margin-right:15px;" class="OptionContainer">
|
||||
<input type="radio" name="vocation" id="vocation{{ key }}" value="{{ key }}"
|
||||
{% if vocation is not null and vocation == key %} checked="checked"{% endif %}>
|
||||
<label for="vocation{{ key }}">{{ config['vocations'][key] }}</label>
|
||||
</span>
|
||||
{% endfor %}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>
|
||||
<span id="vocation_error" class="FormFieldError">{% if errors.vocation is defined %}{{ errors.vocation }}{% endif %}</span>
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
|
||||
{{ hook('HOOK_ACCOUNT_CREATE_AFTER_VOCATION') }}
|
||||
|
||||
{% if config.character_towns|length > 1 %}
|
||||
<tr>
|
||||
<td class="LabelV" style="width: 150px">
|
||||
<span{% if errors.town is defined %} class="red"{% endif %}>Select your town:</span>
|
||||
</td>
|
||||
<td>
|
||||
<table width="100%" >
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
{% for town_id in config.character_towns %}
|
||||
<span style="margin-right:15px;" class="OptionContainer">
|
||||
<input type="radio" name="town" id="town{{ town_id }}" value="{{ town_id }}"
|
||||
{% if town is not null and town == town_id %} checked="checked"{% endif %}>
|
||||
<label for="town{{ town_id }}">{{ config.towns[town_id] }}</label>
|
||||
</span>
|
||||
{% endfor %}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
|
||||
{{ hook('HOOK_ACCOUNT_CREATE_AFTER_TOWNS') }}
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="TableShadowContainer">
|
||||
<div class="TableBottomShadow" style="background-image:url({{ template_path }}/images/global/content/table-shadow-bm.gif);">
|
||||
<div class="TableBottomLeftShadow" style="background-image:url({{ template_path }}/images/global/content/table-shadow-bl.gif);"></div>
|
||||
<div class="TableBottomRightShadow" style="background-image:url({{ template_path }}/images/global/content/table-shadow-br.gif);"></div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="TableShadowContainer">
|
||||
<div class="TableBottomShadow" style="background-image:url({{ template_path }}/images/global/content/table-shadow-bm.gif);"> <div class="TableBottomLeftShadow" style="background-image:url({{ template_path }}/images/global/content/table-shadow-bl.gif);"></div> <div class="TableBottomRightShadow" style="background-image:url({{ template_path }}/images/global/content/table-shadow-br.gif);"></div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
|
||||
{{ hook('HOOK_ACCOUNT_CREATE_AFTER_BOXES') }}
|
||||
{{ hook('HOOK_ACCOUNT_CREATE_BETWEEN_BOXES_2') }}
|
||||
|
||||
</table>
|
||||
{% endset %}
|
||||
{% include 'tables.headline.html.twig' %}
|
||||
<br/>
|
||||
{{ hook('HOOK_ACCOUNT_CREATE_BEFORE_SUBMIT_BUTTON') }}
|
||||
<table width="100%">
|
||||
<tr align="center">
|
||||
<td>
|
||||
<table border="0" cellspacing="0" cellpadding="0" >
|
||||
<tr>
|
||||
<td style="border:0px;" >
|
||||
<form id="form" action="{{ getLink('account/create') }}" method="post">
|
||||
{{ csrf() }}
|
||||
<tr>
|
||||
<td>
|
||||
<div class="TableShadowContainerRightTop">
|
||||
<div class="TableShadowRightTop" style="background-image:url({{ template_path }}/images/global/content/table-shadow-rt.gif);"></div>
|
||||
</div>
|
||||
<div class="TableContentAndRightShadow" style="background-image:url({{ template_path }}/images/global/content/table-shadow-rm.gif);">
|
||||
<div class="TableContentContainer">
|
||||
<table class="TableContent" width="100%" style="border:1px solid #faf0d7;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td colspan="2" ><b>Please select the following check box:</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" >
|
||||
<span><input type="checkbox" id="accept_rules" name="accept_rules" value="true"{% if accept_rules %}checked{% endif %}/> <label for="accept_rules">I agree to the <a href="?subtopic=rules" target="_blank">{{ config.lua.serverName }} Rules</a>.</label></span>
|
||||
</td>
|
||||
</tr>
|
||||
{% if errors.accept_rules is defined %}
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<span class="FormFieldError">{{ errors.accept_rules }}</span>
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="TableShadowContainer">
|
||||
<div class="TableBottomShadow" style="background-image:url({{ template_path }}/images/global/content/table-shadow-bm.gif);"> <div class="TableBottomLeftShadow" style="background-image:url({{ template_path }}/images/global/content/table-shadow-bl.gif);"></div> <div class="TableBottomRightShadow" style="background-image:url({{ template_path }}/images/global/content/table-shadow-br.gif);"></div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
{{ hook('HOOK_ACCOUNT_CREATE_AFTER_BOXES') }}
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<br/>
|
||||
{{ hook('HOOK_ACCOUNT_CREATE_BEFORE_SUBMIT_BUTTON') }}
|
||||
<table width="100%">
|
||||
<tr align="center">
|
||||
<td>
|
||||
<table border="0" cellspacing="0" cellpadding="0" >
|
||||
<tr>
|
||||
<td style="border:0px;" >
|
||||
<input type="hidden" name="save" value="1" >
|
||||
{{ include('buttons.submit.html.twig') }}
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
{{ hook('HOOK_ACCOUNT_CREATE_AFTER_FORM') }}
|
||||
<script type="text/javascript" src="{{ constant('BASE_URL') }}tools/check_name.js"></script>
|
||||
<style>
|
||||
|
@@ -1,6 +1,5 @@
|
||||
To generate recovery key for your account please enter your password.<br/><br/>
|
||||
{% set title = 'Generate recovery key' %}
|
||||
{% set background = config('darkborder') %}
|
||||
{% set content %}
|
||||
<table style="width:100%;" >
|
||||
<tr>
|
||||
|
@@ -1,13 +1,31 @@
|
||||
{% set title = 'Login Successful' %}
|
||||
{% set background = config('darkborder') %}
|
||||
{% set content %}
|
||||
<table style="width:100%;" >
|
||||
<tr>
|
||||
<td>You have logged in.<br/>Press <a href="{{ redirect }}" >here</a> if you are not returned automatically.</td>
|
||||
</tr>
|
||||
</table>
|
||||
{% endset %}
|
||||
{% include 'tables.headline.html.twig' %}
|
||||
<div class="TableContainer">
|
||||
<table class="Table1" cellpadding="0" cellspacing="0">
|
||||
<div class="CaptionContainer">
|
||||
<div class="CaptionInnerContainer">
|
||||
<span class="CaptionEdgeLeftTop" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);" /></span>
|
||||
<span class="CaptionEdgeRightTop" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);" /></span>
|
||||
<span class="CaptionBorderTop" style="background-image:url({{ template_path }}/images/content/table-headline-border.gif);" ></span>
|
||||
<span class="CaptionVerticalLeft" style="background-image:url({{ template_path }}/images/content/box-frame-vertical.gif);" /></span>
|
||||
<div class="Text" >Login Successful</div>
|
||||
<span class="CaptionVerticalRight" style="background-image:url({{ template_path }}/images/content/box-frame-vertical.gif);" /></span>
|
||||
<span class="CaptionBorderBottom" style="background-image:url({{ template_path }}/images/content/table-headline-border.gif);" ></span>
|
||||
<span class="CaptionEdgeLeftBottom" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);" /></span>
|
||||
<span class="CaptionEdgeRightBottom" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);" /></span>
|
||||
</div>
|
||||
</div>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="InnerTableContainer">
|
||||
<table style="width:100%;" >
|
||||
<tr>
|
||||
<td>You have logged in.<br/>Press <a href="{{ redirect }}" >here</a> if you are not returned automatically.</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
// Automatic redirect
|
||||
@@ -15,4 +33,4 @@
|
||||
function automaticRedirect() {
|
||||
window.location = "{{ redirect|raw }}";
|
||||
}
|
||||
</script>
|
||||
</script>
|
@@ -39,9 +39,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" align="center">
|
||||
{{ include('buttons.submit.html.twig') }}
|
||||
</td>
|
||||
<td colspan="2" align="center"><input type="submit" value="Submit"/>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
|
@@ -1,26 +1,24 @@
|
||||
<b>Boards</b>
|
||||
<table width="100%">
|
||||
<thead>
|
||||
<tr bgcolor="{{ config.vdarkborder }}" class="white">
|
||||
<th>
|
||||
<td>
|
||||
<span style="font-size: 10px"><b>Board</b></span>
|
||||
</th>
|
||||
<th>
|
||||
</td>
|
||||
<td>
|
||||
<span style="font-size: 10px"><b>Posts</b></span>
|
||||
</th>
|
||||
<th>
|
||||
</td>
|
||||
<td>
|
||||
<span style="font-size: 10px"><b>Threads</b></span>
|
||||
</th>
|
||||
<th align="center">
|
||||
</td>
|
||||
<td align="center">
|
||||
<span style="font-size: 10px"><b>Last Post</b></span>
|
||||
</th>
|
||||
</td>
|
||||
{% if canEdit %}
|
||||
<th>
|
||||
<td>
|
||||
<span style="font-size: 10px"><b>Options</b></span>
|
||||
</th>
|
||||
</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
</thead>
|
||||
{% set i = 0 %}
|
||||
{% for board in boards %}
|
||||
{% set i = i + 1 %}
|
||||
|
@@ -1,17 +1,31 @@
|
||||
<table border="0" cellspacing="1" cellpadding="4" width="100%">
|
||||
<thead>
|
||||
<tr bgcolor="{{ config.vdarkborder }}">
|
||||
<td colspan="3" class="white"><b>{{ title|raw }}</b></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr style="background-color: {% if background is not null %}{{ background }}{% else %}{{ config.darkborder }}{% endif %}">
|
||||
<td>
|
||||
{{ description|raw }}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="TableContainer">
|
||||
<table class="Table1" cellpadding="0" cellspacing="0">
|
||||
<div class="CaptionContainer">
|
||||
<div class="CaptionInnerContainer">
|
||||
<span class="CaptionEdgeLeftTop" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></span>
|
||||
<span class="CaptionEdgeRightTop" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></span>
|
||||
<span class="CaptionBorderTop" style="background-image:url({{ template_path }}/images/content/table-headline-border.gif);"></span>
|
||||
<span class="CaptionVerticalLeft" style="background-image:url({{ template_path }}/images/content/box-frame-vertical.gif);"></span>
|
||||
<div class="Text" >{{ title|raw }}</div>
|
||||
<span class="CaptionVerticalRight" style="background-image:url({{ template_path }}/images/content/box-frame-vertical.gif);"></span>
|
||||
<span class="CaptionBorderBottom" style="background-image:url({{ template_path }}/images/content/table-headline-border.gif);"></span>
|
||||
<span class="CaptionEdgeLeftBottom" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></span>
|
||||
<span class="CaptionEdgeRightBottom" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></span>
|
||||
</div>
|
||||
</div>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="InnerTableContainer">
|
||||
<table style="width:100%;">
|
||||
<tr>
|
||||
<td>{{ description|raw }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<br/>
|
||||
{% if custom_buttons is defined %}
|
||||
{{ custom_buttons|raw }}
|
||||
|
@@ -31,8 +31,6 @@ if($dev_mode) {
|
||||
}
|
||||
unset($dev_mode);
|
||||
|
||||
$twig->addExtension(new MyAAC\Twig\Extension\TypeCastingExtension());
|
||||
|
||||
$filter = new TwigFilter('timeago', function ($datetime) {
|
||||
|
||||
$time = time() - strtotime($datetime);
|
||||
@@ -73,8 +71,8 @@ $function = new TwigFunction('generateLink', function ($s, $n, $b = false) {
|
||||
});
|
||||
$twig->addFunction($function);
|
||||
|
||||
$function = new TwigFunction('getPlayerLink', function ($s, $p = true, $colored = false) {
|
||||
return getPlayerLink($s, $p, $colored);
|
||||
$function = new TwigFunction('getPlayerLink', function ($s, $p = true) {
|
||||
return getPlayerLink($s, $p);
|
||||
});
|
||||
$twig->addFunction($function);
|
||||
|
||||
|
17
templates/kathrine/success.html.twig
Normal file
17
templates/kathrine/success.html.twig
Normal file
@@ -0,0 +1,17 @@
|
||||
<h2>{{ title }}</h2><br/>
|
||||
{{ description|raw }}
|
||||
{% if custom_buttons is defined %}
|
||||
{{ custom_buttons|raw }}
|
||||
{% else %}
|
||||
<div style="text-align: center; margin: 0 auto;">
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<form action="{{ getLink('account/manage') }}" method="post">
|
||||
<tr>
|
||||
<td style="border:0px; text-align: center;">
|
||||
<input type="submit" name="Back" value="Back"/>
|
||||
</td>
|
||||
</tr>
|
||||
</form>
|
||||
</table>
|
||||
</div>
|
||||
{% endif %}
|
@@ -1,44 +0,0 @@
|
||||
<div class="TableContainer">
|
||||
<table class="Table1" cellpadding="0" cellspacing="0">
|
||||
<div class="CaptionContainer">
|
||||
<div class="CaptionInnerContainer">
|
||||
<span class="CaptionEdgeLeftTop" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></span>
|
||||
<span class="CaptionEdgeRightTop" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></span>
|
||||
<span class="CaptionBorderTop" style="background-image:url({{ template_path }}/images/content/table-headline-border.gif);"></span>
|
||||
<span class="CaptionVerticalLeft" style="background-image:url({{ template_path }}/images/content/box-frame-vertical.gif);"></span>
|
||||
<div class="Text" >{{ title|raw }}</div>
|
||||
<span class="CaptionVerticalRight" style="background-image:url({{ template_path }}/images/content/box-frame-vertical.gif);"></span>
|
||||
<span class="CaptionBorderBottom" style="background-image:url({{ template_path }}/images/content/table-headline-border.gif);"></span>
|
||||
<span class="CaptionEdgeLeftBottom" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></span>
|
||||
<span class="CaptionEdgeRightBottom" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></span>
|
||||
</div>
|
||||
</div>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="InnerTableContainer">
|
||||
<table style="width:100%;">
|
||||
<tr>
|
||||
<td>{{ description|raw }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<br/>
|
||||
{% if custom_buttons is defined %}
|
||||
{{ custom_buttons|raw }}
|
||||
{% else %}
|
||||
<div style="text-align:center">
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<form action="{{ getLink('account/manage') }}" method="post">
|
||||
<tr>
|
||||
<td style="border:0px;">
|
||||
{{ include('buttons.back.html.twig') }}
|
||||
</td>
|
||||
</tr>
|
||||
</form>
|
||||
</table>
|
||||
</div>
|
||||
{% endif %}
|
Reference in New Issue
Block a user