-
Notifications
You must be signed in to change notification settings - Fork 0
/
job.php
43 lines (30 loc) · 830 Bytes
/
job.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></head><body>
<?php
require_once 'config.php';
require_once 'classes/connector.php';
require_once 'classes/parser.php';
require_once 'classes/examsdb.php';
require_once 'classes/clientdb.php';
require_once 'classes/postman.php';
$edb = new ExamsDB();
$exams = $edb->loadExams();
$jc = new JExamConnection();
$jc->login($login);
$html = $jc->exams_html($pin);
$jc->logout();
$p = new ExamsParser($html);
$updates = $p->getUpdates($exams);
$p->debugOutput($exams, $updates);
$edb->log($updates);
$edb->getStatus();
if ($updates) {
$edb->storeExams($updates);
$cl = new ClientDB();
$clients = $cl->getClients();
$cl->close();
$pm = new Postman($mail_header);
$pm->notify($clients, $updates);
}
$edb->close();
?>
</body></html>