Phpcms V9 Modify the default background login address

Source: Internet
Author: User

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">

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.