Changeset 93 for trunk/www/Application/Model/Task.php
- Timestamp:
- Aug 15, 2013, 11:17:26 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/www/Application/Model/Task.php
r78 r93 7 7 var $TempScript = 'temp/wowhosting_script.sh'; 8 8 9 function __construct($ Database)9 function __construct($System) 10 10 { 11 $this->Database = $Database;11 parent::__construct($System); 12 12 } 13 13 14 14 function Add($Title, $Task) 15 15 { 16 global $System;17 18 16 $CommandList = implode("\n", $Task)."\n"; 19 $this->Database->insert('Task', array('User' => $ System->Modules['User']->User['Id'], 'Title' => $Title, 'TimeCreate' => 'NOW()', 'CommandList' => $CommandList));17 $this->Database->insert('Task', array('User' => $this->System->Modules['User']->User['Id'], 'Title' => $Title, 'TimeCreate' => 'NOW()', 'CommandList' => $CommandList)); 20 18 } 21 19 22 20 function ProcessAll() 23 21 { 24 global $Config; 25 26 chdir($Config['BaseDir']); 22 chdir($this->Config['BaseDir']); 27 23 $DbResult = $this->Database->query('SELECT * FROM Task WHERE State = 0 ORDER BY Id,TimeCreate ASC'); 28 24 while($Task = $DbResult->fetch_assoc()) … … 59 55 } 60 56 } 61 62 ?>
Note:
See TracChangeset
for help on using the changeset viewer.