function initS20Data() { // // Search all sockets in the network, and returns // an associative array with all collected data, // including names // // echo "Init S20<p>"; $s20Table = searchS20(); $s20Table = updNamesAndTimerAfterOn($s20Table); updTableTimers($s20Table); return $s20Table; }
function initS20Data() { // // Search all sockets in the network, and returns // an associative array with all collected data, // including names // $s20TableOld = readDataFile(); $s20Table = searchS20($s20TableOld); $s20Table = updNamesAndTimerAfterOn($s20Table); updTableTimers($s20Table); foreach ($s20Table as $mac => $data) { if (is_array($s20TableOld) && array_key_exists($mac, $s20TableOld)) { $s20Table[$mac]['next'] = $s20TableOld[$mac]['next']; } } $_SESSION['s20Table'] = $s20Table; writeDataFile($s20Table); return $s20Table; }