diff --git a/admin-dev/themes/default/template/controllers/login/content.tpl b/admin-dev/themes/default/template/controllers/login/content.tpl index b1cfff216..528e064e7 100755 --- a/admin-dev/themes/default/template/controllers/login/content.tpl +++ b/admin-dev/themes/default/template/controllers/login/content.tpl @@ -22,91 +22,79 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} - - -
-
- {if isset($errors)} -

{if $nbErrors > 1}{l s='There are %d errors.' sprintf=$nbErrors}{else}{l s='There is %d error.' sprintf=$nbErrors}{/if}

-
    - {foreach from=$errors item="error"} -
  1. {$error}
  2. - {/foreach} -
- {/if} -
-
- {if isset($warningSslMessage)} -
- {$warningSslMessage} -
- {/if} -
-

{$shop_name}

- {if !isset($wrong_folder_name) && !isset($wrong_install_name)} -
-
- - -
- -
- - -
- -
- - -

- -

- -

- {l s='Lost password?'} -

-
-
- -
- -
-

{l s='Forgot your password?'}

-

{l s='In order to receive your access code by email, please enter the address you provided during the registration process.'}

- -
- - -
- -
- - -

- -

- -

- -

-
-
-
- {else} -
-

{l s='For security reasons, you cannot connect to the Back Office until after you have:'}

-
    - {if isset($wrong_install_name) && $wrong_install_name == true}
  • {l s='deleted the /install folder'}
  • {/if} - {if isset($wrong_folder_name) && $wrong_folder_name == true}
  • {l s='renamed the /admin folder (e.g. /admin%d)' sprintf=$randomNb}
  • {/if} -
- {if isset($wrong_folder_name) && $wrong_folder_name == true}

{l s='Please then access this page by the new URL (e.g. http://www.yoursite.com/admin%d)' sprintf=$randomNb}

{/if} -
- {/if} -
-

© 2005 - {$smarty.now|date_format:"%Y"} Copyright by PrestaShop. all rights reserved.

-
+ +
+
+{if isset($errors)} +

{if $nbErrors > 1}{l s='There are %d errors.' sprintf=$nbErrors}{else}{l s='There is %d error.' sprintf=$nbErrors}{/if}

+
    + {foreach from=$errors item="error"} +
  1. {$error}
  2. + {/foreach} +
+{/if} +
+
+{if isset($warningSslMessage)} +
{$warningSslMessage}
+{/if} +
+

{$shop_name}

+{if !isset($wrong_folder_name) && !isset($wrong_install_name)} +
+
+ + +
+
+ + +
+
+ +

+ +

+

+ {l s='Lost password?'} +

+
+
+ +
+
+

{l s='Forgot your password?'}

+

{l s='In order to receive your access code by email, please enter the address you provided during the registration process.'}

+
+ + +
+
+ +

+ +

+

+ +

+
+
+
+{else} +
+

{l s='For security reasons, you cannot connect to the Back Office until after you have:'}

+
    + {if isset($wrong_install_name) && $wrong_install_name == true}
  • {l s='deleted the /install folder'}
  • {/if} + {if isset($wrong_folder_name) && $wrong_folder_name == true}
  • {l s='renamed the /admin folder (e.g. /%s)' sprintf=$randomNb}
  • {/if} +
+

{l s='Please then access this page by the new URL (e.g. %s)' sprintf=$adminUrl}

+
+{/if} +
+

© 2005 - {$smarty.now|date_format:"%Y"} Copyright by PrestaShop. all rights reserved.

+
\ No newline at end of file diff --git a/admin-dev/themes/default/template/footer.tpl b/admin-dev/themes/default/template/footer.tpl index 425e970fe..8caf2c64a 100644 --- a/admin-dev/themes/default/template/footer.tpl +++ b/admin-dev/themes/default/template/footer.tpl @@ -22,33 +22,31 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} - -
 
- -
 
+
 
+ +
 
+ +{if $display_footer} +{hook h="displayBackOfficeFooter"} + - - {* ajaxBox allows*} - - {/if} -
- - + + +{* ajaxBox allows*} +{/if} +
+ + \ No newline at end of file diff --git a/admin-dev/themes/default/template/header.tpl b/admin-dev/themes/default/template/header.tpl index 9a3eb0b07..dc80e8831 100644 --- a/admin-dev/themes/default/template/header.tpl +++ b/admin-dev/themes/default/template/header.tpl @@ -82,7 +82,6 @@ {/foreach} {/if} - {if isset($displayBackOfficeHeader)} @@ -91,16 +90,15 @@ - {if isset($brightness)} +{if isset($brightness)} - {/if} +{/if} {if $display_header}
{l s='Loading...'}
-
0}style="margin:auto;width:{$bo_width}px"{/if}>
{* begin HEADER *} @@ -108,7 +106,7 @@
{$shop_name}
- {if {$show_new_orders} == 1} +{if {$show_new_orders} == 1}
0 @@ -120,8 +118,8 @@

