mirror of
https://github.com/slawkens/myaac.git
synced 2025-10-14 01:34:55 +02:00
Refactor account routes into sub folders
This commit is contained in:
@@ -57,14 +57,14 @@ if($email_new_time < 10) {
|
||||
$twig->display('error_box.html.twig', array('errors' => $errors));
|
||||
|
||||
//show form
|
||||
$twig->display('account.change_mail.html.twig', array(
|
||||
$twig->display('account.change-email.html.twig', array(
|
||||
'new_email' => isset($_POST['new_email']) ? $_POST['new_email'] : null
|
||||
));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$twig->display('account.change_mail.html.twig', array(
|
||||
$twig->display('account.change-email.html.twig', array(
|
||||
'new_email' => isset($_POST['new_email']) ? $_POST['new_email'] : null
|
||||
));
|
||||
}
|
@@ -76,7 +76,7 @@ if($show_form) {
|
||||
$countries[$code] = $country;
|
||||
}
|
||||
|
||||
$twig->display('account.change_info.html.twig', array(
|
||||
$twig->display('account.change-info.html.twig', array(
|
||||
'countries' => $countries ?? [],
|
||||
'account_rlname' => $account_rlname,
|
||||
'account_location' => $account_location,
|
@@ -21,7 +21,7 @@ $new_password = $_POST['newpassword'] ?? NULL;
|
||||
$new_password_confirm = $_POST['newpassword_confirm'] ?? NULL;
|
||||
$old_password = $_POST['oldpassword'] ?? NULL;
|
||||
if(empty($new_password) && empty($new_password_confirm) && empty($old_password)) {
|
||||
$twig->display('account.change_password.html.twig');
|
||||
$twig->display('account.change-password.html.twig');
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -52,7 +52,7 @@ else
|
||||
$twig->display('error_box.html.twig', array('errors' => $errors));
|
||||
|
||||
//show form
|
||||
$twig->display('account.change_password.html.twig');
|
||||
$twig->display('account.change-password.html.twig');
|
||||
}
|
||||
else {
|
||||
$org_pass = $new_password;
|
@@ -14,7 +14,7 @@ use MyAAC\Models\Player;
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
|
||||
$title = 'Change Comment';
|
||||
require __DIR__ . '/base.php';
|
||||
require PAGES . 'account/base.php';
|
||||
|
||||
if(!$logged) {
|
||||
return;
|
||||
@@ -68,7 +68,7 @@ if($show_form) {
|
||||
}
|
||||
|
||||
if(isset($player) && $player) {
|
||||
$twig->display('account.change_comment.html.twig', array(
|
||||
$twig->display('account.characters.change-comment.html.twig', array(
|
||||
'player' => $player->toArray()
|
||||
));
|
||||
}
|
@@ -11,7 +11,7 @@
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
|
||||
$title = 'Change Name';
|
||||
require __DIR__ . '/base.php';
|
||||
require PAGES . 'account/base.php';
|
||||
|
||||
if(!$logged) {
|
||||
return;
|
||||
@@ -109,7 +109,7 @@ else
|
||||
$twig->display('error_box.html.twig', array('errors' => $errors));
|
||||
}
|
||||
|
||||
$twig->display('account.change_name.html.twig', array(
|
||||
$twig->display('account.characters.change-name.html.twig', array(
|
||||
'points' => $points,
|
||||
'errors' => $errors
|
||||
//'account_players' => $account_logged->getPlayersList()
|
@@ -11,7 +11,7 @@
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
|
||||
$title = 'Change Sex';
|
||||
require __DIR__ . '/base.php';
|
||||
require PAGES . 'account/base.php';
|
||||
|
||||
if(!$logged) {
|
||||
return;
|
||||
@@ -88,7 +88,7 @@ else
|
||||
if(!empty($errors)) {
|
||||
$twig->display('error_box.html.twig', array('errors' => $errors));
|
||||
}
|
||||
$twig->display('account.change_sex.html.twig', array(
|
||||
$twig->display('account.characters.change-sex.html.twig', array(
|
||||
'players' => $account_logged->getPlayersList(false),
|
||||
'player_sex' => isset($player) ? $player->getSex() : -1,
|
||||
'points' => $points
|
@@ -14,7 +14,7 @@ use MyAAC\CreateCharacter;
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
|
||||
$title = 'Create Character';
|
||||
require __DIR__ . '/base.php';
|
||||
require PAGES . 'account/base.php';
|
||||
|
||||
if(!$logged) {
|
||||
return;
|
||||
@@ -43,7 +43,7 @@ if(count($errors) > 0) {
|
||||
}
|
||||
|
||||
if(!$character_created) {
|
||||
$twig->display('account.create_character.html.twig', array(
|
||||
$twig->display('account.characters.create.html.twig', array(
|
||||
'name' => $character_name,
|
||||
'sex' => $character_sex,
|
||||
'vocation' => $character_vocation,
|
@@ -11,7 +11,7 @@
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
|
||||
$title = 'Delete Character';
|
||||
require __DIR__ . '/base.php';
|
||||
require PAGES . 'account/base.php';
|
||||
|
||||
if(!$logged) {
|
||||
return;
|
||||
@@ -93,5 +93,5 @@ if($show_form) {
|
||||
$twig->display('error_box.html.twig', array('errors' => $errors));
|
||||
}
|
||||
|
||||
$twig->display('account.delete_character.html.twig');
|
||||
$twig->display('account.characters.delete.html.twig');
|
||||
}
|
@@ -227,7 +227,7 @@ if($save)
|
||||
$hash = md5(generateRandomString(16, true, true) . $email);
|
||||
$new_account->setCustomField('email_hash', $hash);
|
||||
|
||||
$verify_url = getLink('account/confirm_email/' . $hash);
|
||||
$verify_url = getLink('account/confirm-email/' . $hash);
|
||||
$body_html = $twig->render('mail.account.verify.html.twig', array(
|
||||
'account' => $tmp_account,
|
||||
'verify_url' => generateLink($verify_url, $verify_url, true)
|
||||
|
@@ -52,7 +52,7 @@ if(empty($recovery_key))
|
||||
else
|
||||
{
|
||||
if(setting('core.account_generate_new_reckey') && setting('core.mail_enabled'))
|
||||
$account_registered = '<b><span style="color: green">Yes ( <a href="' . getLink('account/register/new') . '"> Buy new Recovery Key </a> )</span></b>';
|
||||
$account_registered = '<b><span style="color: green">Yes ( <a href="' . getLink('account/register-new') . '"> Buy new Recovery Key </a> )</span></b>';
|
||||
else
|
||||
$account_registered = '<b><span style="color: green">Yes</span></b>';
|
||||
}
|
||||
|
Reference in New Issue
Block a user