Changeset 11 for trunk/www/task.php
- Timestamp:
- Jun 11, 2009, 8:28:50 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/www/task.php
r10 r11 15 15 16 16 chdir($Config['BaseDir']); 17 $DbResult = $this->Database->query('SELECT * FROM Task WHERE State = WaitingORDER BY Id,Time ASC');17 $DbResult = $this->Database->query('SELECT * FROM Task WHERE State = "Waiting" ORDER BY Id,Time ASC'); 18 18 while($Task = $DbResult->fetch_assoc()) 19 19 { 20 $this->Database->query('UPDATE Task SET State= RunningWHERE Id='.$Task['Id']);20 $this->Database->query('UPDATE Task SET State="Running" WHERE Id='.$Task['Id']); 21 21 echo('Provádím '.$Task['Title']."...\n"); 22 22 $Task['CommandList'] = "#!/bin/sh\n".$Task['CommandList']; … … 27 27 $Output = ''; //implode("\n", $Output); 28 28 //echo($Output); 29 $this->Database->query('UPDATE Task SET State= Finished, Output="'.addslashes($Output).'" WHERE Id='.$Task['Id']);29 $this->Database->query('UPDATE Task SET State="Finished", Output="'.addslashes($Output).'" WHERE Id='.$Task['Id']); 30 30 } 31 31 return($Output); … … 35 35 { 36 36 $Output = ''; 37 $DbResult = $this->Database->query('SELECT * FROM Task WHERE (State IN ( Waiting, Running)) AND (User='.$UserId.') ORDER BY Id,Time ASC');37 $DbResult = $this->Database->query('SELECT * FROM Task WHERE (State IN ("Waiting", "Running")) AND (User='.$UserId.') ORDER BY Id,Time ASC'); 38 38 while($DbRow = $DbResult->fetch_assoc()) 39 39 {
Note:
See TracChangeset
for help on using the changeset viewer.