Login
Username: Password:
Remember me

[Sign Up] / [Recover Password]

Theme / Language

Popular
New Torrents
new name
Size: 18.40 MB
Most active
new name
S: 74 L: 3
New Posters
[MOD] Hide admin panel from guests / use
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / Torrent Trader / v3 Mods Completed

Unknown User
2019-11-24 13:53:21
A quick tutorial for those who want to hide the admin panel in a good way so it cannot be accessed via URL.

Open your admin file and add the following code after include [color=rgb(147, 101, 184)]backend/functions.php[/color]


/**
* Hide admin panel from exploits with 404 header.
*
* @package hide_admin_panel_1.0
* @license GPLv3
* @author  Shadows
* @version 1.0
*/

// Change 'class', to the minimal user class number that are not allowed to visit
if (!$CURUSER || $CURUSER['class'] < 4)
{
   header('HTTP/1.1 404 Not Found');
   // include_once 'your_404_custom_file.php'; // Include your 404 custom file if you use a custom error handlers.
   exit;
}
else
{
   header('HTTP/1.1 200 OK');
}
2019-12-06 15:52:16
Adding this as described, give me a blank page.
Attaching my current admincp.php file
admincp.rar
Download

If It Ain't Dutch, It Ain't Much!!
2019-12-06 23:20:04
Doesn't this basically already exist? I mean, you can dress it up and make it pretty if you want, but....
if (!$CURUSER || $CURUSER["control_panel"]!="yes"){
    show_error_msg(T_("ERROR"), T_("SORRY_NO_RIGHTS_TO_ACCESS"), 1);
}

TTv3 Micro Edition
Ubuntu 20.04.6 LTS Server
Mysql Version: 10.3.39-MariaDB-0ubuntu0.20.04.2
PHP Version: 7.4.3-4ubuntu2.20
Apache Version: Apache/2.4.59 (Ubuntu)
Users online

No users online

Search



Statistics

    Torrents

  • Tracking: 3
  • Todays torrents: 0
  • Seeders: 0
  • Leechers: 0
  • Peers: 0
  • Downloaded: 89.96 GB
  • Uploaded: 9.86 GB

  • Members

  • We have: 838
  • New today: 0
  • Guest today: 9

  • Online

  • Total online: 8
  • Members: 0
  • Guests online: 8
  • Comments: 3
  • Messages: 1,728