Open mostym opened 5 years ago
When exactly does this happen? I can see it is related to the userclass page, but do you click something specifically?
I created a custom page called /add and in the index.php file is the following code:
<?php
//define('e_DEBUG', true);
//to disable https redirection:
//define('e_SSL_DISABLE', true);
require_once("../class2.php");
require_once(HEADERF);
require_once(FOOTERF);
require_once('db_config.php');
include_once("categories.php");
include_once("header.inc.php");
if (!check_class('Uploader')) {
header('location: https://www.domain.com/');
exit;
}
if($pref['user_tracking'] != "session"){
session_start();
}
function getCatList($parentId) {
global $categories;
$res = '';
foreach ($categories as $catId=>$cat) {
if($cat['parent'] != $parentId) continue;
$sunCats = getCatList($catId);
$action = '<input type="text" placeholder="ftp path" /><span class="action add-ftp-path" data-id="'.$catId.'">[add]</span>';
if($cat['dir']) $action = '('.$cat['dir'].') <span class="action start" data-id="'.$catId.'">[go]</span>';
$res .= '<li class="li_cat_'.$catId.'">' . ($sunCats ? '<span class="opener closed">[+]</span> ' : '') . $cat['name'].' <span class="acts">'.$action.'</span>';
$res .= $sunCats.'</li>';
}
return $res ? '<ul class="cat_list'.$parentId.'">'.$res.'</ul>' : '';
}
?>
<?= getCatList(0) ?>
<form id="process" action="process.php" method="POST"><input type="hidden" name="category_id" value="0" /></form>
Removing the following makes the page load. However, this is not the desired result. I need this logic to only allow a specific user class access to this page. Any help would be appreciated. Thanks!
if (!check_class('Uploader')) {
header('location: https://www.domain.com/');
exit;
}