From 8a87186833206b81cb998b7e6340aad597f90e67 Mon Sep 17 00:00:00 2001 From: slawkens Date: Tue, 29 Aug 2017 17:38:32 +0200 Subject: [PATCH] * more templates moved to Twig --- system/init.php | 1 + system/pages/accountmanagement.php | 389 ++------ system/pages/characters.php | 40 +- system/pages/creatures.php | 19 +- system/pages/lostaccount.php | 928 +++++++++--------- system/template.php | 2 + system/templates/account.changemail.html | 72 ++ system/templates/account.changepassword.html | 80 ++ .../account.changepassword.success.html | 43 + system/templates/account.error_box.html | 20 + system/templates/account.login.html | 82 ++ system/templates/account.logout.html | 28 + system/templates/account.lost.form.html | 35 + system/templates/account.lost.noaction.html | 10 + system/templates/account.management.html | 533 ++++++++++ system/templates/account.redirect.html | 36 + system/templates/account.register.html | 64 ++ system/templates/characters.form.html | 15 + templates/kathrine/template.php | 1 + templates/tibiacom/index.php | 156 ++- 20 files changed, 1674 insertions(+), 880 deletions(-) create mode 100644 system/templates/account.changemail.html create mode 100644 system/templates/account.changepassword.html create mode 100644 system/templates/account.changepassword.success.html create mode 100644 system/templates/account.error_box.html create mode 100644 system/templates/account.login.html create mode 100644 system/templates/account.logout.html create mode 100644 system/templates/account.lost.form.html create mode 100644 system/templates/account.lost.noaction.html create mode 100644 system/templates/account.management.html create mode 100644 system/templates/account.redirect.html create mode 100644 system/templates/account.register.html create mode 100644 system/templates/characters.form.html diff --git a/system/init.php b/system/init.php index e4e7d748..18c67048 100644 --- a/system/init.php +++ b/system/init.php @@ -39,6 +39,7 @@ $function = new Twig_SimpleFunction('getStyle', function ($i) { return getStyle($i); }); $twig->addFunction($function); +$twig->addGlobal('config', $config); // trim values we receive if(isset($_POST)) diff --git a/system/pages/accountmanagement.php b/system/pages/accountmanagement.php index 4cd4bdf4..0f453042 100644 --- a/system/pages/accountmanagement.php +++ b/system/pages/accountmanagement.php @@ -21,111 +21,19 @@ $dontshowtableagain = false; $config_salt_enabled = fieldExist('salt', 'accounts'); if(!$logged) { - if($action == "logout") - echo '
' . - '' . - '
' . - '
' . - '' . - '' . - '' . - '' . - '
Logout Successful
' . - ' - - - -
-
- -
-
- - - - -
You have logged out of your '.$config['lua']['serverName'].' account. In order to view your account you need to log in again.
-
-
-
- - '; + if($action == "logout") { + echo $twig->render('account.logout.html'); + } else { if(!empty($errors)) output_errors($errors); - ?> -Please enter your account name and your password.
Create an account if you do not have one yet.

