query("SELECT * FROM `NetworkDevice` WHERE `Online`=1 AND (`Block`=0 OR `Name`='centrala') AND (`Name` != 'GATE') AND (`User` > 0)"); while ($Row = $DbResult->fetch_array()) { //echo('Host: '.$Host."...\n"); //echo(.','.$Row['date']."\n"); $HostID = 100; $StartTime2 = GetMicrotime(); if ($Dnes != $Row['LastShareCheck']) { echo("Kontroluji ".$Row['Name']."...\n"); passthru('env browse_host='.$Row['Name'].' browse_id='.$HostID.' php -q -c php.ini -f browse.php'); } else echo("Vynechavam ".$Row['Name']."...\n"); // Aktualizuj datum prochazeni $Database->update('NetworkDevice', "Id='".$Row['Id']."'", array('LastShareCheck' => $Dnes)); } $Rozdil = GetMicrotime() - $StartTime + 10; // Oprav a zoptimalizuj tabulku //$Database->select_db('share'); echo('Opravuji tabulku...'); $Database->query('REPAIR TABLE NetworkShareItem'); echo("\nOptimalizuji tabulku..."); $Database->query('OPTIMIZE TABLE NetworkShareItem'); echo("\nDoba procháení ".date("H:i:s",$Rozdil-3600)."\n\n"); //$Cekat = $Perioda-$Rozdil; //echo("Cekam ".date("H:i:s",$Cekat-3600)." minut...\n"); //Sleep($Cekat); //}