Get rid of ?subtopic=x links

This commit is contained in:
slawkens 2024-02-03 20:34:42 +01:00
parent b22dc0014a
commit 3f5744964a
35 changed files with 96 additions and 96 deletions

View File

@ -106,7 +106,7 @@ else
</form>
</td>
<td align=right>
<form action="?subtopic=accountmanagement" method="post" >
<form action="' . getLink('account/manage') . '" method="post" >
' . csrf(true) . '
' . $twig->render('buttons.back.html.twig') . '
</form>
@ -164,7 +164,7 @@ if(isset($_POST['emailchangecancel']) && $_POST['emailchangecancel'] == 1) {
$account_logged->setCustomField("email_new", "");
$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(
'title' => 'Email Address Change Cancelled',

View File

@ -304,7 +304,7 @@ elseif($action == 'step3')
$account->setCustomField('salt', $salt);
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="">
<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>
@ -518,7 +518,7 @@ elseif($action == 'setnewpassword')
</TABLE>
<BR>
<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>
</TD></TR></FORM></TABLE></TABLE>';
}

View File

@ -19,7 +19,7 @@ if ($ret === false) {
}
if(!$logged) {
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 />';
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;
}

View File

@ -19,7 +19,7 @@ if ($ret === false) {
}
if(!$logged) {
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 />';
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;
}

View File

@ -21,10 +21,10 @@ if ($ret === false) {
if(!$logged) {
$extra_url = '';
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'];
}
echo 'You are not logged in. <a href="?subtopic=accountmanagement&redirect=' . BASE_URL . urlencode('?subtopic=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;
}

View File

@ -21,10 +21,10 @@ if ($ret === false) {
if(!$logged) {
$extra_url = '';
if(isset($_GET['section_id'])) {
$extra_url = '&action=new_thread&section_id=' . $_GET['section_id'];
$extra_url = '?action=new_thread&section_id=' . $_GET['section_id'];
}
echo 'You are not logged in. <a href="?subtopic=accountmanagement&redirect=' . BASE_URL . urlencode('?subtopic=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;
}

View File

@ -19,7 +19,7 @@ if ($ret === false) {
}
if(!$logged) {
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 />';
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;
}

View File

@ -46,7 +46,7 @@ echo '<a href="' . getLink('forum') . '">Boards</a> >> <b>'.$sections[$section_i
if(!$sections[$section_id]['closed'] || Forum::isModerator()) {
echo '<br /><br />
<a href="?subtopic=forum&action=new_thread&section_id='.$section_id.'"><img src="images/forum/topic.gif" border="0" /></a>';
<a href="' . getLink('forum') . '?action=new_thread&section_id='.$section_id.'"><img src="images/forum/topic.gif" border="0" /></a>';
}
echo '<br /><br />Page: '.$links_to_pages.'<br />';
@ -67,8 +67,8 @@ if(isset($last_threads[0])) {
foreach($last_threads as $thread) {
echo '<tr bgcolor="' . getStyle($number_of_rows++) . '"><td>';
if(Forum::isModerator()) {
echo '<a href="?subtopic=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=move_thread&id='.$thread['id'].'"\')"><span style="color:darkgreen">[MOVE]</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']);
@ -95,7 +95,7 @@ if(isset($last_threads[0])) {
echo '</table>';
if(!$sections[$section_id]['closed'] || Forum::isModerator()) {
echo '<br /><a href="?subtopic=forum&action=new_thread&section_id=' . $section_id . '"><img src="images/forum/topic.gif" border="0" /></a>';
echo '<br /><a href="' . getLink('forum') . '?action=new_thread&section_id=' . $section_id . '"><img src="images/forum/topic.gif" border="0" /></a>';
}
}
else {

View File

@ -49,7 +49,7 @@ if(empty($errors)) {
$new_rank->setLevel(1);
$new_rank->setName($rank_name);
$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...';
}
else {
@ -61,7 +61,7 @@ if(empty($errors)) {
$twig->display('guilds.back_button.html.twig', array(
'new_line' => true,
'action' => '?subtopic=guilds&guild='.$guild_name.'&action=show'
'action' => getLink('guilds') . '?guild='.$guild_name.'&action=show'
));
}
}

View File

@ -69,6 +69,6 @@ if(!empty($errors)) {
$twig->display('guilds.back_button.html.twig', array(
'new_line' => true,
'action' => '?subtopic=guilds'
'action' => getLink('guilds')
));
}

View File

@ -121,7 +121,7 @@ if(!empty($errors)) {
$twig->display('guilds.back_button.html.twig', array(
'new_line' => true,
'action' => '?subtopic=guilds'
'action' => getLink('guilds')
));
}
?>

View File

@ -72,6 +72,6 @@ if(!empty($errors)) {
$twig->display('guilds.back_button.html.twig', array(
'new_line' => true,
'action' => '?subtopic=guilds'
'action' => getLink('guilds')
));
}

View File

@ -45,7 +45,7 @@ if(empty($errors)) {
$twig->display('success.html.twig', array(
'title' => 'Delete Guild',
'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')
));
}
@ -63,6 +63,6 @@ if(!empty($errors)) {
$twig->display('guilds.back_button.html.twig', array(
'new_line' => true,
'action' => '?subtopic=guilds'
'action' => getLink('guilds')
));
}

View File

@ -96,7 +96,7 @@ if(!empty($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
{
@ -106,7 +106,7 @@ else
$twig->display('success.html.twig', array(
'title' => 'Deleted player invitation',
'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 {

View File

@ -104,7 +104,7 @@ if(empty($guild_errors)) {
$twig->display('guilds.back_button.html.twig', array(
'new_line' => true,
'action' => '?subtopic=guilds&guild='.$guild->getName().'&action=manager'
'action' => getLink('guilds') . '?guild='.$guild->getName().'&action=manager'
));
}
else
@ -122,6 +122,6 @@ if(!empty($guild_errors)) {
$twig->display('guilds.back_button.html.twig', array(
'new_line' => true,
'action' => '?subtopic=guilds'
'action' => getLink('guilds')
));
}

View File

@ -109,7 +109,7 @@ if(empty($guild_errors) && empty($guild_errors2)) {
if(empty($guild_errors) && !empty($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_errors2)) {
@ -117,5 +117,5 @@ if(!empty($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>';
}

View File

@ -63,7 +63,7 @@ if(empty($errors)) {
}
//show errors or redirect
if(empty($errors)) {
header("Location: ?subtopic=guilds&action=manager&guild=".$guild->getName());
header("Location: " . getLink('guilds') . "?action=manager&guild=".$guild->getName());
}
}
else

View File

@ -26,7 +26,7 @@ function getColorByPercent($percent)
}
$number_of_rows = 0;
$showed = false;
$link = "polls"; // your link to polls in index.php
$link = getLink('polls'); // your link to polls in index.php
$dark = $config['darkborder'];
$light = $config['lightborder'];
$time = time();
@ -49,9 +49,9 @@ function getColorByPercent($percent)
<td>
<a href="';
if($logged)
echo '?subtopic='.$link.'&id='.$poll['id'];
echo $link.'?id='.$poll['id'];
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>
</td>
@ -78,9 +78,9 @@ function getColorByPercent($percent)
<td>
<a href="';
if($logged)
echo '?subtopic='.$link.'&id='.$poll['id'];
echo $link.'?id='.$poll['id'];
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>
</td>
@ -178,12 +178,12 @@ function getColorByPercent($percent)
$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_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
{
header('Location: ?subtopic='.$link.'&id='.$_REQUEST['id'].'');
header('Location: ' . $link.'?id='.$_REQUEST['id'].'');
}
}
@ -191,7 +191,7 @@ function getColorByPercent($percent)
{
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>
<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`');
$i=1;
foreach($ANSWERS_input as $answer)
@ -282,14 +282,14 @@ function getColorByPercent($percent)
}
$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"))
{
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 */
@ -361,11 +361,11 @@ function getColorByPercent($percent)
}
}
$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)
{
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>';
}

View File

@ -37,22 +37,22 @@
</td>
{% if canEdit %}
<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
</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
</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 %}
</a>
{% 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
</a>
{% endif %}
{% 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
</a>
{% endif %}

View File

@ -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>
<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/>
Page: {{ links_to_pages|raw }}<br/>
<table width="100%">
@ -53,18 +53,18 @@ Page: {{ links_to_pages|raw }}<br/>
<td>
{% if is_moderator %}
{% 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 %}
<a href="?subtopic=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=move_thread&id={{ post.id }}" title="Move Thread"><img src="images/icons/arrow_right.gif"/></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 %}
{% 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>
{% endif %}
{% if logged %}
<a href="?subtopic=forum&action=new_post&thread_id={{ thread_id }}&quote={{ post.id }}" title="Quote Post"><img src="images/icons/comment_add.png"/></a>
<a href="{{ getLink('forum') }}?action=new_post&thread_id={{ thread_id }}&quote={{ post.id }}" title="Quote Post"><img src="images/icons/comment_add.png"/></a>
{% endif %}
</td>
</tr>
@ -72,4 +72,4 @@ Page: {{ links_to_pages|raw }}<br/>
{% endfor %}
</table>
<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>

View File

@ -7,7 +7,7 @@
</tr>
<tr bgcolor="{{ config.darkborder }}">
<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() }}
{% set i = 0 %}
{% for player in invited_players %}

View File

@ -1,13 +1,13 @@
<div style="text-align:center"><h2>Change guild description</h2></div>
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() }}
<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>
(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/>
<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() }}
{{ include('buttons.back.html.twig') }}
</form>

View File

@ -1,6 +1,6 @@
<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/>
<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() }}
<input type="hidden" name="todo" value="save" />
<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>
<br/>
<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() }}
{{ include('buttons.back.html.twig') }}
</form>

View File

@ -1,13 +1,13 @@
<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/>
<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() }}
<input type="hidden" name="todo" value="save"/>
<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/>
<br/>
<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() }}
{{ include('buttons.back.html.twig') }}
</form>

View File

@ -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() }}
<table border="0" cellspacing="1" cellpadding="4" width="100%">
<tr bgcolor="{{ config.vdarkborder }}"><td class="white"><b>Change Rank</b></td></tr>
@ -29,7 +29,7 @@
<tr>
<td>
<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() }}
{{ include('buttons.back.html.twig') }}
</form>

View File

@ -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() }}
<table width="100%" border="0" cellspacing="1" cellpadding="4">
<tr>
@ -47,7 +47,7 @@
</form>
</td>
<td align="center">
<form action="?subtopic=guilds" method="post">
<form action="{{ getLink('guilds') }}" method="post">
{{ csrf() }}
{{ include('buttons.back.html.twig') }}
</form>

View File

@ -19,7 +19,7 @@
<table style="width:100%;" >
<tr>
<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() }}
<input type="hidden" name="todo" value="save"/>
<input type="submit" value="Yes, delete"/>
@ -34,7 +34,7 @@
</div>
<br/>
<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() }}
{{ include('buttons.back.html.twig') }}
</form>

View File

@ -7,14 +7,14 @@
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>
<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() }}
{{ include('buttons.submit.html.twig') }}
</form>
</td>
<td style="width: 10px; "></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() }}
{{ include('buttons.back.html.twig') }}
</form>

View File

@ -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() }}
Invite player with name:&nbsp;&nbsp;<input type="text" name="name">&nbsp;&nbsp;&nbsp;&nbsp;
{{ include('buttons.submit.html.twig') }}

View File

@ -7,7 +7,7 @@
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>
<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() }}
{{ include('buttons.submit.html.twig') }}
</form>

View File

@ -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() }}
<table border="0" cellspacing="1" cellpadding="4" width="100%">
<tr bgcolor="{{ config.vdarkborder }}">
@ -27,7 +27,7 @@
{% endif %}
</form>
<td>
<form action="?subtopic=guilds&action=show&guild={{ guild_name }}" method="post">
<form action="{{ getLink('guilds') }}?action=show&guild={{ guild_name }}" method="post">
{{ csrf() }}
{{ include('buttons.back.html.twig') }}
</form>

View File

@ -46,7 +46,7 @@
<td style="word-break: break-all">
<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>
{% if guild.description is not empty %}
@ -82,7 +82,7 @@
{% if logged %}
<td>
<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() }}
{% set button_name = 'Found Guild' %}
{% set button_image = '_sbutton_foundguild' %}
@ -127,7 +127,7 @@
<tbody>
{% if logged %}
No guild found that suits your needs?
<form action="?subtopic=guilds&action=create" method="post">
<form action="{{ getLink('guilds') }}?action=create" method="post">
{{ csrf() }}
{% set button_name = 'Found Guild' %}
{% set button_image = '_sbutton_foundguild' %}
@ -148,9 +148,9 @@
<br/>
If you have any problem with guilds try:
<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/>
<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 %}
</td>

View File

@ -12,7 +12,7 @@ Here you can change names of ranks, delete and add ranks, pass leadership to oth
</tr>
<tr bgcolor="{{ config.lightborder }}">
<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>
<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 bgcolor="{{ config.darkborder }}">
<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>
<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 bgcolor="{{ config.lightborder }}">
<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>
<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') %}
<tr bgcolor="{{ config.darkborder }}">
<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>
<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 %}
<tr bgcolor="{{ config.lightborder }}">
<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>
<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>
<td width="120" valign="top">New rank name:</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() }}
<input type="text" name="rank_name" size="20"/>
<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>
</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() }}
<table style="clear:both" border="0" cellpadding="0" cellspacing="0" width="100%">
<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 %}
{% for rank in rank_list %}
<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>
<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
<br/>
<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() }}
{{ include('buttons.back.html.twig') }}
</form>

View File

@ -19,7 +19,7 @@
<table style="width:100%;">
<tr>
<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() }}
<input type="hidden" name="todo" value="save"/>
<input type="text" size="40" name="player"/>
@ -35,7 +35,7 @@
</div>
<br/>
<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() }}
{{ include('buttons.back.html.twig') }}
</form>

View File

@ -67,7 +67,7 @@
The guild was founded on {{ config.lua.serverName }} on {{ guild_creation_date|date("j F Y") }}.
{% 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">
</a>
{% endif %}
@ -141,7 +141,7 @@
<td>
{% 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() }}
{{ getPlayerLink(playerName, true)|raw }}
@ -161,7 +161,7 @@
{% if level_in_guild > rank.rank_level or isLeader %}
{% if guildOwnerName != playerName %}
<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>
{% endif %}
{% endif %}
@ -245,7 +245,7 @@
{% if isVice %}
<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>
{% endif %}
</td>
@ -298,7 +298,7 @@
</form>
{% else %}
{% 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() }}
<td>
<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 %}
{% 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() }}
<td>
{% set button_name = 'Invite Character' %}
@ -316,7 +316,7 @@
</td>
</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() }}
<td>
{% set button_name = 'Edit Ranks' %}
@ -327,7 +327,7 @@
{% endif %}
{% 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() }}
<td>
{% set button_name = 'Leave Guild' %}