+
+
+
+'.$pia_func_netdevname.' / '.$pia_func_netdevtyp.'';
+}
+function createnetworktabcontent($pia_func_netdevid, $pia_func_netdevname, $pia_func_netdevtyp, $activetab) {
+ echo '
+
'.$pia_func_netdevname.' (ID: '.$pia_func_netdevid.')
';
+ global $db;
+ $func_sql = 'SELECT * FROM "Devices" WHERE "dev_Infrastructure" = "'.$pia_func_netdevid.'"';
+ $func_result = $db->query($func_sql);//->fetchArray(SQLITE3_ASSOC);
+
+ while($func_res = $func_result->fetchArray(SQLITE3_ASSOC)){
+ if(!isset($func_res['dev_Name'])) continue;
+ echo $func_res['dev_Name'].' - '.$func_res['dev_LastIP'].' - '.$func_res['dev_PresentLastScan'].'
';
+ }
+
+ echo ' ';
+}
+
+$sql = 'SELECT "device_id", "net_device_name", "net_device_typ" FROM "network_infrastructure"';
+$result = $db->query($sql);//->fetchArray(SQLITE3_ASSOC);
+?>
+
+
+
+
+fetchArray(SQLITE3_ASSOC)){
+ if(!isset($res['device_id'])) continue;
+ if ($i == 0) {$active = 'active';} else {$active = '';}
+ createnetworktab($res['device_id'], $res['net_device_name'], $res['net_device_typ'], $active);
+ $i++;
+}
+?>
+
+
+
+fetchArray(SQLITE3_ASSOC)){
+ if(!isset($res['device_id'])) continue;
+ if ($i == 0) {$active = 'active';} else {$active = '';}
+ createnetworktabcontent($res['device_id'], $res['net_device_name'], $res['net_device_typ'], $active);
+ $i++;
+}
+unset($i);
+?>
+
+
+
+
+