* replace "$twig->render()" with "$this->display"

This commit is contained in:
slawkens 2018-05-29 21:29:08 +02:00
parent 68d74a490b
commit c654ea329c
69 changed files with 413 additions and 413 deletions

View File

@ -18,7 +18,7 @@ else {
$locales[] = array('id' => $tmp_locale, 'name' => $locale['name']); $locales[] = array('id' => $tmp_locale, 'name' => $locale['name']);
} }
} }
echo $twig->render('install.welcome.html.twig', array( $twig->display('install.welcome.html.twig', array(
'locales' => $locales, 'locales' => $locales,
'locale' => $locale, 'locale' => $locale,
'buttons' => next_buttons(false, true) 'buttons' => next_buttons(false, true)

View File

@ -1,7 +1,7 @@
<?php <?php
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');
echo $twig->render('install.license.html.twig', array( $twig->display('install.license.html.twig', array(
'license' => file_get_contents(BASE . 'LICENSE'), 'license' => file_get_contents(BASE . 'LICENSE'),
'buttons' => next_buttons() 'buttons' => next_buttons()
)); ));

View File

@ -10,7 +10,7 @@ foreach($config['clients'] as $client) {
$clients[$client] = $client_version; $clients[$client] = $client_version;
} }
echo $twig->render('install.config.html.twig', array( $twig->display('install.config.html.twig', array(
'clients' => $clients, 'clients' => $clients,
'timezones' => DateTimeZone::listIdentifiers(), 'timezones' => DateTimeZone::listIdentifiers(),
'locale' => $locale, 'locale' => $locale,

View File

@ -51,7 +51,7 @@ if(!$error) {
error($database_error); error($database_error);
} }
else { else {
echo $twig->render('install.installer.html.twig', array( $twig->display('install.installer.html.twig', array(
'url' => 'tools/5-database.php', 'url' => 'tools/5-database.php',
'message' => $locale['loading_spinner'] 'message' => $locale['loading_spinner']
)); ));

View File

@ -9,7 +9,7 @@ if(!$error) {
error($database_error); error($database_error);
} }
echo $twig->render('install.admin.html.twig', array( $twig->display('install.admin.html.twig', array(
'locale' => $locale, 'locale' => $locale,
'session' => $_SESSION, 'session' => $_SESSION,
'errors' => isset($errors) ? $errors : null, 'errors' => isset($errors) ? $errors : null,

View File

@ -115,7 +115,7 @@ else {
} }
} }
echo $twig->render('install.installer.html.twig', array( $twig->display('install.installer.html.twig', array(
'url' => 'tools/7-finish.php', 'url' => 'tools/7-finish.php',
'message' => $locale['importing_spinner'] 'message' => $locale['importing_spinner']
)); ));

View File

@ -25,7 +25,7 @@ if($player_name != null) {
$player->setCustomField("hidden", $new_hideacc); $player->setCustomField("hidden", $new_hideacc);
$player->setCustomField("comment", $new_comment); $player->setCustomField("comment", $new_comment);
$account_logged->logAction('Changed comment for character <b>' . $player->getName() . '</b>.'); $account_logged->logAction('Changed comment for character <b>' . $player->getName() . '</b>.');
echo $twig->render('success.html.twig', array( $twig->display('success.html.twig', array(
'title' => 'Character Information Changed', 'title' => 'Character Information Changed',
'description' => 'The character information has been changed.' 'description' => 'The character information has been changed.'
)); ));
@ -47,11 +47,11 @@ else {
if($show_form) { if($show_form) {
if(!empty($errors)) { if(!empty($errors)) {
echo $twig->render('error_box.html.twig', array('errors' => $errors)); $twig->display('error_box.html.twig', array('errors' => $errors));
} }
if(isset($player)) { if(isset($player)) {
echo $twig->render('account.change_comment.html.twig', array( $twig->display('account.change_comment.html.twig', array(
'player' => $player 'player' => $player
)); ));
} }

View File

@ -39,7 +39,7 @@ if($email_new_time < 10) {
$email_new_time = time() + $config['account_mail_change'] * 24 * 3600; $email_new_time = time() + $config['account_mail_change'] * 24 * 3600;
$account_logged->setCustomField("email_new", $email_new); $account_logged->setCustomField("email_new", $email_new);
$account_logged->setCustomField("email_new_time", $email_new_time); $account_logged->setCustomField("email_new_time", $email_new_time);
echo $twig->render('success.html.twig', array( $twig->display('success.html.twig', array(
'title' => 'New Email Address Requested', 'title' => 'New Email Address Requested',
'description' => 'You have requested to change your email address to <b>' . $email_new . '</b>. The actual change will take place after <b>' . date("j F Y, G:i:s", $email_new_time) . '</b>, during which you can cancel the request at any time.' 'description' => 'You have requested to change your email address to <b>' . $email_new . '</b>. The actual change will take place after <b>' . date("j F Y, G:i:s", $email_new_time) . '</b>, during which you can cancel the request at any time.'
)); ));
@ -47,17 +47,17 @@ if($email_new_time < 10) {
else else
{ {
//show errors //show errors
echo $twig->render('error_box.html.twig', array('errors' => $errors)); $twig->display('error_box.html.twig', array('errors' => $errors));
//show form //show form
echo $twig->render('account.change_mail.html.twig', array( $twig->display('account.change_mail.html.twig', array(
'new_email' => isset($_POST['new_email']) ? $_POST['new_email'] : null 'new_email' => isset($_POST['new_email']) ? $_POST['new_email'] : null
)); ));
} }
} }
else else
{ {
echo $twig->render('account.change_mail.html.twig', array( $twig->display('account.change_mail.html.twig', array(
'new_email' => isset($_POST['new_email']) ? $_POST['new_email'] : null 'new_email' => isset($_POST['new_email']) ? $_POST['new_email'] : null
)); ));
} }
@ -73,7 +73,7 @@ else
$account_logged->save(); $account_logged->save();
$account_logged->logAction('Account email changed to <b>' . $email_new . '</b>'); $account_logged->logAction('Account email changed to <b>' . $email_new . '</b>');
echo $twig->render('success.html.twig', array( $twig->display('success.html.twig', array(
'title' => 'Email Address Change Accepted', 'title' => 'Email Address Change Accepted',
'description' => 'You have accepted <b>' . $account_logged->getEmail() . '</b> as your new email adress.' 'description' => 'You have accepted <b>' . $account_logged->getEmail() . '</b> as your new email adress.'
)); ));
@ -103,7 +103,7 @@ else
<td width="30">&nbsp;</td> <td width="30">&nbsp;</td>
</tr> </tr>
</table>'; </table>';
echo $twig->render('success.html.twig', array( $twig->display('success.html.twig', array(
'title' => 'Email Address Change Accepted', 'title' => 'Email Address Change Accepted',
'description' => 'Do you accept <b>'.$email_new.'</b> as your new email adress?', 'description' => 'Do you accept <b>'.$email_new.'</b> as your new email adress?',
'custom_buttons' => $custom_buttons 'custom_buttons' => $custom_buttons
@ -140,7 +140,7 @@ else
</td> </td>
</tr> </tr>
</table>'; </table>';
echo $twig->render('success.html.twig', array( $twig->display('success.html.twig', array(
'title' => 'Change of Email Address', 'title' => 'Change of Email Address',
'description' => 'A request has been submitted to change the email address of this account to <b>'.$email_new.'</b>.<br/>The actual change will take place on <b>'.date("j F Y, G:i:s", $email_new_time).'</b>.<br>If you do not want to change your email address, please click on "Cancel".', 'description' => 'A request has been submitted to change the email address of this account to <b>'.$email_new.'</b>.<br/>The actual change will take place on <b>'.date("j F Y, G:i:s", $email_new_time).'</b>.<br>If you do not want to change your email address, please click on "Cancel".',
'custom_buttons' => $custom_buttons 'custom_buttons' => $custom_buttons
@ -153,7 +153,7 @@ if(isset($_POST['emailchangecancel']) && $_POST['emailchangecancel'] == 1) {
$custom_buttons = '<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></center>'; $custom_buttons = '<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></center>';
echo $twig->render('success.html.twig', array( $twig->display('success.html.twig', array(
'title' => 'Email Address Change Cancelled', 'title' => 'Email Address Change Cancelled',
'description' => 'Your request to change the email address of your account has been cancelled. The email address will not be changed.', 'description' => 'Your request to change the email address of your account has been cancelled. The email address will not be changed.',
'custom_buttons' => $custom_buttons 'custom_buttons' => $custom_buttons

View File

@ -24,14 +24,14 @@ if(isset($_POST['changeinfosave']) && $_POST['changeinfosave'] == 1) {
$account_logged->setCustomField("location", $new_location); $account_logged->setCustomField("location", $new_location);
$account_logged->setCustomField("country", $new_country); $account_logged->setCustomField("country", $new_country);
$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>.'); $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>.');
echo $twig->render('success.html.twig', array( $twig->display('success.html.twig', array(
'title' => 'Public Information Changed', 'title' => 'Public Information Changed',
'description' => 'Your public information has been changed.' 'description' => 'Your public information has been changed.'
)); ));
$show_form = false; $show_form = false;
} }
else { else {
echo $twig->render('error_box.html.twig', array('errors' => $errors)); $twig->display('error_box.html.twig', array('errors' => $errors));
} }
} }
@ -51,7 +51,7 @@ if($show_form) {
foreach ($config['countries'] as $code => $country) foreach ($config['countries'] as $code => $country)
$countries[$code] = $country; $countries[$code] = $country;
echo $twig->render('account.change_info.html.twig', array( $twig->display('account.change_info.html.twig', array(
'countries' => $countries, 'countries' => $countries,
'account_rlname' => $account_rlname, 'account_rlname' => $account_rlname,
'account_location' => $account_location, 'account_location' => $account_location,

View File

@ -60,7 +60,7 @@ else
$player->save(); $player->save();
$account_logged->setCustomField("premium_points", $points - $config['account_change_character_name_points']); $account_logged->setCustomField("premium_points", $points - $config['account_change_character_name_points']);
$account_logged->logAction('Changed name from <b>' . $old_name . '</b> to <b>' . $player->getName() . '</b>.'); $account_logged->logAction('Changed name from <b>' . $old_name . '</b> to <b>' . $player->getName() . '</b>.');
echo $twig->render('success.html.twig', array( $twig->display('success.html.twig', array(
'title' => 'Character Name Changed', 'title' => 'Character Name Changed',
'description' => 'The character <b>'.$old_name.'</b> name has been changed to <b>' . $player->getName() . '</b>.' 'description' => 'The character <b>'.$old_name.'</b> name has been changed to <b>' . $player->getName() . '</b>.'
)); ));
@ -78,10 +78,10 @@ else
if($show_form) { if($show_form) {
if(!empty($errors)) { if(!empty($errors)) {
echo $twig->render('error_box.html.twig', array('errors' => $errors)); $twig->display('error_box.html.twig', array('errors' => $errors));
} }
echo $twig->render('account.change_name.html.twig', array( $twig->display('account.change_name.html.twig', array(
'points' => $points, 'points' => $points,
'errors' => $errors 'errors' => $errors
//'account_players' => $account_logged->getPlayersList() //'account_players' => $account_logged->getPlayersList()

View File

@ -14,7 +14,7 @@ $new_password = isset($_POST['newpassword']) ? $_POST['newpassword'] : NULL;
$new_password2 = isset($_POST['newpassword2']) ? $_POST['newpassword2'] : NULL; $new_password2 = isset($_POST['newpassword2']) ? $_POST['newpassword2'] : NULL;
$old_password = isset($_POST['oldpassword']) ? $_POST['oldpassword'] : NULL; $old_password = isset($_POST['oldpassword']) ? $_POST['oldpassword'] : NULL;
if(empty($new_password) && empty($new_password2) && empty($old_password)) { if(empty($new_password) && empty($new_password2) && empty($old_password)) {
echo $twig->render('account.change_password.html.twig'); $twig->display('account.change_password.html.twig');
} }
else else
{ {
@ -38,10 +38,10 @@ else
} }
if(!empty($errors)){ if(!empty($errors)){
//show errors //show errors
echo $twig->render('error_box.html.twig', array('errors' => $errors)); $twig->display('error_box.html.twig', array('errors' => $errors));
//show form //show form
echo $twig->render('account.change_password.html.twig'); $twig->display('account.change_password.html.twig');
} }
else else
{ {
@ -72,7 +72,7 @@ else
$message = '<br/><p class="error">An error occorred while sending email with password:<br/>' . $mailer->ErrorInfo . '</p>'; $message = '<br/><p class="error">An error occorred while sending email with password:<br/>' . $mailer->ErrorInfo . '</p>';
} }
echo $twig->render('success.html.twig', array( $twig->display('success.html.twig', array(
'title' => 'Password Changed', 'title' => 'Password Changed',
'description' => 'Your password has been changed.' . $message 'description' => 'Your password has been changed.' . $message
)); ));

View File

@ -57,7 +57,7 @@ else
$player->save(); $player->save();
$account_logged->setCustomField("premium_points", $points - $config['account_change_character_name_points']); $account_logged->setCustomField("premium_points", $points - $config['account_change_character_name_points']);
$account_logged->logAction('Changed sex on character <b>' . $player->getName() . '</b> from <b>' . $old_sex_str . '</b> to <b>' . $new_sex_str . '</b>.'); $account_logged->logAction('Changed sex on character <b>' . $player->getName() . '</b> from <b>' . $old_sex_str . '</b> to <b>' . $new_sex_str . '</b>.');
echo $twig->render('success.html.twig', array( $twig->display('success.html.twig', array(
'title' => 'Character Sex Changed', 'title' => 'Character Sex Changed',
'description' => 'The character <b>' . $player->getName() . '</b> sex has been changed to <b>' . $new_sex_str . '</b>.' 'description' => 'The character <b>' . $player->getName() . '</b> sex has been changed to <b>' . $new_sex_str . '</b>.'
)); ));
@ -75,9 +75,9 @@ else
if(!$sex_changed) { if(!$sex_changed) {
if(!empty($errors)) { if(!empty($errors)) {
echo $twig->render('error_box.html.twig', array('errors' => $errors)); $twig->display('error_box.html.twig', array('errors' => $errors));
} }
echo $twig->render('account.change_sex.html.twig', array( $twig->display('account.change_sex.html.twig', array(
'players' => $account_logged->getPlayersList(), 'players' => $account_logged->getPlayersList(),
'player_sex' => isset($player) ? $player->getSex() : -1, 'player_sex' => isset($player) ? $player->getSex() : -1,
'points' => $points 'points' => $points

View File

@ -183,7 +183,7 @@ if($save) {
foreach($loaded_items_to_copy as $save_item) foreach($loaded_items_to_copy as $save_item)
$db->query("INSERT INTO `player_items` (`player_id` ,`pid` ,`sid` ,`itemtype`, `count`, `attributes`) VALUES ('".$player->getId()."', '".$save_item['pid']."', '".$save_item['sid']."', '".$save_item['itemtype']."', '".$save_item['count']."', '".$save_item['attributes']."');"); $db->query("INSERT INTO `player_items` (`player_id` ,`pid` ,`sid` ,`itemtype`, `count`, `attributes`) VALUES ('".$player->getId()."', '".$save_item['pid']."', '".$save_item['sid']."', '".$save_item['itemtype']."', '".$save_item['count']."', '".$save_item['attributes']."');");
echo $twig->render('success.html.twig', array( $twig->display('success.html.twig', array(
'title' => 'Character Created', 'title' => 'Character Created',
'description' => 'The character <b>' . $newchar_name . '</b> has been created.<br/> 'description' => 'The character <b>' . $newchar_name . '</b> has been created.<br/>
Please select the outfit when you log in for the first time.<br/><br/> Please select the outfit when you log in for the first time.<br/><br/>
@ -199,11 +199,11 @@ if($save) {
} }
if(count($errors) > 0) { if(count($errors) > 0) {
echo $twig->render('error_box.html.twig', array('errors' => $errors)); $twig->display('error_box.html.twig', array('errors' => $errors));
} }
if(!$newchar_created) { if(!$newchar_created) {
echo $twig->render('account.create_character.html.twig', array( $twig->display('account.create_character.html.twig', array(
'name' => $newchar_name, 'name' => $newchar_name,
'sex' => $newchar_sex, 'sex' => $newchar_sex,
'vocation' => $newchar_vocation, 'vocation' => $newchar_vocation,

View File

@ -32,7 +32,7 @@ if(isset($_POST['deletecharactersave']) && $_POST['deletecharactersave'] == 1) {
else else
$player->setCustomField('deleted', 1); $player->setCustomField('deleted', 1);
$account_logged->logAction('Deleted character <b>' . $player->getName() . '</b>.'); $account_logged->logAction('Deleted character <b>' . $player->getName() . '</b>.');
echo $twig->render('success.html.twig', array( $twig->display('success.html.twig', array(
'title' => 'Character Deleted', 'title' => 'Character Deleted',
'description' => 'The character <b>' . $player_name . '</b> has been deleted.' 'description' => 'The character <b>' . $player_name . '</b> has been deleted.'
)); ));
@ -62,8 +62,8 @@ if(isset($_POST['deletecharactersave']) && $_POST['deletecharactersave'] == 1) {
} }
if($show_form) { if($show_form) {
if(!empty($errors)) { if(!empty($errors)) {
echo $twig->render('error_box.html.twig', array('errors' => $errors)); $twig->display('error_box.html.twig', array('errors' => $errors));
} }
echo $twig->render('account.delete_character.html.twig'); $twig->display('account.delete_character.html.twig');
} }
?> ?>

View File

@ -33,7 +33,7 @@ if(isset($_POST['registeraccountsave']) && $_POST['registeraccountsave'] == "1")
else else
$message = '<br /><p class="error">An error occorred while sending email with recovery key! You will not receive e-mail with this key. Error:<br/>' . $mailer->ErrorInfo . '</p>'; $message = '<br /><p class="error">An error occorred while sending email with recovery key! You will not receive e-mail with this key. Error:<br/>' . $mailer->ErrorInfo . '</p>';
} }
echo $twig->render('success.html.twig', array( $twig->display('success.html.twig', array(
'title' => 'Account Registered', 'title' => 'Account Registered',
'description' => 'Thank you for registering your account! You can now recover your account if you have lost access to the assigned email address by using the following<br/><br/><font size="5">&nbsp;&nbsp;&nbsp;<b>Recovery Key: '.$new_rec_key.'</b></font><br/><br/><br/><b>Important:</b><ul><li>Write down this recovery key carefully.</li><li>Store it at a safe place!</li>' . $message . '</ul>' 'description' => 'Thank you for registering your account! You can now recover your account if you have lost access to the assigned email address by using the following<br/><br/><font size="5">&nbsp;&nbsp;&nbsp;<b>Recovery Key: '.$new_rec_key.'</b></font><br/><br/><br/><b>Important:</b><ul><li>Write down this recovery key carefully.</li><li>Store it at a safe place!</li>' . $message . '</ul>'
)); ));
@ -48,11 +48,11 @@ if(isset($_POST['registeraccountsave']) && $_POST['registeraccountsave'] == "1")
if($show_form) { if($show_form) {
if(!empty($errors)) { if(!empty($errors)) {
//show errors //show errors
echo $twig->render('error_box.html.twig', array('errors' => $errors)); $twig->display('error_box.html.twig', array('errors' => $errors));
} }
//show form //show form
echo $twig->render('account.generate_recovery_key.html.twig'); $twig->display('account.generate_recovery_key.html.twig');
} }
?> ?>

View File

@ -42,7 +42,7 @@ else
else else
$message = '<br /><p class="error">An error occorred while sending email ( <b>'.$account_logged->getEMail().'</b> ) with recovery key! Recovery key not changed. Try again. Error:<br/>' . $mailer->ErrorInfo . '</p>'; $message = '<br /><p class="error">An error occorred while sending email ( <b>'.$account_logged->getEMail().'</b> ) with recovery key! Recovery key not changed. Try again. Error:<br/>' . $mailer->ErrorInfo . '</p>';
echo $twig->render('success.html.twig', array( $twig->display('success.html.twig', array(
'title' => 'Account Registered', 'title' => 'Account Registered',
'description' => '<ul>' . $message . '</ul>' 'description' => '<ul>' . $message . '</ul>'
)); ));
@ -56,13 +56,13 @@ else
//show errors if not empty //show errors if not empty
if(!empty($errors)) { if(!empty($errors)) {
echo $twig->render('error_box.html.twig', array('errors' => $errors)); $twig->display('error_box.html.twig', array('errors' => $errors));
} }
if($show_form) if($show_form)
{ {
//show form //show form
echo $twig->render('account.generate_new_recovery_key.html.twig', array( $twig->display('account.generate_new_recovery_key.html.twig', array(
'points' => $points 'points' => $points
)); ));
} }

View File

@ -21,7 +21,7 @@ $config_salt_enabled = $db->hasColumn('accounts', 'salt');
if(ACTION == "logout" && !isset($_REQUEST['account_login'])) { if(ACTION == "logout" && !isset($_REQUEST['account_login'])) {
if(!defined('HOOK_LOGOUT_DISPLAY') || HOOK_LOGOUT_DISPLAY) { // plugin will take care of this message if(!defined('HOOK_LOGOUT_DISPLAY') || HOOK_LOGOUT_DISPLAY) { // plugin will take care of this message
echo $twig->render('account.logout.html.twig'); $twig->display('account.logout.html.twig');
} }
return; return;
@ -35,9 +35,9 @@ if(!$logged)
} }
if(!empty($errors)) if(!empty($errors))
echo $twig->render('error_box.html.twig', array('errors' => $errors)); $twig->display('error_box.html.twig', array('errors' => $errors));
echo $twig->render('account.login.html.twig', array( $twig->display('account.login.html.twig', array(
'redirect' => isset($_REQUEST['redirect']) ? $_REQUEST['redirect'] : null, 'redirect' => isset($_REQUEST['redirect']) ? $_REQUEST['redirect'] : null,
'account' => USE_ACCOUNT_NAME ? 'Name' : 'Number', 'account' => USE_ACCOUNT_NAME ? 'Name' : 'Number',
'error' => isset($errors[0]) ? $errors[0] : null 'error' => isset($errors[0]) ? $errors[0] : null
@ -52,7 +52,7 @@ $errors = array();
{ {
$redirect = urldecode($_REQUEST['redirect']); $redirect = urldecode($_REQUEST['redirect']);
echo $twig->render('account.redirect.html.twig', array( $twig->display('account.redirect.html.twig', array(
'redirect' => $redirect 'redirect' => $redirect
)); ));
return; return;
@ -114,7 +114,7 @@ $errors = array();
$account_players = $account_logged->getPlayersList(); $account_players = $account_logged->getPlayersList();
$account_players->orderBy('id'); $account_players->orderBy('id');
echo $twig->render('account.management.html.twig', array( $twig->display('account.management.html.twig', array(
'welcome_message' => $welcome_message, 'welcome_message' => $welcome_message,
'recovery_key' => $recovery_key, 'recovery_key' => $recovery_key,
'email_change' => $email_change, 'email_change' => $email_change,

View File

@ -47,7 +47,7 @@ $tmp = '';
if(fetchDatabaseConfig('site_closed_message', $tmp)) if(fetchDatabaseConfig('site_closed_message', $tmp))
$closed_message = $tmp; $closed_message = $tmp;
echo $twig->render('admin.dashboard.html.twig', array( $twig->display('admin.dashboard.html.twig', array(
'is_closed' => $is_closed, 'is_closed' => $is_closed,
'closed_message' => $closed_message, 'closed_message' => $closed_message,
'status' => $status 'status' => $status

View File

@ -13,7 +13,7 @@ $title = 'Load items.xml';
require LIBS . 'items.php'; require LIBS . 'items.php';
require LIBS . 'weapons.php'; require LIBS . 'weapons.php';
echo $twig->render('admin.items.html.twig'); $twig->display('admin.items.html.twig');
$reload = isset($_REQUEST['reload']) && (int)$_REQUEST['reload'] == 1; $reload = isset($_REQUEST['reload']) && (int)$_REQUEST['reload'] == 1;
if($reload) { if($reload) {

View File

@ -19,5 +19,5 @@ if(isset($errors)) {
} }
} }
echo $twig->render('admin.login.html.twig'); $twig->display('admin.login.html.twig');
?> ?>

View File

@ -37,7 +37,7 @@ if($preview) {
} }
echo $twig->render('admin.mailer.html.twig', array( $twig->display('admin.mailer.html.twig', array(
'mail_subject' => $mail_subject, 'mail_subject' => $mail_subject,
'mail_content' => $mail_content, 'mail_content' => $mail_content,
'preview_done' => $preview_done 'preview_done' => $preview_done

View File

@ -101,7 +101,7 @@ if(isset($_REQUEST['template'])) {
echo '<input type="button" class="button" value="Cancel" onclick="window.location = \'' . ADMIN_URL . '?p=menus&template=' . $template . '\';">'; echo '<input type="button" class="button" value="Cancel" onclick="window.location = \'' . ADMIN_URL . '?p=menus&template=' . $template . '\';">';
echo '</form>'; echo '</form>';
echo $twig->render('admin.menus.js.html.twig', array( $twig->display('admin.menus.js.html.twig', array(
'menus' => $menus, 'menus' => $menus,
'last_id' => $last_id 'last_id' => $last_id
)); ));
@ -115,7 +115,7 @@ else {
} }
} }
echo $twig->render('admin.menus.form.html.twig', array( $twig->display('admin.menus.form.html.twig', array(
'templates' => $templates 'templates' => $templates
)); ));
} }

View File

@ -27,7 +27,7 @@ else
$_content = $notepad_content; $_content = $notepad_content;
} }
echo $twig->render('admin.notepad.html.twig', array('content' => isset($_content) ? $_content : null)); $twig->display('admin.notepad.html.twig', array('content' => isset($_content) ? $_content : null));
class Notepad class Notepad
{ {

View File

@ -84,7 +84,7 @@ if(!empty($action))
} }
if(!empty($errors)) if(!empty($errors))
echo $twig->render('error_box.html.twig', array('errors' => $errors)); $twig->display('error_box.html.twig', array('errors' => $errors));
} }
$query = $query =
@ -100,7 +100,7 @@ foreach($query as $_page) {
); );
} }
echo $twig->render('admin.pages.form.html.twig', array( $twig->display('admin.pages.form.html.twig', array(
'action' => $action, 'action' => $action,
'id' => $action == 'edit' ? $id : null, 'id' => $action == 'edit' ? $id : null,
'name' => $name, 'name' => $name,
@ -111,7 +111,7 @@ echo $twig->render('admin.pages.form.html.twig', array(
'access' => $access 'access' => $access
)); ));
echo $twig->render('admin.pages.html.twig', array( $twig->display('admin.pages.html.twig', array(
'pages' => $pages 'pages' => $pages
)); ));

View File

@ -12,7 +12,7 @@ $title = 'Plugin manager';
require LIBS . 'plugins.php'; require LIBS . 'plugins.php';
echo $twig->render('admin.plugins.form.html.twig'); $twig->display('admin.plugins.form.html.twig');
if(isset($_REQUEST['uninstall'])){ if(isset($_REQUEST['uninstall'])){
$uninstall = $_REQUEST['uninstall']; $uninstall = $_REQUEST['uninstall'];
@ -118,7 +118,7 @@ foreach(get_plugins() as $plugin)
} }
} }
echo $twig->render('admin.plugins.html.twig', array( $twig->display('admin.plugins.html.twig', array(
'plugins' => $plugins 'plugins' => $plugins
)); ));
?> ?>

View File

@ -28,7 +28,7 @@ $total_houses = $query['how_much'];
$points = $db->query('SELECT `premium_points`, `' . (USE_ACCOUNT_NAME ? 'name' : 'id') . '` as `name` FROM `accounts` ORDER BY `premium_points` DESC LIMIT 10;'); $points = $db->query('SELECT `premium_points`, `' . (USE_ACCOUNT_NAME ? 'name' : 'id') . '` as `name` FROM `accounts` ORDER BY `premium_points` DESC LIMIT 10;');
echo $twig->render('admin.statistics.html.twig', array( $twig->display('admin.statistics.html.twig', array(
'total_accounts' => $total_accounts, 'total_accounts' => $total_accounts,
'total_players' => $total_players, 'total_players' => $total_players,
'total_guilds' => $total_guilds, 'total_guilds' => $total_guilds,

View File

@ -28,7 +28,7 @@ function compare($a, $b) {
$tmp = $visitors->getVisitors(); $tmp = $visitors->getVisitors();
usort($tmp, 'compare'); usort($tmp, 'compare');
echo $twig->render('admin.visitors.html.twig', array( $twig->display('admin.visitors.html.twig', array(
'config_visitors_counter_ttl' => $config['visitors_counter_ttl'], 'config_visitors_counter_ttl' => $config['visitors_counter_ttl'],
'visitors' => $tmp 'visitors' => $tmp
)); ));

View File

@ -35,7 +35,7 @@ foreach($changelogs as $key => &$log)
$i++; $i++;
} }
echo $twig->render('changelog.html.twig', array( $twig->display('changelog.html.twig', array(
'changelogs' => $changelogs, 'changelogs' => $changelogs,
'page' => $_page, 'page' => $_page,
'next_page' => $next_page, 'next_page' => $next_page,

View File

@ -377,7 +377,7 @@ WHERE killers.death_id = '".$death['id']."' ORDER BY killers.final_hit DESC, kil
} }
} }
echo $twig->render('characters.html.twig', array( $twig->display('characters.html.twig', array(
'outfit' => isset($outfit) ? $outfit : null, 'outfit' => isset($outfit) ? $outfit : null,
'player' => $player, 'player' => $player,
'account' => $account, 'account' => $account,
@ -421,7 +421,7 @@ WHERE killers.death_id = '".$death['id']."' ORDER BY killers.final_hit DESC, kil
else else
{ {
$search_errors[] = 'Character <b>' . $name . '</b> does not exist or has been deleted.'; $search_errors[] = 'Character <b>' . $name . '</b> does not exist or has been deleted.';
echo $twig->render('error_box.html.twig', array('errors' => $search_errors)); $twig->display('error_box.html.twig', array('errors' => $search_errors));
$search_errors = array(); $search_errors = array();
$promotion = ''; $promotion = '';
@ -450,4 +450,4 @@ else
} }
if(!empty($search_errors)) if(!empty($search_errors))
echo $twig->render('error_box.html.twig', array('errors' => $search_errors)); $twig->display('error_box.html.twig', array('errors' => $search_errors));

View File

@ -68,10 +68,10 @@ if($canEdit)
} }
if(!empty($errors)) if(!empty($errors))
echo $twig->render('error_box.html.twig', array('errors' => $errors)); $twig->display('error_box.html.twig', array('errors' => $errors));
} }
echo $twig->render('commands.form.html.twig', array( $twig->display('commands.form.html.twig', array(
'link' => getLink('commands/' . ($action == 'edit' ? 'edit' : 'add')), 'link' => getLink('commands/' . ($action == 'edit' ? 'edit' : 'add')),
'action' => $action, 'action' => $action,
'id' => isset($id) ? $id : null, 'id' => isset($id) ? $id : null,
@ -88,7 +88,7 @@ $commands =
' ORDER BY `ordering`;'); ' ORDER BY `ordering`;');
$last = $commands->rowCount(); $last = $commands->rowCount();
echo $twig->render('commands.html.twig', array( $twig->display('commands.html.twig', array(
'commands' => $commands, 'commands' => $commands,
'last' => $last, 'last' => $last,
'canEdit' => $canEdit 'canEdit' => $canEdit

View File

@ -171,7 +171,7 @@ if($save)
if(_mail($email, 'New account on ' . $config['lua']['serverName'], $body_html)) if(_mail($email, 'New account on ' . $config['lua']['serverName'], $body_html))
{ {
echo $twig->render('account.created.verify.html.twig', array( $twig->display('account.created.verify.html.twig', array(
'account' => $tmp_account 'account' => $tmp_account
)); ));
} }
@ -184,7 +184,7 @@ if($save)
} }
else else
{ {
echo $twig->render('account.created.html.twig', array( $twig->display('account.created.html.twig', array(
'account' => $tmp_account 'account' => $tmp_account
)); ));
@ -223,7 +223,7 @@ if($config['account_country_recognize']) {
} }
if(!empty($errors)) if(!empty($errors))
echo $twig->render('error_box.html.twig', array('errors' => $errors)); $twig->display('error_box.html.twig', array('errors' => $errors));
if($config['account_country']) { if($config['account_country']) {
$countries = array(); $countries = array();
@ -235,8 +235,8 @@ if($config['account_country']) {
$countries[$code] = $c; $countries[$code] = $c;
} }
echo $twig->render('account.create.js.html.twig'); $twig->display('account.create.js.html.twig');
echo $twig->render('account.create.html.twig', array( $twig->display('account.create.html.twig', array(
'account' => isset($_POST['account']) ? $_POST['account'] : '', 'account' => isset($_POST['account']) ? $_POST['account'] : '',
'email' => isset($_POST['email']) ? $_POST['email'] : '', 'email' => isset($_POST['email']) ? $_POST['email'] : '',
'countries' => isset($countries) ? $countries : null, 'countries' => isset($countries) ? $countries : null,

View File

@ -238,5 +238,5 @@ else
} }
//back button //back button
echo $twig->render('creatures.back_button.html.twig'); $twig->display('creatures.back_button.html.twig');
?> ?>

View File

@ -9,5 +9,5 @@
*/ */
$title = 'Downloads'; $title = 'Downloads';
echo $twig->render('downloads.html.twig'); $twig->display('downloads.html.twig');
?> ?>

View File

@ -18,7 +18,7 @@ for($i = 0; $i < $columns; $i++) {
} }
} }
echo $twig->render('experience_table.html.twig', array( $twig->display('experience_table.html.twig', array(
'experience' => $experience 'experience' => $experience
)); ));
?> ?>

View File

@ -56,10 +56,10 @@ if($canEdit)
} }
if(!empty($errors)) if(!empty($errors))
echo $twig->render('error_box.html.twig', array('errors' => $errors)); $twig->display('error_box.html.twig', array('errors' => $errors));
} }
echo $twig->render('faq.form.html.twig', array( $twig->display('faq.form.html.twig', array(
'link' => getLink('faq/' . ($action == 'edit' ? 'edit' : 'add')), 'link' => getLink('faq/' . ($action == 'edit' ? 'edit' : 'add')),
'action' => $action, 'action' => $action,
'id' => isset($id) ? $id : null, 'id' => isset($id) ? $id : null,
@ -83,7 +83,7 @@ if(!$faqs->rowCount())
} }
$last = $faqs->rowCount(); $last = $faqs->rowCount();
echo $twig->render('faq.html.twig', array( $twig->display('faq.html.twig', array(
'faqs' => $faqs, 'faqs' => $faqs,
'last' => $last, 'last' => $last,
'canEdit' => $canEdit 'canEdit' => $canEdit

View File

@ -89,14 +89,14 @@ if($canEdit)
} }
if(!empty($errors)) { if(!empty($errors)) {
echo $twig->render('error_box.html.twig', array('errors' => $errors)); $twig->display('error_box.html.twig', array('errors' => $errors));
$action = ''; $action = '';
} }
} }
if(empty($action) || $action == 'edit_board') { if(empty($action) || $action == 'edit_board') {
$guilds = $db->query('SELECT `id`, `name` FROM `guilds`')->fetchAll(); $guilds = $db->query('SELECT `id`, `name` FROM `guilds`')->fetchAll();
echo $twig->render('forum.add_board.html.twig', array( $twig->display('forum.add_board.html.twig', array(
'link' => getLink('forum', ($action == 'edit_board' ? 'edit_board' : 'add_board')), 'link' => getLink('forum', ($action == 'edit_board' ? 'edit_board' : 'add_board')),
'action' => $action, 'action' => $action,
'id' => isset($id) ? $id : null, 'id' => isset($id) ? $id : null,
@ -163,7 +163,7 @@ if(empty($action))
} }
} }
echo $twig->render('forum.boards.html.twig', array( $twig->display('forum.boards.html.twig', array(
'boards' => $boards, 'boards' => $boards,
'canEdit' => $canEdit, 'canEdit' => $canEdit,
'last' => count($sections) 'last' => count($sections)

View File

@ -89,9 +89,9 @@ if(Forum::canPost($account_logged))
if(!$saved) if(!$saved)
{ {
if(!empty($errors)) if(!empty($errors))
echo $twig->render('error_box.html.twig', array('errors' => $errors)); $twig->display('error_box.html.twig', array('errors' => $errors));
echo $twig->render('forum.edit_post.html.twig', array( $twig->display('forum.edit_post.html.twig', array(
'post_id' => $post_id, 'post_id' => $post_id,
'players' => $players_from_account, 'players' => $players_from_account,
'player_id' => $char_id, 'player_id' => $char_id,

View File

@ -48,7 +48,7 @@ else {
if ($post['id'] == $post_id) { if ($post['id'] == $post_id) {
if ($post['id'] == $post['first_post']) { if ($post['id'] == $post['first_post']) {
echo $twig->render('forum.move_thread.html.twig', array( $twig->display('forum.move_thread.html.twig', array(
'thread' => $post['post_topic'], 'thread' => $post['post_topic'],
'author' => $name['name'], 'author' => $name['name'],
'board' => $sections[$post['section']]['name'], 'board' => $sections[$post['section']]['name'],

View File

@ -85,7 +85,7 @@ if(Forum::canPost($account_logged))
if(!$saved) if(!$saved)
{ {
if(!empty($errors)) if(!empty($errors))
echo $twig->render('error_box.html.twig', array('errors' => $errors)); $twig->display('error_box.html.twig', array('errors' => $errors));
$threads = $db->query("SELECT `players`.`name`, `" . TABLE_PREFIX . "forum`.`post_text`, `" . TABLE_PREFIX . "forum`.`post_topic`, `" . TABLE_PREFIX . "forum`.`post_smile`, `" . TABLE_PREFIX . "forum`.`post_html`, `" . TABLE_PREFIX . "forum`.`author_aid` 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` DESC LIMIT 5")->fetchAll(); $threads = $db->query("SELECT `players`.`name`, `" . TABLE_PREFIX . "forum`.`post_text`, `" . TABLE_PREFIX . "forum`.`post_topic`, `" . TABLE_PREFIX . "forum`.`post_smile`, `" . TABLE_PREFIX . "forum`.`post_html`, `" . TABLE_PREFIX . "forum`.`author_aid` 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` DESC LIMIT 5")->fetchAll();
foreach($threads as &$thread) { foreach($threads as &$thread) {
@ -96,7 +96,7 @@ if(Forum::canPost($account_logged))
} }
} }
echo $twig->render('forum.new_post.html.twig', array( $twig->display('forum.new_post.html.twig', array(
'thread_id' => $thread_id, 'thread_id' => $thread_id,
'post_player_id' => $char_id, 'post_player_id' => $char_id,
'players' => $players_from_account, 'players' => $players_from_account,
@ -116,4 +116,4 @@ if(Forum::canPost($account_logged))
else else
echo "Your account is banned, deleted or you don't have any player with level " . $config['forum_level_required'] . " on your account. You can't post."; echo "Your account is banned, deleted or you don't have any player with level " . $config['forum_level_required'] . " on your account. You can't post.";
echo $twig->render('forum.fullscreen.html.twig'); $twig->display('forum.fullscreen.html.twig');

View File

@ -79,9 +79,9 @@ if(Forum::canPost($account_logged))
if (!$saved) { if (!$saved) {
if (!empty($errors)) if (!empty($errors))
echo $twig->render('error_box.html.twig', array('errors' => $errors)); $twig->display('error_box.html.twig', array('errors' => $errors));
echo $twig->render('forum.new_thread.html.twig', array( $twig->display('forum.new_thread.html.twig', array(
'section_id' => $section_id, 'section_id' => $section_id,
'players' => $players_from_account, 'players' => $players_from_account,
'post_player_id' => $char_id, 'post_player_id' => $char_id,

View File

@ -90,7 +90,7 @@ foreach($posts as &$post)
} }
} }
echo $twig->render('forum.show_thread.html.twig', array( $twig->display('forum.show_thread.html.twig', array(
'thread_id' => $thread_id, 'thread_id' => $thread_id,
'posts' => $posts, 'posts' => $posts,
'links_to_pages' => $links_to_pages, 'links_to_pages' => $links_to_pages,
@ -100,4 +100,4 @@ echo $twig->render('forum.show_thread.html.twig', array(
'is_moderator' => Forum::isModerator() 'is_moderator' => Forum::isModerator()
)); ));
echo $twig->render('forum.fullscreen.html.twig'); $twig->display('forum.fullscreen.html.twig');

View File

@ -52,11 +52,11 @@ if($canEdit) {
} }
if (!empty($errors)) if (!empty($errors))
echo $twig->render('error_box.html.twig', array('errors' => $errors)); $twig->display('error_box.html.twig', array('errors' => $errors));
} }
if(!isset($_GET['image'])) { if(!isset($_GET['image'])) {
echo $twig->render('gallery.form.html.twig', array( $twig->display('gallery.form.html.twig', array(
'link' => getLink('gallery/' . ($action == 'edit' ? 'edit' : 'add')), 'link' => getLink('gallery/' . ($action == 'edit' ? 'edit' : 'add')),
'action' => $action, 'action' => $action,
'id' => isset($id) ? $id : null, 'id' => isset($id) ? $id : null,
@ -93,7 +93,7 @@ if(isset($_GET['image']))
else else
$next_image = NULL; $next_image = NULL;
echo $twig->render('gallery.get.html.twig', array( $twig->display('gallery.get.html.twig', array(
'previous' => $previous_image ? $previous_image['id'] : null, 'previous' => $previous_image ? $previous_image['id'] : null,
'next' => $next_image ? $next_image['id'] : null, 'next' => $next_image ? $next_image['id'] : null,
'image' => $image 'image' => $image
@ -117,7 +117,7 @@ if(!$last)
return; return;
} }
echo $twig->render('gallery.html.twig', array( $twig->display('gallery.html.twig', array(
'images' => $images, 'images' => $images,
'last' => $last, 'last' => $last,
'canEdit' => $canEdit 'canEdit' => $canEdit

View File

@ -96,16 +96,16 @@ else
} }
if(!empty($errors)) { if(!empty($errors)) {
echo $twig->render('error_box.html.twig', array('errors' => $errors)); $twig->display('error_box.html.twig', array('errors' => $errors));
echo $twig->render('guilds.back_button.html.twig', array( $twig->display('guilds.back_button.html.twig', array(
'action' => getLink('guilds') . '/' . $guild_name 'action' => getLink('guilds') . '/' . $guild_name
)); ));
} }
else { else {
if(isset($_REQUEST['todo']) && $_REQUEST['todo'] == 'save') { if(isset($_REQUEST['todo']) && $_REQUEST['todo'] == 'save') {
$guild->acceptInvite($player); $guild->acceptInvite($player);
echo $twig->render('success.html.twig', array( $twig->display('success.html.twig', array(
'title' => 'Accept invitation', 'title' => 'Accept invitation',
'description' => 'Player with name <b>'.$player->getName().'</b> has been added to guild <b>'.$guild->getName() . '</b>.', 'description' => 'Player with name <b>'.$player->getName().'</b> has been added to guild <b>'.$guild->getName() . '</b>.',
'custom_buttons' => $twig->render('guilds.back_button.html.twig', array( 'custom_buttons' => $twig->render('guilds.back_button.html.twig', array(
@ -117,7 +117,7 @@ else {
{ {
sort($list_of_invited_players); sort($list_of_invited_players);
echo $twig->render('guilds.accept_invite.html.twig', array( $twig->display('guilds.accept_invite.html.twig', array(
'guild_name' => $guild_name, 'guild_name' => $guild_name,
'invited_players' => $list_of_invited_players 'invited_players' => $list_of_invited_players
)); ));

View File

@ -55,9 +55,9 @@ if(empty($errors)) {
} }
} }
if(!empty($errors)) { if(!empty($errors)) {
echo $twig->render('error_box.html.twig', array('errors' => $errors)); $twig->display('error_box.html.twig', array('errors' => $errors));
echo $twig->render('guilds.back_button.html.twig', array( $twig->display('guilds.back_button.html.twig', array(
'new_line' => true, 'new_line' => true,
'action' => '?subtopic=guilds&guild='.$guild_name.'&action=show' 'action' => '?subtopic=guilds&guild='.$guild_name.'&action=show'
)); ));
@ -66,9 +66,9 @@ if(empty($errors)) {
else else
{ {
if(!empty($errors)) { if(!empty($errors)) {
echo $twig->render('error_box.html.twig', array('errors' => $errors)); $twig->display('error_box.html.twig', array('errors' => $errors));
echo $twig->render('guilds.back_button.html.twig', array( $twig->display('guilds.back_button.html.twig', array(
'new_line' => true 'new_line' => true
)); ));
} }

View File

@ -50,7 +50,7 @@ if(empty($errors)) {
success('Changes has been saved'); success('Changes has been saved');
} }
echo $twig->render('guilds.change_description.html.twig', array( $twig->display('guilds.change_description.html.twig', array(
'guild' => $guild, 'guild' => $guild,
'rows' => bcsub($config['guild_description_lines_limit'],1) 'rows' => bcsub($config['guild_description_lines_limit'],1)
)); ));
@ -64,9 +64,9 @@ if(empty($errors)) {
} }
} }
if(!empty($errors)) { if(!empty($errors)) {
echo $twig->render('error_box.html.twig', array('errors' => $errors)); $twig->display('error_box.html.twig', array('errors' => $errors));
echo $twig->render('guilds.back_button.html.twig', array( $twig->display('guilds.back_button.html.twig', array(
'new_line' => true, 'new_line' => true,
'action' => '?subtopic=guilds' 'action' => '?subtopic=guilds'
)); ));

View File

@ -85,7 +85,7 @@ if(empty($errors)) {
//show errors or save file //show errors or save file
if(!empty($upload_errors)) { if(!empty($upload_errors)) {
echo $twig->render('error_box.html.twig', array('errors' => $upload_errors)); $twig->display('error_box.html.twig', array('errors' => $upload_errors));
} }
else { else {
success('Logo has been changed.'); success('Logo has been changed.');
@ -98,7 +98,7 @@ if(empty($errors)) {
$guild_logo = "default.gif"; $guild_logo = "default.gif";
} }
echo $twig->render('guilds.change_logo.html.twig', array( $twig->display('guilds.change_logo.html.twig', array(
'guild_logo' => $guild_logo, 'guild_logo' => $guild_logo,
'guild' => $guild, 'guild' => $guild,
'max_image_size_b' => $max_image_size_b 'max_image_size_b' => $max_image_size_b
@ -115,9 +115,9 @@ if(empty($errors)) {
} }
} }
if(!empty($errors)) { if(!empty($errors)) {
echo $twig->render('error_box.html.twig', array('errors' => $errors)); $twig->display('error_box.html.twig', array('errors' => $errors));
echo $twig->render('guilds.back_button.html.twig', array( $twig->display('guilds.back_button.html.twig', array(
'new_line' => true, 'new_line' => true,
'action' => '?subtopic=guilds' 'action' => '?subtopic=guilds'
)); ));

View File

@ -53,7 +53,7 @@ if(empty($errors)) {
success('Changes has been saved'); success('Changes has been saved');
} }
echo $twig->render('guilds.change_motd.html.twig', array( $twig->display('guilds.change_motd.html.twig', array(
'guild' => $guild 'guild' => $guild
)); ));
} }
@ -66,9 +66,9 @@ if(empty($errors)) {
} }
} }
if(!empty($errors)) { if(!empty($errors)) {
echo $twig->render('error_box.html.twig', array('errors' => $errors)); $twig->display('error_box.html.twig', array('errors' => $errors));
echo $twig->render('guilds.back_button.html.twig', array( $twig->display('guilds.back_button.html.twig', array(
'new_line' => true, 'new_line' => true,
'action' => '?subtopic=guilds' 'action' => '?subtopic=guilds'
)); ));

View File

@ -12,7 +12,7 @@ defined('MYAAC') or die('Direct access not allowed!');
if(!$logged) { if(!$logged) {
echo 'You are not logged.'; echo 'You are not logged.';
echo $twig->render('guilds.back_button.html.twig'); $twig->display('guilds.back_button.html.twig');
return; return;
} }
@ -62,5 +62,5 @@ if(strlen($new_nick) <= 40)
else else
echo 'Too long guild nick. Max. 40 chars, your length: '.strlen($new_nick); echo 'Too long guild nick. Max. 40 chars, your length: '.strlen($new_nick);
echo $twig->render('guilds.back_button.html.twig'); $twig->display('guilds.back_button.html.twig');
?> ?>

View File

@ -29,8 +29,8 @@ if(empty($errors))
if(!empty($errors)) if(!empty($errors))
{ {
echo $twig->render('error_box.html.twig', array('errors' => $errors)); $twig->display('error_box.html.twig', array('errors' => $errors));
echo $twig->render('guilds.back_button.html.twig'); $twig->display('guilds.back_button.html.twig');
return; return;
} }
@ -145,7 +145,7 @@ if($guild_vice)
if(empty($change_errors)) if(empty($change_errors))
{ {
$player_to_change->setRank($rank); $player_to_change->setRank($rank);
echo $twig->render('success.html.twig', array( $twig->display('success.html.twig', array(
'title' => 'Rank Changed', 'title' => 'Rank Changed',
'description' => 'Rank of player <b>'.$player_to_change->getName().'</b> has been changed to <b>'.$rank->getName().'</b>.', 'description' => 'Rank of player <b>'.$player_to_change->getName().'</b> has been changed to <b>'.$rank->getName().'</b>.',
'custom_buttons' => '' 'custom_buttons' => ''
@ -191,10 +191,10 @@ if($guild_vice)
} }
else else
{ {
echo $twig->render('error_box.html.twig', array('errors' => $change_errors)); $twig->display('error_box.html.twig', array('errors' => $change_errors));
} }
} }
echo $twig->render('guilds.change_rank.html.twig', array( $twig->display('guilds.change_rank.html.twig', array(
'players' => $players_with_lower_rank, 'players' => $players_with_lower_rank,
'guild_name' => $guild->getName(), 'guild_name' => $guild->getName(),
'ranks' => $ranks 'ranks' => $ranks
@ -202,7 +202,7 @@ if($guild_vice)
} }
else { else {
echo 'Error. You are not a leader or vice leader in guild ' . $guild->getName(); echo 'Error. You are not a leader or vice leader in guild ' . $guild->getName();
echo $twig->render('guilds.back_button.html.twig', array( $twig->display('guilds.back_button.html.twig', array(
'new_line' => true, 'new_line' => true,
'action' => getLink('guilds') . '/' . $guild->getName() 'action' => getLink('guilds') . '/' . $guild->getName()
)); ));

View File

@ -13,7 +13,7 @@ defined('MYAAC') or die('Direct access not allowed!');
if(!$logged) if(!$logged)
{ {
echo "You are not logged in."; echo "You are not logged in.";
echo $twig->render('guilds.back_button.html.twig'); $twig->display('guilds.back_button.html.twig');
return; return;
} }
@ -63,5 +63,5 @@ if(count($guilds_list) > 0)
else else
echo "0 guilds found."; echo "0 guilds found.";
echo $twig->render('guilds.back_button.html.twig'); $twig->display('guilds.back_button.html.twig');
?> ?>

View File

@ -13,7 +13,7 @@ defined('MYAAC') or die('Direct access not allowed!');
if(!$logged) if(!$logged)
{ {
echo "You are not logged in."; echo "You are not logged in.";
echo $twig->render('guilds.back_button.html.twig'); $twig->display('guilds.back_button.html.twig');
return; return;
} }
@ -65,5 +65,5 @@ if(count($players_list) > 0)
else else
echo "0 players found."; echo "0 players found.";
echo $twig->render('guilds.back_button.html.twig'); $twig->display('guilds.back_button.html.twig');
?> ?>

View File

@ -95,7 +95,7 @@ if($todo == 'save')
} }
if(!empty($guild_errors)) { if(!empty($guild_errors)) {
echo $twig->render('error_box.html.twig', array('errors' => $guild_errors)); $twig->display('error_box.html.twig', array('errors' => $guild_errors));
unset($todo); unset($todo);
} }
@ -115,7 +115,7 @@ if(isset($todo) && $todo == 'save')
$player->setRank($rank); $player->setRank($rank);
} }
} }
echo $twig->render('guilds.create.success.html.twig', array( $twig->display('guilds.create.success.html.twig', array(
'guild_name' => $guild_name, 'guild_name' => $guild_name,
'leader_name' => $player->getName() 'leader_name' => $player->getName()
)); ));
@ -126,7 +126,7 @@ if(isset($todo) && $todo == 'save')
} }
else { else {
sort($array_of_player_nig); sort($array_of_player_nig);
echo $twig->render('guilds.create.html.twig', array( $twig->display('guilds.create.html.twig', array(
'players' => $array_of_player_nig 'players' => $array_of_player_nig
)); ));
} }

View File

@ -33,14 +33,14 @@ if(empty($errors)) {
} }
if($saved) { if($saved) {
echo $twig->render('success.html.twig', array( $twig->display('success.html.twig', array(
'title' => 'Guild Deleted', 'title' => 'Guild Deleted',
'description' => 'Guild with name <b>' . $guild_name . '</b> has been deleted.', 'description' => 'Guild with name <b>' . $guild_name . '</b> has been deleted.',
'custom_buttons' => $twig->render('guilds.back_button.html.twig') 'custom_buttons' => $twig->render('guilds.back_button.html.twig')
)); ));
} }
else { else {
echo $twig->render('success.html.twig', array( $twig->display('success.html.twig', array(
'title' => 'Delete Guild', 'title' => 'Delete Guild',
'description' => 'Are you sure you want delete guild <b>' . $guild_name . '</b>?<br/> '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="?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>',
@ -57,9 +57,9 @@ if(empty($errors)) {
} }
} }
if(!empty($errors)) { if(!empty($errors)) {
echo $twig->render('error_box.html.twig', array('errors' => $errors)); $twig->display('error_box.html.twig', array('errors' => $errors));
echo $twig->render('guilds.back_button.html.twig', array( $twig->display('guilds.back_button.html.twig', array(
'new_line' => true, 'new_line' => true,
'action' => '?subtopic=guilds' 'action' => '?subtopic=guilds'
)); ));

View File

@ -48,14 +48,14 @@ if(empty($errors)) {
} }
if($saved) { if($saved) {
echo $twig->render('success.html.twig', array( $twig->display('success.html.twig', array(
'title' => 'Guild Deleted', 'title' => 'Guild Deleted',
'description' => 'Guild with name <b>'.$guild_name.'</b> has been deleted.', 'description' => 'Guild with name <b>'.$guild_name.'</b> has been deleted.',
'custom_buttons' => $twig->render('guilds.back_button.html.twig') 'custom_buttons' => $twig->render('guilds.back_button.html.twig')
)); ));
} }
else { else {
echo $twig->render('guilds.delete_guild.html.twig', array( $twig->display('guilds.delete_guild.html.twig', array(
'guild' => $guild 'guild' => $guild
)); ));
} }
@ -70,9 +70,9 @@ if(empty($errors)) {
} }
if(!empty($errors)) { if(!empty($errors)) {
echo $twig->render('error_box.html.twig', array('errors' => $errors)); $twig->display('error_box.html.twig', array('errors' => $errors));
echo $twig->render('guilds.back_button.html.twig', array( $twig->display('guilds.back_button.html.twig', array(
'new_line' => true 'new_line' => true
)); ));
} }

View File

@ -92,23 +92,23 @@ if(empty($errors))
} }
if(!empty($errors)) if(!empty($errors))
{ {
echo $twig->render('error_box.html.twig', array('errors' => $errors)); $twig->display('error_box.html.twig', array('errors' => $errors));
echo $twig->render('guilds.back_button.html.twig', array('action' => '?subtopic=guilds&action=show&guild=' . $guild_name)); $twig->display('guilds.back_button.html.twig', array('action' => '?subtopic=guilds&action=show&guild=' . $guild_name));
} }
else else
{ {
if(isset($_REQUEST['todo']) && $_REQUEST['todo'] == 'save') if(isset($_REQUEST['todo']) && $_REQUEST['todo'] == 'save')
{ {
$guild->deleteInvite($player); $guild->deleteInvite($player);
echo $twig->render('success.html.twig', array( $twig->display('success.html.twig', array(
'title' => 'Deleted player invitation', 'title' => 'Deleted player invitation',
'description' => 'Player with name <b>' . $player->getName() . '</b> has been deleted from invites list.', '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' => '?subtopic=guilds&action=show&guild=' . $guild_name))
)); ));
} }
else { else {
echo $twig->render('guilds.delete_invite.html.twig', array( $twig->display('guilds.delete_invite.html.twig', array(
'player_name' => $player->getName(), 'player_name' => $player->getName(),
'guild_name' => $guild->getName() 'guild_name' => $guild->getName()
)); ));

View File

@ -87,16 +87,16 @@ if(empty($guild_errors)) {
} }
} }
if($saved) { if($saved) {
echo $twig->render('success.html.twig', array( $twig->display('success.html.twig', array(
'title' => 'Rank Deleted', 'title' => 'Rank Deleted',
'description' => 'Rank <b>'.$rank->getName().'</b> has been deleted. Players with this rank has now other rank.', 'description' => 'Rank <b>'.$rank->getName().'</b> has been deleted. Players with this rank has now other rank.',
'custom_buttons' => '' 'custom_buttons' => ''
)); ));
} else { } else {
echo $twig->render('error_box.html.twig', array('errors' => $guild_errors2)); $twig->display('error_box.html.twig', array('errors' => $guild_errors2));
} }
echo $twig->render('guilds.back_button.html.twig', array( $twig->display('guilds.back_button.html.twig', array(
'new_line' => true, 'new_line' => true,
'action' => '?subtopic=guilds&guild='.$guild->getName().'&action=manager' 'action' => '?subtopic=guilds&guild='.$guild->getName().'&action=manager'
)); ));
@ -112,9 +112,9 @@ if(empty($guild_errors)) {
} }
} }
if(!empty($guild_errors)) { if(!empty($guild_errors)) {
echo $twig->render('error_box.html.twig', array('errors' => $guild_errors)); $twig->display('error_box.html.twig', array('errors' => $guild_errors));
echo $twig->render('guilds.back_button.html.twig', array( $twig->display('guilds.back_button.html.twig', array(
'new_line' => true, 'new_line' => true,
'action' => '?subtopic=guilds' 'action' => '?subtopic=guilds'
)); ));

View File

@ -95,12 +95,12 @@ if(empty($errors)) {
$show = true; $show = true;
if(!empty($errors)) { if(!empty($errors)) {
echo $twig->render('error_box.html.twig', array('errors' => $errors)); $twig->display('error_box.html.twig', array('errors' => $errors));
} }
else { else {
if(isset($_REQUEST['todo']) && $_REQUEST['todo'] == 'save') { if(isset($_REQUEST['todo']) && $_REQUEST['todo'] == 'save') {
$guild->invite($player); $guild->invite($player);
echo $twig->render('success.html.twig', array( $twig->display('success.html.twig', array(
'title' => 'Invite player', 'title' => 'Invite player',
'description' => 'Player with name <b>' . $player->getName() . '</b> has been invited to your guild.', 'description' => 'Player with name <b>' . $player->getName() . '</b> has been invited to your guild.',
'custom_buttons' => '' 'custom_buttons' => ''
@ -111,7 +111,7 @@ else {
} }
if($show) { if($show) {
echo $twig->render('success.html.twig', array( $twig->display('success.html.twig', array(
'title' => 'Invite player', 'title' => 'Invite player',
'description' => $twig->render('guilds.invite.html.twig', array( 'description' => $twig->render('guilds.invite.html.twig', array(
'guild_name' => $guild->getName() 'guild_name' => $guild->getName()
@ -120,6 +120,6 @@ if($show) {
)); ));
} }
echo $twig->render('guilds.back_button.html.twig', array( $twig->display('guilds.back_button.html.twig', array(
'action' => getLink('guilds') . '/' . $guild_name 'action' => getLink('guilds') . '/' . $guild_name
)); ));

View File

@ -93,8 +93,8 @@ if(empty($errors)) {
} }
if(!empty($errors)) { if(!empty($errors)) {
echo $twig->render('error_box.html.twig', array('errors' => $errors)); $twig->display('error_box.html.twig', array('errors' => $errors));
echo $twig->render('guilds.back_button.html.twig', array( $twig->display('guilds.back_button.html.twig', array(
'action' => getLink('guilds') . '/' . $guild_name 'action' => getLink('guilds') . '/' . $guild_name
)); ));
} }
@ -103,7 +103,7 @@ else
if(isset($_REQUEST['todo']) && $_REQUEST['todo'] == 'save') { if(isset($_REQUEST['todo']) && $_REQUEST['todo'] == 'save') {
$player->setRank(); $player->setRank();
echo $twig->render('success.html.twig', array( $twig->display('success.html.twig', array(
'title' => 'Kick player', 'title' => 'Kick player',
'description' => 'Player with name <b>'.$player->getName().'</b> has been kicked from your guild.', 'description' => 'Player with name <b>'.$player->getName().'</b> has been kicked from your guild.',
'custom_buttons' => $twig->render('guilds.back_button.html.twig', array( 'custom_buttons' => $twig->render('guilds.back_button.html.twig', array(
@ -112,7 +112,7 @@ else
)); ));
} }
else { else {
echo $twig->render('guilds.kick_player.html.twig', array( $twig->display('guilds.kick_player.html.twig', array(
'player_name' => $player->getName(), 'player_name' => $player->getName(),
'guild_name' => $guild->getName() 'guild_name' => $guild->getName()
)); ));

View File

@ -85,8 +85,8 @@ if(empty($errors)) {
} }
if(!empty($errors)) { if(!empty($errors)) {
echo $twig->render('error_box.html.twig', array('errors' => $errors)); $twig->display('error_box.html.twig', array('errors' => $errors));
echo $twig->render('guilds.back_button.html.twig', array( $twig->display('guilds.back_button.html.twig', array(
'action' => getLink('guilds') . '/' . $guild_name 'action' => getLink('guilds') . '/' . $guild_name
)); ));
} }
@ -94,7 +94,7 @@ else
{ {
if(isset($_REQUEST['todo']) && $_REQUEST['todo'] == 'save') { if(isset($_REQUEST['todo']) && $_REQUEST['todo'] == 'save') {
$player->setRank(); $player->setRank();
echo $twig->render('success.html.twig', array( $twig->display('success.html.twig', array(
'title' => 'Leave guild', 'title' => 'Leave guild',
'description' => 'Player with name <b>'.$player->getName().'</b> leaved guild <b>'.$guild->getName().'</b>.', 'description' => 'Player with name <b>'.$player->getName().'</b> leaved guild <b>'.$guild->getName().'</b>.',
'custom_buttons' => $twig->render('guilds.back_button.html.twig', array( 'custom_buttons' => $twig->render('guilds.back_button.html.twig', array(
@ -106,7 +106,7 @@ else
{ {
sort($array_of_player_ig); sort($array_of_player_ig);
echo $twig->render('guilds.leave_guild.html.twig', array( $twig->display('guilds.leave_guild.html.twig', array(
'players' => $array_of_player_ig, 'players' => $array_of_player_ig,
'guild_name' => $guild_name 'guild_name' => $guild_name
)); ));

View File

@ -38,7 +38,7 @@ if(empty($errors)) {
} }
} }
if($guild_leader) { if($guild_leader) {
echo $twig->render('guilds.manager.html.twig', array( $twig->display('guilds.manager.html.twig', array(
'guild' => $guild, 'guild' => $guild,
'rank_list' => $rank_list 'rank_list' => $rank_list
)); ));
@ -54,7 +54,7 @@ if(empty($errors)) {
} }
} }
if(!empty($errors)) { if(!empty($errors)) {
echo $twig->render('error_box.html.twig', array('errors' => $errors)); $twig->display('error_box.html.twig', array('errors' => $errors));
} }
?> ?>

View File

@ -82,14 +82,14 @@ if(empty($guild_errors) && empty($guild_errors2)) {
$saved = true; $saved = true;
} }
if($saved) { if($saved) {
echo $twig->render('success.html.twig', array( $twig->display('success.html.twig', array(
'title' => 'Leadership passed', 'title' => 'Leadership passed',
'description' => '<b>'.$to_player->getName().'</b> is now a Leader of <b>'.$guild_name.'</b>.', 'description' => '<b>'.$to_player->getName().'</b> is now a Leader of <b>'.$guild_name.'</b>.',
'custom_buttons' => '<center><form action="' . getLink('guilds') . '/' . $guild->getName().'" METHOD=post>' . $twig->render('buttons.back.html.twig') . '</form></center>' 'custom_buttons' => '<center><form action="' . getLink('guilds') . '/' . $guild->getName().'" METHOD=post>' . $twig->render('buttons.back.html.twig') . '</form></center>'
)); ));
} }
else { else {
echo $twig->render('guilds.pass_leadership.html.twig', array( $twig->display('guilds.pass_leadership.html.twig', array(
'guild' => $guild 'guild' => $guild
)); ));
} }
@ -103,7 +103,7 @@ if(empty($guild_errors) && empty($guild_errors2)) {
} }
} }
if(empty($guild_errors) && !empty($guild_errors2)) { if(empty($guild_errors) && !empty($guild_errors2)) {
echo $twig->render('error_box.html.twig', array('errors' => $guild_errors2)); $twig->display('error_box.html.twig', array('errors' => $guild_errors2));
echo '<br/><center><form action="?subtopic=guilds&guild='.$guild->getName().'&action=pass_leadership" method="post">' . $twig->render('buttons.back.html.twig') . '</form></center>'; echo '<br/><center><form action="?subtopic=guilds&guild='.$guild->getName().'&action=pass_leadership" method="post">' . $twig->render('buttons.back.html.twig') . '</form></center>';
} }
@ -111,7 +111,7 @@ if(!empty($guild_errors)) {
if(!empty($guild_errors2)) { if(!empty($guild_errors2)) {
$guild_errors = array_merge($guild_errors, $guild_errors2); $guild_errors = array_merge($guild_errors, $guild_errors2);
} }
echo $twig->render('error_box.html.twig', array('errors' => $guild_errors)); $twig->display('error_box.html.twig', array('errors' => $guild_errors));
echo '<br/><center><form action="?subtopic=guilds" method="post">' . $twig->render('buttons.back.html.twig') . '</form></center>'; echo '<br/><center><form action="?subtopic=guilds" method="post">' . $twig->render('buttons.back.html.twig') . '</form></center>';
} }

View File

@ -61,7 +61,7 @@ if(empty($errors)) {
} }
//show errors or redirect //show errors or redirect
if(!empty($errors)) { if(!empty($errors)) {
echo $twig->render('error_box.html.twig', array('errors' => $errors)); $twig->display('error_box.html.twig', array('errors' => $errors));
} }
else else
{ {
@ -79,7 +79,7 @@ if(empty($errors)) {
} }
} }
if(!empty($errors)) { if(!empty($errors)) {
echo $twig->render('error_box.html.twig', array('errors' => $errors)); $twig->display('error_box.html.twig', array('errors' => $errors));
} }
?> ?>

View File

@ -25,9 +25,9 @@ if(empty($errors))
if(!empty($errors)) if(!empty($errors))
{ {
echo $twig->render('error_box.html.twig', array('errors' => $errors)); $twig->display('error_box.html.twig', array('errors' => $errors));
echo $twig->render('guilds.back_button.html.twig'); $twig->display('guilds.back_button.html.twig');
} }
else else
{ {

View File

@ -21,10 +21,10 @@ $config_salt_enabled = $db->hasColumn('accounts', 'salt');
$action_type = isset($_REQUEST['action_type']) ? $_REQUEST['action_type'] : ''; $action_type = isset($_REQUEST['action_type']) ? $_REQUEST['action_type'] : '';
if($action == '') if($action == '')
{ {
echo $twig->render('account.lost.form.html.twig'); $twig->display('account.lost.form.html.twig');
} }
else if($action == 'step1' && $action_type == '') { else if($action == 'step1' && $action_type == '') {
echo $twig->render('account.lost.noaction.html.twig'); $twig->display('account.lost.noaction.html.twig');
} }
elseif($action == 'step1' && $action_type == 'email') elseif($action == 'step1' && $action_type == 'email')
{ {

View File

@ -55,7 +55,7 @@ if(isset($_GET['archive']))
} }
} }
echo $twig->render('news.html.twig', array( $twig->display('news.html.twig', array(
'title' => stripslashes($news['title']), 'title' => stripslashes($news['title']),
'content' => $content_, 'content' => $content_,
'date' => $news['date'], 'date' => $news['date'],
@ -68,7 +68,7 @@ if(isset($_GET['archive']))
else else
echo "This news doesn't exist or is hidden.<br/>"; echo "This news doesn't exist or is hidden.<br/>";
echo $twig->render('news.back_button.html.twig'); $twig->display('news.back_button.html.twig');
return; return;
} }
?> ?>
@ -87,7 +87,7 @@ if(isset($_GET['archive']))
); );
} }
echo $twig->render('news.archive.html.twig', array( $twig->display('news.archive.html.twig', array(
'newses' => $newses 'newses' => $newses
)); ));
@ -164,7 +164,7 @@ if($canEdit)
} }
if(!empty($errors)) if(!empty($errors))
echo $twig->render('error_box.html.twig', array('errors' => $errors)); $twig->display('error_box.html.twig', array('errors' => $errors));
if($cache->enabled()) if($cache->enabled())
{ {
@ -259,7 +259,7 @@ if(!$news_cached)
$account_players = $account_logged->getPlayersList(); $account_players = $account_logged->getPlayersList();
$account_players->orderBy('group_id', POT::ORDER_DESC); $account_players->orderBy('group_id', POT::ORDER_DESC);
echo $twig->render('news.add.html.twig', array( $twig->display('news.add.html.twig', array(
'action' => $action, 'action' => $action,
'news_link' => getLink(PAGE), 'news_link' => getLink(PAGE),
'news_link_form' => getLink('news/' . ($action == 'edit' ? 'edit' : 'add')), 'news_link_form' => getLink('news/' . ($action == 'edit' ? 'edit' : 'add')),
@ -324,7 +324,7 @@ if(!$news_cached)
} }
} }
echo $twig->render('news.html.twig', array( $twig->display('news.html.twig', array(
'id' => $news['id'], 'id' => $news['id'],
'title' => stripslashes($news['title']), 'title' => stripslashes($news['title']),
'content' => $content_ . $admin_options, 'content' => $content_ . $admin_options,

View File

@ -120,11 +120,11 @@ if($players > 0)
} }
} }
echo $twig->render('online.html.twig', array( $twig->display('online.html.twig', array(
'players' => $players_data, 'players' => $players_data,
'record' => $record 'record' => $record
)); ));
//search bar //search bar
echo $twig->render('online.form.html.twig'); $twig->display('online.form.html.twig');
?> ?>

View File

@ -11,4 +11,4 @@
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');
$title = 'Server Rules'; $title = 'Server Rules';
echo $twig->render('rules.html.twig'); $twig->display('rules.html.twig');

View File

@ -76,7 +76,7 @@ else {
} }
} }
echo $twig->render('spells.html.twig', array( $twig->display('spells.html.twig', array(
'canEdit' => $canEdit, 'canEdit' => $canEdit,
'post_vocation_id' => $vocation_id, 'post_vocation_id' => $vocation_id,
'post_vocation' => $vocation, 'post_vocation' => $vocation,

View File

@ -8,7 +8,7 @@ defined('MYAAC') or die('Direct access not allowed!');
<link rel="stylesheet" href="<?php echo $template_path; ?>/style.css" type="text/css" /> <link rel="stylesheet" href="<?php echo $template_path; ?>/style.css" type="text/css" />
<script type="text/javascript"> <script type="text/javascript">
<?php <?php
echo $twig->render('menu.js.html.twig', array('categories' => $config['menu_categories'])); $twig->display('menu.js.html.twig', array('categories' => $config['menu_categories']));
?> ?>
</script> </script>
<script type="text/javascript" src="tools/basic.js"></script> <script type="text/javascript" src="tools/basic.js"></script>