Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?PHP
- $whitelist = array();
- $whitelist['news'] = true;
- $whitelist['progress'] = true;
- $whitelist['register'] = false;
- function check_inc($arg)
- {
- if(isset($whitelist[$arg]) OR $whitelist[$arg] == 1)
- {
- if($whitelist[$arg] == true)
- {
- return "include";
- }
- else
- {
- return "deactive";
- }
- }
- else
- {
- return "notvalid";
- }
- }
- if(isset($_GET['act']))
- {
- if(check_inc($_GET['act']) == "include")
- {
- include(realpath($_GET['act'].".php"));
- }
- elseif(check_inc($_GET['act']) == "deactive")
- {
- $_GET['error'] = "deactive";
- include(realpath('error.php'));
- }
- elseif(check_inc($_GET['act']) == "notvalid")
- {
- #die($_GET['act'].check_inc($_GET['inc']).$whitelist[$_GET['act']]);
- $_GET['error'] = "notvalid";
- include(realpath('error.php'));
- }
- }
- else
- {
- include(realpath('news.php'));
- }
- ?>
Add Comment
Please, Sign In to add comment