Merge branch 'main' into develop

This commit is contained in:
slawkens
2026-01-03 13:21:22 +01:00
18 changed files with 99 additions and 64 deletions

View File

@@ -22,7 +22,7 @@ csrfProtect();
$new_password = $_POST['new_password'] ?? null;
$new_password_confirm = $_POST['new_password_confirm'] ?? null;
$old_password = $_POST['old_password'] ?? null;
if(empty($new_password) && empty($new_password_confirm) && empty($old_password)) {
if(is_null($new_password) && is_null($new_password_confirm) && is_null($old_password)) {
$twig->display('account.change-password.html.twig');
}
else {

View File

@@ -48,7 +48,7 @@ else
$account_logged->setCustomField('key', $new_rec_key);
$account_logged->setCustomField(setting('core.donate_column'), $account_logged->getCustomField(setting('core.donate_column')) - setting('core.account_generate_new_reckey_price'));
$account_logged->logAction('Generated new recovery key for ' . setting('core.account_generate_new_reckey_price') . ' premium points.');
$message = '<br />Your recovery key were send on email address <b>'.$account_logged->getEMail().'</b> for '.setting('core.account_generate_new_reckey_price').' premium points.';
$message = '<br />Your recovery key was sent on email address <b>'.$account_logged->getEMail().'</b> for '.setting('core.account_generate_new_reckey_price').' premium points.';
}
else
$message = '<br /><p class="error">An error occurred while sending email ( <b>'.$account_logged->getEMail().'</b> ) with recovery key! Recovery key not changed. Try again later. For Admin: More info can be found in system/logs/mailer-error.log</p>';

View File

@@ -5,18 +5,18 @@ Please enter your password and the new email address. Make sure that you enter a
<table style="width:100%;">
<tr>
<td class="LabelV" >
<span>New Email Address:</span>
<label for="new_email">New Email Address:</label>
</td>
<td style="width:90%;">
<input form="form" name="new_email" value="{% if new_email is defined %}{{ new_email }}{% endif %}" size="30" maxlength="50" autofocus/>
<input form="form" id="new_email" name="new_email" value="{% if new_email is defined %}{{ new_email }}{% endif %}" size="30" maxlength="50" autofocus/>
</td>
</tr>
<tr>
<td class="LabelV">
<span >Password:</span>
<label for="password">Password:</label>
</td>
<td>
<input form="form" type="password" name="password" size="30" maxlength="29">
<input form="form" type="password" id="password" name="password" size="30" maxlength="29">
</td>
</tr>
</table>

View File

@@ -4,20 +4,26 @@ Here you can tell other players about yourself. This information will be display
{% set content %}
<table style="width: 100%;" >
<tr>
<td class="LabelV">Real Name:</td>
<td class="LabelV">
<label for="info_rlname">Real Name:</label>
</td>
<td style="width:90%;" >
<input form="form" name="info_rlname" value="{{ account_rlname }}" size="30" maxlength="50" >
<input form="form" id="info_rlname" name="info_rlname" value="{{ account_rlname }}" size="30" maxlength="50" >
</td>
</tr>
<tr>
<td class="LabelV" >Location:</td>
<td class="LabelV">
<label for="info_location">Location:</label>
</td>
<td>
<input form="form" name="info_location" value="{{ account_location }}" size="30" maxlength="50" >
<input form="form" id="info_location" name="info_location" value="{{ account_location }}" size="30" maxlength="50" >
</td>
</tr>
{% if setting('core.account_country') %}
<tr>
<td class="LabelV">Country:</td>
<td class="LabelV">
<label for="account_country">Country:</label>
</td>
<td>
<select form="form" name="info_country" id="account_country">
{% for code, country in countries %}

View File

@@ -6,7 +6,7 @@ Please enter your current password and a new password. For your security, please
<table style="width:100%;">
<tr>
<td class="LabelV">
<span>Current Password:</span>
<label for="old_password">Current Password:</label>
</td>
<td>
<input form="form" type="password" id="old_password" name="old_password" size="30" maxlength="29">
@@ -17,7 +17,7 @@ Please enter your current password and a new password. For your security, please
<tr>
<td class="LabelV">
<span>New Password:</span>
<label for="new_password">New Password:</label>
</td>
<td style="width:90%;">
<input form="form" type="password" id="new_password" name="new_password" size="30" maxlength="29">
@@ -28,7 +28,7 @@ Please enter your current password and a new password. For your security, please
<tr>
<td class="LabelV">
<span>New Password Again:</span>
<label for="new_password_confirm">New Password Again:</label>
</td>
<td>
<input form="form" type="password" id="new_password_confirm" name="new_password_confirm" size="30" maxlength="29">

View File

@@ -1,4 +1,4 @@
To change a name of character select player and choose a new name.<br/>
To change the name of a character, select a player and choose a new name.<br/>
<span style="color: red">Change name cost {{ setting('core.account_change_character_name_price') }} {{ setting('core.donate_column') == 'coins' ? 'coins' : 'premium points' }}. You have {{ points }} {{ setting('core.donate_column') == 'coins' ? 'coins' : 'premium points' }}.</span><br/><br/>
{% set title = 'Change Name' %}
@@ -6,9 +6,11 @@ To change a name of character select player and choose a new name.<br/>
{% set content %}
<table style="width:100%;" >
<tr>
<td class="LabelV" ><span>Character:</span></td>
<td class="LabelV">
<label for="player_id">Character:</label>
</td>
<td style="width:90%;" >
<select form="form" name="player_id">
<select form="form" id="player_id" name="player_id">
{% for player in account_logged.getPlayersList(false) %}
<option value="{{ player.getId() }}">{{ player.getName() }}</option>
{% endfor %}
@@ -16,7 +18,9 @@ To change a name of character select player and choose a new name.<br/>
</td>
</tr>
<tr>
<td class="LabelV" ><span>New Name:</span></td>
<td class="LabelV">
<label for="character_name">New Name:</label>
</td>
<td>
<input form="form" type="text" name="name" id="character_name" size="25" maxlength="25" >
<img id="character_indicator" src="images/global/general/{% if not save or errors|length > 0 %}n{% endif %}ok.gif" />

View File

@@ -6,9 +6,11 @@ To change a sex of character select player and choose a new sex.<br/>
{% set content %}
<table style="width:100%;" >
<tr>
<td class="LabelV" ><span>Character:</span></td>
<td class="LabelV">
<label for="player_id">Character:</label>
</td>
<td style="width:90%;" >
<select form="form" name="player_id">
<select form="form" id="player_id" name="player_id">
{% for player in players %}
<option value="{{ player.getId() }}">{{ player.getName() }}</option>
{% endfor %}
@@ -16,9 +18,11 @@ To change a sex of character select player and choose a new sex.<br/>
</td>
</tr>
<tr>
<td class="LabelV" ><span>New Sex:</span></td>
<td class="LabelV">
<label for="new_sex">New Sex:</label>
</td>
<td>
<select form="form" name="new_sex">
<select form="form" id="new_sex" name="new_sex">
{% for id, gender in config.genders %}
<option value="{{ id }}"{% if player_sex == id %} selected{% endif %}>{{ gender }}</option>
{% endfor %}

View File

@@ -4,15 +4,19 @@ To delete a character enter the name of the character and your password.<br/><br
{% set content %}
<table style="width:100%;">
<tr>
<td class="LabelV" ><span>Character Name:</span></td>
<td class="LabelV">
<label for="delete_name">Character Name:</label>
</td>
<td style="width:90%;">
<input form="form" name="delete_name" value="" size="30" maxlength="29"/>
<input form="form" id="delete_name" name="delete_name" value="" size="30" maxlength="29"/>
</td>
</tr>
<tr>
<td class="LabelV" ><span>Password:</span></td>
<td class="LabelV">
<label for="delete_password">Password:</label>
</td>
<td>
<input form="form" type="password" name="delete_password" size="30" maxlength="29"/>
<input form="form" type="password" id="delete_password" name="delete_password" size="30" maxlength="29"/>
</td>
</tr>
</table>

View File

@@ -48,7 +48,7 @@
</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>
<tr><td></td><td><span><strong>Please use a real address!<br/>We will send a link to validate your Email.</strong></span></td></tr>
{% endif %}
{{ hook('HOOK_ACCOUNT_CREATE_AFTER_EMAIL') }}

View File

@@ -1,13 +1,15 @@
To generate new recovery key for your account please enter your password.<br/>
<span style="color: red"><b>New recovery key cost {{ setting('core.account_generate_new_reckey_price') }} Premium Points</b>.</span> You have {{ points }} premium points. You will receive e-mail with this recovery key.
To generate a new recovery key for your account, please enter your password.<br/>
<span style="color: red"><b>New recovery key cost {{ setting('core.account_change_character_name_price') }} {{ setting('core.donate_column') == 'coins' ? 'coins' : 'premium points' }}. You have {{ points }} {{ setting('core.donate_column') == 'coins' ? 'coins' : 'premium points' }}. You will receive an e-mail with this recovery key.
<br/>
{% set title = 'Generate recovery key' %}
{% set background = config('darkborder') %}
{% set content %}
<table style="width:100%;">
<tr>
<td class="LabelV"><span>Password:</span></td>
<td><input form="form" type="password" name="reg_password" size="30" maxlength="29" ></td>
<td class="LabelV">
<label for="reg_password">Password:</label>
</td>
<td><input form="form" type="password" id="reg_password" name="reg_password" size="30" maxlength="29" ></td>
</tr>
</table>
{% endset %}
@@ -18,7 +20,7 @@ To generate new recovery key for your account please enter your password.<br/>
<td>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td style="border:0px;">
<td style="border:0;">
<form id="form" action="{{ getLink('account/register-new') }}" method="post">
{{ csrf() }}
<input type="hidden" name="registeraccountsave" value="1">
@@ -31,7 +33,7 @@ To generate new recovery key for your account please enter your password.<br/>
<td>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td style="border:0px;">
<td style="border:0;">
<form action="{{ getLink('account/manage') }}" method="post">
{{ csrf() }}
{{ include('buttons.back.html.twig') }}

View File

@@ -5,10 +5,10 @@ To generate recovery key for your account please enter your password.<br/><br/>
<table style="width:100%;" >
<tr>
<td class="LabelV">
<span>Password:</span>
<label for="reg_password">Password:</label>
</td>
<td>
<input form="form" type="password" name="reg_password" size="30" maxlength="29" autofocus/>
<input form="form" type="password" id="reg_password" name="reg_password" size="30" maxlength="29" autofocus/>
</td>
</tr>
</table>
@@ -20,7 +20,7 @@ To generate recovery key for your account please enter your password.<br/><br/>
<td>
<table border="0" cellspacing="0" cellpadding="0" >
<tr>
<td style="border:0px;">
<td style="border:0;">
<form id="form" action="{{ getLink('account/register') }}" method="post">
{{ csrf() }}
<input type="hidden" name="registeraccountsave" value="1"/>

View File

@@ -179,7 +179,7 @@
{% set i = i + 1 %}
<tr bgcolor="{{ getStyle(i) }}">
<td>
<a href="{{ getLink('characters/' ~ player.getName()|urlencode) }}">{{ player.getName() }}</a>
<a href="{{ getLink('characters/' ~ player.getName()|urlencode) }}">{{ player.getName() }}</a>{% if player.isDeleted() %}<span style="color: red"><b> [ DELETED ] </b></span>{% endif %}
</td>
<td>{{ player.getLevel() }}</td>
<td>{{ player.getVocationName() }}</td>

View File

@@ -1,7 +1,7 @@
<form action="?" method="post">
{{ csrf() }}
<input type="hidden" name="action" value="new_post" />
<input type="hidden" name="thread_id" value=" {{ thread_id }}" />
<input type="hidden" name="thread_id" value="{{ thread_id }}" />
<input type="hidden" name="subtopic" value="forum" />
<input type="hidden" name="save" value="save" />
<table width="100%">
@@ -43,7 +43,8 @@
</tr>
</table>
<div style="text-align:center">
<input type="submit" value="Post Reply" />
{% set button_name = 'Post Reply' %}
{{ include('buttons.base.html.twig') }}
</div>
</form>

View File

@@ -44,6 +44,7 @@
</tr>
</table>
<div style="text-align:center">
<input type="submit" value="Post Thread" />
{% set button_name = 'Post Thread' %}
{{ include('buttons.base.html.twig') }}
</div>
</form>

View File

@@ -6,7 +6,7 @@
<td class="white"><b>Leave guild</b></td></tr>
{% if players|length > 0 %}
<tr bgcolor="{{ config.lightborder }}">
<td width="100%">Select character to leave guild:</td>
<td width="100%">Select a character to leave the guild:</td>
</tr>
<tr bgcolor="{{ config.darkborder }}">
<td>

View File

@@ -105,7 +105,8 @@ Here you can change names of ranks, delete and add ranks, pass leadership to oth
<form action="{{ getLink('guilds') }}?guild={{ guild.getName() }}&action=delete_rank" method="post" style="display: inline;">
{{ csrf() }}
<input type="hidden" name="rankid" value="{{ rank.getId() }}" />
<input type="image" src="/images/news/delete.png" border="0" alt="Delete" />
<input type="submit" value="Delete" />
</form>
</td>
<td>

View File

@@ -4,24 +4,35 @@
<br/>
{% endif %}
<br/>
{# vocation statistics #}
{% if setting('core.online_vocations') %}
<br/>
{% set title = 'Vocation statistics' %}
{% set tableClass = 'Table3' %}
{% set background = config('darkborder') %}
{% set content %}
{% if setting('core.online_vocations_images') %}
<table width="200" cellspacing="1" cellpadding="0" border="0" align="center">
<tr bgcolor="{{ config.darkborder }}">
<td><img src="images/sorcerer.png" /></td>
<td><img src="images/druid.png" /></td>
<td><img src="images/paladin.png" /></td>
<td><img src="images/knight.png" /></td>
</tr>
<tr bgcolor="{{ config.vdarkborder }}">
<table width="200" cellspacing="1" cellpadding="0" border="0" align="center" class="myaac-table">
<thead>
<tr>
<td class="white" style="text-align: center;"><strong>Sorcerers</strong></td>
<td class="white" style="text-align: center;"><strong>Druids</strong></td>
<td class="white" style="text-align: center;"><strong>Paladins</strong></td>
<td class="white" style="text-align: center;"><strong>Knights</strong></td>
</tr>
<tr bgcolor="{{ config.lightborder }}">
</thead>
<tr>
<td><img src="images/sorcerer.png" /></td>
<td><img src="images/druid.png" /></td>
<td><img src="images/paladin.png" /></td>
<td><img src="images/knight.png" /></td>
</tr>
<tr>
<td style="text-align: center;">{{ vocs[1] }}</td>
<td style="text-align: center;">{{ vocs[2] }}</td>
<td style="text-align: center;">{{ vocs[3] }}</td>
@@ -29,30 +40,30 @@
</tr>
</table>
<div style="text-align: center;">&nbsp;</div>
{% else %}
<table border="0" cellspacing="1" cellpadding="4" width="100%">
<tr bgcolor="{{ config.vdarkborder }}">
<td class="white" colspan="2"><b>Vocation statistics</b></td>
</tr>
{% else %}
<table border="0" cellspacing="1" cellpadding="4" width="100%" class="myaac-table">
{% for i in 1..config.vocations_amount %}
<tr bgcolor="{{ getStyle(i) }}">
<tr>
<td width="25%">{{ config.vocations[i] }}</td>
<td width="75%">{{ vocs[i] }}</td>
</tr>
{% endfor %}
</table>
<br/>
<br/>
{% endif %}
{% endset %}
{% include 'tables.headline.html.twig' %}
{% endif %}
<br/>
{# show skulls #}
{% if setting('core.online_skulls') %}
<table width="100%" cellspacing="1">
<table width="100%" cellspacing="1" class="myaac-table">
<tr>
<td style="background: {{ config.darkborder }};" align="center">
<td align="center">
<img src="images/white_skull.gif"/> - 1 - 6 Frags<br/>
<img src="images/red_skull.gif"/> - 6+ Frags or Red Skull<br/>
<img src="images/black_skull.gif"/> - 10+ Frags or Black Skull
@@ -125,7 +136,8 @@
{% set title = 'Players Online' %}
{% set tableClass = 'Table2' %}
{% set content %}
<table width="100%">
<table width="100%" class="myaac-table">
<tr class="LabelH" style="position: relative; z-index: 20;">
{% if setting('core.account_country') %}
<td width="11px"><a href="{{ getLink('online')}}?order=country_{{ order == 'country_asc' ? 'desc' : 'asc' }}">#&#160;&#160;</a>
@@ -151,7 +163,7 @@
{% for player in players %}
{% set i = i + 1 %}
<tr style="background: {{ getStyle(i) }}; text-align: right; height: 40px;">
<tr style="text-align: right; height: 40px;">
{% if setting('core.account_country') %}
<td>{{ player.country_image|raw }}</td>
{% endif %}