Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include("dbString.php");
- class cjFramework
- {
- public $unix_db = 'opgaver';
- public $twoHours = 0;
- public function __construct() { $this->twoHours = (date("U") - (60*60*2)); }
- public function getQuery($SQL){return(mysql_query($SQL));}
- public function compile($d){die('<p>'.$d.'</p>');}
- public function __doTask(){
- $openDB = $this->getQuery('SELECT `tester_id`, `opgave_id`, `accepteret_tidspunkt` FROM `'.$this->unix_db.'_accepteret` WHERE `accepteret` = 1 AND `done` != 1 AND `accepteret_tidspunkt` > '.$this->twoHours);
- while ( $task = mysql_fetch_assoc($openDB) )
- {
- echo "Tester: ".$task['tester_id']." har accepteret opgaven d. ".date("d-m/Y H:i:s", $task['accepteret_tidspunkt']).", men har ikke lavet testen indenfor 2 timer (".date("d-m/Y H:i:s", $this->twoHours).")<br/>";
- }
- }
- }
- /** KΓΈr opgave hver 2. minut. **/
- $l=new cjFramework;
- $l->__doTask();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement