Using open source program to build a station, the default background path is known to many times, although the general people even know the background landing path, no account password can not login, but for security reasons, there are a lot of webmaster in the selection of the default landing path to modify the background, But phpcms for other space programs, it is more troublesome to modify the login path of the backend administrator. Modify the steps more, so generally do not recommend the Novice Webmaster Manual modification.
Here's how to modify the PHPCMS administrator path:
1, modify the admin.php file name, and modify the jump address to write the full path, specifically modified as follows:
2, modify/phpcms/modules/admin/index.php, put public function login changes to the address you want:
find "?m=admin&c=index& A=login "replaces the subsequent login with the modified function name with the bulk substitution.
3, modify/phpcms/modules/admin/classes/admin.class.php
3.1 Code
Final Public function check_admin () {ifin_arrayarray(' login ', ' Public_card ')) {
Revision changed to
Final Public function check_admin () {ifin_arrayarray(' New login function name ', ' Public_card '))) {
3.2 The Code
if (! isset ($_session[' userid ']) | | ! isset ($_session[' Roleid ']) | | ! $_session [' userid '] | | ! $_session [' Roleid ']) ShowMessage (L (' Admin_login '), ' m=admin&c=index&a=login ');
Revision changed to
if (! isset ($_session[' userid ']) | | ! isset ($_session[' Roleid ']) | | ! $_session [' userid '] | | ! $_session [' Roleid ']) ShowMessage (L (' Admin_login '), App_path);
Note: This change, avoid jumping to the homepage of the site, because do not know the exact address will never open the login page.
3.3 The Code
Final Public function Check_priv () {ifin_arrayarrayreturntrue;
Switch
Final Public function Check_priv () {ifin_arrayarrayreturntrue;
Modify/phpcms/modules/admin/templates/login.tpl.php
The Code
<action= "Index.php?m=admin&c=index&a=login&dosubmit=1" Method= "POST" name= "Myfrom">