* Last one

This commit is contained in:
Momchil Bozhinov
2021-02-23 23:45:43 +02:00
parent 366ac6e865
commit 58e24fcac7
2 changed files with 4 additions and 5 deletions

View File

@@ -54,7 +54,7 @@ class CBSD {
}
}
function register_media($path,$file,$ext)
function static register_media($path,$file,$ext)
{
$cmd='cbsd media mode=register name=%s path=%s type=%s';
$res=self::run($cmd, array($file, $path.$file, $ext));

View File

@@ -11,18 +11,17 @@ require_once($_real_path.'/php/clonos.php');
require_once($_real_path.'/php/menu.php');
$chunks=Utils::gen_uri_chunks($uri);
$clonos=new ClonOS($_real_path, $chunks);
$cbsd = new CBSD();
$locale = new Locale($_real_path.'/public/'); # /usr/home/web/cp/clonos/public/
$menu=new Menu($locale, $chunks);
if(isset($_GET['upload'])){
include('upload.php');
$cbsd->register_media($path,$file,$ext);
CBSD::register_media($path,$file,$ext);
exit;
}
if(isset($_GET['download'])){
include('download.php');
$cbsd->register_media($path,$file,$ext);
CBSD::register_media($path,$file,$ext);
exit;
}
@@ -69,7 +68,7 @@ if(!$user_info['error']){
<meta name="keywords" content="" />
<meta name="description" content="" />
<script type="text/javascript">
_server_name='<?php echo $clonos->server_name; ?>';_first_start=true;
_first_start=true;
err_messages={add:function(arr){for(n in arr){err_messages[n]=arr[n];}}};
<?php if(isset($user_info_txt)) echo $user_info_txt; ?>
</script>