prepare($q) or wts_die(show_error()); $values = [':code_agence' => $_REQUEST['IDA']]; $result = excuteQuery($q, $values); $res = $result['stmt']; $agence = $res->fetchObject(); $n = $res->rowCount(); if ($n != 1) { // XXX message pas à jour? echo "
';
$html .= " ";
$html .= " Clients en attente";
$html .= " (" . count($data['en_attente']) . ")";
$html .= "
";
$i = 0;
foreach ($data['en_attente'] as $o) {
$cliType = "SANS RDV";
$cliClass = "srdv";
$btClass = "bt";
$cliProgressBar = "orange";
if ($o->rdv == 1) {
$cliClass = 'grey';
if ($o->id_conseiller == 0) {
$cliType = "RDV | Conseiller inconnu";
} else {
$cliType = "RDV | ";
if ($GLOBALS["BO_CONF"]["CONSEILLER"]["prenom"])
$cliType .= $o->conseillerPrenom . " ";
$cliType .= $o->conseillerNom;
}
} else if ($o->rdv == 0) {
$cliClass = "myst";
if ($GLOBALS["BO_CONF"]["MOTIFS"] && $o->objetVenue != "")
$cliType .= " : " . $o->objetVenue;
} else {
$cliClass = "meeting";
$cliType = "Salle de réunion";
}
$cliNomClient = $o->civ . " ";
if ($GLOBALS["BO_CONF"]["CLIENT"]["prenom"])
$cliNomClient .= $o->prenom . " ";
$cliNomClient .= $o->nom;
$heure_serveur = date('H\hi');
$da = ((substr($o->date_arrivee, 0, 2) * 3600) + (substr($o->date_arrivee, 3, 2) * 60));
$ds = ((substr($heure_serveur, 0, 2) * 3600) + (substr($heure_serveur, 3, 2) * 60));
$diff = ($ds - $da);
$attente = "";
$attente = round($diff / 60);
if ($attente < 1) {
$attente = "";
} else {
if ($attente > 59) {
$h = floor($attente / 60);
$m = ($attente % 60);
if ($m < 10)
$m = "0" . $m;
$attente = "Attente : " . $h . "h" . $m . "m ";
} else {
$attente = "Attente : " . $attente . "m ";
}
}
$pct = ($diff / 600) * 280; // 600 pour 10 minutes
if ($pct > 280)
$pct = 280;
$pctId = "clt" . $o->id_client;
// AGENCE DOUBLES
if ($o->id_borne > 0)
$cliNomClient .= " [" . $o->id_borne . "]";
$html .= "
| ';
$html .= '
';
$html .= "
Clients pris en charge (" . count($data['pris_en_charge']) . ") ";
$i = 0;
foreach ($data['pris_en_charge'] as $o) {
$heure_serveur = date('H\hi');
$da = ((substr($o->date_arrivee, 0, 2) * 3600) + (substr($o->date_arrivee, 3, 2) * 60));
$ds = ((substr($o->date_priseencharge, 0, 2) * 3600) + (substr($o->date_priseencharge, 3, 2) * 60));
$diff = ($ds - $da);
$attente = "";
$attente = round($diff / 60);
if ($attente < 1) {
$attente = "";
} else {
if ($attente > 59) {
$h = floor($attente / 60);
$m = ($attente % 60);
if ($m < 10)
$m = "0" . $m;
$attente = "Attente : " . $h . "h" . $m . "m ";
} else {
$attente = "Attente : " . $attente . "m ";
}
}
$cliNomClient = "";
$cliType = "SANS RDV";
$classAppend = "encours1";
if ($i % 2 != 0)
$classAppend = "encours2";
if ($o->rdv == 1) {
$cliType = "RDV | ";
if ($GLOBALS["BO_CONF"]["CONSEILLER"]["prenom"])
$cliType .= $o->conseillerPrenom . " ";
$cliType .= $o->conseillerNom;
} else {
if ($GLOBALS["BO_CONF"]["MOTIFS"] && $o->objetVenue != "")
$cliType .= " : " . $o->objetVenue;
}
if ($o->rdv == 1) {
$cliClass = "G " . $classAppend;
if ($o->id_conseiller == 0) {
$cliType = "RDV | Conseiller inconnu";
} else {
$cliType = "RDV | ";
if ($GLOBALS["BO_CONF"]["CONSEILLER"]["prenom"])
$cliType .= $o->conseillerPrenom . " ";
$cliType .= $o->conseillerNom;
}
} else if ($o->rdv == 0) {
$cliClass = "mystG " . $classAppend;
if ($GLOBALS["BO_CONF"]["MOTIFS"] && $o->objetVenue != "")
$cliType .= " : " . $o->objetVenue;
} else {
$cliClass = "meetingG " . $classAppend;
$cliType = "Salle de réunion";
}
$cliNomClient = $o->civ . " " . $o->prenom . " " . $o->nom;
$PCT = "";
$html .= " ";
$html .= '
|
Pile Invitation : nom_agence; ?>
|