{l s='Show all orders'}

- {/if} - {if ($show_new_customers == 1)} +{/if} +{if ($show_new_customers == 1)}
0 @@ -133,8 +131,8 @@

{l s='Show all customers'}

- {/if} - {if {$show_new_messages} == 1} +{/if} +{if {$show_new_messages} == 1}
0 @@ -146,9 +144,8 @@

{l s='Show all messages'}

- {/if} +{/if}
-
{l s='Welcome,'} {$first_name} {$last_name}
@@ -157,14 +154,13 @@
  • {l s='My preferences'}
  •  
  • {l s='logout'}
  • - {if {$base_url}} -
  •  
  • - {l s='View my shop'} - {/if} +{if {$base_url}} +
  •  
  • + {l s='View my shop'} +{/if}
    - - - {if count($quick_access) > 0} +{if count($quick_access) > 0}
    - {/if} - {if isset($displayBackOfficeTop)} - {$displayBackOfficeTop} - {/if} +{/if} +{if isset($displayBackOfficeTop)}{$displayBackOfficeTop}{/if} {* end header_infos*} - - {/if} - {/foreach} +{/if} +{/foreach} - {/if} - {* end header*} - + {* end header*} +{/if}
    - {if $display_header && $install_dir_exists} -
    - {l s='For security reasons, you must also:'} {l s='delete the /install folder'} -
    - {/if} - - {if $display_header && $is_multishop && $shop_list && ($multishop_context & Shop::CONTEXT_GROUP || $multishop_context & Shop::CONTEXT_SHOP)} -
    - {l s='Multistore configuration for'} - {$shop_list} -
    - {/if} +{if $display_header && $install_dir_exists} +
    + {l s='For security reasons, you must also:'} {l s='delete the /install folder'} +
    +{/if} +{if $display_header && $is_multishop && $shop_list && ($multishop_context & Shop::CONTEXT_GROUP || $multishop_context & Shop::CONTEXT_SHOP)} +
    + {l s='Multistore configuration for'} {$shop_list} +
    +{/if} \ No newline at end of file diff --git a/admin-dev/themes/default/template/layout.tpl b/admin-dev/themes/default/template/layout.tpl index 3481179da..10ca2fd13 100644 --- a/admin-dev/themes/default/template/layout.tpl +++ b/admin-dev/themes/default/template/layout.tpl @@ -47,7 +47,6 @@ {/if}
    {/if} - {if isset($informations) && count($informations) && $informations}
    @@ -60,7 +59,6 @@

    {/if} - {if isset($confirmations) && count($confirmations) && $confirmations}
    {foreach $confirmations as $conf} @@ -68,7 +66,6 @@ {/foreach}

    {/if} - {if count($warnings)}
    @@ -94,6 +91,5 @@ {/if}
    {/if} - {$page} -{include file='footer.tpl'} +{include file='footer.tpl'} \ No newline at end of file diff --git a/controllers/admin/AdminLoginController.php b/controllers/admin/AdminLoginController.php index 3329fb75a..5ce949c00 100755 --- a/controllers/admin/AdminLoginController.php +++ b/controllers/admin/AdminLoginController.php @@ -70,18 +70,23 @@ class AdminLoginControllerCore extends AdminController if (file_exists(_PS_ADMIN_DIR_.'/../install')) $this->context->smarty->assign('wrong_install_name', true); - if (file_exists(_PS_ADMIN_DIR_.'/../admin')) + + if (basename(_PS_ADMIN_DIR_) == 'admin' && file_exists(_PS_ADMIN_DIR_.'/../admin/')) { - $rand = sprintf('%04d', rand(0, 9999)); - if (@rename(_PS_ADMIN_DIR_.'/../admin', _PS_ADMIN_DIR_.'/../admin'.$rand)) - Tools::redirectAdmin('../admin'.$rand); + $rand = 'admin'.sprintf('%04d', rand(0, 9999)).'/'; + if (@rename(_PS_ADMIN_DIR_.'/../admin/', _PS_ADMIN_DIR_.'/../'.$rand)) + Tools::redirectAdmin('../'.$rand); else $this->context->smarty->assign(array( 'wrong_folder_name' => true )); } + else + $rand = basename(_PS_ADMIN_DIR_).'/'; + $this->context->smarty->assign(array( - 'randomNb' => rand(0, 9999) + 'randomNb' => $rand, + 'adminUrl' => Tools::getCurrentUrlProtocolPrefix().Tools::getShopDomain().__PS_BASE_URI__.$rand )); // Redirect to admin panel