-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgetDemandeHandler.php
More file actions
59 lines (42 loc) · 1.57 KB
/
getDemandeHandler.php
File metadata and controls
59 lines (42 loc) · 1.57 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<?php
require_once('controller.php');
$idDemande = $_POST["id"];
$type = $_POST["type"];
$action = $_POST["action"];
$notification_Controller = new demandeController();
if (strcmp($action, "recieved") == 0){
$r = $notification_Controller->getDemandeInfoFromRecieved($idDemande, $type);
}
if (strcmp($action, "accepted") == 0){
$r = $notification_Controller->getDemandeInfoFromAccepted($idDemande, $type);
}
if (strcmp($action, "paiement") == 0){
$r = $notification_Controller->getDemandeInfoFromPaiement($idDemande, $type);
}
if (strcmp($action, "started") == 0){
$r = $notification_Controller->getDemandeInfoFromStarted($idDemande, $type);
}
if (strcmp($action, "finished") == 0){
$r = $notification_Controller->getDemandeInfoFromFinished($idDemande, $type);
}
echo '<input type="hidden" id="demandeId" value="'.$idDemande.'"></input>';
foreach ($r as $lg){
foreach($lg as $key => $value){
echo '<div class="row">
<div>
<label class="titre"> <h2> <b>'.$key.' </b>: </h2></label>
</div>
<div>
<label class="valeur"> <h2> '.$value.' </h2> </label>
</div>
</div>';
}
}
if (strcmp($action, "started") == 0){
$tc = new traductor_controller();
$r = $tc->isTraductor($_COOKIE["userid"]);
if (strcmp($r, "1") == 0){
echo '<button class="btn btn-primary float-right" id="send'.$type.'" data-toggle="modal" data-target="#modalfinalFile'.$type.'">Envoyer fichier finale</button>';
}
}
?>