mirror of
https://github.com/slawkens/myaac.git
synced 2025-10-14 09:44:55 +02:00
* 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:
@@ -17,7 +17,6 @@ if($config['account_country'])
|
||||
|
||||
$groups = new OTS_Groups_List();
|
||||
|
||||
$errors = array();
|
||||
$show_form = true;
|
||||
$config_salt_enabled = fieldExist('salt', 'accounts');
|
||||
if(!$logged)
|
||||
@@ -29,7 +28,7 @@ if(!$logged)
|
||||
{
|
||||
if(!empty($errors))
|
||||
echo $twig->render('error_box.html.twig', array('errors' => $errors));
|
||||
|
||||
|
||||
echo $twig->render('account.login.html.twig', array(
|
||||
'redirect' => isset($_REQUEST['redirect']) ? $_REQUEST['redirect'] : null,
|
||||
'account' => USE_ACCOUNT_NAME ? 'Name' : 'Number',
|
||||
@@ -39,6 +38,8 @@ if(!$logged)
|
||||
}
|
||||
}
|
||||
|
||||
$errors = array();
|
||||
|
||||
if(isset($_REQUEST['redirect']))
|
||||
{
|
||||
$redirect = urldecode($_REQUEST['redirect']);
|
||||
@@ -63,7 +64,7 @@ if(!$logged)
|
||||
else
|
||||
{
|
||||
if($config['generate_new_reckey'] && $config['mail_enabled'])
|
||||
$account_registered = '<b><font color="green">Yes ( <a href="?subtopic=accountmanagement&action=newreckey"> Buy new Recovery Key </a> )</font></b>';
|
||||
$account_registered = '<b><font color="green">Yes ( <a href="?subtopic=accountmanagement&action=registernew"> Buy new Recovery Key </a> )</font></b>';
|
||||
else
|
||||
$account_registered = '<b><font color="green">Yes</font></b>';
|
||||
}
|
||||
@@ -477,7 +478,7 @@ if($action == "changeemail") {
|
||||
}
|
||||
|
||||
//############## GENERATE NEW RECOVERY KEY ###########
|
||||
if($action == "newreckey")
|
||||
if($action == "registernew")
|
||||
{
|
||||
if(isset($_POST['reg_password']))
|
||||
$reg_password = encrypt(($config_salt_enabled ? $account_logged->getCustomField('salt') : '') . $_POST['reg_password']);
|
||||
@@ -542,45 +543,52 @@ if($action == "changeemail") {
|
||||
|
||||
//###### CHANGE CHARACTER COMMENT ######
|
||||
if($action == "changecomment") {
|
||||
$player_name = stripslashes($_REQUEST['name']);
|
||||
$player_name = isset($_REQUEST['name']) ? stripslashes($_REQUEST['name']) : null;
|
||||
$new_comment = isset($_POST['comment']) ? htmlspecialchars(stripslashes(substr($_POST['comment'],0,2000))) : NULL;
|
||||
$new_hideacc = isset($_POST['accountvisible']) ? (int)$_POST['accountvisible'] : NULL;
|
||||
if(check_name($player_name)) {
|
||||
$player = $ots->createObject('Player');
|
||||
$player->find($player_name);
|
||||
if($player->isLoaded()) {
|
||||
$player_account = $player->getAccount();
|
||||
if($account_logged->getId() == $player_account->getId()) {
|
||||
if(isset($_POST['changecommentsave']) && $_POST['changecommentsave'] == 1) {
|
||||
$player->setCustomField("hidden", $new_hideacc);
|
||||
$player->setCustomField("comment", $new_comment);
|
||||
$account_logged->logAction('Changed comment for character <b>' . $player->getName() . '</b>.');
|
||||
echo $twig->render('success.html.twig', array(
|
||||
'title' => 'Character Information Changed',
|
||||
'description' => 'The character information has been changed.'
|
||||
));
|
||||
}
|
||||
else
|
||||
{
|
||||
echo $twig->render('account.change_comment.html.twig', array(
|
||||
'player' => $player,
|
||||
'player_name' => $player_name
|
||||
));
|
||||
|
||||
if($player_name != null) {
|
||||
if (check_name($player_name)) {
|
||||
$player = $ots->createObject('Player');
|
||||
$player->find($player_name);
|
||||
if ($player->isLoaded()) {
|
||||
$player_account = $player->getAccount();
|
||||
if ($account_logged->getId() == $player_account->getId()) {
|
||||
if (isset($_POST['changecommentsave']) && $_POST['changecommentsave'] == 1) {
|
||||
$player->setCustomField("hidden", $new_hideacc);
|
||||
$player->setCustomField("comment", $new_comment);
|
||||
$account_logged->logAction('Changed comment for character <b>' . $player->getName() . '</b>.');
|
||||
echo $twig->render('success.html.twig', array(
|
||||
'title' => 'Character Information Changed',
|
||||
'description' => 'The character information has been changed.'
|
||||
));
|
||||
$show_form = false;
|
||||
}
|
||||
} else {
|
||||
$errors[] = 'Error. Character <b>' . $player_name . '</b> is not on your account.';
|
||||
}
|
||||
} else {
|
||||
$errors[] = "Error. Character with this name doesn't exist.";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "Error. Character <b>".$player_name."</b> is not on your account.";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "Error. Character with this name doesn't exist.";
|
||||
} else {
|
||||
$errors[] = 'Error. Name contain illegal characters.';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "Error. Name contain illegal characters.";
|
||||
else {
|
||||
$errors[] = 'Please enter character name.';
|
||||
}
|
||||
|
||||
if($show_form) {
|
||||
if(!empty($errors)) {
|
||||
echo $twig->render('error_box.html.twig', array('errors' => $errors));
|
||||
}
|
||||
|
||||
if(isset($player)) {
|
||||
echo $twig->render('account.change_comment.html.twig', array(
|
||||
'player' => $player,
|
||||
'player_name' => $player_name
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -181,7 +181,7 @@ if(!empty($action))
|
||||
<tr>
|
||||
<td align="right"><input type="submit" class="button" value="Save"/></td>
|
||||
<td align="left">
|
||||
<input type="button" onclick="window.location = '<?php echo getPageLink(PAGE) . ($config['friendly_urls'] ? '?' : '&'); ?>p=pages';" class="button" value="Cancel"/>
|
||||
<input type="button" onclick="window.location = '<?php echo getLink(PAGE) . ($config['friendly_urls'] ? '?' : '&'); ?>p=pages';" class="button" value="Cancel"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -203,7 +203,7 @@ $pages =
|
||||
$i = 0;
|
||||
foreach($pages as $_page): ?>
|
||||
<tr>
|
||||
<td><?php echo getLink($_page['name'], $_page['name']); ?></td>
|
||||
<td><?php echo getFullLink($_page['name'], $_page['name']); ?></td>
|
||||
<td><i><?php echo substr($_page['title'], 0, 20); ?></i></td>
|
||||
<td>
|
||||
<a href="?p=pages&action=edit&id=<?php echo $_page['id']; ?>" class="ico" title="Edit">
|
||||
|
@@ -18,7 +18,7 @@ function generate_search_form($autofocus = false)
|
||||
{
|
||||
global $config, $twig;
|
||||
return $twig->render('characters.form.html.twig', array(
|
||||
'link' => getPageLink('characters'),
|
||||
'link' => getLink('characters'),
|
||||
'autofocus' => $autofocus
|
||||
));
|
||||
}
|
||||
@@ -42,7 +42,7 @@ function retrieve_former_name($name)
|
||||
|
||||
$name = '';
|
||||
if(isset($_REQUEST['name']))
|
||||
$name = stripslashes(ucwords(strtolower(trim($_REQUEST['name']))));
|
||||
$name = urldecode(stripslashes(ucwords(strtolower($_REQUEST['name']))));
|
||||
|
||||
if(empty($name))
|
||||
{
|
||||
@@ -370,9 +370,7 @@ WHERE killers.death_id = '".$death['id']."' ORDER BY killers.final_hit DESC, kil
|
||||
|
||||
// signature
|
||||
if($config['signature_enabled']) {
|
||||
$signature_url = BASE_URL . 'tools/signature/?name=' . urlencode($player->getName());
|
||||
if($config['friendly_urls'])
|
||||
$signature_url = BASE_URL . urlencode($player->getName()) . '.png';
|
||||
$signature_url = BASE_URL . ($config['friendly_urls'] ? '' : '?') . urlencode($player->getName()) . '.png';
|
||||
}
|
||||
|
||||
$hidden = $player->getCustomField('hidden');
|
||||
@@ -431,7 +429,7 @@ WHERE killers.death_id = '".$death['id']."' ORDER BY killers.final_hit DESC, kil
|
||||
'player_link' => getPlayerLink($player->getName(), false),
|
||||
'hidden' => $hidden,
|
||||
'bannedUntil' => isset($bannedUntil) ? $bannedUntil : null,
|
||||
'characters_link' => internalLayoutLink('characters'),
|
||||
'characters_link' => getLink('characters'),
|
||||
'account_players' => isset($account_players) ? $account_players : null,
|
||||
'search_form' => generate_search_form()
|
||||
));
|
||||
|
@@ -73,7 +73,7 @@ if($canEdit)
|
||||
}
|
||||
|
||||
echo $twig->render('commands.form.html.twig', array(
|
||||
'link' => getPageLink('commands', ($action == 'edit' ? 'edit' : 'add')),
|
||||
'link' => getLink('commands/' . ($action == 'edit' ? 'edit' : 'add')),
|
||||
'action' => $action,
|
||||
'id' => isset($id) ? $id : null,
|
||||
'words' => isset($words) ? $words : null,
|
||||
|
@@ -174,7 +174,7 @@ if($canEdit)
|
||||
|
||||
if(empty($action) || $action == 'edit_board') {
|
||||
echo $twig->render('forum.add_board.html.twig', array(
|
||||
'link' => getPageLink('forum', ($action == 'edit_board' ? 'edit_board' : 'add_board')),
|
||||
'link' => getLink('forum', ($action == 'edit_board' ? 'edit_board' : 'add_board')),
|
||||
'action' => $action,
|
||||
'id' => isset($id) ? $id : null,
|
||||
'name' => isset($name) ? $name : null,
|
||||
@@ -253,7 +253,7 @@ if($action == 'show_board')
|
||||
else
|
||||
$links_to_pages .= '<b>'.($i + 1).' </b>';
|
||||
}
|
||||
echo '<a href="' . getPageLink('forum') . '">Boards</a> >> <b>'.$sections[$section_id]['name'].'</b>';
|
||||
echo '<a href="' . getLink('forum') . '">Boards</a> >> <b>'.$sections[$section_id]['name'].'</b>';
|
||||
if(!$sections[$section_id]['closed'] || Forum::isModerator())
|
||||
{
|
||||
echo '<br /><br />
|
||||
@@ -324,7 +324,7 @@ if($action == 'show_thread')
|
||||
$threads = $db->query("SELECT `players`.`id` as `player_id`, `players`.`name`, `players`.`account_id`, `players`.`vocation`" . (fieldExist('promotion', 'players') ? ", `players`.`promotion`" : "") . ", `players`.`level`, `" . TABLE_PREFIX . "forum`.`id`,`" . TABLE_PREFIX . "forum`.`first_post`, `" . TABLE_PREFIX . "forum`.`section`,`" . TABLE_PREFIX . "forum`.`post_text`, `" . TABLE_PREFIX . "forum`.`post_topic`, `" . TABLE_PREFIX . "forum`.`post_date`, `" . TABLE_PREFIX . "forum`.`post_smile`, `" . TABLE_PREFIX . "forum`.`author_aid`, `" . TABLE_PREFIX . "forum`.`author_guid`, `" . TABLE_PREFIX . "forum`.`last_edit_aid`, `" . TABLE_PREFIX . "forum`.`edit_date` FROM `players`, `" . TABLE_PREFIX . "forum` WHERE `players`.`id` = `" . TABLE_PREFIX . "forum`.`author_guid` AND `" . TABLE_PREFIX . "forum`.`first_post` = ".(int) $thread_id." ORDER BY `" . TABLE_PREFIX . "forum`.`post_date` LIMIT ".$config['forum_posts_per_page']." OFFSET ".($_page * $config['forum_posts_per_page']))->fetchAll();
|
||||
if(isset($threads[0]['name']))
|
||||
$db->query("UPDATE `" . TABLE_PREFIX . "forum` SET `views`=`views`+1 WHERE `id` = ".(int) $thread_id);
|
||||
echo '<a href="' . getPageLink('forum') . '">Boards</a> >> <a href="' . getForumBoardLink($threads[0]['section']) . '">'.$sections[$threads[0]['section']]['name'].'</a> >> <b>'.$thread_name['post_topic'].'</b>';
|
||||
echo '<a href="' . getLink('forum') . '">Boards</a> >> <a href="' . getForumBoardLink($threads[0]['section']) . '">'.$sections[$threads[0]['section']]['name'].'</a> >> <b>'.$thread_name['post_topic'].'</b>';
|
||||
echo '<br /><br /><a href="?subtopic=forum&action=new_post&thread_id='.$thread_id.'"><img src="images/forum/post.gif" border="0" /></a><br /><br />Page: '.$links_to_pages.'<br /><table width="100%"><tr bgcolor="'.$config['lightborder'].'" width="100%"><td colspan="2"><font size="4"><b>'.htmlspecialchars($thread_name['post_topic']).'</b></font><font size="1"><br />by ' . getPlayerLink($thread_name['name']) . '</font></td></tr><tr bgcolor="'.$config['vdarkborder'].'"><td width="200"><font color="white" size="1"><b>Author</b></font></td><td> </td></tr>';
|
||||
$player = $ots->createObject('Player');
|
||||
foreach($threads as $thread)
|
||||
@@ -421,7 +421,7 @@ if($action == 'new_post')
|
||||
$players_from_account = $db->query("SELECT `players`.`name`, `players`.`id` FROM `players` WHERE `players`.`account_id` = ".(int) $account_logged->getId())->fetchAll();
|
||||
$thread_id = (int) $_REQUEST['thread_id'];
|
||||
$thread = $db->query("SELECT `" . TABLE_PREFIX . "forum`.`post_topic`, `" . TABLE_PREFIX . "forum`.`id`, `" . TABLE_PREFIX . "forum`.`section` FROM `" . TABLE_PREFIX . "forum` WHERE `" . TABLE_PREFIX . "forum`.`id` = ".(int) $thread_id." AND `" . TABLE_PREFIX . "forum`.`first_post` = ".(int) $thread_id." LIMIT 1")->fetch();
|
||||
echo '<a href="' . getPageLink('forum') . '">Boards</a> >> <a href="' . getForumBoardLink($thread['section']) . '">'.$sections[$thread['section']]['name'].'</a> >> <a href="' . getForumThreadLink($thread_id) . '">'.$thread['post_topic'].'</a> >> <b>Post new reply</b><br /><h3>'.$thread['post_topic'].'</h3>';
|
||||
echo '<a href="' . getLink('forum') . '">Boards</a> >> <a href="' . getForumBoardLink($thread['section']) . '">'.$sections[$thread['section']]['name'].'</a> >> <a href="' . getForumThreadLink($thread_id) . '">'.$thread['post_topic'].'</a> >> <b>Post new reply</b><br /><h3>'.$thread['post_topic'].'</h3>';
|
||||
if(isset($thread['id']))
|
||||
{
|
||||
$quote = isset($_REQUEST['quote']) ? (int) $_REQUEST['quote'] : NULL;
|
||||
@@ -537,7 +537,7 @@ if($action == 'edit_post')
|
||||
if(isset($thread['id']))
|
||||
{
|
||||
$first_post = $db->query("SELECT `" . TABLE_PREFIX . "forum`.`author_guid`, `" . TABLE_PREFIX . "forum`.`author_aid`, `" . TABLE_PREFIX . "forum`.`first_post`, `" . TABLE_PREFIX . "forum`.`post_topic`, `" . TABLE_PREFIX . "forum`.`post_text`, `" . TABLE_PREFIX . "forum`.`post_smile`, `" . TABLE_PREFIX . "forum`.`id`, `" . TABLE_PREFIX . "forum`.`section` FROM `" . TABLE_PREFIX . "forum` WHERE `" . TABLE_PREFIX . "forum`.`id` = ".(int) $thread['first_post']." LIMIT 1")->fetch();
|
||||
echo '<a href="' . getPageLink('forum') . '">Boards</a> >> <a href="' . getForumBoardLink($thread['section']) . '">'.$sections[$thread['section']]['name'].'</a> >> <a href="' . getForumThreadLink($thread['first_post']) . '">'.$first_post['post_topic'].'</a> >> <b>Edit post</b>';
|
||||
echo '<a href="' . getLink('forum') . '">Boards</a> >> <a href="' . getForumBoardLink($thread['section']) . '">'.$sections[$thread['section']]['name'].'</a> >> <a href="' . getForumThreadLink($thread['first_post']) . '">'.$first_post['post_topic'].'</a> >> <b>Edit post</b>';
|
||||
if($account_logged->getId() == $thread['author_aid'] || Forum::isModerator())
|
||||
{
|
||||
$players_from_account = $db->query("SELECT `players`.`name`, `players`.`id` FROM `players` WHERE `players`.`account_id` = ".(int) $account_logged->getId())->fetchAll();
|
||||
@@ -634,7 +634,7 @@ if($action == 'new_thread')
|
||||
$players_from_account = $db->query('SELECT `players`.`name`, `players`.`id` FROM `players` WHERE `players`.`account_id` = '.(int) $account_logged->getId())->fetchAll();
|
||||
$section_id = isset($_REQUEST['section_id']) ? $_REQUEST['section_id'] : null;
|
||||
if($section_id !== null) {
|
||||
echo '<a href="' . getPageLink('forum') . '">Boards</a> >> <a href="' . getForumBoardLink($section_id) . '">' . $sections[$section_id]['name'] . '</a> >> <b>Post new thread</b><br />';
|
||||
echo '<a href="' . getLink('forum') . '">Boards</a> >> <a href="' . getForumBoardLink($section_id) . '">' . $sections[$section_id]['name'] . '</a> >> <b>Post new thread</b><br />';
|
||||
if (isset($sections[$section_id]['name'])) {
|
||||
if ($sections[$section_id]['closed'] && !Forum::isModerator())
|
||||
$errors[] = 'You cannot create topic on this board.';
|
||||
|
@@ -104,6 +104,8 @@ if($action == '')
|
||||
{
|
||||
foreach($guilds_list as $guild)
|
||||
{
|
||||
$link = ($config['friendly_urls'] ? '' : '?') . 'guilds/' . $guild->getName();
|
||||
|
||||
$guild_logo = $guild->getCustomField('logo_name');
|
||||
if(empty($guild_logo) || !file_exists('images/guilds/' . $guild_logo))
|
||||
$guild_logo = "default.gif";
|
||||
@@ -117,7 +119,7 @@ if($action == '')
|
||||
<TD valign="top"><B>'.$guild->getName().'</B><BR/>'.$description.'';
|
||||
if(admin())
|
||||
echo '<br /><a href="?subtopic=guilds&action=deletebyadmin&guild='.$guild->getName().'">Delete this guild (for ADMIN only!)</a>';
|
||||
echo '</TD><TD><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0><FORM ACTION="?subtopic=guilds&action=show&guild='.$guild->getName().'" METHOD=post><TR><TD>
|
||||
echo '</TD><TD><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0><FORM ACTION="' . $link . '" METHOD=post><TR><TD>
|
||||
<INPUT TYPE=image NAME="View" ALT="View" SRC="'.$template_path.'/images/buttons/sbutton_view.gif" BORDER=0 WIDTH=120 HEIGHT=18>
|
||||
</TD></TR></FORM></TABLE>
|
||||
</TD></TR>';
|
||||
@@ -145,7 +147,7 @@ if($action == '')
|
||||
<BR /><a href="?subtopic=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!';
|
||||
else
|
||||
echo 'Before you can create guild you must login.<br><TABLE BORDER=0 WIDTH=100%><TR><TD ALIGN=center><IMG SRC="'.$template_path.'/images/general/blank.gif" WIDTH=80 HEIGHT=1 BORDER=0<BR></TD><TD ALIGN=center><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0><FORM ACTION="?subtopic=accountmanagement&redirect=' . getPageLink('guilds') . '" METHOD=post><TR><TD>
|
||||
echo 'Before you can create guild you must login.<br><TABLE BORDER=0 WIDTH=100%><TR><TD ALIGN=center><IMG SRC="'.$template_path.'/images/general/blank.gif" WIDTH=80 HEIGHT=1 BORDER=0<BR></TD><TD ALIGN=center><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0><FORM ACTION="?subtopic=accountmanagement&redirect=' . getLink('guilds') . '" METHOD=post><TR><TD>
|
||||
<INPUT TYPE=image NAME="Login" ALT="Login" SRC="'.$template_path.'/images/buttons/sbutton_login.gif" BORDER=0 WIDTH=120 HEIGHT=18>
|
||||
</TD></TR></FORM></TABLE></TD><TD ALIGN=center><IMG SRC="'.$template_path.'/images/general/blank.gif" WIDTH=80 HEIGHT=1 BORDER=0<BR></TD></TR></TABLE>';
|
||||
}
|
||||
|
@@ -289,42 +289,32 @@ echo '
|
||||
);
|
||||
|
||||
foreach($types as $link => $name) {
|
||||
if($config['friendly_urls'])
|
||||
echo '<A HREF="' . getPageLink('highscores') . '/' . $link . (isset($vocation) ? '/' . $vocation : '') . '" CLASS="size_xs">' . $name . '</A><BR>';
|
||||
else
|
||||
echo '<A HREF="' . getPageLink('highscores') . '&list=' . $link . (isset($vocation) ? '&vocation=' . $vocation : '') . '" CLASS="size_xs">' . $name . '</A><BR>';
|
||||
echo '<A HREF="' . getLink('highscores') . '/' . $link . (isset($vocation) ? '/' . $vocation : '') . '" CLASS="size_xs">' . $name . '</A><BR>';
|
||||
}
|
||||
|
||||
if($config['highscores_frags'])
|
||||
if($config['friendly_urls'])
|
||||
echo '<A HREF="' . getPageLink('highscores') . '/frags" CLASS="size_xs">Frags</A><BR>';
|
||||
else
|
||||
echo '<A HREF="' . getPageLink('highscores') . '&list=frags' . (isset($vocation) ? '&vocation=' . $vocation : '') . '" CLASS="size_xs">Frags</A><BR>';
|
||||
|
||||
echo '</TD>
|
||||
</TR>
|
||||
</TABLE><BR>';
|
||||
echo '<a href="' . getLink('highscores') . '/frags' . (isset($vocation) ? '/' . $vocation : '') . '" CLASS="size_xs">Frags</a><br/>';
|
||||
echo '</td>
|
||||
</tr>
|
||||
</table><br>';
|
||||
|
||||
if($config['highscores_vocation_box'])
|
||||
{
|
||||
echo
|
||||
'<TABLE BORDER=0 width="100%" CELLPADDING=4 CELLSPACING=1>
|
||||
<TR BGCOLOR="' . $config['vdarkborder'] . '">
|
||||
<TD CLASS=whites><B>Choose a vocation</B></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="'.$config['lightborder'].'">
|
||||
<TD>
|
||||
<A HREF="' . getPageLink('highscores') . ($config['friendly_urls'] ? '/' : '&list=') . $list . '" CLASS="size_xs">[ALL]</A><BR>';
|
||||
'<table border="0" width="100%" cellpadding="4" cellspacing="1">
|
||||
<tr bgcolor="' . $config['vdarkborder'] . '">
|
||||
<td class=whites><b>Choose a vocation</b></td>
|
||||
</tr>
|
||||
<tr bgcolor="'.$config['lightborder'].'">
|
||||
<td>
|
||||
<a href="' . getLink('highscores') . ($config['friendly_urls'] ? '/' : '&list=') . $list . '" class="size_xs">[ALL]</A><BR>';
|
||||
for($i = 1; $i < count($config_vocations) / 2; $i++) {
|
||||
if($config['friendly_urls'])
|
||||
echo '<A HREF="' . getPageLink('highscores') . '/' . $list . '/' . strtolower($config_vocations[$i]) . '" CLASS="size_xs">' . $config_vocations[$i] . '</A><BR>';
|
||||
else
|
||||
echo '<A HREF="' . getPageLink('highscores') . '&list=' . $list . '&vocation=' . strtolower($config_vocations[$i]) . '" CLASS="size_xs">' . $config_vocations[$i] . '</A><BR>';
|
||||
echo '<a href="' . getLink('highscores') . '/' . $list . '/' . strtolower($config_vocations[$i]) . '" class="size_xs">' . $config_vocations[$i] . '</a><br/>';
|
||||
}
|
||||
echo '
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>';
|
||||
</td>
|
||||
</tr>
|
||||
</table>';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
|
@@ -66,11 +66,9 @@ if(isset($_GET['archive']))
|
||||
}
|
||||
else
|
||||
echo "This news doesn't exist or is hidden.<br/>";
|
||||
|
||||
//echo '<br /><a href="' . internalLayoutLink('news') . ($config['friendly_urls'] ? '/' : '') . 'archive' . '"><font size="2"><b>Back to Archive</b></font></a>';
|
||||
?>
|
||||
<center>
|
||||
<table cellspacing="0" cellpadding="0" border="0"><form method="post" action="<?php echo internalLayoutLink('news') . ($config['friendly_urls'] ? '' : '') . 'archive'; ?>"><tbody><tr><td>
|
||||
<table cellspacing="0" cellpadding="0" border="0"><form method="post" action="<?php echo getLink('news/archive'); ?>"><tbody><tr><td>
|
||||
<input width="120" height="18" border="0" type="image" src="<?php echo $template_path; ?>/images/buttons/sbutton_back.gif" alt="Back" name="Back">
|
||||
</form></td></tr></tbody></table>
|
||||
</center>
|
||||
@@ -85,14 +83,8 @@ if(isset($_GET['archive']))
|
||||
$news_DB = $db->query('SELECT * FROM '.$db->tableName(TABLE_PREFIX . 'news').' WHERE `type` = 1 AND `hidden` != 1 ORDER BY `date` DESC');
|
||||
foreach($news_DB as $news)
|
||||
{
|
||||
$link = internalLayoutLink('news');
|
||||
if($config['friendly_urls'])
|
||||
$link .= '/archive/' . $news['id'];
|
||||
else
|
||||
$link .= 'archive&id=' . $news['id'];
|
||||
|
||||
$newses[] = array(
|
||||
'link' => $link,
|
||||
'link' => ($config['friendly_urls']) . getLink('news') . '/archive/' . $news['id'],
|
||||
'icon_id' => $categories[$news['category']]['icon_id'],
|
||||
'title' => stripslashes($news['title']),
|
||||
'date' => $news['date']
|
||||
@@ -283,8 +275,8 @@ if(!$news_cached)
|
||||
|
||||
echo $twig->render('news.add.html.twig', array(
|
||||
'action' => $action,
|
||||
'news_link' => getPageLink(PAGE),
|
||||
'news_link_form' => getPageLink('news', ($action == 'edit' ? 'edit' : 'add')),
|
||||
'news_link' => getLink(PAGE),
|
||||
'news_link_form' => getLink('news/' . ($action == 'edit' ? 'edit' : 'add')),
|
||||
'news_id' => isset($id) ? $id : null,
|
||||
'title' => isset($p_title) ? $p_title : '',
|
||||
'body' => isset($body) ? $body : '',
|
||||
|
@@ -57,7 +57,7 @@ if($canEdit) {
|
||||
}
|
||||
|
||||
echo $twig->render('screenshots.form.html.twig', array(
|
||||
'link' => getPageLink('screenshots', ($action == 'edit' ? 'edit' : 'add')),
|
||||
'link' => getLink('screenshots/' . ($action == 'edit' ? 'edit' : 'add')),
|
||||
'action' => $action,
|
||||
'id' => isset($id) ? $id : null,
|
||||
'comment' => isset($comment) ? $comment : null,
|
||||
|
@@ -20,10 +20,10 @@ if(isset($config['lua']['experience_stages']))
|
||||
<h1><?php echo $config['lua']['serverName']; ?></h1>
|
||||
<h3>
|
||||
<?php if(isset($config['lua']['experienceStages']) && getBoolean($config['lua']['experienceStages'])): ?>
|
||||
Experience stages: <a href="<?php echo getPageLink('experienceStages'); ?>">Look here</a><br/>
|
||||
Experience stages: <a href="<?php echo getLink('experienceStages'); ?>">Look here</a><br/>
|
||||
<?php endif; ?>
|
||||
Commands: <a href="<?php echo getPageLink('commands'); ?>">Look here</a><br/>
|
||||
Team: <a href="<?php echo getPageLink('team'); ?>">Look here</a><br/>
|
||||
Commands: <a href="<?php echo getLink('commands'); ?>">Look here</a><br/>
|
||||
Team: <a href="<?php echo getLink('team'); ?>">Look here</a><br/>
|
||||
</h3>
|
||||
</center>
|
||||
|
||||
@@ -184,6 +184,6 @@ if(isset($config['lua']['experience_stages']))
|
||||
<?php endif; ?>
|
||||
<br/>
|
||||
<h2>Other</h2>
|
||||
<li>Respect our <a href="<?php echo getPageLink('rules'); ?>">rules</a>.</li>
|
||||
<li>Respect our <a href="<?php echo getLink('rules'); ?>">rules</a>.</li>
|
||||
<li>Please report rule violations (Botters, players breaking rules etc) with <b>CTRL + R</b>.</li>
|
||||
</ul>
|
||||
|
Reference in New Issue
Block a user