-
Notifications
You must be signed in to change notification settings - Fork 0
/
func_paye.php
65 lines (55 loc) · 2.61 KB
/
func_paye.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<?PHP
function overwrite_salaire($IDSession){
$SQL = new sqlclass;
//AQUAFORME - AQUAJOGGING - AQUAFORME @ limoilou
//20$
$Req = "SELECT IDRessource FROM ressource JOIN cours JOIN periode on ressource.IDCours = cours.IDCours AND periode.IDPeriode = cours.IDPeriode WHERE IDNiveau in (32,33,34,36) AND End-Start >=3600 AND IDPiscine = 11 AND IDSession = ".$IDSession;
$SQL->SELECT($Req);
$Couple = "";
while($Rep = $SQL->FetchArray()){
$Couple .= ",".$Rep['IDRessource'];
}
$Req = "UPDATE ressource SET salaire=20 WHERE IDRessource in (".substr($Couple,1).")";
$SQL->QUERY($Req);
//AQUAFORME - AQUAJOGGING - AQUAFORME @ Garneau/Eudes
//15$
$Req = "SELECT IDRessource FROM ressource JOIN cours JOIN periode on ressource.IDCours = cours.IDCours AND periode.IDPeriode = cours.IDPeriode WHERE IDNiveau in (32,33,34,36) AND IDPiscine in (13,14) AND IDSession = ".$IDSession;
$SQL->SELECT($Req);
$Couple = "";
while($Rep = $SQL->FetchArray()){
$Couple .= ",".$Rep['IDRessource'];
}
$Req = "UPDATE ressource SET salaire=15 WHERE IDRessource in (".substr($Couple,1).")";
$SQL->QUERY($Req);
//Cours de semaine, sauf bain libre (Lundi à Jeudi)
//15$ / h
$Req = "SELECT IDRessource FROM ressource JOIN cours JOIN periode on ressource.IDCours = cours.IDCours AND periode.IDPeriode = cours.IDPeriode WHERE IDNiveau <> 42 AND IDPiscine = 12 AND Jour in (1,2,3,4) AND IDSession = ".$IDSession;
$SQL->SELECT($Req);
$Couple = "";
while($Rep = $SQL->FetchArray()){
$Couple .= ",".$Rep['IDRessource'];
}
$Req = "UPDATE ressource SET salaire=15 WHERE IDRessource in (".substr($Couple,1).")";
$SQL->QUERY($Req);
//Cours de semaine, sauf bain libre (Vendredi)
//15$ / h
$Req = "SELECT IDRessource FROM ressource JOIN cours JOIN periode on ressource.IDCours = cours.IDCours AND periode.IDPeriode = cours.IDPeriode WHERE IDNiveau <> 42 AND IDPiscine = 12 AND Jour = 5 AND Start<61200 AND IDSession = ".$IDSession;
$SQL->SELECT($Req);
$Couple = "";
while($Rep = $SQL->FetchArray()){
$Couple .= ",".$Rep['IDRessource'];
}
$Req = "UPDATE ressource SET salaire=15 WHERE IDRessource in (".substr($Couple,1).")";
$SQL->QUERY($Req);
//Bains Libre Plaza
//15$ / h
$Req = "SELECT IDRessource FROM ressource JOIN cours JOIN periode on ressource.IDCours = cours.IDCours AND periode.IDPeriode = cours.IDPeriode WHERE IDNiveau = 42 AND IDPiscine = 12 AND Jour in (1,2,3,4,5) AND Start<61200 AND IDSession = ".$IDSession;
$SQL->SELECT($Req);
$Couple = "";
while($Rep = $SQL->FetchArray()){
$Couple .= ",".$Rep['IDRessource'];
}
$Req = "UPDATE ressource SET salaire=15 WHERE IDRessource in (".substr($Couple,1).")";
$SQL->QUERY($Req);
}
?>