Changeset 505 for trunk/Modules/NetworkShare/update.php
- Timestamp:
- Apr 1, 2013, 12:29:37 AM (12 years ago)
- Location:
- trunk/Modules/NetworkShare
- Files:
-
- 1 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/NetworkShare/update.php
r40 r505 1 1 <?php 2 include('../style.php');3 2 4 3 //$Perioda = 3600*3; // prochazet po tech hodinach … … 9 8 $Hosts = array(); 10 9 $StartTime = GetMicrotime(); 11 $DbResult = $Database->query("SELECT * FROM hosts WHERE online=1 AND (block=0 OR name='centrala') AND (name!='GATE') AND user>0");10 $DbResult = $Database->query("SELECT * FROM NetworkDevice WHERE Online=1 AND (Block=0 OR Name='centrala') AND (Name!='GATE') AND User>0"); 12 11 while($Row = $DbResult->fetch_array()) 13 12 { … … 19 18 if($Dnes != $Row['last_share_check']) 20 19 { 21 echo("Kontroluji ".$Row[' name']."...\n");22 passthru('env browse_host='.$Row[' name'].' browse_id='.$HostID.' php -q -c php.ini -f browse.php');20 echo("Kontroluji ".$Row['Name']."...\n"); 21 passthru('env browse_host='.$Row['Name'].' browse_id='.$HostID.' php -q -c php.ini -f browse.php'); 23 22 } 24 else echo("Vynechavam ".$Row[' name']."...\n");23 else echo("Vynechavam ".$Row['Name']."...\n"); 25 24 // Aktualizuj datum prochazeni 26 $Database->update(' hosts',"name='".$Row['name']."'",array('last_share_check' => $Dnes));25 $Database->update('Hosts', "name='".$Row['name']."'",array('last_share_check' => $Dnes)); 27 26 } 28 27 $Rozdil = GetMicrotime()-$StartTime+10; 29 28 30 29 // Oprav a zoptimalizuj tabulku 31 $Database->select_db('share');30 //$Database->select_db('share'); 32 31 echo('Opravuji tabulku...'); 33 $Database->query('REPAIR TABLE items');32 $Database->query('REPAIR TABLE NetworkShareItem'); 34 33 echo("\nOptimalizuji tabulku..."); 35 $Database->query('OPTIMIZE TABLE items');34 $Database->query('OPTIMIZE TABLE NetworkShareItem'); 36 35 37 36 echo("\nDoba procháení ".date("H:i:s",$Rozdil-3600)."\n\n");
Note:
See TracChangeset
for help on using the changeset viewer.