* moved .htaccess rules to plain php (index.php)

Its a salut to nginx and other web server nutzer (not apache), as they can now simply redirect all requests with simple rule to index.php, and php will take care of all redirects. .htaccess just now redirects everything to index.php with simple 3 lines.
* change accountmanagement links to use friendly_urls
* fixed creating new forum thread
* some fixes in account changecomment action
* show info when account name/number or password is empty on login
* fixed showing account login errors
* added new twig function getLink that convert link taking into account config.friendly_urls
* internalLayoutLink -> getLink
This commit is contained in:
slawkens
2017-10-06 17:11:06 +02:00
parent 35b0795b51
commit 7b234ad41f
39 changed files with 390 additions and 380 deletions

View File

@@ -11,7 +11,7 @@
<td width="100%"></td>
<td>
<table border="0" cellspacing="0" cellpadding="0" >
<form action="?subtopic=accountmanagement&action=logout" method="post" >
<form action="{{ getLink('account/logout') }}" method="post" >
<tr>
<td style="border:0px;">
<div class="BigButton" style="background-image:url({{ template_path }}/images/buttons/sbutton.gif)"><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);"><div class="BigButtonOver" style="background-image:url({{ template_path }}/images/buttons/sbutton_over.gif);" ></div>
@@ -61,7 +61,7 @@
</table>
<div align="center">
<table border="0" cellspacing="0" cellpadding="0">
<form action="?subtopic=accountmanagement&action=registeraccount" method="post">
<form action="{{ getLink('account/register') }}" method="post">
<tr>
<td style="border:0px;">
<div class="BigButton" style="background-image:url({{ template_path }}/images/buttons/sbutton.gif)"><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);"><div class="BigButtonOver" style="background-image:url({{ template_path }}/images/buttons/sbutton_over.gif);" ></div>
@@ -93,12 +93,12 @@
<table>
<tr>
<td class="LabelV" >Note:</td>
<td style="width:100%;" >A request has beefffn submitted to change the email address of this account to <b>{{ email_new }}</b>. After <b>{{ email_new_time|date("j F Y, G:i:s") }}</b> you can accept the new email address and finish the process. Please cancel the request if you do not want your email address to be changed! Also cancel the request if you have no access to the new email address!</td>
<td style="width:100%;" >A request has been submitted to change the email address of this account to <b>{{ email_new }}</b>. After <b>{{ email_new_time|date("j F Y, G:i:s") }}</b> you can accept the new email address and finish the process. Please cancel the request if you do not want your email address to be changed! Also cancel the request if you have no access to the new email address!</td>
</tr>
</table>
<div align="center">
<table border="0" cellspacing="0" cellpadding="0">
<form action="?subtopic=accountmanagement&action=changeemail" method="post">
<form action="{{ getLink('account/email') }}" method="post">
<tr>
<td style="border:0px;">
<div class="BigButton" style="background-image:url({{ template_path }}/images/buttons/sbutton.gif)"><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);"><div class="BigButtonOver" style="background-image:url({{ template_path }}/images/buttons/sbutton_over.gif);" ></div>
@@ -194,7 +194,7 @@
<tr>
<td>
<table border="0" cellspacing="0" cellpadding="0">
<form action="?subtopic=accountmanagement&action=changepassword" method="post">
<form action="{{ getLink('account/password') }}" method="post">
<tr>
<td style="border:0px;" >
<div class="BigButton" style="background-image:url({{ template_path }}/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);"><div class="BigButtonOver" style="background-image:url({{ template_path }}/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Change Password" alt="Change Password" src="{{ template_path }}/images/buttons/_sbutton_changepassword.gif" ></div>
@@ -206,7 +206,7 @@
</td>
<td>
<table border="0" cellspacing="0" cellpadding="0">
<form action="?subtopic=accountmanagement&action=changeemail" method="post">
<form action="{{ getLink('account/email') }}" method="post">
<tr>
<td style="border:0px;">
<input type="hidden" name="newemail" value=""/>
@@ -223,7 +223,7 @@
{% if recovery_key is empty %}
<td>
<table border="0" cellspacing="0" cellpadding="0">
<form action="?subtopic=accountmanagement&action=registeraccount" method="post">
<form action="{{ getLink('account/register') }}" method="post">
<tr>
<td style="border:0px;">
<div class="BigButton" style="background-image:url({{ template_path }}/images/buttons/sbutton.gif)"><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);"><div class="BigButtonOver" style="background-image:url({{ template_path }}/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Register Account" alt="Register Account" src="{{ template_path }}/images/buttons/_sbutton_registeraccount.gif" ></div>
@@ -295,7 +295,7 @@
</td>
<td align=right>
<table border="0" cellspacing="0" cellpadding="0">
<form action="?subtopic=accountmanagement&action=changeinfo" method="post">
<form action="{{ getLink('account/info') }}" method="post">
<tr>
<td style="border:0px;">
<div class="BigButton" style="background-image:url({{ template_path }}/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url({{ template_path }}/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Edit" alt="Edit" src="{{ template_path }}/images/buttons/_sbutton_edit.gif" ></div>
@@ -450,7 +450,7 @@
{% else %}
<td><font color="red"><b>Offline</b></font></td>
{% endif %}
<td>[<a href="?subtopic=accountmanagement&action=changecomment&name={{ player.name_encoded }}" >Edit</a>]</td>
<td>[<a href="{{ getLink('account/character/comment/' ~ player.name_encoded) }}" >Edit</a>]</td>
</tr>
{% endfor %}
</table>
@@ -469,7 +469,7 @@
<tr>
<td>
<table border="0" cellspacing="0" cellpadding="0" >
<form action="?subtopic=accountmanagement&action=createcharacter" method="post" >
<form action="{{ getLink('account/character/create') }}" method="post" >
<tr>
<td style="border:0px;" ><div class="BigButton" style="background-image:url({{ template_path }}/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url({{ template_path }}/images/buttons/sbutton_over.gif);" ></div>
<input class="ButtonText" type="image" name="Create Character" alt="Create Character" src="{{ template_path }}/images/buttons/_sbutton_createcharacter.gif" ></div>
@@ -482,7 +482,7 @@
{% if config.account_change_character_name %}
<td>
<table border="0" cellspacing="0" cellpadding="0" >
<form action="?subtopic=accountmanagement&action=changename" method="post" >
<form action="{{ getLink('account/character/name') }}" method="post" >
<tr>
<td style="border:0px;" ><div class="BigButton" style="background-image:url({{ template_path }}/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$template_path.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Change Name" alt="Change Name" src="images/buttons/_sbutton_change_name.gif" ></div>
</div>
@@ -495,7 +495,7 @@
{% if config.account_change_character_sex %}
<td>
<table border="0" cellspacing="0" cellpadding="0" >
<form action="?subtopic=accountmanagement&action=changesex" method="post" >
<form action="{{ getLink('account/character/sex') }}" method="post" >
<tr>
<td style="border:0px;" ><div class="BigButton" style="background-image:url({{ template_path }}/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$template_path.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Change Sex" alt="Change Sex" src="images/buttons/_sbutton_change_sex.gif" ></div>
</div>
@@ -508,7 +508,7 @@
<td style="width:100%;" ></td>
<td>
<table border="0" cellspacing="0" cellpadding="0">
<form action="?subtopic=accountmanagement&action=deletecharacter" method="post">
<form action="{{ getLink('account/character/delete') }}" method="post">
<tr>
<td style="border:0px;">
<div class="BigButton" style="background-image:url({{ template_path }}/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url({{ template_path }}/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Delete Character" alt="Delete Character" src="{{ template_path }}/images/buttons/_sbutton_deletecharacter.gif" ></div>