0, ':supp2' => 0, ':id_conseiller' => $CID); $qaglistArray = $allAgencies = array(); $result = excuteQuery($qaglist, $values_aglist); $ra = $result['stmt']; while($ligne = $ra->fetchObject()) { $qaglistArray[] = $ligne; $allAgencies[] = $ligne->id_agence; if($ligne->id_agence == $AID){ $oa = $ligne; } } //////// $q = "SELECT id_orientation, texte FROM ca_orientations WHERE supp=0 AND id_agence IN (:id_agence)"; $values = array(':id_agence' => implode(",",$allAgencies)); $result = excuteQuery($q, $values); $r = $result['stmt']; while($ligne = $r->fetchObject()) { $orientationsArray["orientation-".$ligne->id_orientation] = str_replace("\\", "", $ligne->texte); } //////// $qprofil = "SELECT id_profil FROM ca_conseiller_profils WHERE id_conseiller=:id_conseiller ORDER BY ID DESC LIMIT 1"; $vprofil = array(':id_conseiller' => $CID); $result = excuteQuery($qprofil, $vprofil); $rprofil = $result['stmt']; $oprofil = $rprofil->fetchObject(); $gs3Col = $GLOBALS["BO_CONF"]["GS3"] ? ", gs3" : ""; $q = "SELECT fonction, label_fonction, id_profil, civ, nom, prenom, id_agent, email, pro, part, photo, inactif, orientation, groupe, id_agence" . $receiveMailCol . $gs3Col . " FROM ca_conseillers c LEFT JOIN ca_conseiller_profils cp ON cp.id_conseiller = c.id_conseiller WHERE c.id_conseiller=:id_conseiller"; $values = array(':id_conseiller' => $CID); $result = excuteQuery($q, $values); $r = $result['stmt']; $o = $r->fetchObject(); $LABELFONCTION = $o->label_fonction; $CIV = ''; if ($AID == 0) $AID = $o->id_agence; $FONCTION = $o->fonction; $PROFIL = $o->id_profil; $FONCTIONS = ""; $GS3 = $GLOBALS["BO_CONF"]["GS3"] ? $o->gs3 : ""; $fonctionQ = "SELECT id_fonction,libelle FROM ca_fonctions WHERE supp=:supp ORDER BY libelle ASC"; $fonctionV = array(':supp' => 0); $result = excuteQuery($fonctionQ, $fonctionV); $fonctionR = $result['stmt']; $fonctionArray = array(); while ($f = $fonctionR->fetchObject()) { $fonctionArray[] = $f; $FONCTIONS .= ""; } $PROFILS = ""; $PCQ = "SELECT id_profil FROM ca_conseiller_profils WHERE id_conseiller=:id_conseiller ORDER BY id DESC LIMIT 1"; $PCV = array(':id_conseiller' => $CID); $result = excuteQuery($PCQ, $PCV); $PCR = $result['stmt']; $PCO = $PCR->fetchObject(); $profilQ = "SELECT id_profil,nom FROM ca_profils WHERE bo=:bo ORDER BY nom ASC"; $profilV = array(':bo' => 0); $result = excuteQuery($profilQ, $profilV); $profilR = $result['stmt']; while ($p = $profilR->fetchObject()) { $PROFILS .= ""; } $NOM = $o->nom; $PRENOM = $o->prenom; $MATRICULE = $o->id_agent; $EMAIL = $o->email; $PART = $o->part; if ($PART == 1) $PART = "checked"; $PRO = $o->pro; if ($PRO == 1) $PRO = "checked"; $src_img = $o->photo; if (strpos($src_img, 'upload') == false) { $src_img = str_replace("admin/", "", $o->photo); } $PHOTO = $src_img; $GROUPE = $o->groupe; //$INACTIF = $o->inactif; //if($INACTIF==0) $INACTIF="checked"; $STATUT = $o->inactif; if ($STATUT == 0) { $STATUT1 = "checked"; $STATUT2 = ""; } else { $STATUT1 = ""; $STATUT2 = "checked"; } $RECEIVEEMAIL = $o->receive_email ? " checked" : ""; $MSGTYPE = $o->orientation; $MSG = ""; $texteA =""; $valuesBind = array(); $typesBind = ""; $q2 = "SELECT id_orientation, orientation, texte, orientation, label FROM ca_orientations WHERE supp=:supp "; $valuesBind[':supp'] = 0; $typesBind .= "i"; if ($GLOBALS["BO_CONF"]["ENTITIES"]) { $q2 .= "AND id_entite=:id_entite"; $valuesBind[':id_entite'] = $GROUPE; } if ($AID != 0) { $q2 .= " AND id_agence=:id_agence"; $valuesBind[':id_agence'] = $oa->id_agence; } $q2 .= " ORDER BY orientation ASC, id_orientation ASC"; $result = excuteQuery($q2, $valuesBind); if ($result['status']) { $r = $result['stmt']; if ($r->rowCount() > 0) { $NBSRDV = $NBRDV = 0; $j = 0; while ($o2 = $r->fetchObject()) { $TYPE = $o2->label; if ($o2->id_orientation == $o->orientation) { $texteA=str_replace("\\", "", $o2->texte); $MSG .= ""; } else { $MSG .= ""; } } } } $query = "SELECT nom_agence, code_agence, type_agence, initiales FROM ca_agences WHERE supp=:supp"; $values = array(':supp' => 0); if ($AID != 0) $query .= " AND id_agence=:id_agence"; $query .= " ORDER BY nom_agence"; if ($AID != 0) $values[':id_agence'] = $AID; $result = excuteQuery($query, $values); $r = $result['stmt']; $row = $r->fetchObject(); $AGENCE = $row->nom_agence; $AGENCECODE = $row->initiales; $options = ""; $q3 = "SELECT id_entite, libelle, borne_color from ca_entites WHERE id_agence=:id_agence AND supp=:supp AND enabled=:enabled "; $v3 = array(':id_agence' => $AID, ':supp' => 0, ':enabled' => 1); $result = excuteQuery($q3, $v3); $r3 = $result['stmt']; while ($o3 = $r3->fetchObject()) { $options .= ''; } $MAXWIDTH = isset($GLOBALS["BO_CONF"]["CONSEILLER"]["photo"]["width"]) ? $GLOBALS["BO_CONF"]["CONSEILLER"]["photo"]["width"] : 174; $MAXHEIGHT = isset($GLOBALS["BO_CONF"]["CONSEILLER"]["photo"]["height"]) ? $GLOBALS["BO_CONF"]["CONSEILLER"]["photo"]["height"] : 149; //salle dimensions for siege agency if($GLOBALS["BO_CONF"]["AGENCE"]["SIEGE"] && $GLOBALS["BO_CONF"]["AGENCE"]["SIEGE"]["CHOICES"]){ $q_agency_siege = "SELECT siege FROM ca_agences WHERE id_agence = ".$AID." LIMIT 1"; $stmt_agency_siege = excuteQuery($q_agency_siege); $res_agency_siege = $stmt_agency_siege["stmt"]; $o_agency_siege = $res_agency_siege->fetchObject(); if($o_agency_siege->siege == 1){ $MAXWIDTH = isset($GLOBALS["BO_CONF"]["AGENCE"]["SIEGE"]["IMAGES"]["CONSEILLER"]["photo"]["width"]) ? $GLOBALS["BO_CONF"]["AGENCE"]["SIEGE"]["IMAGES"]["CONSEILLER"]["photo"]["width"] : 830; $MAXHEIGHT = isset($GLOBALS["BO_CONF"]["AGENCE"]["SIEGE"]["IMAGES"]["CONSEILLER"]["photo"]["height"]) ? $GLOBALS["BO_CONF"]["AGENCE"]["SIEGE"]["IMAGES"]["CONSEILLER"]["photo"]["height"] : 600; } } ?>