mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-27 01:39:22 +02:00
* replace "$twig->render()" with "$this->display"
This commit is contained in:
parent
68d74a490b
commit
c654ea329c
@ -18,7 +18,7 @@ else {
|
||||
$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,
|
||||
'locale' => $locale,
|
||||
'buttons' => next_buttons(false, true)
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
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'),
|
||||
'buttons' => next_buttons()
|
||||
));
|
||||
|
@ -10,7 +10,7 @@ foreach($config['clients'] as $client) {
|
||||
$clients[$client] = $client_version;
|
||||
}
|
||||
|
||||
echo $twig->render('install.config.html.twig', array(
|
||||
$twig->display('install.config.html.twig', array(
|
||||
'clients' => $clients,
|
||||
'timezones' => DateTimeZone::listIdentifiers(),
|
||||
'locale' => $locale,
|
||||
|
@ -51,7 +51,7 @@ if(!$error) {
|
||||
error($database_error);
|
||||
}
|
||||
else {
|
||||
echo $twig->render('install.installer.html.twig', array(
|
||||
$twig->display('install.installer.html.twig', array(
|
||||
'url' => 'tools/5-database.php',
|
||||
'message' => $locale['loading_spinner']
|
||||
));
|
||||
|
@ -9,7 +9,7 @@ if(!$error) {
|
||||
error($database_error);
|
||||
}
|
||||
|
||||
echo $twig->render('install.admin.html.twig', array(
|
||||
$twig->display('install.admin.html.twig', array(
|
||||
'locale' => $locale,
|
||||
'session' => $_SESSION,
|
||||
'errors' => isset($errors) ? $errors : null,
|
||||
|
@ -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',
|
||||
'message' => $locale['importing_spinner']
|
||||
));
|
||||
|
@ -25,7 +25,7 @@ if($player_name != null) {
|
||||
$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(
|
||||
$twig->display('success.html.twig', array(
|
||||
'title' => 'Character Information Changed',
|
||||
'description' => 'The character information has been changed.'
|
||||
));
|
||||
@ -47,11 +47,11 @@ else {
|
||||
|
||||
if($show_form) {
|
||||
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)) {
|
||||
echo $twig->render('account.change_comment.html.twig', array(
|
||||
$twig->display('account.change_comment.html.twig', array(
|
||||
'player' => $player
|
||||
));
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ if($email_new_time < 10) {
|
||||
$email_new_time = time() + $config['account_mail_change'] * 24 * 3600;
|
||||
$account_logged->setCustomField("email_new", $email_new);
|
||||
$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',
|
||||
'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
|
||||
{
|
||||
//show errors
|
||||
echo $twig->render('error_box.html.twig', array('errors' => $errors));
|
||||
$twig->display('error_box.html.twig', array('errors' => $errors));
|
||||
|
||||
//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
|
||||
));
|
||||
}
|
||||
}
|
||||
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
|
||||
));
|
||||
}
|
||||
@ -73,7 +73,7 @@ else
|
||||
$account_logged->save();
|
||||
$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',
|
||||
'description' => 'You have accepted <b>' . $account_logged->getEmail() . '</b> as your new email adress.'
|
||||
));
|
||||
@ -103,7 +103,7 @@ else
|
||||
<td width="30"> </td>
|
||||
</tr>
|
||||
</table>';
|
||||
echo $twig->render('success.html.twig', array(
|
||||
$twig->display('success.html.twig', array(
|
||||
'title' => 'Email Address Change Accepted',
|
||||
'description' => 'Do you accept <b>'.$email_new.'</b> as your new email adress?',
|
||||
'custom_buttons' => $custom_buttons
|
||||
@ -140,7 +140,7 @@ else
|
||||
</td>
|
||||
</tr>
|
||||
</table>';
|
||||
echo $twig->render('success.html.twig', array(
|
||||
$twig->display('success.html.twig', array(
|
||||
'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".',
|
||||
'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>';
|
||||
|
||||
echo $twig->render('success.html.twig', array(
|
||||
$twig->display('success.html.twig', array(
|
||||
'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.',
|
||||
'custom_buttons' => $custom_buttons
|
||||
|
@ -24,14 +24,14 @@ if(isset($_POST['changeinfosave']) && $_POST['changeinfosave'] == 1) {
|
||||
$account_logged->setCustomField("location", $new_location);
|
||||
$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>.');
|
||||
echo $twig->render('success.html.twig', array(
|
||||
$twig->display('success.html.twig', array(
|
||||
'title' => 'Public Information Changed',
|
||||
'description' => 'Your public information has been changed.'
|
||||
));
|
||||
$show_form = false;
|
||||
}
|
||||
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)
|
||||
$countries[$code] = $country;
|
||||
|
||||
echo $twig->render('account.change_info.html.twig', array(
|
||||
$twig->display('account.change_info.html.twig', array(
|
||||
'countries' => $countries,
|
||||
'account_rlname' => $account_rlname,
|
||||
'account_location' => $account_location,
|
||||
|
@ -60,7 +60,7 @@ else
|
||||
$player->save();
|
||||
$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>.');
|
||||
echo $twig->render('success.html.twig', array(
|
||||
$twig->display('success.html.twig', array(
|
||||
'title' => 'Character Name Changed',
|
||||
'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(!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,
|
||||
'errors' => $errors
|
||||
//'account_players' => $account_logged->getPlayersList()
|
||||
|
@ -14,7 +14,7 @@ $new_password = isset($_POST['newpassword']) ? $_POST['newpassword'] : NULL;
|
||||
$new_password2 = isset($_POST['newpassword2']) ? $_POST['newpassword2'] : NULL;
|
||||
$old_password = isset($_POST['oldpassword']) ? $_POST['oldpassword'] : NULL;
|
||||
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
|
||||
{
|
||||
@ -38,10 +38,10 @@ else
|
||||
}
|
||||
if(!empty($errors)){
|
||||
//show errors
|
||||
echo $twig->render('error_box.html.twig', array('errors' => $errors));
|
||||
$twig->display('error_box.html.twig', array('errors' => $errors));
|
||||
|
||||
//show form
|
||||
echo $twig->render('account.change_password.html.twig');
|
||||
$twig->display('account.change_password.html.twig');
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -72,7 +72,7 @@ else
|
||||
$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',
|
||||
'description' => 'Your password has been changed.' . $message
|
||||
));
|
||||
|
@ -57,7 +57,7 @@ else
|
||||
$player->save();
|
||||
$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>.');
|
||||
echo $twig->render('success.html.twig', array(
|
||||
$twig->display('success.html.twig', array(
|
||||
'title' => 'Character Sex Changed',
|
||||
'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(!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(),
|
||||
'player_sex' => isset($player) ? $player->getSex() : -1,
|
||||
'points' => $points
|
||||
|
@ -183,7 +183,7 @@ if($save) {
|
||||
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']."');");
|
||||
|
||||
echo $twig->render('success.html.twig', array(
|
||||
$twig->display('success.html.twig', array(
|
||||
'title' => 'Character Created',
|
||||
'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/>
|
||||
@ -199,11 +199,11 @@ if($save) {
|
||||
}
|
||||
|
||||
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) {
|
||||
echo $twig->render('account.create_character.html.twig', array(
|
||||
$twig->display('account.create_character.html.twig', array(
|
||||
'name' => $newchar_name,
|
||||
'sex' => $newchar_sex,
|
||||
'vocation' => $newchar_vocation,
|
||||
|
@ -32,7 +32,7 @@ if(isset($_POST['deletecharactersave']) && $_POST['deletecharactersave'] == 1) {
|
||||
else
|
||||
$player->setCustomField('deleted', 1);
|
||||
$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',
|
||||
'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(!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');
|
||||
}
|
||||
?>
|
@ -33,7 +33,7 @@ if(isset($_POST['registeraccountsave']) && $_POST['registeraccountsave'] == "1")
|
||||
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>';
|
||||
}
|
||||
echo $twig->render('success.html.twig', array(
|
||||
$twig->display('success.html.twig', array(
|
||||
'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"> <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(!empty($errors)) {
|
||||
//show errors
|
||||
echo $twig->render('error_box.html.twig', array('errors' => $errors));
|
||||
$twig->display('error_box.html.twig', array('errors' => $errors));
|
||||
}
|
||||
|
||||
//show form
|
||||
echo $twig->render('account.generate_recovery_key.html.twig');
|
||||
$twig->display('account.generate_recovery_key.html.twig');
|
||||
}
|
||||
|
||||
?>
|
@ -42,7 +42,7 @@ 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>';
|
||||
|
||||
echo $twig->render('success.html.twig', array(
|
||||
$twig->display('success.html.twig', array(
|
||||
'title' => 'Account Registered',
|
||||
'description' => '<ul>' . $message . '</ul>'
|
||||
));
|
||||
@ -56,13 +56,13 @@ else
|
||||
|
||||
//show errors if not empty
|
||||
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)
|
||||
{
|
||||
//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
|
||||
));
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ $config_salt_enabled = $db->hasColumn('accounts', 'salt');
|
||||
|
||||
if(ACTION == "logout" && !isset($_REQUEST['account_login'])) {
|
||||
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;
|
||||
@ -35,9 +35,9 @@ if(!$logged)
|
||||
}
|
||||
|
||||
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,
|
||||
'account' => USE_ACCOUNT_NAME ? 'Name' : 'Number',
|
||||
'error' => isset($errors[0]) ? $errors[0] : null
|
||||
@ -52,7 +52,7 @@ $errors = array();
|
||||
{
|
||||
$redirect = urldecode($_REQUEST['redirect']);
|
||||
|
||||
echo $twig->render('account.redirect.html.twig', array(
|
||||
$twig->display('account.redirect.html.twig', array(
|
||||
'redirect' => $redirect
|
||||
));
|
||||
return;
|
||||
@ -114,7 +114,7 @@ $errors = array();
|
||||
$account_players = $account_logged->getPlayersList();
|
||||
$account_players->orderBy('id');
|
||||
|
||||
echo $twig->render('account.management.html.twig', array(
|
||||
$twig->display('account.management.html.twig', array(
|
||||
'welcome_message' => $welcome_message,
|
||||
'recovery_key' => $recovery_key,
|
||||
'email_change' => $email_change,
|
||||
|
@ -47,7 +47,7 @@ $tmp = '';
|
||||
if(fetchDatabaseConfig('site_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,
|
||||
'closed_message' => $closed_message,
|
||||
'status' => $status
|
||||
|
@ -13,7 +13,7 @@ $title = 'Load items.xml';
|
||||
require LIBS . 'items.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;
|
||||
if($reload) {
|
||||
|
@ -19,5 +19,5 @@ if(isset($errors)) {
|
||||
}
|
||||
}
|
||||
|
||||
echo $twig->render('admin.login.html.twig');
|
||||
$twig->display('admin.login.html.twig');
|
||||
?>
|
@ -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_content' => $mail_content,
|
||||
'preview_done' => $preview_done
|
||||
|
@ -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 '</form>';
|
||||
|
||||
echo $twig->render('admin.menus.js.html.twig', array(
|
||||
$twig->display('admin.menus.js.html.twig', array(
|
||||
'menus' => $menus,
|
||||
'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
|
||||
));
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ else
|
||||
$_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
|
||||
{
|
||||
|
@ -84,7 +84,7 @@ if(!empty($action))
|
||||
}
|
||||
|
||||
if(!empty($errors))
|
||||
echo $twig->render('error_box.html.twig', array('errors' => $errors));
|
||||
$twig->display('error_box.html.twig', array('errors' => $errors));
|
||||
}
|
||||
|
||||
$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,
|
||||
'id' => $action == 'edit' ? $id : null,
|
||||
'name' => $name,
|
||||
@ -111,7 +111,7 @@ echo $twig->render('admin.pages.form.html.twig', array(
|
||||
'access' => $access
|
||||
));
|
||||
|
||||
echo $twig->render('admin.pages.html.twig', array(
|
||||
$twig->display('admin.pages.html.twig', array(
|
||||
'pages' => $pages
|
||||
));
|
||||
|
||||
|
@ -12,7 +12,7 @@ $title = 'Plugin manager';
|
||||
|
||||
require LIBS . 'plugins.php';
|
||||
|
||||
echo $twig->render('admin.plugins.form.html.twig');
|
||||
$twig->display('admin.plugins.form.html.twig');
|
||||
|
||||
if(isset($_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
|
||||
));
|
||||
?>
|
@ -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;');
|
||||
|
||||
echo $twig->render('admin.statistics.html.twig', array(
|
||||
$twig->display('admin.statistics.html.twig', array(
|
||||
'total_accounts' => $total_accounts,
|
||||
'total_players' => $total_players,
|
||||
'total_guilds' => $total_guilds,
|
||||
|
@ -28,7 +28,7 @@ function compare($a, $b) {
|
||||
$tmp = $visitors->getVisitors();
|
||||
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'],
|
||||
'visitors' => $tmp
|
||||
));
|
||||
|
@ -35,7 +35,7 @@ foreach($changelogs as $key => &$log)
|
||||
$i++;
|
||||
}
|
||||
|
||||
echo $twig->render('changelog.html.twig', array(
|
||||
$twig->display('changelog.html.twig', array(
|
||||
'changelogs' => $changelogs,
|
||||
'page' => $_page,
|
||||
'next_page' => $next_page,
|
||||
|
@ -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,
|
||||
'player' => $player,
|
||||
'account' => $account,
|
||||
@ -421,7 +421,7 @@ WHERE killers.death_id = '".$death['id']."' ORDER BY killers.final_hit DESC, kil
|
||||
else
|
||||
{
|
||||
$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();
|
||||
|
||||
$promotion = '';
|
||||
@ -450,4 +450,4 @@ else
|
||||
}
|
||||
|
||||
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));
|
@ -68,10 +68,10 @@ if($canEdit)
|
||||
}
|
||||
|
||||
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')),
|
||||
'action' => $action,
|
||||
'id' => isset($id) ? $id : null,
|
||||
@ -88,7 +88,7 @@ $commands =
|
||||
' ORDER BY `ordering`;');
|
||||
|
||||
$last = $commands->rowCount();
|
||||
echo $twig->render('commands.html.twig', array(
|
||||
$twig->display('commands.html.twig', array(
|
||||
'commands' => $commands,
|
||||
'last' => $last,
|
||||
'canEdit' => $canEdit
|
||||
|
@ -171,7 +171,7 @@ if($save)
|
||||
|
||||
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
|
||||
));
|
||||
}
|
||||
@ -184,7 +184,7 @@ if($save)
|
||||
}
|
||||
else
|
||||
{
|
||||
echo $twig->render('account.created.html.twig', array(
|
||||
$twig->display('account.created.html.twig', array(
|
||||
'account' => $tmp_account
|
||||
));
|
||||
|
||||
@ -223,7 +223,7 @@ if($config['account_country_recognize']) {
|
||||
}
|
||||
|
||||
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']) {
|
||||
$countries = array();
|
||||
@ -235,8 +235,8 @@ if($config['account_country']) {
|
||||
$countries[$code] = $c;
|
||||
}
|
||||
|
||||
echo $twig->render('account.create.js.html.twig');
|
||||
echo $twig->render('account.create.html.twig', array(
|
||||
$twig->display('account.create.js.html.twig');
|
||||
$twig->display('account.create.html.twig', array(
|
||||
'account' => isset($_POST['account']) ? $_POST['account'] : '',
|
||||
'email' => isset($_POST['email']) ? $_POST['email'] : '',
|
||||
'countries' => isset($countries) ? $countries : null,
|
||||
|
@ -238,5 +238,5 @@ else
|
||||
}
|
||||
|
||||
//back button
|
||||
echo $twig->render('creatures.back_button.html.twig');
|
||||
$twig->display('creatures.back_button.html.twig');
|
||||
?>
|
||||
|
@ -9,5 +9,5 @@
|
||||
*/
|
||||
$title = 'Downloads';
|
||||
|
||||
echo $twig->render('downloads.html.twig');
|
||||
$twig->display('downloads.html.twig');
|
||||
?>
|
@ -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
|
||||
));
|
||||
?>
|
||||
|
@ -56,10 +56,10 @@ if($canEdit)
|
||||
}
|
||||
|
||||
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')),
|
||||
'action' => $action,
|
||||
'id' => isset($id) ? $id : null,
|
||||
@ -83,7 +83,7 @@ if(!$faqs->rowCount())
|
||||
}
|
||||
|
||||
$last = $faqs->rowCount();
|
||||
echo $twig->render('faq.html.twig', array(
|
||||
$twig->display('faq.html.twig', array(
|
||||
'faqs' => $faqs,
|
||||
'last' => $last,
|
||||
'canEdit' => $canEdit
|
||||
|
@ -89,14 +89,14 @@ if($canEdit)
|
||||
}
|
||||
|
||||
if(!empty($errors)) {
|
||||
echo $twig->render('error_box.html.twig', array('errors' => $errors));
|
||||
$twig->display('error_box.html.twig', array('errors' => $errors));
|
||||
$action = '';
|
||||
}
|
||||
}
|
||||
|
||||
if(empty($action) || $action == 'edit_board') {
|
||||
$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')),
|
||||
'action' => $action,
|
||||
'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,
|
||||
'canEdit' => $canEdit,
|
||||
'last' => count($sections)
|
||||
|
@ -89,9 +89,9 @@ if(Forum::canPost($account_logged))
|
||||
if(!$saved)
|
||||
{
|
||||
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,
|
||||
'players' => $players_from_account,
|
||||
'player_id' => $char_id,
|
||||
|
@ -48,7 +48,7 @@ else {
|
||||
|
||||
if ($post['id'] == $post_id) {
|
||||
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'],
|
||||
'author' => $name['name'],
|
||||
'board' => $sections[$post['section']]['name'],
|
||||
|
@ -85,7 +85,7 @@ if(Forum::canPost($account_logged))
|
||||
if(!$saved)
|
||||
{
|
||||
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();
|
||||
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,
|
||||
'post_player_id' => $char_id,
|
||||
'players' => $players_from_account,
|
||||
@ -116,4 +116,4 @@ if(Forum::canPost($account_logged))
|
||||
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 $twig->render('forum.fullscreen.html.twig');
|
||||
$twig->display('forum.fullscreen.html.twig');
|
@ -79,9 +79,9 @@ if(Forum::canPost($account_logged))
|
||||
|
||||
if (!$saved) {
|
||||
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,
|
||||
'players' => $players_from_account,
|
||||
'post_player_id' => $char_id,
|
||||
|
@ -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,
|
||||
'posts' => $posts,
|
||||
'links_to_pages' => $links_to_pages,
|
||||
@ -100,4 +100,4 @@ echo $twig->render('forum.show_thread.html.twig', array(
|
||||
'is_moderator' => Forum::isModerator()
|
||||
));
|
||||
|
||||
echo $twig->render('forum.fullscreen.html.twig');
|
||||
$twig->display('forum.fullscreen.html.twig');
|
||||
|
@ -52,11 +52,11 @@ if($canEdit) {
|
||||
}
|
||||
|
||||
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'])) {
|
||||
echo $twig->render('gallery.form.html.twig', array(
|
||||
$twig->display('gallery.form.html.twig', array(
|
||||
'link' => getLink('gallery/' . ($action == 'edit' ? 'edit' : 'add')),
|
||||
'action' => $action,
|
||||
'id' => isset($id) ? $id : null,
|
||||
@ -93,7 +93,7 @@ if(isset($_GET['image']))
|
||||
else
|
||||
$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,
|
||||
'next' => $next_image ? $next_image['id'] : null,
|
||||
'image' => $image
|
||||
@ -117,7 +117,7 @@ if(!$last)
|
||||
return;
|
||||
}
|
||||
|
||||
echo $twig->render('gallery.html.twig', array(
|
||||
$twig->display('gallery.html.twig', array(
|
||||
'images' => $images,
|
||||
'last' => $last,
|
||||
'canEdit' => $canEdit
|
||||
|
@ -96,16 +96,16 @@ else
|
||||
}
|
||||
|
||||
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
|
||||
));
|
||||
}
|
||||
else {
|
||||
if(isset($_REQUEST['todo']) && $_REQUEST['todo'] == 'save') {
|
||||
$guild->acceptInvite($player);
|
||||
echo $twig->render('success.html.twig', array(
|
||||
$twig->display('success.html.twig', array(
|
||||
'title' => 'Accept invitation',
|
||||
'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(
|
||||
@ -117,7 +117,7 @@ else {
|
||||
{
|
||||
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,
|
||||
'invited_players' => $list_of_invited_players
|
||||
));
|
||||
|
@ -55,9 +55,9 @@ 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,
|
||||
'action' => '?subtopic=guilds&guild='.$guild_name.'&action=show'
|
||||
));
|
||||
@ -66,9 +66,9 @@ if(empty($errors)) {
|
||||
else
|
||||
{
|
||||
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
|
||||
));
|
||||
}
|
||||
|
@ -50,7 +50,7 @@ if(empty($errors)) {
|
||||
success('Changes has been saved');
|
||||
}
|
||||
|
||||
echo $twig->render('guilds.change_description.html.twig', array(
|
||||
$twig->display('guilds.change_description.html.twig', array(
|
||||
'guild' => $guild,
|
||||
'rows' => bcsub($config['guild_description_lines_limit'],1)
|
||||
));
|
||||
@ -64,9 +64,9 @@ 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,
|
||||
'action' => '?subtopic=guilds'
|
||||
));
|
||||
|
@ -85,7 +85,7 @@ if(empty($errors)) {
|
||||
|
||||
//show errors or save file
|
||||
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 {
|
||||
success('Logo has been changed.');
|
||||
@ -98,7 +98,7 @@ if(empty($errors)) {
|
||||
$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' => $guild,
|
||||
'max_image_size_b' => $max_image_size_b
|
||||
@ -115,9 +115,9 @@ 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,
|
||||
'action' => '?subtopic=guilds'
|
||||
));
|
||||
|
@ -53,7 +53,7 @@ if(empty($errors)) {
|
||||
success('Changes has been saved');
|
||||
}
|
||||
|
||||
echo $twig->render('guilds.change_motd.html.twig', array(
|
||||
$twig->display('guilds.change_motd.html.twig', array(
|
||||
'guild' => $guild
|
||||
));
|
||||
}
|
||||
@ -66,9 +66,9 @@ 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,
|
||||
'action' => '?subtopic=guilds'
|
||||
));
|
||||
|
@ -12,7 +12,7 @@ defined('MYAAC') or die('Direct access not allowed!');
|
||||
|
||||
if(!$logged) {
|
||||
echo 'You are not logged.';
|
||||
echo $twig->render('guilds.back_button.html.twig');
|
||||
$twig->display('guilds.back_button.html.twig');
|
||||
return;
|
||||
}
|
||||
|
||||
@ -62,5 +62,5 @@ if(strlen($new_nick) <= 40)
|
||||
else
|
||||
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');
|
||||
?>
|
@ -29,8 +29,8 @@ if(empty($errors))
|
||||
|
||||
if(!empty($errors))
|
||||
{
|
||||
echo $twig->render('error_box.html.twig', array('errors' => $errors));
|
||||
echo $twig->render('guilds.back_button.html.twig');
|
||||
$twig->display('error_box.html.twig', array('errors' => $errors));
|
||||
$twig->display('guilds.back_button.html.twig');
|
||||
|
||||
return;
|
||||
}
|
||||
@ -145,7 +145,7 @@ if($guild_vice)
|
||||
if(empty($change_errors))
|
||||
{
|
||||
$player_to_change->setRank($rank);
|
||||
echo $twig->render('success.html.twig', array(
|
||||
$twig->display('success.html.twig', array(
|
||||
'title' => 'Rank Changed',
|
||||
'description' => 'Rank of player <b>'.$player_to_change->getName().'</b> has been changed to <b>'.$rank->getName().'</b>.',
|
||||
'custom_buttons' => ''
|
||||
@ -191,10 +191,10 @@ if($guild_vice)
|
||||
}
|
||||
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,
|
||||
'guild_name' => $guild->getName(),
|
||||
'ranks' => $ranks
|
||||
@ -202,7 +202,7 @@ if($guild_vice)
|
||||
}
|
||||
else {
|
||||
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,
|
||||
'action' => getLink('guilds') . '/' . $guild->getName()
|
||||
));
|
||||
|
@ -13,7 +13,7 @@ defined('MYAAC') or die('Direct access not allowed!');
|
||||
if(!$logged)
|
||||
{
|
||||
echo "You are not logged in.";
|
||||
echo $twig->render('guilds.back_button.html.twig');
|
||||
$twig->display('guilds.back_button.html.twig');
|
||||
return;
|
||||
}
|
||||
|
||||
@ -63,5 +63,5 @@ if(count($guilds_list) > 0)
|
||||
else
|
||||
echo "0 guilds found.";
|
||||
|
||||
echo $twig->render('guilds.back_button.html.twig');
|
||||
$twig->display('guilds.back_button.html.twig');
|
||||
?>
|
@ -13,7 +13,7 @@ defined('MYAAC') or die('Direct access not allowed!');
|
||||
if(!$logged)
|
||||
{
|
||||
echo "You are not logged in.";
|
||||
echo $twig->render('guilds.back_button.html.twig');
|
||||
$twig->display('guilds.back_button.html.twig');
|
||||
return;
|
||||
}
|
||||
|
||||
@ -65,5 +65,5 @@ if(count($players_list) > 0)
|
||||
else
|
||||
echo "0 players found.";
|
||||
|
||||
echo $twig->render('guilds.back_button.html.twig');
|
||||
$twig->display('guilds.back_button.html.twig');
|
||||
?>
|
@ -95,7 +95,7 @@ if($todo == 'save')
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
@ -115,7 +115,7 @@ if(isset($todo) && $todo == 'save')
|
||||
$player->setRank($rank);
|
||||
}
|
||||
}
|
||||
echo $twig->render('guilds.create.success.html.twig', array(
|
||||
$twig->display('guilds.create.success.html.twig', array(
|
||||
'guild_name' => $guild_name,
|
||||
'leader_name' => $player->getName()
|
||||
));
|
||||
@ -126,7 +126,7 @@ if(isset($todo) && $todo == 'save')
|
||||
}
|
||||
else {
|
||||
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
|
||||
));
|
||||
}
|
||||
|
@ -33,14 +33,14 @@ if(empty($errors)) {
|
||||
}
|
||||
|
||||
if($saved) {
|
||||
echo $twig->render('success.html.twig', array(
|
||||
$twig->display('success.html.twig', array(
|
||||
'title' => 'Guild Deleted',
|
||||
'description' => 'Guild with name <b>' . $guild_name . '</b> has been deleted.',
|
||||
'custom_buttons' => $twig->render('guilds.back_button.html.twig')
|
||||
));
|
||||
}
|
||||
else {
|
||||
echo $twig->render('success.html.twig', array(
|
||||
$twig->display('success.html.twig', array(
|
||||
'title' => 'Delete Guild',
|
||||
'description' => 'Are you sure you want delete guild <b>' . $guild_name . '</b>?<br/>
|
||||
<form action="?subtopic=guilds&guild=' . $guild->getName() . '&action=delete_by_admin" METHOD="post"><input type="hidden" name="todo" value="save"><input type="submit" value="Yes, delete"></form>',
|
||||
@ -57,9 +57,9 @@ 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,
|
||||
'action' => '?subtopic=guilds'
|
||||
));
|
||||
|
@ -48,14 +48,14 @@ if(empty($errors)) {
|
||||
}
|
||||
|
||||
if($saved) {
|
||||
echo $twig->render('success.html.twig', array(
|
||||
$twig->display('success.html.twig', array(
|
||||
'title' => 'Guild Deleted',
|
||||
'description' => 'Guild with name <b>'.$guild_name.'</b> has been deleted.',
|
||||
'custom_buttons' => $twig->render('guilds.back_button.html.twig')
|
||||
));
|
||||
}
|
||||
else {
|
||||
echo $twig->render('guilds.delete_guild.html.twig', array(
|
||||
$twig->display('guilds.delete_guild.html.twig', array(
|
||||
'guild' => $guild
|
||||
));
|
||||
}
|
||||
@ -70,9 +70,9 @@ 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
|
||||
));
|
||||
}
|
||||
|
@ -92,23 +92,23 @@ 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
|
||||
{
|
||||
if(isset($_REQUEST['todo']) && $_REQUEST['todo'] == 'save')
|
||||
{
|
||||
$guild->deleteInvite($player);
|
||||
echo $twig->render('success.html.twig', array(
|
||||
$twig->display('success.html.twig', array(
|
||||
'title' => 'Deleted player invitation',
|
||||
'description' => 'Player with name <b>' . $player->getName() . '</b> has been deleted from invites list.',
|
||||
'custom_buttons' => $twig->render('guilds.back_button.html.twig', array('action' => '?subtopic=guilds&action=show&guild=' . $guild_name))
|
||||
));
|
||||
}
|
||||
else {
|
||||
echo $twig->render('guilds.delete_invite.html.twig', array(
|
||||
$twig->display('guilds.delete_invite.html.twig', array(
|
||||
'player_name' => $player->getName(),
|
||||
'guild_name' => $guild->getName()
|
||||
));
|
||||
|
@ -87,16 +87,16 @@ if(empty($guild_errors)) {
|
||||
}
|
||||
}
|
||||
if($saved) {
|
||||
echo $twig->render('success.html.twig', array(
|
||||
$twig->display('success.html.twig', array(
|
||||
'title' => 'Rank Deleted',
|
||||
'description' => 'Rank <b>'.$rank->getName().'</b> has been deleted. Players with this rank has now other rank.',
|
||||
'custom_buttons' => ''
|
||||
));
|
||||
} 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,
|
||||
'action' => '?subtopic=guilds&guild='.$guild->getName().'&action=manager'
|
||||
));
|
||||
@ -112,9 +112,9 @@ 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,
|
||||
'action' => '?subtopic=guilds'
|
||||
));
|
||||
|
@ -95,12 +95,12 @@ if(empty($errors)) {
|
||||
|
||||
$show = true;
|
||||
if(!empty($errors)) {
|
||||
echo $twig->render('error_box.html.twig', array('errors' => $errors));
|
||||
$twig->display('error_box.html.twig', array('errors' => $errors));
|
||||
}
|
||||
else {
|
||||
if(isset($_REQUEST['todo']) && $_REQUEST['todo'] == 'save') {
|
||||
$guild->invite($player);
|
||||
echo $twig->render('success.html.twig', array(
|
||||
$twig->display('success.html.twig', array(
|
||||
'title' => 'Invite player',
|
||||
'description' => 'Player with name <b>' . $player->getName() . '</b> has been invited to your guild.',
|
||||
'custom_buttons' => ''
|
||||
@ -111,7 +111,7 @@ else {
|
||||
}
|
||||
|
||||
if($show) {
|
||||
echo $twig->render('success.html.twig', array(
|
||||
$twig->display('success.html.twig', array(
|
||||
'title' => 'Invite player',
|
||||
'description' => $twig->render('guilds.invite.html.twig', array(
|
||||
'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
|
||||
));
|
@ -93,8 +93,8 @@ if(empty($errors)) {
|
||||
}
|
||||
|
||||
if(!empty($errors)) {
|
||||
echo $twig->render('error_box.html.twig', array('errors' => $errors));
|
||||
echo $twig->render('guilds.back_button.html.twig', array(
|
||||
$twig->display('error_box.html.twig', array('errors' => $errors));
|
||||
$twig->display('guilds.back_button.html.twig', array(
|
||||
'action' => getLink('guilds') . '/' . $guild_name
|
||||
));
|
||||
}
|
||||
@ -103,7 +103,7 @@ else
|
||||
if(isset($_REQUEST['todo']) && $_REQUEST['todo'] == 'save') {
|
||||
$player->setRank();
|
||||
|
||||
echo $twig->render('success.html.twig', array(
|
||||
$twig->display('success.html.twig', array(
|
||||
'title' => 'Kick player',
|
||||
'description' => 'Player with name <b>'.$player->getName().'</b> has been kicked from your guild.',
|
||||
'custom_buttons' => $twig->render('guilds.back_button.html.twig', array(
|
||||
@ -112,7 +112,7 @@ else
|
||||
));
|
||||
}
|
||||
else {
|
||||
echo $twig->render('guilds.kick_player.html.twig', array(
|
||||
$twig->display('guilds.kick_player.html.twig', array(
|
||||
'player_name' => $player->getName(),
|
||||
'guild_name' => $guild->getName()
|
||||
));
|
||||
|
@ -85,8 +85,8 @@ if(empty($errors)) {
|
||||
}
|
||||
|
||||
if(!empty($errors)) {
|
||||
echo $twig->render('error_box.html.twig', array('errors' => $errors));
|
||||
echo $twig->render('guilds.back_button.html.twig', array(
|
||||
$twig->display('error_box.html.twig', array('errors' => $errors));
|
||||
$twig->display('guilds.back_button.html.twig', array(
|
||||
'action' => getLink('guilds') . '/' . $guild_name
|
||||
));
|
||||
}
|
||||
@ -94,7 +94,7 @@ else
|
||||
{
|
||||
if(isset($_REQUEST['todo']) && $_REQUEST['todo'] == 'save') {
|
||||
$player->setRank();
|
||||
echo $twig->render('success.html.twig', array(
|
||||
$twig->display('success.html.twig', array(
|
||||
'title' => 'Leave guild',
|
||||
'description' => 'Player with name <b>'.$player->getName().'</b> leaved guild <b>'.$guild->getName().'</b>.',
|
||||
'custom_buttons' => $twig->render('guilds.back_button.html.twig', array(
|
||||
@ -106,7 +106,7 @@ else
|
||||
{
|
||||
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,
|
||||
'guild_name' => $guild_name
|
||||
));
|
||||
|
@ -38,7 +38,7 @@ if(empty($errors)) {
|
||||
}
|
||||
}
|
||||
if($guild_leader) {
|
||||
echo $twig->render('guilds.manager.html.twig', array(
|
||||
$twig->display('guilds.manager.html.twig', array(
|
||||
'guild' => $guild,
|
||||
'rank_list' => $rank_list
|
||||
));
|
||||
@ -54,7 +54,7 @@ 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));
|
||||
}
|
||||
|
||||
?>
|
@ -82,14 +82,14 @@ if(empty($guild_errors) && empty($guild_errors2)) {
|
||||
$saved = true;
|
||||
}
|
||||
if($saved) {
|
||||
echo $twig->render('success.html.twig', array(
|
||||
$twig->display('success.html.twig', array(
|
||||
'title' => 'Leadership passed',
|
||||
'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>'
|
||||
));
|
||||
}
|
||||
else {
|
||||
echo $twig->render('guilds.pass_leadership.html.twig', array(
|
||||
$twig->display('guilds.pass_leadership.html.twig', array(
|
||||
'guild' => $guild
|
||||
));
|
||||
}
|
||||
@ -103,7 +103,7 @@ 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>';
|
||||
}
|
||||
@ -111,7 +111,7 @@ if(!empty($guild_errors)) {
|
||||
if(!empty($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>';
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ if(empty($errors)) {
|
||||
}
|
||||
//show errors or redirect
|
||||
if(!empty($errors)) {
|
||||
echo $twig->render('error_box.html.twig', array('errors' => $errors));
|
||||
$twig->display('error_box.html.twig', array('errors' => $errors));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -79,7 +79,7 @@ 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));
|
||||
}
|
||||
|
||||
?>
|
@ -25,9 +25,9 @@ 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
|
||||
{
|
||||
|
@ -21,10 +21,10 @@ $config_salt_enabled = $db->hasColumn('accounts', 'salt');
|
||||
$action_type = isset($_REQUEST['action_type']) ? $_REQUEST['action_type'] : '';
|
||||
if($action == '')
|
||||
{
|
||||
echo $twig->render('account.lost.form.html.twig');
|
||||
$twig->display('account.lost.form.html.twig');
|
||||
}
|
||||
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')
|
||||
{
|
||||
|
@ -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']),
|
||||
'content' => $content_,
|
||||
'date' => $news['date'],
|
||||
@ -68,7 +68,7 @@ if(isset($_GET['archive']))
|
||||
else
|
||||
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;
|
||||
}
|
||||
?>
|
||||
@ -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
|
||||
));
|
||||
|
||||
@ -164,7 +164,7 @@ if($canEdit)
|
||||
}
|
||||
|
||||
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())
|
||||
{
|
||||
@ -259,7 +259,7 @@ if(!$news_cached)
|
||||
$account_players = $account_logged->getPlayersList();
|
||||
$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,
|
||||
'news_link' => getLink(PAGE),
|
||||
'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'],
|
||||
'title' => stripslashes($news['title']),
|
||||
'content' => $content_ . $admin_options,
|
||||
|
@ -120,11 +120,11 @@ if($players > 0)
|
||||
}
|
||||
}
|
||||
|
||||
echo $twig->render('online.html.twig', array(
|
||||
$twig->display('online.html.twig', array(
|
||||
'players' => $players_data,
|
||||
'record' => $record
|
||||
));
|
||||
|
||||
//search bar
|
||||
echo $twig->render('online.form.html.twig');
|
||||
$twig->display('online.form.html.twig');
|
||||
?>
|
||||
|
@ -11,4 +11,4 @@
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
$title = 'Server Rules';
|
||||
|
||||
echo $twig->render('rules.html.twig');
|
||||
$twig->display('rules.html.twig');
|
||||
|
@ -76,7 +76,7 @@ else {
|
||||
}
|
||||
}
|
||||
|
||||
echo $twig->render('spells.html.twig', array(
|
||||
$twig->display('spells.html.twig', array(
|
||||
'canEdit' => $canEdit,
|
||||
'post_vocation_id' => $vocation_id,
|
||||
'post_vocation' => $vocation,
|
||||
|
@ -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" />
|
||||
<script type="text/javascript">
|
||||
<?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 type="text/javascript" src="tools/basic.js"></script>
|
||||
|
Loading…
x
Reference in New Issue
Block a user