Replace deprecated instr function with str_contains and add include/global.php for central configurations.
This commit is contained in:
@@ -66,7 +66,7 @@
|
||||
if($OSType == "AIX"){
|
||||
$memory = round(str_replace(" Mo","",$Qx[0]['Memory'])/1024,2)." GB";
|
||||
}else{
|
||||
$memory = $Qvm[0]['Memory'];
|
||||
$memory = $Qvm[0]['Memory'] ?? $Qx[0]['Memory'] ;
|
||||
}
|
||||
}
|
||||
echo "<div id='type' data-value='".strtolower($OSType)."' hidden></div>";
|
||||
@@ -198,8 +198,8 @@
|
||||
foreach($drives as $drive){
|
||||
echo "<div class='col-6'><div class='row'>";
|
||||
$data = explode(",",$drive);
|
||||
echo "<div class='col-3'><b>".$data[0]."</b> : ".round($data[2])."/<b>".$data[1]." GB</b></div>";
|
||||
$pcent = ($data[1] - $data[2])/$data[1]*100;
|
||||
echo "<div class='col-3'><b>".$data[0]."</b> : ".round(intval($data[2]))."/<b>".$data[1]." GB</b></div>";
|
||||
$pcent = (intval($data[1]) - intval($data[2]))/intval($data[1])*100;
|
||||
$pcent_restant = 100 - $pcent;
|
||||
if($pcent <= 5){
|
||||
$color = "bg-danger"; $border = "red";
|
||||
|
||||
Reference in New Issue
Block a user