This commit is contained in:
Momchil Bozhinov
2021-02-24 10:52:04 +02:00
parent 2f1e2752b0
commit 4ddc6588b6
3 changed files with 5 additions and 5 deletions

View File

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

View File

@@ -79,7 +79,7 @@ class ClonOS {
$this->server_name=$_SERVER['SERVER_ADDR']; $this->server_name=$_SERVER['SERVER_ADDR'];
} }
if (is_null($uri_chunks) { # TODO Do we need this ? if (is_null($uri_chunks)) { # TODO Do we need this ?
$this->uri_chunks=Utils::gen_uri_chunks($uri); $this->uri_chunks=Utils::gen_uri_chunks($uri);
} else { } else {
$this->uri_chunks=$uri_chunks; $this->uri_chunks=$uri_chunks;
@@ -799,7 +799,7 @@ class ClonOS {
foreach($arr_copy as $a){ foreach($arr_copy as $a){
if(isset($form[$a]) && $form[$a]=='on'){ if(isset($form[$a]) && $form[$a]=='on'){
$arr[$a]=1; $arr[$a]=1;
} else-{ } else {
$arr[$a]=0; $arr[$a]=0;
} }
} }

View File

@@ -1,4 +1,5 @@
<?php <?php
if(!isset($_GET['jname'])){ if(!isset($_GET['jname'])){
echo 'You forgot to specify a name of jail!'; echo 'You forgot to specify a name of jail!';
exit; exit;
@@ -6,8 +7,7 @@ if(!isset($_GET['jname'])){
function runVNC($jname) function runVNC($jname)
{ {
$db=new Db('base','local'); $res=(new Db('base','local'))->selectOne("SELECT vnc_password FROM bhyve WHERE jname=?", array([$jname]));
$res=db->selectOne("SELECT vnc_password FROM bhyve WHERE jname=?", array([$jname]));
$pass='cbsd'; $pass='cbsd';
if($res!==false) $pass=$res['vnc_password']; if($res!==false) $pass=$res['vnc_password'];