-
- - - -
- -
-
- - - - -
Account Login
- - - - -
-
- -
- - - - - - - - - - - - - - '; - ?> -
- >Account : -
- >Password: -
-
' . $errors[0] . '
-
-
-
- -
- -
-
-
-
-
- -
-
-
-
-
- -
- - - render('account.login.html', array( + 'redirect' => isset($_REQUEST['redirect']) ? $_REQUEST['redirect'] : null, + 'account' => USE_ACCOUNT_NAME ? 'Name' : 'Number', + 'error' => isset($errors[0]) ? $errors[0] : null + )); return; } } @@ -133,192 +41,99 @@ Please enter your account name and your password.
- -
-
- - - - -
Login Successful
- - - - -
-
- -
-
- - - - -
You have logged in.
Press here if you are not returned automatically.
-
-
- - - - -render('account.redirect.html', array( + 'redirect' => $redirect + )); return; } - if($action == "") + if($action == '') { $freePremium = isset($config['lua']['freePremium']) && getBoolean($config['lua']['freePremium']); - $account_reckey = $account_logged->getCustomField("key"); + $recovery_key = $account_logged->getCustomField('key'); if(!$account_logged->isPremium()) $account_status = 'Free Account'; else $account_status = 'Premium Account, ' . ($freePremium ? 'Unlimited' : $account_logged->getPremDays() . ' days left') . ''; - if(empty($account_reckey)) - $account_registred = 'No'; + + if(empty($recovery_key)) + $account_registered = 'No'; else { if($config['generate_new_reckey'] && $config['mail_enabled']) - $account_registred = 'Yes (
Buy new Recovery Key )'; + $account_registered = 'Yes ( Buy new Recovery Key )'; else - $account_registred = 'Yes'; + $account_registered = 'Yes'; } $account_created = $account_logged->getCustomField("created"); $account_email = $account_logged->getEMail(); - $account_email_new_time = $account_logged->getCustomField("email_new_time"); - if($account_email_new_time > 1) - $account_email_new = $account_logged->getCustomField("email_new"); + $email_new_time = $account_logged->getCustomField("email_new_time"); + if($email_new_time > 1) + $email_new = $account_logged->getCustomField("email_new"); $account_rlname = $account_logged->getRLName(); $account_location = $account_logged->getLocation(); if($account_logged->isBanned()) if($account_logged->getBanTime() > 0) - $welcome_msg = 'Your account is banished until '.date("j F Y, G:i:s", $account_logged->getBanTime()).'!'; + $welcome_message = 'Your account is banished until '.date("j F Y, G:i:s", $account_logged->getBanTime()).'!'; else - $welcome_msg = 'Your account is banished FOREVER!'; + $welcome_message = 'Your account is banished FOREVER!'; else - $welcome_msg = 'Welcome to your account!'; - echo '

'.$welcome_msg.'

'; - //if account dont have recovery key show hint - if(empty($account_reckey)) - echo '
Hint:You can register your account for increased protection. Click on "Register Account" and get your free recovery key today!

'; + $welcome_message = 'Welcome to your account!'; - $account_email_change = ''; - if($account_email_new_time > 1) + $email_change = ''; + $email_request = false; + if($email_new_time > 1) { - if($account_email_new_time < time()) - $account_email_change = '
(You can accept '.$account_email_new.' as a new email.)'; + if($email_new_time < time()) + $email_change = '
(You can accept '.$email_new.' as a new email.)'; else { - $account_email_change = '
You can accept new e-mail after '.date("j F Y", $account_email_new_time)."."; - echo '
Note:A request has been submitted to change the email address of this account to '.$account_email_new.'. After '.date("j F Y, G:i:s", $account_email_new_time).' you can accept the new email address and finish the process. Please cancel the request if you do not want your email address to be changed! Also cancel the request if you have no access to the new email address!


'; + $email_change = '
You can accept new e-mail after '.date("j F Y", $email_new_time)."."; + $email_request = true; } } - echo '
General Information
- - - - - - - - - - - - - -
Account ' . (USE_ACCOUNT_NAME ? 'Name' : 'Number') . ':' . (USE_ACCOUNT_NAME ? $account_logged->getName() : $account_logged->getId()) . '
Email Address:'.$account_email.''.$account_email_change.'
Created:'.date("j F Y, G:i:s", $account_created).'
Last Login:'.date("j F Y, G:i:s", time()).'
Account Status:'.$account_status.'
Registred:'.$account_registred.'
'; - //show button "register account" - if(empty($account_reckey)) - echo ''; - echo '

Public Information
Real Name:'.$account_rlname.'
Location:'.$account_location.'
'; - echo '
Account logs
- '; - $player_number_counter = 0; - foreach($account_logged->getActionsLog(0, 1000) as $action) - { - echo ' - '; + $actions = array(); + foreach($account_logged->getActionsLog(0, 1000) as $action) { + $actions[] = array('action' => $action['action'], 'date' => $action['date'], 'ip' => $action['ip'] != 0 ? long2ip($action['ip']) : inet_ntop($action['ipv6'])); } - echo '
ActionDateIP
'.$action['action'] . '' . date("jS F Y H:i:s",$action['date']) . '' . ($action['ip'] != 0 ? long2ip($action['ip']) : inet_ntop($action['ipv6'])) . '
- - -

'; - echo '
Characters
'; + + $players = array(); $account_players = $account_logged->getPlayersList(); $account_players->orderBy('id'); //show list of players on account - $player_number_counter = 0; - foreach($account_players as $account_player) + foreach($account_players as $player) { - echo ''; - if(!$account_player->isOnline()) - echo ''; - else - echo ''; - echo ''; + $players[] = array( + 'name' => $player->getName(), + 'name_encoded' => urlencode($player->getName()), + 'deleted' => $player->isDeleted(), + 'level' => $player->getLevel(), + 'vocation' => $config['vocations'][$player->getVocation()], + 'online' => $player->isOnline() + ); } - echo '
NameLevelStatus 
'.$player_number_counter.'. '.$account_player->getName(); - if($account_player->isDeleted()) - echo ' [ DELETED ] '; - echo ''.$account_player->getLevel().' '.$config['vocations'][$account_player->getVocation()].'OfflineOnline[Edit]
- '; - if($config['account_change_character_name']) { - echo ' - '; - } - if($config['account_change_character_sex']) { - echo ' - '; - } - echo ' - -
- - - - - - -
-
-
-
-
- - - - - - -
-
-
-
-
- - - - - - -
-
-
-
-


'; + + echo $twig->render('account.management.html', array( + 'welcome_message' => $welcome_message, + 'recovery_key' => $recovery_key, + 'email_change' => $email_change, + 'email_request' => $email_request, + 'email_new_time' => $email_new_time, + 'email_new' => isset($email_new) ? $email_new : '', + 'account' => USE_ACCOUNT_NAME ? $account_logged->getName() : $account_logged->getId(), + 'account_email' => $account_email, + 'account_created' => $account_created, + 'account_status' => $account_status, + 'account_registered' => $account_registered, + 'account_rlname' => $account_rlname, + 'account_location' => $account_location, + 'config' => $config, + 'actions' => $actions, + 'players' => $players + )); } //########### CHANGE PASSWORD ########## if($action == "changepassword") { @@ -326,7 +141,7 @@ Please enter your account name and your password.
Change Password
New Password:
New Password Again:
Current Password:

'; + echo $twig->render('account.changepassword.html'); } else { @@ -360,8 +175,9 @@ Please enter your account name and your password.

'; + //show form - echo 'Please enter your current password and a new password. For your security, please enter the new password twice.

Change Password
New Password:
New Password Again:
Current Password:

'; + echo $twig->render('account.changepassword.html'); } else { @@ -378,20 +194,24 @@ Please enter your account name and your password.
Password Changed
Your password has been changed.'; + + $message = ''; if($config['mail_enabled'] && $config['send_mail_when_change_password']) { $mailBody = '

Password to account changed!

You or someone else changed password to your account on server '.$config['lua']['serverName'].'.

New password: '.$org_pass.'

'; - + if(_mail($account_logged->getEMail(), $config['lua']['serverName']." - Changed password", $mailBody)) - echo '
Your new password were send on email address '.$account_logged->getEMail().'.'; + $message = '
Your new password were send on email address '.$account_logged->getEMail().'.'; else - echo '

An error occorred while sending email with password:
' . $mailer->ErrorInfo . '

'; + $message = '

An error occorred while sending email with password:
' . $mailer->ErrorInfo . '

'; } - echo '

'; + + echo $twig->render('account.changepassword.success.html', array( + 'message' => $message + )); $_SESSION['password'] = $new_password; } } @@ -399,18 +219,18 @@ Please enter your account name and your password.
getCustomField("email_new_time"); - if($account_email_new_time > 10) {$account_email_new = $account_logged->getCustomField("email_new"); } - if($account_email_new_time < 10){ + $email_new_time = $account_logged->getCustomField("email_new_time"); + if($email_new_time > 10) {$email_new = $account_logged->getCustomField("email_new"); } + if($email_new_time < 10){ if(isset($_POST['changeemailsave']) && $_POST['changeemailsave'] == 1) { - $account_email_new = $_POST['new_email']; + $email_new = $_POST['new_email']; $post_password = $_POST['password']; - if(empty($account_email_new)) { + if(empty($email_new)) { $change_email_errors[] = "Please enter your new email address."; } else { - if(!check_mail($account_email_new)) { + if(!check_mail($email_new)) { $change_email_errors[] = "E-mail address is not correct."; } } @@ -425,47 +245,48 @@ Please enter your account name and your password.
setCustomField("email_new_time", $account_email_new_time); - echo '
New Email Address Requested
You have requested to change your email address to '.$account_email_new.'. The actual change will take place after '.date("j F Y, G:i:s", $account_email_new_time).', during which you can cancel the request at any time.

'; + $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 '
New Email Address Requested
You have requested to change your email address to '.$email_new.'. The actual change will take place after '.date("j F Y, G:i:s", $email_new_time).', during which you can cancel the request at any time.

'; } else { //show errors - echo '
The Following Errors Have Occurred:
'; - foreach($change_email_errors as $change_email_error) { - echo '
  • '.$change_email_error; - } - echo '

  • '; + echo $twig->render('account.error_box.html', array('errors' => $change_email_errors)); + //show form - echo 'Please enter your password and the new email address. Make sure that you enter a valid email address which you have access to. For security reasons, the actual change will be finalised after a waiting period of '.$config['account_mail_change'].' days.

    Change Email Address
    New Email Address:
    Password:

    '; + echo $twig->render('account.changemail.html', array( + 'new_email' => isset($_POST['new_email']) ? $_POST['new_email'] : null + )); } } else { - echo 'Please enter your password and the new email address. Make sure that you enter a valid email address which you have access to. For security reasons, the actual change will be finalised after a waiting period of '.$config['account_mail_change'].' days.

    Change Email Address
    New Email Address:
    Password:

    '; + echo $twig->render('account.changemail.html', array( + 'new_email' => isset($_POST['new_email']) ? $_POST['new_email'] : null + )); } } else { - if($account_email_new_time < time()) { + if($email_new_time < time()) { if($_POST['changeemailsave'] == 1) { $account_logged->setCustomField("email_new", ""); $account_logged->setCustomField("email_new_time", 0); - $account_logged->setEmail($account_email_new); + $account_logged->setEmail($email_new); $account_logged->save(); - $account_logged->logAction('Account email changed to ' . $account_email_new . ''); + $account_logged->logAction('Account email changed to ' . $email_new . ''); echo '
    Email Address Change Accepted
    You have accepted '.$account_logged->getEmail().' as your new email adress.

    '; } else { - echo '
    Email Address Change Accepted
    Do you accept '.$account_email_new.' as your new email adress?

     
     
    '; + echo '
    Email Address Change Accepted
    Do you accept '.$email_new.' as your new email adress?

     
     
    '; } } else { - echo '
    Change of Email Address
    A request has been submitted to change the email address of this account to '.$account_email_new.'.
    The actual change will take place on '.date("j F Y, G:i:s", $account_email_new_time).'.
    If you do not want to change your email address, please click on "Cancel".

    '; + echo '
    Change of Email Address
    A request has been submitted to change the email address of this account to '.$email_new.'.
    The actual change will take place on '.date("j F Y, G:i:s", $email_new_time).'.
    If you do not want to change your email address, please click on "Cancel".

    '; } } if(isset($_POST['emailchangecancel']) && $_POST['emailchangecancel'] == 1) { @@ -624,16 +445,14 @@ Please enter your account name and your password.
    The Following Errors Have Occurred:
    '; - foreach($reg_errors as $reg_error) - echo '
  • '.$reg_error . '
  • '; - echo '

    '; + //show errors + echo $twig->render('account.error_box.html', array('errors' => $reg_errors)); } + //show form - echo 'To generate recovery key for your account please enter your password.

    Generate recovery key
    Password:

    '; + echo $twig->render('account.register.html'); } } diff --git a/system/pages/characters.php b/system/pages/characters.php index 087ec532..6e98c38a 100644 --- a/system/pages/characters.php +++ b/system/pages/characters.php @@ -14,34 +14,16 @@ $title = 'Characters'; require(SYSTEM . 'item.php'); $groups = new OTS_Groups_List(); -function generate_search_table($script = false) +function generate_search_table($autofocus = false) { - global $config, $template_path; - $ret = ' -
    - - - -
    Search Character
    - - - - - -
    Name: - -
    -
    -
    '; - if($script) - $ret .= ' - '; - - return $ret; + global $config, $template_path, $twig; + return $twig->render('characters.form.html', array( + 'link' => getPageLink('characters'), + 'vdarkborder' => $config['vdarkborder'], + 'darkborder' => $config['darkborder'], + 'autofocus' => $autofocus, + 'template_path' => $template_path + )); } function generate_player_lookup($player) @@ -129,7 +111,7 @@ if(isset($_REQUEST['name'])) if(empty($name)) { $tmp_link = getPlayerLink($name); - echo 'Here you can get detailed information about a certain player on '.$config['lua']['serverName'].'.
    '; + echo 'Here you can get detailed information about a certain player on ' . $config['lua']['serverName'] . '.
    '; echo generate_search_table(true); return; } @@ -165,7 +147,7 @@ if($player->isLoaded() && !$player->isDeleted()) -
    >
    +
    diff --git a/system/pages/creatures.php b/system/pages/creatures.php index 3e163b63..1a6e6b57 100644 --- a/system/pages/creatures.php +++ b/system/pages/creatures.php @@ -170,7 +170,7 @@ if(empty($_REQUEST['creature'])) //generate sql query $desc = ''; if(isset($_REQUEST['desc']) && $_REQUEST['desc'] == 1) { - $desc = " DESC"; + $desc = " DESC"; } if($order == 'name') { $whereandorder = ' ORDER BY name'.$desc; @@ -229,24 +229,25 @@ if(empty($_REQUEST['creature'])) $number_of_rows = 0; foreach($monsters as $monster) { echo ''; + if($monster['summonable']) { - echo ''; + echo ''; } - else { - echo ''; + else { + echo ''; } if($monster['convinceable']) { - echo ''; + echo ''; } - else { - echo ''; + else { + echo ''; } - echo ''; + echo ''; } - echo '
    Character Information
    '.$monster['name'].''.$monster['health'].''.$monster['exp'].''.$monster['mana'].''.$monster['mana'].'------'.$monster['mana'].''.$monster['mana'].'------'.ucwords($monster['race']).'
    '.ucwords($monster['race']).'
    '; + echo ''; return; } diff --git a/system/pages/lostaccount.php b/system/pages/lostaccount.php index 572fce4c..f2217e65 100644 --- a/system/pages/lostaccount.php +++ b/system/pages/lostaccount.php @@ -12,408 +12,194 @@ defined('MYAAC') or die('Direct access not allowed!'); $title = 'Lost Account Interface'; -$config_salt_enabled = fieldExist('salt', 'accounts'); -if($config['mail_enabled']) +if(!$config['mail_enabled']) { - if($action == '') + echo 'Account maker is not configured to send e-mails, you can\'t use Lost Account Interface. Contact with admin to get help.'; + return; +} + +$config_salt_enabled = fieldExist('salt', 'accounts'); +$action_type = isset($_REQUEST['action_type']) ? $_REQUEST['action_type'] : ''; +if($action == '') +{ + echo $twig->render('account.lost.form.html', array( + 'vdarkborder' => $config['vdarkborder'], + 'darkborder' => $config['darkborder'], + 'template_path' => $template_path + )); +} +else if($action == 'step1' && $action_type == '') { + echo $twig->render('account.lost.noaction.html', array( + 'template_path' => $template_path + )); +} +elseif($action == 'step1' && $action_type == 'email') +{ + $nick = stripslashes($_REQUEST['nick']); + if(check_name($nick)) { - echo 'The Lost Account Interface can help you to get back your account name and password. Please enter your character name and select what you want to do.
    -
    - - - - -
    Please enter your character name
    -
    -
    - - - -
    What do you want?
    -
    -
    -
    -
    -
    -
    -
    '; - ?> - -
    - Back
    -
    '; - elseif($action == 'step1' && $_REQUEST['action_type'] == 'email') - { - $nick = stripslashes($_REQUEST['nick']); - if(check_name($nick)) + $player = new OTS_Player(); + $account = new OTS_Account(); + $player->find($nick); + if($player->isLoaded()) + $account = $player->getAccount(); + + if($account->isLoaded()) { - $player = new OTS_Player(); - $account = new OTS_Account(); - $player->find($nick); - if($player->isLoaded()) - $account = $player->getAccount(); - if($account->isLoaded()) - { - if($account->getCustomField('email_next') < time()) - echo 'Please enter e-mail to account with this character.
    -
    - - - - -
    Please enter e-mail to account
    - Character:
    - E-mail to account:
    -
    -
    -
    -
    -
    '; - else - { - $insec = $account->getCustomField('email_next') - time(); - $minutesleft = floor($insec / 60); - $secondsleft = $insec - ($minutesleft * 60); - $timeleft = $minutesleft.' minutes '.$secondsleft.' seconds'; - echo 'Account of selected character ('.$nick.') received e-mail in last '.ceil($config['email_lai_sec_interval'] / 60).' minutes. You must wait '.$timeleft.' before you can use Lost Account Interface again.'; - } - } + if($account->getCustomField('email_next') < time()) + echo 'Please enter e-mail to account with this character.
    +
    + + + + +
    Please enter e-mail to account
    + Character:
    + E-mail to account:
    +
    +
    +
    +
    +
    '; else - echo 'Player or account of player '.$nick.' doesn\'t exist.'; + { + $insec = $account->getCustomField('email_next') - time(); + $minutesleft = floor($insec / 60); + $secondsleft = $insec - ($minutesleft * 60); + $timeleft = $minutesleft.' minutes '.$secondsleft.' seconds'; + echo 'Account of selected character ('.$nick.') received e-mail in last '.ceil($config['email_lai_sec_interval'] / 60).' minutes. You must wait '.$timeleft.' before you can use Lost Account Interface again.'; + } } else - echo 'Invalid player name format. If you have other characters on account try with other name.'; - echo '
    - Back
    -
    '; + echo 'Player or account of player ' . $nick . ' doesn\'t exist.'; } - elseif($action == 'sendcode') + else + echo 'Invalid player name format. If you have other characters on account try with other name.'; + echo '
    + Back
    +
    '; +} +elseif($action == 'sendcode') +{ + $email = $_REQUEST['email']; + $nick = stripslashes($_REQUEST['nick']); + if(check_name($nick)) { - $email = $_REQUEST['email']; - $nick = stripslashes($_REQUEST['nick']); - if(check_name($nick)) + $player = new OTS_Player(); + $account = new OTS_Account(); + $player->find($nick); + if($player->isLoaded()) + $account = $player->getAccount(); + + if($account->isLoaded()) { - $player = new OTS_Player(); - $account = new OTS_Account(); - $player->find($nick); - if($player->isLoaded()) - $account = $player->getAccount(); - if($account->isLoaded()) + if($account->getCustomField('email_next') < time()) { - if($account->getCustomField('email_next') < time()) + if($account->getEMail() == $email) { - if($account->getEMail() == $email) - { - $newcode = generateRandomString(30, true, false, true); - $mailBody = ' - You asked to reset your ' . $config['lua']['serverName'] . ' password.
    -

    Account name: '.$account->getName().'

    -
    - To do so, please click this link: -

    '.BASE_URL.'/?subtopic=lostaccount&action=checkcode&code='.$newcode.'&character='.urlencode($nick).'

    -

    or open page: ' . BASE_URL . '/?subtopic=lostaccount&action=checkcode and in field "code" write '.$newcode.'

    -
    -

    If you did not request a password change, you may ignore this message and your password will remain unchanged.'; + $newcode = generateRandomString(30, true, false, true); + $mailBody = ' + You asked to reset your ' . $config['lua']['serverName'] . ' password.
    +

    Account name: '.$account->getName().'

    +
    + To do so, please click this link: +

    '.BASE_URL.'/?subtopic=lostaccount&action=checkcode&code='.$newcode.'&character='.urlencode($nick).'

    +

    or open page: ' . BASE_URL . '/?subtopic=lostaccount&action=checkcode and in field "code" write '.$newcode.'

    +
    +

    If you did not request a password change, you may ignore this message and your password will remain unchanged.'; - $account_mail = $account->getCustomField('email'); - if(_mail($account_mail, $config['lua']['serverName'].' - Recover your account', $mailBody)) - { - $account->setCustomField('email_code', $newcode); - $account->setCustomField('email_next', (time() + $config['email_lai_sec_interval'])); - echo '
    Details about steps required to recover your account has been sent to ' . $account_mail . '. You should receive this email within 15 minutes. Please check your inbox/spam directory.'; - } - else - { - $account->setCustomField('email_next', (time() + 60)); - echo '

    An error occorred while sending email! Try again or contact with admin. Error:
    ' . $mailer->ErrorInfo . '

    '; - } + $account_mail = $account->getCustomField('email'); + if(_mail($account_mail, $config['lua']['serverName'].' - Recover your account', $mailBody)) + { + $account->setCustomField('email_code', $newcode); + $account->setCustomField('email_next', (time() + $config['email_lai_sec_interval'])); + echo '
    Details about steps required to recover your account has been sent to ' . $account_mail . '. You should receive this email within 15 minutes. Please check your inbox/spam directory.'; } else - echo 'Invalid e-mail to account of character '.$nick.'. Try again.'; - } - else - { - $insec = $account->getCustomField('email_next') - time(); - $minutesleft = floor($insec / 60); - $secondsleft = $insec - ($minutesleft * 60); - $timeleft = $minutesleft.' minutes '.$secondsleft.' seconds'; - echo 'Account of selected character ('.$nick.') received e-mail in last '.ceil($config['email_lai_sec_interval'] / 60).' minutes. You must wait '.$timeleft.' before you can use Lost Account Interface again.'; - } - } - else - echo 'Player or account of player '.$nick.' doesn\'t exist.'; - } - else - echo 'Invalid player name format. If you have other characters on account try with other name.'; - echo '
    - Back
    -
    '; - } - elseif($action == 'step1' && $_REQUEST['action_type'] == 'reckey') - { - $nick = stripslashes($_REQUEST['nick']); - if(check_name($nick)) - { - $player = new OTS_Player(); - $account = new OTS_Account(); - $player->find($nick); - if($player->isLoaded()) - $account = $player->getAccount(); - if($account->isLoaded()) - { - $account_key = $account->getCustomField('key'); - if(!empty($account_key)) - { - echo 'If you enter right recovery key you will see form to set new e-mail and password to account. To this e-mail will be send your new password and account name.
    -
    - - - -
    Please enter your recovery key
    - Character name: 
    - Recovery key:    
    -
    -
    -
    -
    -
    '; - } - else - echo 'Account of this character has no recovery key!'; - } - else - echo 'Player or account of player '.$nick.' doesn\'t exist.'; - } - else - echo 'Invalid player name format. If you have other characters on account try with other name.'; - echo '
    - Back
    -
    '; - } - elseif($action == 'step2') - { - $rec_key = trim($_REQUEST['key']); - $nick = stripslashes($_REQUEST['nick']); - if(check_name($nick)) - { - $player = new OTS_Player(); - $account = new OTS_Account(); - $player->find($nick); - if($player->isLoaded()) - $account = $player->getAccount(); - if($account->isLoaded()) - { - $account_key = $account->getCustomField('key'); - if(!empty($account_key)) - { - if($account_key == $rec_key) { - echo ''; - echo 'Set new password and e-mail to your account.
    -
    - + $account->setCustomField('email_next', (time() + 60)); + echo '

    An error occorred while sending email! Try again or contact with admin. Error:
    ' . $mailer->ErrorInfo . '

    '; + } + } + else + echo 'Invalid e-mail to account of character '.$nick.'. Try again.'; + } + else + { + $insec = $account->getCustomField('email_next') - time(); + $minutesleft = floor($insec / 60); + $secondsleft = $insec - ($minutesleft * 60); + $timeleft = $minutesleft.' minutes '.$secondsleft.' seconds'; + echo 'Account of selected character ('.$nick.') received e-mail in last '.ceil($config['email_lai_sec_interval'] / 60).' minutes. You must wait '.$timeleft.' before you can use Lost Account Interface again.'; + } + } + else + echo 'Player or account of player '.$nick.' doesn\'t exist.'; + } + else + echo 'Invalid player name format. If you have other characters on account try with other name.'; + echo '
    + Back
    +
    '; +} +elseif($action == 'step1' && $action_type == 'reckey') +{ + $nick = stripslashes($_REQUEST['nick']); + if(check_name($nick)) + { + $player = new OTS_Player(); + $account = new OTS_Account(); + $player->find($nick); + if($player->isLoaded()) + $account = $player->getAccount(); + if($account->isLoaded()) + { + $account_key = $account->getCustomField('key'); + if(!empty($account_key)) + { + echo 'If you enter right recovery key you will see form to set new e-mail and password to account. To this e-mail will be send your new password and account name.
    +
    - +
    Please enter new password and e-mail
    Please enter your recovery key
    - Account of character:  
    - New password:            
    - Repeat new password:  
    - New e-mail address:     
    - + Character name: 
    + Recovery key:    

    '; - } - else - echo 'Wrong recovery key!'; - } - else - echo 'Account of this character has no recovery key!'; } else - echo 'Player or account of player '.$nick.' doesn\'t exist.'; + echo 'Account of this character has no recovery key!'; } else - echo 'Invalid player name format. If you have other characters on account try with other name.'; - echo '
    - Back
    -
    '; + echo 'Player or account of player '.$nick.' doesn\'t exist.'; } - elseif($action == 'step3') + else + echo 'Invalid player name format. If you have other characters on account try with other name.'; + echo '
    + Back
    +
    '; +} +elseif($action == 'step2') +{ + $rec_key = trim($_REQUEST['key']); + $nick = stripslashes($_REQUEST['nick']); + if(check_name($nick)) { - $rec_key = trim($_REQUEST['key']); - $nick = stripslashes($_REQUEST['nick']); - $new_pass = trim($_REQUEST['passor']); - $new_email = trim($_REQUEST['email']); - if(check_name($nick)) + $player = new OTS_Player(); + $account = new OTS_Account(); + $player->find($nick); + if($player->isLoaded()) + $account = $player->getAccount(); + if($account->isLoaded()) { - $player = new OTS_Player(); - $account = new OTS_Account(); - $player->find($nick); - if($player->isLoaded()) - $account = $player->getAccount(); - if($account->isLoaded()) + $account_key = $account->getCustomField('key'); + if(!empty($account_key)) { - $account_key = $account->getCustomField('key'); - if(!empty($account_key)) - { - if($account_key == $rec_key) - { - if(check_password($new_pass)) - { - if(check_mail($new_email)) - { - $account->setEMail($new_email); - - if($config_salt_enabled) - { - $salt = generateRandomString(10, false, true, true); - $new_pass_with_salt = $salt . $new_pass; - } - - $account->setPassword(encrypt($new_pass_with_salt)); - $account->save(); - - if($config_salt_enabled) - $account->setCustomField('salt', $salt); - - echo 'Your account name, new password and new e-mail.
    -
    - - - -
    Your account name, new password and new e-mail
    - Account name:     '.$account->getName().'
    - New password:        '.$new_pass.'
    - New e-mail address: '.$new_email.'
    '; - if($account->getCustomField('email_next') < time()) - { - $mailBody = ' -

    Your account name and new password!

    -

    Changed password and e-mail to your account in Lost Account Interface on server '.$config['lua']['serverName'].'

    -

    Account name: '.$account->getName().'

    -

    New password: '.$new_pass.'

    -

    E-mail: '.$new_email.' (this e-mail)

    -
    -

    It\'s automatic e-mail from OTS Lost Account System. Do not reply!

    '; - - if(_mail($account->getCustomField('email'), $config['lua']['serverName']." - New password to your account", $mailBody)) - { - echo '
    Sent e-mail with your account name and password to new e-mail. You should receive this e-mail in 15 minutes. You can login now with new password!'; - } - else - { - echo '

    An error occorred while sending email! You will not receive e-mail with this informations. Error:
    ' . $mailer->ErrorInfo . '

    '; - } - } - else - { - echo '
    You will not receive e-mail with this informations.'; - } - echo ' - -

    -
    -
    -
    '; - } - else - echo 'Wrong e-mail format.'; - } - else - echo 'Wrong password format. Use only a-Z, A-Z, 0-9. Minimum password length is 7 characters and maximum 32.'; - } - else - echo 'Wrong recovery key!'; - } - else - echo 'Account of this character has no recovery key!'; - } - else - echo 'Player or account of player '.$nick.' doesn\'t exist.'; - } - else - echo 'Invalid player name format. If you have other characters on account try with other name.'; - echo '
    - Back
    -
    '; - } - elseif($action == 'checkcode') - { - $code = trim($_REQUEST['code']); - $character = stripslashes(trim($_REQUEST['character'])); - if(empty($code) || empty($character)) - echo 'Please enter code from e-mail and name of one character from account. Then press Submit.
    -
    - - - -
    Code & character name
    - Your code: 
    - Character: 
    -
    -
    -
    -
    -
    '; - else - { - $player = new OTS_Player(); - $account = new OTS_Account(); - $player->find($character); - if($player->isLoaded()) - $account = $player->getAccount(); - if($account->isLoaded()) - { - if($account->getCustomField('email_code') == $code) + if($account_key == $rec_key) { echo ' - Please enter new password to your account and repeat to make sure you remember password.
    -
    - - + '; + echo 'Set new password and e-mail to your account.
    + + - +
    Code & account name
    Please enter new password and e-mail
    - New password:      
    - Repeat new password: 
    + Account of character:  
    + New password:            
    + Repeat new password:  
    + New e-mail address:     
    +

    @@ -456,118 +258,298 @@ if($config['mail_enabled'])
    '; } else - $error= 'Wrong code to change password.'; + echo 'Wrong recovery key!'; } else - $error = 'Account of this character or this character doesn\'t exist.'; + echo 'Account of this character has no recovery key!'; } - if(!empty($error)) - echo ''.$error.'
    Please enter code from e-mail and name of one character from account. Then press Submit.
    -
    - - - -
    Code & character name
    - Your code: 
    - Character: 
    -
    -
    -
    -
    -
    '; - } - elseif($action == 'setnewpassword') - { - $newpassword = $_REQUEST['passor']; - $code = $_REQUEST['code']; - $character = stripslashes($_REQUEST['character']); - echo ''; - if(empty($code) || empty($character) || empty($newpassword)) - echo 'Error. Try again.
    Please enter code from e-mail and name of one character from account. Then press Submit.
    -
    -
    -
    -
    '; else + echo 'Player or account of player '.$nick.' doesn\'t exist.'; + } + else + echo 'Invalid player name format. If you have other characters on account try with other name.'; + echo '
    + Back
    +
    '; +} +elseif($action == 'step3') +{ + $rec_key = trim($_REQUEST['key']); + $nick = stripslashes($_REQUEST['nick']); + $new_pass = trim($_REQUEST['passor']); + $new_email = trim($_REQUEST['email']); + if(check_name($nick)) + { + $player = new OTS_Player(); + $account = new OTS_Account(); + $player->find($nick); + if($player->isLoaded()) + $account = $player->getAccount(); + if($account->isLoaded()) { - $player = new OTS_Player(); - $account = new OTS_Account(); - $player->find($character); - if($player->isLoaded()) - $account = $player->getAccount(); - if($account->isLoaded()) + $account_key = $account->getCustomField('key'); + if(!empty($account_key)) { - if($account->getCustomField('email_code') == $code) + if($account_key == $rec_key) { - if(check_password($newpassword)) + if(check_password($new_pass)) { - if($config_salt_enabled) + if(check_mail($new_email)) { - $salt = generateRandomString(10, false, true, true); - $newpassword_with_salt = $salt . $newpassword; - $account->setCustomField('salt', $salt); - } - - $account->setPassword(encrypt($newpassword_with_salt)); - $account->save(); - $account->setCustomField('email_code', ''); - echo 'New password to your account is below. Now you can login.
    - - - -
    Changed password
    - New password: '.$newpassword.'
    - Account name:   (Already on your e-mail)
    '; + $account->setEMail($new_email); + + if($config_salt_enabled) + { + $salt = generateRandomString(10, false, true, true); + $new_pass_with_salt = $salt . $new_pass; + } + + $account->setPassword(encrypt($new_pass_with_salt)); + $account->save(); + + if($config_salt_enabled) + $account->setCustomField('salt', $salt); + + echo 'Your account name, new password and new e-mail.
    +
    + + + +
    Your account name, new password and new e-mail
    + Account name:     '.$account->getName().'
    + New password:        '.$new_pass.'
    + New e-mail address: '.$new_email.'
    '; + if($account->getCustomField('email_next') < time()) + { + $mailBody = ' +

    Your account name and new password!

    +

    Changed password and e-mail to your account in Lost Account Interface on server '.$config['lua']['serverName'].'

    +

    Account name: '.$account->getName().'

    +

    New password: '.$new_pass.'

    +

    E-mail: '.$new_email.' (this e-mail)

    +
    +

    It\'s automatic e-mail from OTS Lost Account System. Do not reply!

    '; - $mailBody = ' -

    Your account name and password!

    -

    Changed password to your account in Lost Account Interface on server '.$config['lua']['serverName'].'

    -

    Account name: '.$account->getName().'

    -

    New password: '.$newpassword.'

    -
    -

    It\'s automatic e-mail from OTS Lost Account System. Do not reply!

    '; - - if(_mail($account->getCustomField('email'), $config['lua']['serverName']." - Your new password", $mailBody)) - { - echo '
    New password work! Sent e-mail with your password and account name. You should receive this e-mail in 15 minutes. You can login now with new password!'; + if(_mail($account->getCustomField('email'), $config['lua']['serverName']." - New password to your account", $mailBody)) + { + echo '
    Sent e-mail with your account name and password to new e-mail. You should receive this e-mail in 15 minutes. You can login now with new password!'; + } + else + { + echo '

    An error occorred while sending email! You will not receive e-mail with this informations. Error:
    ' . $mailer->ErrorInfo . '

    '; + } + } + else + { + echo '
    You will not receive e-mail with this informations.'; + } + echo ' + +

    +
    +
    +
    '; } else - { - echo '

    New password work! An error occorred while sending email! You will not receive e-mail with new password. Error:
    ' . $mailer->ErrorInfo . '

    '; - } - echo ' - -
    -
    -
    -
    -
    '; + echo 'Wrong e-mail format.'; } else - $error= 'Wrong password format. Use only a-z, A-Z, 0-9. Minimum password length is 7 characters and maximum 32.'; + echo 'Wrong password format. Use only a-Z, A-Z, 0-9. Minimum password length is 7 characters and maximum 32.'; } else - $error= 'Wrong code to change password.'; + echo 'Wrong recovery key!'; } else - $error = 'Account of this character or this character doesn\'t exist.'; + echo 'Account of this character has no recovery key!'; } - if(!empty($error)) - echo ''.$error.'
    Please enter code from e-mail and name of one character from account. Then press Submit.
    -
    - - - -
    Code & character name
    - Your code: 
    - Character: 
    -
    -
    -
    -
    -
    '; + else + echo 'Player or account of player '.$nick.' doesn\'t exist.'; } + else + echo 'Invalid player name format. If you have other characters on account try with other name.'; + echo '
    + Back
    +
    '; +} +elseif($action == 'checkcode') +{ + $code = trim($_REQUEST['code']); + $character = stripslashes(trim($_REQUEST['character'])); + if(empty($code) || empty($character)) + echo 'Please enter code from e-mail and name of one character from account. Then press Submit.
    +
    + + + +
    Code & character name
    + Your code: 
    + Character: 
    +
    +
    +
    +
    +
    '; + else + { + $player = new OTS_Player(); + $account = new OTS_Account(); + $player->find($character); + if($player->isLoaded()) + $account = $player->getAccount(); + if($account->isLoaded()) + { + if($account->getCustomField('email_code') == $code) + { + echo ' + Please enter new password to your account and repeat to make sure you remember password.
    +
    + + + + + +
    Code & account name
    + New password:      
    + Repeat new password: 
    +
    +
    +
    +
    +
    '; + } + else + $error= 'Wrong code to change password.'; + } + else + $error = 'Account of this character or this character doesn\'t exist.'; + } + if(!empty($error)) + echo ''.$error.'
    Please enter code from e-mail and name of one character from account. Then press Submit.
    +
    + + + +
    Code & character name
    + Your code: 
    + Character: 
    +
    +
    +
    +
    +
    '; +} +elseif($action == 'setnewpassword') +{ + $newpassword = $_REQUEST['passor']; + $code = $_REQUEST['code']; + $character = stripslashes($_REQUEST['character']); + echo ''; + if(empty($code) || empty($character) || empty($newpassword)) + echo 'Error. Try again.
    Please enter code from e-mail and name of one character from account. Then press Submit.
    +
    +
    +
    +
    '; + else + { + $player = new OTS_Player(); + $account = new OTS_Account(); + $player->find($character); + if($player->isLoaded()) + $account = $player->getAccount(); + if($account->isLoaded()) + { + if($account->getCustomField('email_code') == $code) + { + if(check_password($newpassword)) + { + if($config_salt_enabled) + { + $salt = generateRandomString(10, false, true, true); + $newpassword_with_salt = $salt . $newpassword; + $account->setCustomField('salt', $salt); + } + + $account->setPassword(encrypt($newpassword_with_salt)); + $account->save(); + $account->setCustomField('email_code', ''); + echo 'New password to your account is below. Now you can login.
    + + + + +
    Changed password
    + New password: '.$newpassword.'
    + Account name:   (Already on your e-mail)
    '; + + $mailBody = ' +

    Your account name and password!

    +

    Changed password to your account in Lost Account Interface on server '.$config['lua']['serverName'].'

    +

    Account name: '.$account->getName().'

    +

    New password: '.$newpassword.'

    +
    +

    It\'s automatic e-mail from OTS Lost Account System. Do not reply!

    '; + + if(_mail($account->getCustomField('email'), $config['lua']['serverName']." - Your new password", $mailBody)) + { + echo '
    New password work! Sent e-mail with your password and account name. You should receive this e-mail in 15 minutes. You can login now with new password!'; + } + else + { + echo '

    New password work! An error occorred while sending email! You will not receive e-mail with new password. Error:
    ' . $mailer->ErrorInfo . '

    '; + } + echo '
    +
    +
    +
    +
    +
    '; + } + else + $error= 'Wrong password format. Use only a-z, A-Z, 0-9. Minimum password length is 7 characters and maximum 32.'; + } + else + $error= 'Wrong code to change password.'; + } + else + $error = 'Account of this character or this character doesn\'t exist.'; + } + if(!empty($error)) + echo ''.$error.'
    Please enter code from e-mail and name of one character from account. Then press Submit.
    +
    + + + +
    Code & character name
    + Your code: 
    + Character: 
    +
    +
    +
    +
    +
    '; } -else - echo 'Account maker is not configured to send e-mails, you can\'t use Lost Account Interface. Contact with admin to get help.'; ?> diff --git a/system/template.php b/system/template.php index d3bdc56d..92978c82 100644 --- a/system/template.php +++ b/system/template.php @@ -92,4 +92,6 @@ if($config['forum'] != '') else $template['link_forum'] = ""; } + +$twig->addGlobal('template_path', $template_path); ?> diff --git a/system/templates/account.changemail.html b/system/templates/account.changemail.html new file mode 100644 index 00000000..3bece4d2 --- /dev/null +++ b/system/templates/account.changemail.html @@ -0,0 +1,72 @@ +Please enter your password and the new email address. Make sure that you enter a valid email address which you have access to. For security reasons, the actual change will be finalised after a waiting period of {{ config.account_mail_change }} days.

    +
    +
    + +
    +
    + + + + +
    Change Email Address
    + + + + +
    +
    + + + +
    +
    + + + + + + + + + +
    + New Email Address: + + +
    + Password: + + +
    +
    +
    +
    +
    + + + + + + +
    + + + + +
    + +
    +
    +
    +
    + + + + + + +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/system/templates/account.changepassword.html b/system/templates/account.changepassword.html new file mode 100644 index 00000000..53c917ad --- /dev/null +++ b/system/templates/account.changepassword.html @@ -0,0 +1,80 @@ +Please enter your current password and a new password. For your security, please enter the new password twice.
    +
    +
    +
    + +
    +
    + + + + +
    Change Password
    + + + + +
    +
    + + + +
    +
    + + + + + + + + + + + + + +
    + New Password: + + +
    + New Password Again: + + +
    + Current Password: + + +
    +
    +
    +
    +
    + + + + + + +
    + + + + +
    +
    +
    +
    +
    + + + + + + +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/system/templates/account.changepassword.success.html b/system/templates/account.changepassword.success.html new file mode 100644 index 00000000..7f775a80 --- /dev/null +++ b/system/templates/account.changepassword.success.html @@ -0,0 +1,43 @@ +
    + +
    +
    + + + + +
    Password Changed
    + + + + +
    +
    + + + +
    +
    + + + + +
    Your password has been changed.{{ message|raw }}
    +
    +
    +
    +
    +
    + + + + + + +
    +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/system/templates/account.error_box.html b/system/templates/account.error_box.html new file mode 100644 index 00000000..0f841eee --- /dev/null +++ b/system/templates/account.error_box.html @@ -0,0 +1,20 @@ +
    +
    +
    +
    +
    +
    +
    +
    +
    + The Following Errors Have Occurred:
    + {% for error in errors %} +
  • {{ error }}
  • + {% endfor %} +
    +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/system/templates/account.login.html b/system/templates/account.login.html new file mode 100644 index 00000000..0cdcf850 --- /dev/null +++ b/system/templates/account.login.html @@ -0,0 +1,82 @@ +Please enter your account name and your password.
    Create an account if you do not have one yet.

    +
    + {% if redirect is not null %} + + {% endif %} +
    + +
    +
    + + + + +
    Account Login
    + + + + +
    +
    + + + +
    +
    + + + + + + + + + + + + + + {% if error is not null %} + + {% endif %} +
    + Account {{ account }}: +
    + Password: +
    +
    {{ error }}
    +
    +
    +
    +
    + + + + + +
    + + + + + +
    +
    + +
    +
    +
    +
    + + + + + + +
    +
    + +
    +
    +
    +
    \ No newline at end of file diff --git a/system/templates/account.logout.html b/system/templates/account.logout.html new file mode 100644 index 00000000..9bacfed9 --- /dev/null +++ b/system/templates/account.logout.html @@ -0,0 +1,28 @@ +
    + +
    +
    + + + + +
    Logout Successful
    + + + + +
    +
    + + + +
    +
    + + + + +
    You have logged out of your {{ config.serverName }} account. In order to view your account you need to log in again.
    +
    +
    +
    \ No newline at end of file diff --git a/system/templates/account.lost.form.html b/system/templates/account.lost.form.html new file mode 100644 index 00000000..d8283cab --- /dev/null +++ b/system/templates/account.lost.form.html @@ -0,0 +1,35 @@ +The Lost Account Interface can help you to get back your account name and password. Please enter your character name and select what you want to do.
    +
    + + + + + + + + +
    Please enter your character name
    +
    +
    + + + + + + + +
    What do you want?
    + +
    + +
    +
    +
    + + + + +
    + +
    +
    \ No newline at end of file diff --git a/system/templates/account.lost.noaction.html b/system/templates/account.lost.noaction.html new file mode 100644 index 00000000..bfec0d31 --- /dev/null +++ b/system/templates/account.lost.noaction.html @@ -0,0 +1,10 @@ +Please select action.
    + + + + +
    + + back + +
    \ No newline at end of file diff --git a/system/templates/account.management.html b/system/templates/account.management.html new file mode 100644 index 00000000..9eb3939a --- /dev/null +++ b/system/templates/account.management.html @@ -0,0 +1,533 @@ +
    +
    +
    +
    +
    +
    +
    +
    + + + + + +
    + + + + + + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + + + + + + +
    + + {{ welcome_message }}
    +
    +
    +{# if account dont have recovery key show hint #} +{% if recovery_key is empty %} +
    +
    +
    +
    +
    +
    +
    +
    + + + + + +
    Hint:You can register your account for increased protection. Click on "Register Account" and get your free recovery key today!
    +
    + + + + + + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +{% endif %} + +{% if email_request %} +
    +
    +
    +
    +
    +
    +
    +
    + + + + + +
    Note:A request has beefffn submitted to change the email address of this account to {{ email_new }}. After {{ email_new_time|date("j F Y, G:i:s") }} you can accept the new email address and finish the process. Please cancel the request if you do not want your email address to be changed! Also cancel the request if you have no access to the new email address!
    +
    + + + + + + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +

    +{% endif %} + +
    +
    + + + +
    +
    +
    + +
    +
    + + + + +
    General Information
    + + + + +
    +
    + + + +
    +
    + + + + + + + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + {% autoescape false %} + + + + + + + + + {% endautoescape %} +
    Account {% if constant('USE_ACCOUNT_NAME') %}Name{% else %}Number{% endif %}:{{ account }}
    Email Address:{{ account_email ~ email_change}}
    Created:{{ account_created|date("j F Y, G:i:s") }}
    Last Login:{{ "now"|date("j F Y, G:i:s") }}
    Account Status:{{ account_status }}
    Registred:{{ account_registered }}
    +
    +
    +
    +
    +
    +
    +
    +
    + + + + + + {# show button "register account" #} + {% if recovery_key is empty %} + + {% endif %} + +
    + + + + + + +
    +
    +
    +
    +
    + + + + + + +
    + + +
    +
    +
    +
    + + + + + + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    + + + +
    +
    +
    + +
    +
    + + + + +
    Public Information
    + + + + +
    +
    + + + +
    +
    + + + + +
    +
    +
    +
    +
    +
    + + + + + +
    + + + + + + + + + +
    Real Name:{{ account_rlname }}
    Location:{{ account_location }}
    +
    + + + + + + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    + + + +
    +
    +
    + +
    +
    + + + + +
    Account logs
    + + + + +
    +
    + + + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    + + + + + + + {% autoescape false %} + {% set i = 0 %} + {% for action in actions %} + {% set i = i + 1 %} + + + + + + {% endfor %} + {% endautoescape %} +
    ActionDateIP
    {{ action.action }}{{ action.date|date("jS F Y H:i:s") }}{{ action.ip }}
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    + + + +
    +
    +
    + +
    +
    + + + + +
    Characters
    + + + + +
    +
    + + + +
    +
    + + + + + + + +
    +
    +
    +
    +
    +
    + + + + + + + + {% set i = 0 %} + {% for player in players %} + {% set i = i + 1 %} + + + + {% if player.online %} + + {% else %} + + {% endif %} + + + {% endfor %} +
    NameLevelStatus 
    + {{ i }}. {{ player.name }}{% if player.deleted %} [ DELETED ] {% endif %} + + {{ player.level }} {{ player.vocation }} + OnlineOffline[Edit]
    +
    +
    +
    +
    +
    +
    +
    +
    + + + + {% if config.account_change_character_name %} + + {% endif %} + {% if config.account_change_character_sex %} + + {% endif %} + + + +
    + + + + + + +
    +
    +
    +
    +
    + + + + + + +
    +
    +
    +
    +
    + + + + + + +
    +
    +
    +
    +
    + + + + + + +
    +
    +
    +
    +
    +
    +
    +
    +
    +

    \ No newline at end of file diff --git a/system/templates/account.redirect.html b/system/templates/account.redirect.html new file mode 100644 index 00000000..daf830c2 --- /dev/null +++ b/system/templates/account.redirect.html @@ -0,0 +1,36 @@ +
    + +
    +
    + + + + +
    Login Successful
    + + + + +
    +
    + + + +
    +
    + + + + +
    You have logged in.
    Press here if you are not returned automatically.
    +
    +
    +
    + + \ No newline at end of file diff --git a/system/templates/account.register.html b/system/templates/account.register.html new file mode 100644 index 00000000..94e1e59e --- /dev/null +++ b/system/templates/account.register.html @@ -0,0 +1,64 @@ +To generate recovery key for your account please enter your password.

    +
    + +
    + +
    +
    + + + + +
    Generate recovery key
    + + + + +
    +
    + + + +
    +
    + + + + + +
    + Password: + + +
    +
    +
    +
    +
    + + + + + + +
    + + + + +
    +
    +
    +
    +
    + + + + + + +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/system/templates/characters.form.html b/system/templates/characters.form.html new file mode 100644 index 00000000..9fcc0fae --- /dev/null +++ b/system/templates/characters.form.html @@ -0,0 +1,15 @@ +
    + + + +
    Search Character
    + + + + + +
    Name: + +
    +
    +
    \ No newline at end of file diff --git a/templates/kathrine/template.php b/templates/kathrine/template.php index 3d134e88..84a9567f 100644 --- a/templates/kathrine/template.php +++ b/templates/kathrine/template.php @@ -29,6 +29,7 @@ defined('MYAAC') or die('Direct access not allowed!'); +
    diff --git a/templates/tibiacom/index.php b/templates/tibiacom/index.php index c822a84a..eb926a5b 100644 --- a/templates/tibiacom/index.php +++ b/templates/tibiacom/index.php @@ -13,12 +13,11 @@ if(isset($config['boxes']))