while (list($number, $row) = each($mount_points)) { if (($number + 1) % 2 == 0) { $tpl->assign(array('ITEM_CLASS' => 'content')); } else { $tpl->assign(array('ITEM_CLASS' => 'content2')); } $tpl->assign(array('MOUNT' => $row['mount'], 'TYPE' => $row['fstype'], 'PARTITION' => $row['disk'], 'PERCENT' => $row['percent'], 'FREE' => make_hr($row['free'] * 1014), 'USED' => make_hr($row['used'] * 1024), 'SIZE' => make_hr($row['size'] * 1024))); $tpl->parse('DISK_LIST_ITEM', '.disk_list_item'); } $tpl->parse('DISK_LIST', 'disk_list'); } /* * * static page messages. * */ gen_admin_menu($tpl); gen_mount_point($tpl); $kernel = kernel(); $uptime = uptime(); $load = loadavg(); $cpu = cpu_info(); $mem = memory(); $tpl->assign(array('TR_SYSTEM_INFO_TITLE' => tr('System info'), 'TR_SYSTEM_INFO' => tr('Vital system info'), 'TR_CPU_SYSTEM_INFO' => tr('CPU system Info'), 'TR_CPU_MODEL' => tr('CPU model'), 'TR_CPU_MHZ' => tr('CPU MHz'), 'TR_CPU_CACHE' => tr('CPU cache'), 'TR_CPU_BOGOMIPS' => tr('CPU bogomips'), 'CPU_MODEL' => $cpu['model'], 'CPU_MHZ' => $cpu['mhz'], 'CPU_CACHE' => $cpu['cache'], 'CPU_BOGOMIPS' => $cpu['bogomips'], 'TR_MEMRY_SYSTEM_INFO' => tr('Memory system info'), 'TR_RAM' => tr('RAM'), 'TR_TOTAL' => tr('Total'), 'TR_USED' => tr('Used'), 'TR_FREE' => tr('Free'), 'TR_SWAP' => tr('Swap'), 'TR_UPTIME' => tr('Up time'), 'UPTIME' => $uptime, 'TR_KERNEL' => tr('Kernel'), 'KERNEL' => $kernel, 'TR_LOAD' => tr('Load'), 'LOAD' => $load[0] . ' ' . $load[1] . ' ' . $load[0], 'RAM' => tr('RAM'), 'RAM_TOTAL' => format_bytesize($mem['ram']['total']), 'RAM_USED' => format_bytesize($mem['ram']['used']), 'RAM_FREE' => format_bytesize($mem['ram']['free']), 'SWAP_TOTAL' => format_bytesize($mem['swap']['total']), 'SWAP_USED' => format_bytesize($mem['swap']['used']), 'SWAP_FREE' => format_bytesize($mem['swap']['free']), 'TR_FILE_SYSTEM_INFO' => tr('Filesystem system Info'), 'TR_MOUNT' => tr('Mount'), 'TR_TYPE' => tr('Type'), 'TR_PARTITION' => tr('Partition'), 'TR_PERCENT' => tr('Percent'), 'TR_SIZE' => tr('Size'))); gen_page_message($tpl); $tpl->parse('PAGE', 'page'); $tpl->prnt(); if (isset($cfg['DUMP_GUI_DEBUG'])) { dump_gui_debug(); } unset_messages();
<div class="row" style="margin-top:15px;"> <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12"> <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12"> <div class="thumbnail-general" style="background:#dfe0e0; height:100px;"> <p style="font-size:16px;" class="bg-primary">Load average statut server Raspberry Pi type B</p> <div id="load_donnees"><?php cpu_usage(); ?> </div> </div> </div> <div class="col-xs-12 col-sm-12 col-md-12 col-lg-5"> <div class="thumbnail" style="background:#dfe0e0; height:420px;"> <p style="font-size:16px;" class="bg-primary">Processor in server raspberry pi type b</p> <?php cpu_info(); ?> </div> </div> <div class="col-xs-12 col-sm-12 col-md-12 col-lg-7"> <div class="thumbnail" style="background:#dfe0e0; height:200px;"> <p style="font-size:16px;" class="bg-primary">Memory in server raspberry pi type b</p> <?php mem_info(); ?> </div> </div> </div> </div><?php } }