# Conflicts:
#	metadata/dbms/records.php
This commit is contained in:
2022-08-31 01:04:11 +06:00
10 changed files with 279 additions and 96 deletions

View File

@ -18,7 +18,7 @@ class BolmerCMS{
if ( ! self::$authenticated) {
define('BOLMER_API_MODE', true);
define('IN_MANAGER_MODE', true);
$init = realpath(dirname(dirname(dirname(dirname(dirname(dirname(__FILE__))))))."/index.php");
$init = realpath(dirname(dirname(dirname(dirname(dirname(dirname(__FILE__))))))."/login.php");
include_once($init);
$type = getService('user', true)->getLoginUserType();
if($type=='manager'){

View File

@ -352,6 +352,43 @@ function deleteTempFiles($dir)
}
}
function getFilesTree($dir,$cut="",$result = null){
if($result==null)
$result = new stdClass();
if (is_dir($dir))
{
$result->list = array();
$dh = opendir($dir);
if ($dh)
{
while (($file = readdir($dh)) !== false)
{
if($file == '..' || $file == '.') continue;
if(is_dir($dir.DIRECTORY_SEPARATOR.$file)){
$sub = new stdClass();
$sub->name=$file;
$sub->path=$dir.DIRECTORY_SEPARATOR.$file;
if($cut) $sub->path = str_replace($cut, "",$sub->path);
array_push($result->list, $sub);
getFilesTree($dir.DIRECTORY_SEPARATOR.$file, $cut, $sub);
}else{
$sub = new stdClass();
$sub->name=$file;
$sub->path=$dir.DIRECTORY_SEPARATOR.$file;
if($cut) $sub->path = str_replace($cut, "",$sub->path);
array_push($result->list, $sub);
}
}
closedir($dh);
}
}
return $result;
}
//Генерация пароля
function getPassword($max)
{