function hd_list(){ $sock=new sockets(); if(isset($_GET["rescan"])){ $sock->getFrameWork("cmd.php?usb-scan-write=yes&force=yes"); }else{ $sock->getFrameWork("cmd.php?usb-scan-write=yes"); } writelogs("cmd.php?usb-scan-write=yes done",__FUNCTION__,__FILE__,__LINE__); if(!file_exists('ressources/usb.scan.inc')){die('ressources/usb.scan.inc !!');} include_once 'ressources/usb.scan.inc'; $d=$sock->getFrameWork("cmd.php?fdiskl=yes"); writelogs("cmd.php?fdiskl=yes Done ". strlen($d)." bytes",__FUNCTION__,__FILE__,__LINE__); $d=unserialize(base64_decode($d)); if(!is_array($_GLOBAL["disks_list"])){return null;} $artmp=$_GLOBAL["disks_list"]; while (list ($num, $line) = each ($d)){ if($num=="size (logical/physical)"){continue;} if(!is_array($_GLOBAL["disks_list"][$num])){ $_GLOBAL["disks_list"][$num]=array("SIZE"=>$line,"ID_MODEL_1"=>"unknown"); } } $html="<table style='width:99%'>"; $count=0; while (list ($num, $line) = each ($_GLOBAL["disks_list"])){ if($num=="size (logical/physical)"){continue;} if($count==2){$tr="</tr><tr>";$count=0;}else{$tr=null;} $html=$html . "$tr<td valign='top'>". ParseHDline($num,$line)."</td>"; $count=$count+1; } $html=$html . "</table>"; return $html; }
function hd_list() { $tpl = new templates(); $sock = new sockets(); if (isset($_GET["rescan"])) { $sock->getFrameWork("cmd.php?usb-scan-write=yes&force=yes"); } else { $sock->getFrameWork("cmd.php?usb-scan-write=yes"); } writelogs("cmd.php?usb-scan-write=yes done", __FUNCTION__, __FILE__, __LINE__); if (!file_exists('ressources/usb.scan.inc')) { $html = "\n\t\t<center style='width:98%' class=form>\n\t\t\t<table style='width:100%'>\n\t\t\t\t<tr>\n\t\t\t\t\t<td width=1% valign='top'><img src='img/error-128.png'></td>\n\t\t\t\t\t<td width=99% style='font-size:18px;font-weight:bold' valign='top'>{WARN_USB_SCAN_MISSING}</td>\n\t\t\t\t</tr>\n\t\t\t</table>\n\t\t</center>\n\t\t\n\t\t"; echo $tpl->_ENGINE_parse_body($html); } include_once 'ressources/usb.scan.inc'; $d = $sock->getFrameWork("cmd.php?fdiskl=yes"); writelogs("cmd.php?fdiskl=yes Done " . strlen($d) . " bytes", __FUNCTION__, __FILE__, __LINE__); $d = unserialize(base64_decode($d)); if (!is_array($_GLOBAL["disks_list"])) { return null; } $artmp = $_GLOBAL["disks_list"]; while (list($num, $line) = each($d)) { if ($num == "size (logical/physical)") { continue; } if (!is_array($_GLOBAL["disks_list"][$num])) { $_GLOBAL["disks_list"][$num] = array("SIZE" => $line, "ID_MODEL_1" => "unknown"); } } $radius = "-webkit-border-radius: 5px;-moz-border-radius: 5px;border-radius: 5px;/* behavior:url(/css/border-radius.htc); */"; $datas = unserialize(@file_get_contents("/usr/share/artica-postfix/ressources/usb.scan.serialize")); $DD[] = ""; $count = 0; while (list($dev, $array) = each($_GLOBAL["disks_list"])) { if ($num == "size (logical/physical)") { continue; } $DD[] = "\n\t\t<table style='width:98%;margin:10px;margin-bottom:20px;border:2px solid #CCCCCC;{$radius}'>\n\t\t<tr>\n\t\t<td style='vertical-align:top;font-size:22px;width:128px;'><img src='img/disk-128.png' style=';width:128px'></td>\n\t\t<td style='vertical-align:top;font-size:22px;width:400px;'>" . ParseHDline($dev, $array) . "</td>\n\t\t\t\t\n\t\t"; $DD[] = "<td style='vertical-align:top;font-size:22px'>"; if (isset($datas[$dev]["PARTITIONS"])) { $DD[] = ParsePartitions($dev, $datas[$dev]["PARTITIONS"]); } $DD[] = "</td></tR>"; $DD[] = "</table>"; } return @implode("\n", $DD); }
function hd_list(){ $tpl=new templates(); $sock=new sockets(); if(isset($_GET["rescan"])){ $sock->getFrameWork("cmd.php?usb-scan-write=yes&force=yes"); }else{ $sock->getFrameWork("cmd.php?usb-scan-write=yes"); } writelogs("cmd.php?usb-scan-write=yes done",__FUNCTION__,__FILE__,__LINE__); if(!file_exists('ressources/usb.scan.inc')){ $html=" <center style='width:98%' class=form> <table style='width:100%'> <tr> <td width=1% valign='top'><img src='img/error-128.png'></td> <td width=99% style='font-size:18px;font-weight:bold' valign='top'>{WARN_USB_SCAN_MISSING}</td> </tr> </table> </center> "; echo $tpl->_ENGINE_parse_body($html); } include_once 'ressources/usb.scan.inc'; $d=$sock->getFrameWork("cmd.php?fdiskl=yes"); writelogs("cmd.php?fdiskl=yes Done ". strlen($d)." bytes",__FUNCTION__,__FILE__,__LINE__); $d=unserialize(base64_decode($d)); if(!is_array($_GLOBAL["disks_list"])){return null;} $artmp=$_GLOBAL["disks_list"]; while (list ($num, $line) = each ($d)){ if($num=="size (logical/physical)"){continue;} if(!is_array($_GLOBAL["disks_list"][$num])){ $_GLOBAL["disks_list"][$num]=array("SIZE"=>$line,"ID_MODEL_1"=>"unknown"); } } $html=" <center style='margin-top:25px'>"; $count=0; while (list ($num, $line) = each ($_GLOBAL["disks_list"])){ if($num=="size (logical/physical)"){continue;} $DD[]=ParseHDline($num,$line); } $html=$html.CompileTr3($DD,true); $html=$html . "</center>"; return $html; }