/**
  * On obtient le tableau des id intranet action gestionnaire pour un espace de travail donné
  * @param int $paramWorkflow
  * @return array
  */
 public static function getArrayIdIntranetActionsByWorkflowAndGestionnaire($paramWorkflow)
 {
     $arrayIdIntranetActions = DatabaseOperation::convertSqlStatementWithoutKeyToArray('SELECT ' . self::TABLENAME . '.' . self::FIELDNAME_ID_INTRANET_ACTIONS . ' FROM ' . FtaRoleModel::TABLENAME . ', ' . self::TABLENAME . ' WHERE ' . self::TABLENAME . '.' . self::FIELDNAME_ID_FTA_WORKFLOW . '=' . $paramWorkflow . ' AND ' . FtaRoleModel::TABLENAME . '.' . FtaRoleModel::FIELDNAME_IS_GESTIONNAIRE . '=' . FtaRoleModel::IS_GESTIONNAIRE_TRUE . ' AND ' . self::TABLENAME . '.' . self::FIELDNAME_ID_FTA_ROLE . '=' . FtaRoleModel::TABLENAME . '.' . FtaRoleModel::KEYNAME);
     if ($arrayIdIntranetActions) {
         foreach ($arrayIdIntranetActions as $value) {
             $result[] = $value[self::FIELDNAME_ID_INTRANET_ACTIONS];
         }
         return $result;
     }
 }
 /**
  * On return le nom de la clé primaire d'une table donnée
  * @param string $paramTable
  * @return string
  */
 public static function getPrimaryFieldName($paramTable)
 {
     $arrayKeyField = DatabaseOperation::convertSqlStatementWithoutKeyToArray("DESC " . $paramTable);
     foreach ($arrayKeyField as $value) {
         if ($value[self::KEY] == self::PRIMARY_KEY) {
             $primaryFieldName = $value[self::FIELD];
         }
     }
     return $primaryFieldName;
 }
 /**
  * On obtient le tableau des id intranet action du site de rpooduction
  * pour un espace de travail donné
  * @param int $paramWorkflow
  * @param int $paramSiteDeProd
  * @return array
  */
 public static function getArrayIdIntranetActionsByWorkflowAndSiteDeProd($paramWorkflow, $paramSiteDeProd)
 {
     $arrayIdIntranetActions = DatabaseOperation::convertSqlStatementWithoutKeyToArray('SELECT ' . self::TABLENAME . '.' . self::FIELDNAME_ID_INTRANET_ACTIONS . ' FROM ' . self::TABLENAME . ' WHERE ' . self::TABLENAME . '.' . self::FIELDNAME_ID_FTA_WORKFLOW . '=' . $paramWorkflow . ' AND ' . self::TABLENAME . '.' . self::FIELDNAME_ID_SITE . '=' . $paramSiteDeProd);
     if ($arrayIdIntranetActions) {
         foreach ($arrayIdIntranetActions as $value) {
             $result[] = $value[self::FIELDNAME_ID_INTRANET_ACTIONS];
         }
         return $result;
     }
 }
 public static function checkActifWorkflow($paramIdFtaWorkflow)
 {
     $arrayActifWorkflow = DatabaseOperation::convertSqlStatementWithoutKeyToArray(" SELECT " . self::TABLENAME . "." . self::FIELDNAME_WORKFLOW_ACTIF . "," . self::FIELDNAME_DESCRIPTION_FTA_WORKFLOW . " FROM " . self::TABLENAME . " WHERE  " . self::KEYNAME . "=" . $paramIdFtaWorkflow);
     foreach ($arrayActifWorkflow as $rowsActifWorkflow) {
         $actif = $rowsActifWorkflow[self::FIELDNAME_WORKFLOW_ACTIF];
         $nom = $rowsActifWorkflow[self::FIELDNAME_DESCRIPTION_FTA_WORKFLOW];
         if (!$actif) {
             $titre = self::WORKFLOW_NON_ACTIF_TITLE;
             $message = self::WORKFLOW_NON_ACTIF_1 . $nom . self::WORKFLOW_NON_ACTIF_2;
             $redirection = "";
             Lib::showMessage($titre, $message, $redirection);
         }
     }
 }
Esempio n. 5
0
 public static function isLieuGeoSiteDeProduction($paramLieuGeo)
 {
     $trueSiteDeProd = FALSE;
     $arrayNomSiteProduction = DatabaseOperation::convertSqlStatementWithoutKeyToArray('SELECT ' . GeoModel::FIELDNAME_ASSEMBLAGE . ' FROM ' . GeoModel::TABLENAME . ' WHERE ' . GeoModel::KEYNAME . '= \'' . $paramLieuGeo . '\'');
     if ($arrayNomSiteProduction) {
         foreach ($arrayNomSiteProduction as $rowsNomSiteProduction) {
             $siteDeProdValue = $rowsNomSiteProduction[GeoModel::FIELDNAME_ASSEMBLAGE];
             if ($siteDeProdValue) {
                 $trueSiteDeProd = TRUE;
             }
         }
     }
     return $trueSiteDeProd;
 }
 /**
  * On récupère IdAnnexeEmballage en fonction de l'emballage groupe
  * @param int $paramIdEmballageGroupe
  * @return array
  */
 public static function getArrayIdAnnexeEmballage($paramIdEmballageGroupe)
 {
     $req = 'SELECT DISTINCT ' . AnnexeEmballageModel::TABLENAME . '.' . AnnexeEmballageModel::KEYNAME . ' FROM ' . AnnexeEmballageGroupeModel::TABLENAME . ',' . AnnexeEmballageModel::TABLENAME . ' WHERE ( 0 ';
     $req .= AnnexeEmballageGroupeModel::AddIdAnnexeEmballageGroupe($paramIdEmballageGroupe);
     $req .= ') AND ' . AnnexeEmballageGroupeModel::TABLENAME . '.' . AnnexeEmballageGroupeModel::KEYNAME . '=' . AnnexeEmballageModel::TABLENAME . '.' . AnnexeEmballageModel::FIELDNAME_ID_ANNEXE_EMBALLAGE_GROUPE;
     $arrayIdAnnexeEmballage = DatabaseOperation::convertSqlStatementWithoutKeyToArray($req);
     if ($arrayIdAnnexeEmballage) {
         foreach ($arrayIdAnnexeEmballage as $rowsIdAnnexeEmballage) {
             $arrayidAnnexeEmballage[] = $rowsIdAnnexeEmballage[AnnexeEmballageModel::KEYNAME];
         }
     } else {
         $arrayidAnnexeEmballage = 0;
     }
     return $arrayidAnnexeEmballage;
 }
 /**
  * On retourne l'id annexe groupe emballage selon l'id annexe emballage et le type d'emballage
  * @param int $paramIdAnnexeEmballage
  * @param int $paramIdAnnexeAmballageGroupeType
  * @return string
  */
 public static function getIdAnnexeEmballageGroupeByIdAnnexeEmballageAndIdAnnexeGroupeType($paramIdAnnexeEmballage, $paramIdAnnexeAmballageGroupeType)
 {
     //Dans le cas d'emballage UVC, on peut avoir de l'emballage primaire
     if ($paramIdAnnexeAmballageGroupeType == 2) {
         $op = '<=';
     } else {
         $op = '=';
     }
     $arrayIdAnnexeEmballageGroupe = DatabaseOperation::convertSqlStatementWithoutKeyToArray("SELECT " . self::TABLENAME . "." . self::KEYNAME . " FROM " . self::TABLENAME . "," . AnnexeEmballageGroupeTypeModel::TABLENAME . "," . AnnexeEmballageModel::TABLENAME . " WHERE " . self::TABLENAME . "." . self::FIELDNAME_ID_ANNEXE_EMBALLAGE_GROUPE_CONFIGURATION . "=" . AnnexeEmballageGroupeTypeModel::TABLENAME . "." . AnnexeEmballageGroupeTypeModel::KEYNAME . " AND " . self::TABLENAME . "." . self::KEYNAME . "=" . AnnexeEmballageModel::TABLENAME . "." . AnnexeEmballageModel::FIELDNAME_ID_ANNEXE_EMBALLAGE_GROUPE . " AND " . self::TABLENAME . '.' . AnnexeEmballageGroupeModel::FIELDNAME_ID_ANNEXE_EMBALLAGE_GROUPE_CONFIGURATION . $op . $paramIdAnnexeAmballageGroupeType . " AND " . AnnexeEmballageModel::TABLENAME . '.' . AnnexeEmballageModel::KEYNAME . "=" . $paramIdAnnexeEmballage);
     //Récupération de l'id Groupe
     if ($arrayIdAnnexeEmballageGroupe) {
         foreach ($arrayIdAnnexeEmballageGroupe as $rowsIdAnnexeEmballageGroupe) {
             $IdAnnexeEmballageGroupe = $rowsIdAnnexeEmballageGroupe[self::KEYNAME];
         }
     }
     return $IdAnnexeEmballageGroupe;
 }
Esempio n. 8
0
function tableau_planning_selectionne($semaine_en_cours, $annee_en_cours, $service, $site)
{
    //construction de la requête SQL
    $req1 = "SELECT DISTINCT id_salaries,id_planning_presence_semaine_visible, annee_planning_presence_semaine_visible, prenom, nom ";
    $req1 .= "FROM salaries, planning_presence_detail, annexe_jours_semaine, geo ";
    $req1 .= "WHERE (salaries.id_user=planning_presence_detail.id_salaries) ";
    $req1 .= "AND (geo.id_geo=salaries.lieu_geo) ";
    $req1 .= "AND (planning_presence_detail.id_annexe_jours_semaine=annexe_jours_semaine.id_annexe_jours_semaine) ";
    $req1 .= "AND (id_planning_presence_semaine_visible='{$semaine_en_cours}') ";
    $req1 .= "AND (annee_planning_presence_semaine_visible='{$annee_en_cours}') ";
    $req1 .= "AND (id_service='{$service}') ";
    $req1 .= "AND (geo.id_geo='{$site}') ";
    $req1 .= "ORDER BY nom,prenom ASC";
    //echo $req1;
    //Execution de la requête SQL
    $result1 = DatabaseOperation::convertSqlStatementWithoutKeyToArray($req1);
    return $result1;
}
Esempio n. 9
0
 /**
  * On récupère les informations des Fta 
  * @param type $paramArrayIdFta
  * @param type $paramOrderBy
  * @return type
  */
 public static function getIdFtaByUserAndWorkflow($paramArrayIdFta, $paramOrderBy, $paramDebut, $paramFtaModificatin)
 {
     if ($paramFtaModificatin) {
         $nbMaxParPage = ModuleConfig::VALUE_MAX_PAR_PAGE;
     } else {
         $nbMaxParPage = ModuleConfig::VALUE_MAX_PAR_PAGE_CONSUL;
         $paramOrderBy = FtaModel::FIELDNAME_DATE_DERNIERE_MAJ_FTA . ' DESC ';
     }
     /**
      * Attention dans la condition where de la requette ne pas mettre des conditions non présente lors de la création de la fta
      * Exemple ClassificationRaccourcisModel::TABLENAME 
      */
     if ($paramArrayIdFta) {
         $array['1'] = DatabaseOperation::convertSqlStatementWithoutKeyToArray('SELECT DISTINCT ' . FtaModel::TABLENAME . '.' . FtaModel::KEYNAME . ', ' . FtaEtatModel::FIELDNAME_ABREVIATION . ', ' . FtaModel::FIELDNAME_LIBELLE . ', ' . FtaWorkflowModel::FIELDNAME_DESCRIPTION_FTA_WORKFLOW . ', ' . FtaWorkflowModel::FIELDNAME_NOM_FTA_WORKFLOW . ', ' . FtaModel::FIELDNAME_NOMBRE_UVC_PAR_CARTON . ', ' . FtaModel::FIELDNAME_POIDS_ELEMENTAIRE . ', ' . FtaModel::FIELDNAME_ID_CLASSIFICATION_RACCOURCIS . ', ' . FtaModel::FIELDNAME_DESIGNATION_COMMERCIALE . ', ' . FtaModel::FIELDNAME_DOSSIER_FTA . ', ' . FtaModel::FIELDNAME_VERSION_DOSSIER_FTA . ', ' . FtaModel::FIELDNAME_CODE_ARTICLE_LDC . ', ' . FtaModel::FIELDNAME_DATE_ECHEANCE_FTA . ', ' . FtaModel::FIELDNAME_CREATEUR . ', ' . FtaModel::FIELDNAME_ID_FTA_CLASSIFICATION2 . ', ' . FtaModel::FIELDNAME_POURCENTAGE_AVANCEMENT . ', ' . FtaModel::FIELDNAME_LISTE_ID_FTA_ROLE . ', ' . GeoModel::FIELDNAME_GEO . ', ' . FtaModel::TABLENAME . '. ' . FtaModel::FIELDNAME_WORKFLOW . ' FROM ' . FtaModel::TABLENAME . ',' . UserModel::TABLENAME . ', ' . FtaEtatModel::TABLENAME . ', ' . FtaWorkflowModel::TABLENAME . ', ' . GeoModel::TABLENAME . ' WHERE ( 0 ' . FtaModel::addIdFtaLabel($paramArrayIdFta) . ')' . ' AND ' . FtaModel::TABLENAME . '.' . FtaModel::FIELDNAME_CREATEUR . '=' . UserModel::TABLENAME . '.' . UserModel::KEYNAME . ' AND ' . FtaModel::TABLENAME . '.' . FtaModel::FIELDNAME_ID_FTA_ETAT . '=' . FtaEtatModel::TABLENAME . '.' . FtaEtatModel::KEYNAME . ' AND ' . FtaWorkflowModel::TABLENAME . '.' . FtaWorkflowModel::KEYNAME . '=' . FtaModel::TABLENAME . '.' . FtaModel::FIELDNAME_WORKFLOW . ' AND ' . FtaModel::TABLENAME . '.' . FtaModel::FIELDNAME_SITE_PRODUCTION . '=' . GeoModel::TABLENAME . '.' . GeoModel::KEYNAME . ' ORDER BY ' . $paramOrderBy . ',' . FtaModel::TABLENAME . '.' . FtaModel::FIELDNAME_WORKFLOW . ',' . UserModel::FIELDNAME_PRENOM . ' ASC' . ',' . UserModel::FIELDNAME_NOM . ' ASC' . ',' . FtaModel::FIELDNAME_DATE_ECHEANCE_FTA . ' LIMIT ' . $nbMaxParPage . ' OFFSET ' . $paramDebut);
         $array['2'] = DatabaseOperation::getRowsNumberOverLimitInSqlStatement('SELECT SQL_CALC_FOUND_ROWS ' . FtaModel::TABLENAME . '.' . FtaModel::KEYNAME . ', ' . FtaEtatModel::FIELDNAME_ABREVIATION . ', ' . FtaModel::FIELDNAME_LIBELLE . ', ' . FtaWorkflowModel::FIELDNAME_DESCRIPTION_FTA_WORKFLOW . ', ' . FtaWorkflowModel::FIELDNAME_NOM_FTA_WORKFLOW . ', ' . FtaModel::FIELDNAME_NOMBRE_UVC_PAR_CARTON . ', ' . FtaModel::FIELDNAME_POIDS_ELEMENTAIRE . ', ' . FtaModel::FIELDNAME_ID_CLASSIFICATION_RACCOURCIS . ', ' . FtaModel::FIELDNAME_DESIGNATION_COMMERCIALE . ', ' . FtaModel::FIELDNAME_DOSSIER_FTA . ', ' . FtaModel::FIELDNAME_VERSION_DOSSIER_FTA . ', ' . FtaModel::FIELDNAME_CODE_ARTICLE_LDC . ', ' . FtaModel::FIELDNAME_ID_FTA_CLASSIFICATION2 . ', ' . FtaModel::FIELDNAME_DATE_ECHEANCE_FTA . ', ' . FtaModel::FIELDNAME_CREATEUR . ', ' . FtaModel::FIELDNAME_POURCENTAGE_AVANCEMENT . ', ' . FtaModel::FIELDNAME_LISTE_ID_FTA_ROLE . ', ' . GeoModel::FIELDNAME_GEO . ', ' . FtaModel::TABLENAME . '. ' . FtaModel::FIELDNAME_WORKFLOW . ' FROM ' . FtaModel::TABLENAME . ',' . UserModel::TABLENAME . ', ' . FtaEtatModel::TABLENAME . ', ' . FtaWorkflowModel::TABLENAME . ', ' . GeoModel::TABLENAME . ' WHERE ( 0 ' . FtaModel::addIdFtaLabel($paramArrayIdFta) . ')' . ' AND ' . FtaModel::TABLENAME . '.' . FtaModel::FIELDNAME_CREATEUR . '=' . UserModel::TABLENAME . '.' . UserModel::KEYNAME . ' AND ' . FtaModel::TABLENAME . '.' . FtaModel::FIELDNAME_ID_FTA_ETAT . '=' . FtaEtatModel::TABLENAME . '.' . FtaEtatModel::KEYNAME . ' AND ' . FtaWorkflowModel::TABLENAME . '.' . FtaWorkflowModel::KEYNAME . '=' . FtaModel::TABLENAME . '.' . FtaModel::FIELDNAME_WORKFLOW . ' AND ' . FtaModel::TABLENAME . '.' . FtaModel::FIELDNAME_SITE_PRODUCTION . '=' . GeoModel::TABLENAME . '.' . GeoModel::KEYNAME . ' ORDER BY ' . $paramOrderBy . ',' . FtaModel::TABLENAME . '.' . FtaModel::FIELDNAME_WORKFLOW . ',' . UserModel::FIELDNAME_PRENOM . ' ASC' . ',' . FtaModel::FIELDNAME_DATE_ECHEANCE_FTA . ' LIMIT ' . $nbMaxParPage . ' OFFSET ' . $paramDebut);
         $array['3'] = DatabaseOperation::convertSqlStatementWithoutKeyToArray('SELECT DISTINCT ' . FtaWorkflowModel::TABLENAME . '.*' . ' FROM ' . FtaModel::TABLENAME . ',' . FtaWorkflowModel::TABLENAME . ' WHERE ( ' . '0' . ' ' . FtaModel::addIdFtaLabel($array['1']) . ')' . ' AND ' . FtaModel::TABLENAME . '.' . FtaModel::FIELDNAME_WORKFLOW . '=' . FtaWorkflowModel::TABLENAME . '.' . FtaWorkflowModel::KEYNAME);
         return $array;
     }
 }
 /**
  * Récupération de la description d'un champ
  * @param string $paramNameTable
  * @param string $paramNameVariable
  * @param string $paramLabel
  * @param boolean $paramIsEditable
  * @param object $paramHtmlObject
  * @return string
  */
 public static function getFieldDesc($paramNameTable, $paramNameVariable, $paramLabel, $paramIsEditable, $paramHtmlObject)
 {
     //Recherche des informations d'aide en ligne (format Pop-up)
     $req_explication = "SELECT " . self::FIELDNAME_TABLE_NAME_INTRANET_DESCRIPTION . "," . self::FIELDNAME_CHAMP_NAME_INTRANET_DESCRIPTION . "," . self::FIELDNAME_EXPLICATION_INTRANET_DESCRIPTION . "," . self::FIELDNAME_IS_ENABLED_INTRANET_DESCRIPTION . "," . self::KEYNAME . " FROM " . self::TABLENAME . " WHERE " . self::FIELDNAME_TABLE_NAME_INTRANET_DESCRIPTION . "='" . $paramNameTable . "' " . "AND " . self::FIELDNAME_CHAMP_NAME_INTRANET_DESCRIPTION . "='" . $paramNameVariable . "' ";
     $arrayIntranetDescription = DatabaseOperation::convertSqlStatementWithoutKeyToArray($req_explication);
     if ($arrayIntranetDescription) {
         foreach ($arrayIntranetDescription as $rowsIntranetDescription) {
             $id_intranet_description = $rowsIntranetDescription[self::KEYNAME];
             $explication_intranet_description = $rowsIntranetDescription[self::FIELDNAME_EXPLICATION_INTRANET_DESCRIPTION];
             $show_help = $rowsIntranetDescription[self::FIELDNAME_IS_ENABLED_INTRANET_DESCRIPTION];
         }
     } else {
         $id_intranet_description = self::insertIntranetDescription($paramNameTable, $paramNameVariable);
         $show_help = self::IS_ENABLED_TRUE;
     }
     $paramHtmlObject->setShowHelp($show_help);
     if ($show_help) {
         //Ajout des liens hypertextes
         $return .= "<a title=\"" . $explication_intranet_description . "\" " . "href=" . self::HREF_JAVASCRIPT_BEGIN . self::HREF_POPUP . "?id_intranet_description=" . $id_intranet_description . "&disable_full_page=1" . "&isEditable=" . $paramIsEditable . "&champ_intranet_description={$paramNameVariable}" . self::HREF_JAVASCRIPT_END . "  CLASS=link1 />" . $paramLabel . "</a>";
     }
     return $return;
 }
Esempio n. 11
0
             }
             $_SESSION['identite'] = $login;
             $_SESSION['tentative'] = $tentative;
         } else {
             $_SESSION['tentative'] = "0";
             $titre = "Erreur d'identification ";
             $message = "L'identifiant {$login} n'existe pas dans la base de données.<br><br>";
             Lib::showMessage($titre, $message, $redirection);
         }
     }
     /* fin nouvelles fonctions tests tentatives */
     header('Location: ' . $page);
 } else {
     //Création des variables une fois l'authentification terminé
     if (!$id_user) {
         $arrayR1 = DatabaseOperation::convertSqlStatementWithoutKeyToArray('SELECT prenom' . ',id_catsopro' . ',id_user' . ',id_catsopro' . ',id_service' . ',id_type' . ',nom' . ',mail' . ',lieu_geo' . ',portail_wiki_salaries' . ' FROM salaries WHERE ( ' . '(login = \'' . $login . '\') AND ' . '(blocage=\'non\') AND ' . '(actif=\'oui\') ' . ')');
         if ($arrayR1) {
             foreach ($arrayR1 as $rows) {
                 $prenom = $rows['prenom'];
                 $id_user = $rows[UserModel::KEYNAME];
                 $id_catsopro = $rows['id_catsopro'];
                 $id_service = $rows['id_service'];
                 $nom_type = $rows['id_type'];
                 $nom_famille_ses = $rows['nom'];
                 $mail_user = $rows['mail'];
                 $lieu_geo = $rows['lieu_geo'];
                 $portail_wiki_salaries = $rows['portail_wiki_salaries'];
             }
             $_SESSION[UserModel::FIELDNAME_PASSWORD] = $pass;
             $_SESSION['nom_famille_ses'] = $nom_famille_ses;
             $_SESSION[UserModel::FIELDNAME_LOGIN] = $login;
 public static function getListeClassificationLabel($paramAscendent, $paramIdDefaut, $paramSelect, $paramOrig, $paramNomDefaut, $paramIsEditable, $paramMarque2 = NULL)
 {
     if ($paramAscendent != NULL) {
         $req = 'SELECT DISTINCT ' . $paramSelect . ' FROM  ' . ClassificationFta2Model::TABLENAME . ' WHERE  ' . $paramOrig . ' = ' . $paramAscendent;
         if (self::$idProprietaireGroupe) {
             $req .= ' AND ' . ClassificationFta2Model::FIELDNAME_ID_PROPRIETAIRE_GROUPE . ' = ' . self::$idProprietaireGroupe;
         }
         if (self::$idProprietaireEnseigne != NULL) {
             $req .= ' AND ' . ClassificationFta2Model::FIELDNAME_ID_PROPRIETAIRE_ENSEIGNE . ' = ' . self::$idProprietaireEnseigne;
         }
         if (self::$idMarque) {
             $req .= ' AND ' . ClassificationFta2Model::FIELDNAME_ID_MARQUE . ' = ' . self::$idMarque;
         }
         if (self::$idActivite) {
             $req .= ' AND ' . ClassificationFta2Model::FIELDNAME_ID_ACTIVITE . ' = ' . self::$idActivite;
         }
         if (self::$idRayon) {
             $req .= ' AND ' . ClassificationFta2Model::FIELDNAME_ID_RAYON . ' = ' . self::$idRayon;
         }
         if (self::$idEnvironnement) {
             $req .= ' AND ' . ClassificationFta2Model::FIELDNAME_ID_ENVIRONNEMENT . ' = ' . self::$idEnvironnement;
         }
         if (self::$idSaisonnalite) {
             $req .= ' AND ' . ClassificationFta2Model::FIELDNAME_ID_SAISONNALITE . ' = ' . self::$idSaisonnalite;
         }
         $array = DatabaseOperation::convertSqlStatementWithoutKeyToArray($req);
         foreach ($array as $value) {
             $return[] = $value[$paramSelect];
         }
     }
     //Traitement du Warning Update
     if (self::$paramWarningUpdate) {
         $image_modif = Html::DEFAULT_HTML_WARNING_UPDATE_IMAGE;
         $color_modif = Html::DEFAULT_HTML_WARNING_UPDATE_BGCOLOR;
     }
     $reqClassification = 'SELECT ' . ClassificationArborescenceArticleCategorieContenuModel::KEYNAME . ',' . ClassificationArborescenceArticleCategorieContenuModel::FIELDNAME_NOM_CLASSIFICATION_ARBORESCENCE_ARTICLE_CATEGORIE_CONTENU . ' FROM ' . ClassificationArborescenceArticleCategorieContenuModel::TABLENAME . ' WHERE ( 0 ' . ClassificationFta2Model::AddIdClassificationArborescenceArticleCategorieContenu($return) . ') ORDER BY ' . ClassificationArborescenceArticleCategorieContenuModel::FIELDNAME_NOM_CLASSIFICATION_ARBORESCENCE_ARTICLE_CATEGORIE_CONTENU;
     $listeClassification = '<tr><td class=contenu style=\'' . $color_modif . '\' >' . DatabaseDescription::getFieldDocLabel(ClassificationFta2Model::TABLENAME, $paramSelect) . '</td><td class=contenu width=75%  style=\'' . $color_modif . '\' >' . AccueilFta::afficherRequeteEnListeDeroulante($reqClassification, $paramIdDefaut, $paramNomDefaut, $paramIsEditable, TRUE) . ' ' . $image_modif . '</td></tr>';
     return $listeClassification;
 }
 /**
  * On obtient l' id Annexe Emballage groupe type de type UVC selon l'id fta et id fta conditionnement
  * @param type $paramIdFtaConditionnement
  * @param type $paramIdFta
  * @return int
  */
 public static function getIdAnnexeEmballageAndGroupeTypeAndGroupeAndIdFtaConditionnementFromFtaConditionnement($paramIdFtaConditionnement, $paramIdFta)
 {
     $req = 'SELECT DISTINCT ' . self::KEYNAME . ',' . self::FIELDNAME_ID_ANNEXE_EMBALLAGE . ',' . self::FIELDNAME_ID_ANNEXE_EMBALLAGE_GROUPE_TYPE . ' FROM ' . self::TABLENAME . ' WHERE ( 0 ' . self::addIdFtaConditionnement($paramIdFtaConditionnement) . ' ) AND ' . self::FIELDNAME_ID_FTA . '=' . $paramIdFta;
     $arrayIdAnnexeEmballageGroupe = DatabaseOperation::convertSqlStatementWithoutKeyToArray($req);
     return $arrayIdAnnexeEmballageGroupe;
 }
Esempio n. 14
0
 /**
  * On vérifie selon le role de l'utilisateur connecté 
  * si il a accès aux bouton de transition, de duplication et retirer
  * @param int $paramIdRole
  * @return boolean
  */
 public static function isGestionnaire($paramIdRole)
 {
     $valueIsGestionnaire = 0;
     $return = FALSE;
     $arrayIsGestionnaire = DatabaseOperation::convertSqlStatementWithoutKeyToArray('SELECT ' . self::FIELDNAME_IS_GESTIONNAIRE . ' FROM ' . self::TABLENAME . ' WHERE ' . self::KEYNAME . '=' . $paramIdRole);
     foreach ($arrayIsGestionnaire as $rowsIsGestionnaire) {
         $valueIsGestionnaire = $rowsIsGestionnaire[self::FIELDNAME_IS_GESTIONNAIRE];
     }
     if ($valueIsGestionnaire != 0) {
         $return = TRUE;
     }
     return $return;
 }
 /**
  * Retour la liste des IdClassificationActiviteSousFamille pour une activite donnée
  * @param int $paramIdActivite
  * @return array
  */
 private static function getArrayIdClassificationActiviteSousFamilleArcadiaByIdActivite($paramIdActivite)
 {
     $array = DatabaseOperation::convertSqlStatementWithoutKeyToArray("SELECT " . self::KEYNAME . " FROM " . self::TABLENAME . " WHERE " . self::FIELDNAME_ID_ACTIVITE . "=" . $paramIdActivite);
     return $array;
 }
    //    $bloc .= "<input type=hidden name=" . FtaComposantModel::FIELDNAME_ETIQUETTE_POIDS_FTA_COMPOSITION . " value='" . $etiquette_poids_fta_composition . "'/>";
    $bloc .= $ftaComposantView2->getHtmlDataField(FtaComposantModel::FIELDNAME_ETIQUETTE_POIDS_FTA_COMPOSITION);
    //}
    //Décomposition du poids
    //$bloc .= "<tr><td " . $color_modif . ">" . DatabaseDescription::getFieldDocLabel(FtaComposantModel::TABLENAME, FtaComposantModel::FIELDNAME_ETIQUETTE_DECOMPOSITION_POIDS_FTA_COMPOSANT) . "</td><td " . $color_modif . ">";
    //if ($edit_allow) {
    //    $bloc .= "<input type=text name=" . FtaComposantModel::FIELDNAME_ETIQUETTE_DECOMPOSITION_POIDS_FTA_COMPOSANT . " value='" . $etiquette_decomposition_poids_fta_composant . "' size=50/>";
    //} else {
    //    $bloc .=$etiquette_decomposition_poids_fta_composant;
    //    $bloc .= "<input type=hidden name=" . FtaComposantModel::FIELDNAME_ETIQUETTE_DECOMPOSITION_POIDS_FTA_COMPOSANT . " value='" . $etiquette_decomposition_poids_fta_composant . "'/>";
    $bloc .= $ftaComposantView2->getHtmlDataField(FtaComposantModel::FIELDNAME_ETIQUETTE_DECOMPOSITION_POIDS_FTA_COMPOSANT);
}
//}
//Liste des composants regroupés sur cette étiquette
if ($id_fta_composant) {
    $arrayComposition = DatabaseOperation::convertSqlStatementWithoutKeyToArray(" SELECT " . FtaComposantModel::FIELDNAME_NOM_FTA_COMPOSITION . "," . FtaComposantModel::FIELDNAME_POIDS_FTA_COMPOSITION . "," . FtaComposantModel::FIELDNAME_QUANTITE_FTA_COMPOSITION . " FROM " . FtaComposantModel::TABLENAME . " WHERE " . FtaComposantModel::FIELDNAME_ETIQUETTE_ID_FTA_COMPOSITION . "=" . $id_fta_composant . " ORDER BY " . FtaComposantModel::FIELDNAME_NOM_FTA_COMPOSITION);
}
if ($arrayComposition) {
    $liste_composant_associee = "";
    foreach ($arrayComposition as $rows) {
        $liste_composant_associee .= $rows[FtaComposantModel::FIELDNAME_NOM_FTA_COMPOSITION] . "<br>";
        $etiquette_poids_fta_composition = $etiquette_poids_fta_composition + $rows[FtaComposantModel::FIELDNAME_POIDS_FTA_COMPOSITION] * $rows[FtaComposantModel::FIELDNAME_QUANTITE_FTA_COMPOSITION];
    }
    $bloc .= "<tr><td>Liste des composants inclus sur cette étiquette</td>" . "<td>" . $liste_composant_associee . "</td></tr>";
}
//Configuration de l'étiquette
if ($mode_etiquette_fta_composition == 1 or $mode_etiquette_fta_composition == 2 or $mode_etiquette_fta_composition == 4) {
    //Taile de la police de la liste d'ingrédient:
    //    $bloc .= "<tr class=contenu><td " . $color_modif . ">" . DatabaseDescription::getFieldDocLabel(FtaComposantModel::TABLENAME, FtaComposantModel::FIELDNAME_TAILLE_POLICE_INGREDIENT_FTA_COMPOSITION) . "</td><td " . $color_modif . ">";
    //
    ////Remise à zéro des bouton radio
Esempio n. 17
0
<?php

/* ------------------------------------------------
  ACQUISITION DES DROITS D'ACCES DE intranet.agis.fr
  ------------------------------------------------ */
//Création des variables globales de tous les droits d'acces de l'intranet
//$timestart = time();
$nom_droits_acces = Lib::isDefined('nom_droits_acces');
$id_user = Lib::isDefined('id_user');
//Requête retournant tous les droits d'accès de l'intranet pour l'utilisateur en cours
$array = DatabaseOperation::convertSqlStatementWithoutKeyToArray('SELECT ' . IntranetDroitsAccesModel::TABLENAME . '.' . IntranetDroitsAccesModel::FIELDNAME_ID_USER . ', ' . IntranetDroitsAccesModel::TABLENAME . '.' . IntranetDroitsAccesModel::FIELDNAME_NIVEAU_INTRANET_DROITS_ACCES . ', ' . IntranetModulesModel::TABLENAME . '.' . IntranetModulesModel::FIELDNAME_NOM_INTRANET_MODULES . ', ' . IntranetActionsModel::TABLENAME . '.' . IntranetActionsModel::FIELDNAME_NOM_INTRANET_ACTIONS . ' FROM ' . IntranetActionsModel::TABLENAME . ', ' . IntranetDroitsAccesModel::TABLENAME . ', ' . IntranetModulesModel::TABLENAME . ' WHERE ( ' . IntranetActionsModel::TABLENAME . '.' . IntranetActionsModel::KEYNAME . ' = ' . IntranetDroitsAccesModel::TABLENAME . '.' . IntranetDroitsAccesModel::FIELDNAME_ID_INTRANET_ACTIONS . ' AND ' . IntranetDroitsAccesModel::TABLENAME . '.' . IntranetDroitsAccesModel::FIELDNAME_ID_INTRANET_MODULES . ' = ' . IntranetModulesModel::TABLENAME . '.' . IntranetModulesModel::KEYNAME . ' AND ' . IntranetDroitsAccesModel::TABLENAME . '.' . IntranetDroitsAccesModel::FIELDNAME_ID_USER . ' = ' . $id_user . ') ' . ' ORDER BY ' . IntranetModulesModel::TABLENAME . '.' . IntranetModulesModel::FIELDNAME_NOM_INTRANET_MODULES . ' ASC, ' . IntranetActionsModel::TABLENAME . '.' . IntranetActionsModel::FIELDNAME_NOM_INTRANET_ACTIONS . ' ASC ');
if ($array) {
    foreach ($array as $rows) {
        //Déclaration du droit d'accès
        $nom_droits_acces = $rows['nom_intranet_modules'] . '_' . $rows['nom_intranet_actions'];
        //Affectation du niveau du droit d'accès
        //        $$nom_droits_acces = $rows["niveau_intranet_droits_acces"];
        //Vérification
        //echo $nom_droits_acces.'='.$$nom_droits_acces.'<br>';
        //Enregistrement du droits d'accès dans les variables de session PHP
        Acl::setAccesRightsValues($nom_droits_acces, $rows["niveau_intranet_droits_acces"]);
        //        $_SESSION["$nom_droits_acces"] = $$nom_droits_acces;
        //Réinitialisation pour préaparer la nouvelle boucle
        //        $nom_droits_acces = "";
        //        $$nom_droits_acces = 0;
    }
} else {
    $titre = 'Attention';
    $message = 'Votre compte utilisateur n\'est pas déclaré dans l\'Intranet.<br>' . 'Veuillez contacter votre service informatique.<br>';
    $redirection = false;
    afficher_message($titre, $message, $redirection);
Esempio n. 18
0
 /**
  * On récupère l'abréviation de l'état par l'id
  * @param int $paramIdEtat
  * @return string
  */
 public static function getAbreviationEtatByIdEtat($paramIdEtat)
 {
     $arrayIdEtat = DatabaseOperation::convertSqlStatementWithoutKeyToArray('SELECT ' . FtaEtatModel::FIELDNAME_ABREVIATION . ' FROM ' . FtaEtatModel::TABLENAME . ' WHERE ' . FtaEtatModel::KEYNAME . '=' . $paramIdEtat);
     return $arrayIdEtat[0][FtaEtatModel::FIELDNAME_ABREVIATION];
 }
 /**
  * Actualise l'état d'un champ verrouillé si le champ à était mise à jour.
  * @param string $paramTableName
  * @param string $paramKeyValue
  * @param string $paramFieldName
  */
 public static function doUpdateLockField($paramTableName, $paramKeyValue, $paramFieldName)
 {
     $mondelName = ModelTableAssociation::getModelName($paramTableName);
     $model = new $mondelName($paramKeyValue);
     $idFta = $model->getDataField(FtaModel::KEYNAME)->getFieldValue();
     if ($idFta) {
         $modelFta = new FtaModel($idFta);
         $idFtaDossier = $modelFta->getDossierFta();
     }
     $arrayFieldToLockChap = DatabaseOperation::convertSqlStatementWithoutKeyToArray("SELECT " . self::KEYNAME . " FROM " . self::TABLENAME . " WHERE " . self::FIELDNAME_TABLE_NAME . "=\"" . $paramTableName . "\" AND " . self::FIELDNAME_FIELD_NAME . "=\"" . $paramFieldName . "\" AND " . self::FIELDNAME_DOSSIER_FTA_PRIMAIRE . "=\"" . $idFtaDossier . "\" AND " . self::FIELDNAME_FIELD_LOCK . "=" . self::FIELD_LOCK_TRUE);
     if ($arrayFieldToLockChap) {
         DatabaseOperation::execute("UPDATE " . self::TABLENAME . " SET " . self::FIELDNAME_FIELD_CHANGE_STATE . "=" . self::CHANGE_STATE_FALSE . " WHERE " . self::FIELDNAME_TABLE_NAME . "=\"" . $paramTableName . "\" AND " . self::FIELDNAME_FIELD_NAME . "=\"" . $paramFieldName . "\" AND " . self::FIELDNAME_DOSSIER_FTA_PRIMAIRE . "=\"" . $idFtaDossier . "\"");
     }
 }
 /**
  * MOTEUR DE RECHERCHE
  * Cette fonction retourne l'affiche de l'interface du moteur de recherche
  * @param type $module
  * @param type $id_recherche
  * @param type $etat_table
  * @param type $id_recherche_etat
  * @param type $abreviation_recherche_etat
  * @param type $nom_recherche_recherche_etat
  * @param string $paramImageBordure
  * @param string $paramImageRecherche
  * @param type $champ_retour
  * @param int $paramNbLimiteDeResultat
  * @param type $url_page_depart
  * @param type $QUERY_STRING
  * @param type $PHP_SELF
  * @param type $nbligne
  * @param type $nbcol
  * @param type $champ_recherche
  * @param type $operateur_recherche
  * @param type $texte_recherche
  * @param type $champ_courant
  * @param type $operateur_courant
  * @param type $texte_courant
  * @param type $nb_col_courant
  * @param type $ajout_col
  * @param type $paramRequete
  * @param type $tab_resultat
  * @param type $module_table
  * @return type
  */
 public static function afficherMoteurDeRecherche($module, $id_recherche, $etat_table, $id_recherche_etat, $abreviation_recherche_etat, $nom_recherche_recherche_etat, $paramImageBordure, $paramImageRecherche, $champ_retour, $paramNbLimiteDeResultat, $url_page_depart, $QUERY_STRING, $PHP_SELF, $nbligne, $nbcol, $champ_recherche, $operateur_recherche, $texte_recherche, $champ_courant, $operateur_courant, $texte_courant, $nb_col_courant, $ajout_col, $paramRequete, $tab_resultat, $module_table, $nb_ligne_courant)
 {
     /*
      Définition des Variables
     */
     if ($url_page_depart == '') {
         if ($QUERY_STRING) {
             $url_page_depart = '(' . $PHP_SELF . '?' . $QUERY_STRING . ')';
         } else {
             $url_page_depart = '(' . $PHP_SELF . ')';
         }
     }
     $return = "";
     $_REQUEST['table_champ_retour'] = $module_table;
     // table du champ retour
     $_REQUEST['table_tous_champs_rech'] = $module_table . "_moteur_de_recherche";
     $tab_resultat;
     //Construction du code HTML
     $return .= "\n     <center>\n     <img src=" . $paramImageBordure . "> &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp\n     <img src=" . $paramImageBordure . "> &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp\n     <img src=" . $paramImageBordure . "> &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp\n     <img src=" . $paramImageBordure . "> &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp\n     <img src=" . $paramImageBordure . "> &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp\n     <img src=" . $paramImageBordure . "> &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp\n     <img src=" . $paramImageBordure . ">\n     <br>\n     </center>\n     <center>\n     <table width=100% border=1 valign=top cellspacing=0>\n     <tr>\n     <td class=titre_principal><img src=" . $paramImageRecherche . " WIDTH=70 HEIGHT=50 align=left> <br> Recherche <br><br></td>\n     </tr>\n     <tr>\n     <td colspan=3> ";
     $return .= MoteurDeRecherche::recuperationDesDonneesDeRecherche($module, $url_page_depart, $module_table, $champ_retour, $paramNbLimiteDeResultat, $nbligne, $nbcol, $champ_recherche, $operateur_recherche, $texte_recherche, $champ_courant, $operateur_courant, $texte_courant, $nb_col_courant, $nb_ligne_courant, $ajout_col);
     $return .= "</td>\n      </tr>\n      </table>\n      ";
     if ($tab_resultat) {
         $tab_resultat = explode(';;', $tab_resultat);
     }
     $return .= "\n     <table width=100% border=1 valign=top cellspacing=0>\n     <tr>\n     <td class=titre_principal> <br> Résultats <br><br></td>\n     </tr>\n     ";
     $choix = -1;
     // pour que l'on affiche les entetes du tableau une seule fois
     if ($paramRequete) {
         //On vérifie si le résultat n'est pas nul
         $result_requete_resultat = DatabaseOperation::convertSqlStatementWithoutKeyToArray($paramRequete);
         if (!$result_requete_resultat) {
             $titre = 'Moteur de Recherche';
             $message = UserInterfaceMessage::FR_WARNING_RECHERE_ERREUR;
             Lib::showMessage($titre, $message, $redirection);
         } elseif (count($result_requete_resultat) > ModuleConfig::VALUE_MAX_MOTEUR_RECHERCHE) {
             $message = UserInterfaceMessage::FR_WARNING_RECHERE . ModuleConfig::VALUE_MAX_MOTEUR_RECHERCHE;
             $redirection = "recherche.php";
             Lib::showMessage("Erreur", $message, $redirection);
         }
         //Regroupement par Etat du résultat
         $req = "SELECT * FROM {$etat_table} ";
         //Spécificité propre au module FTMP
         //Restriction par droit d'accès
         //  $acces= $module."_modification";
         //  echo $SESSION[$acces];
         if (!Acl::getValueAccesRights($module . "_modification") and $_SESSION["module"] == "fiches_mp_achats") {
             $req .= "WHERE " . $abreviation_recherche_etat . "='V' OR " . $abreviation_recherche_etat . "='E' ";
         }
         $result = DatabaseOperation::convertSqlStatementWithoutKeyToArray($req);
         foreach ($result as $rows) {
             //Construction de la reqûete de resultat propre à cet Etat
             $req1 = "{$paramRequete} AND " . $id_recherche_etat . "=" . $rows[$id_recherche_etat];
             $arrayFta = DatabaseOperation::convertSqlStatementWithoutKeyToArray($req1);
             //Si il y a des résltat on commence la construction du tableau
             if ($arrayFta) {
                 //Affichage de l'en-tête de regroupement
                 $return .= "<tr><td class=titre>" . $rows["nom_" . $etat_table] . "</td></tr>";
                 //Affichage des fiches
                 foreach ($arrayFta as $rowsFta) {
                     //echo $choix;
                     $return .= "<tr><td>" . TableauFicheView::getHtmlTable($rowsFta[$id_recherche], $choix, "0", "") . "</td></tr>";
                 }
             }
             $return .= "<br>";
         }
         // Fin de l'affichage des résultats;
     }
     //Dans le cas où un résultat de recherche est proposé, affichage du tableau
     //if ($tab_resultat){
     $return .= "</td></tr>\n     </table>\n     <br>\n     <img src=" . $paramImageBordure . "><img src=" . $paramImageBordure . "><img src=" . $paramImageBordure . "><img src=" . $paramImageBordure . "><img src=" . $paramImageBordure . "><img src=" . $paramImageBordure . ">\n     <img src=" . $paramImageBordure . "><img src=" . $paramImageBordure . "><img src=" . $paramImageBordure . "><img src=" . $paramImageBordure . "><img src=" . $paramImageBordure . "><img src=" . $paramImageBordure . ">\n     <img src=" . $paramImageBordure . "><img src=" . $paramImageBordure . "><img src=" . $paramImageBordure . "><img src=" . $paramImageBordure . "><img src=" . $paramImageBordure . "><img src=" . $paramImageBordure . ">\n     <img src=" . $paramImageBordure . "><img src=" . $paramImageBordure . "><img src=" . $paramImageBordure . "><img src=" . $paramImageBordure . "><img src=" . $paramImageBordure . "><img src=" . $paramImageBordure . ">\n     ";
     return $return;
     /*         * *****************************************************************************
               FIN MOTEUR DE RECHERCHE
              * ***************************************************************************** */
 }
 /**
  * On verifie si selon le workflow  et site de production en cours l'utilisateur connecté à les droits d'accès.
  * @param int $paramIdUser
  * @param int $paramIdFtaWorkflow
  * @param array $paramIdIntranetActionSiteDeProduction
  * @return array
  */
 public static function getArrayIdIntranetActionByIdUserFtaWorkflowAndSiteDeProduction($paramIdUser, $paramIdFtaWorkflow, $paramIdIntranetActionSiteDeProduction)
 {
     /**
      * Vérification de l'accès utilisateur: action du site de prod / espace de travail
      */
     $arrayAcl = DatabaseOperation::convertSqlStatementWithoutKeyToArray('SELECT ' . self::TABLENAME . '.' . self::KEYNAME . ' FROM ' . self::TABLENAME . ',' . FtaWorkflowModel::TABLENAME . ',' . IntranetDroitsAccesModel::TABLENAME . ' WHERE ' . self::TABLENAME . '.' . self::KEYNAME . '=' . IntranetDroitsAccesModel::TABLENAME . '.' . IntranetDroitsAccesModel::FIELDNAME_ID_INTRANET_ACTIONS . ' AND ' . IntranetDroitsAccesModel::FIELDNAME_ID_USER . '=' . $paramIdUser . ' AND ' . IntranetDroitsAccesModel::TABLENAME . '.' . IntranetDroitsAccesModel::FIELDNAME_NIVEAU_INTRANET_DROITS_ACCES . '= ' . IntranetNiveauAccesModel::NIVEAU_GENERIC_TRUE . ' AND ' . self::TABLENAME . '.' . self::FIELDNAME_PARENT_INTRANET_ACTIONS . '=' . FtaWorkflowModel::TABLENAME . '.' . FtaWorkflowModel::FIELDNAME_ID_INTRANET_ACTIONS . ' AND ' . FtaWorkflowModel::TABLENAME . '.' . FtaWorkflowModel::KEYNAME . '=' . $paramIdFtaWorkflow . ' AND ( 0 ' . self::addIdIntranetAction($paramIdIntranetActionSiteDeProduction) . ')');
     return $arrayAcl;
 }
Esempio n. 22
0
     $idFtaProcessusEtat = "1";
     /**
      * Vérification que tous les processus précédent soit validé si oui le processus est encours
      */
     $taux_validation_processus = FtaProcessusModel::getFtaProcessusNonValidePrecedent($id_fta, $id_fta_processus, $idFtaWorkflow);
     if ($taux_validation_processus == "1" or $taux_validation_processus === NULL) {
         $idFtaProcessusEtat = "2";
     }
 } elseif ($taux != "0" and $taux != "1") {
     $idFtaProcessusEtat = "2";
 } elseif ($taux == "1") {
     $idFtaProcessusEtat = "3";
 }
 $ftaProcessusEtatModel = new FtaProcessusEtatModel($idFtaProcessusEtat);
 //            $idSite = $ftaModel->getDataField(FtaModel::FIELDNAME_SITE_ASSEMBLAGE)->getFieldValue();
 $arrayIdFtaChapitre = DatabaseOperation::convertSqlStatementWithoutKeyToArray('SELECT DISTINCT ' . FtaChapitreModel::FIELDNAME_NOM_USUEL_CHAPITRE . ' FROM ' . FtaWorkflowStructureModel::TABLENAME . ',' . FtaChapitreModel::TABLENAME . ' WHERE ' . FtaWorkflowStructureModel::FIELDNAME_ID_FTA_WORKFLOW . '=' . $idFtaWorkflow . ' AND ' . FtaWorkflowStructureModel::FIELDNAME_ID_FTA_PROCESSUS . '=' . $id_fta_processus . ' AND ' . FtaChapitreModel::TABLENAME . '.' . FtaChapitreModel::KEYNAME . '=' . FtaWorkflowStructureModel::TABLENAME . '.' . FtaWorkflowStructureModel::FIELDNAME_ID_FTA_CHAPITRE);
 $nombreChapitre = count($arrayIdFtaChapitre);
 foreach ($arrayIdFtaChapitre as $rowsIdFtaChapitre) {
     $champChapitre .= $rowsIdFtaChapitre[FtaChapitreModel::FIELDNAME_NOM_USUEL_CHAPITRE] . '<br>';
 }
 //            $geoModel = new GeoModel($idSite);
 //            $nom_site = $geoModel->getDataField(GeoModel::FIELDNAME_GEO)->getFieldValue();
 $nom_fta_processus = $ftaProcessusModel->getDataField(FtaProcessusModel::FIELDNAME_NOM)->getFieldValue();
 $service_fta_processus = $ftaProcessusModel->getDataField(FtaProcessusModel::FIELDNAME_SERVICE)->getFieldValue();
 $couleur_fta_processus_etat = $ftaProcessusEtatModel->getDataField(FtaProcessusEtatModel::FIELDNAME_COULEUR_PROCESSUS_ETAT)->getFieldValue();
 $nom_fta_processus_etat = $ftaProcessusEtatModel->getDataField(FtaProcessusEtatModel::FIELDNAME_NOM_PROCESSUS_ETAT)->getFieldValue();
 //Ecriture du code HTML
 $bloc .= '
    <tr class=contenu >
         <td >
        &nbsp;' . $service_fta_processus . '
 /**
  * On vérifie si la l'element qui va être supprimé est utilisé
  */
 function checkClassificationUsed()
 {
     $array = DatabaseOperation::convertSqlStatementWithoutKeyToArray("SELECT DISTINCT " . FtaModel::FIELDNAME_CODE_ARTICLE_LDC . "," . FtaModel::FIELDNAME_LIBELLE . " FROM " . ClassificationFta2Model::TABLENAME . "," . FtaModel::TABLENAME . " WHERE (" . ClassificationFta2Model::FIELDNAME_ID_PROPRIETAIRE_GROUPE . "=" . $this->getKeyValue() . " OR " . ClassificationFta2Model::FIELDNAME_ID_PROPRIETAIRE_ENSEIGNE . "=" . $this->getKeyValue() . " OR " . ClassificationFta2Model::FIELDNAME_ID_ACTIVITE . "=" . $this->getKeyValue() . " OR " . ClassificationFta2Model::FIELDNAME_ID_MARQUE . "=" . $this->getKeyValue() . " OR " . ClassificationFta2Model::FIELDNAME_ID_RAYON . "=" . $this->getKeyValue() . " OR " . ClassificationFta2Model::FIELDNAME_ID_ENVIRONNEMENT . "=" . $this->getKeyValue() . " OR " . ClassificationFta2Model::FIELDNAME_ID_RESEAU . "=" . $this->getKeyValue() . " OR " . ClassificationFta2Model::FIELDNAME_ID_SAISONNALITE . "=" . $this->getKeyValue() . ")" . " AND " . ClassificationFta2Model::TABLENAME . "." . ClassificationFta2Model::KEYNAME . "=" . FtaModel::TABLENAME . "." . FtaModel::FIELDNAME_ID_FTA_CLASSIFICATION2 . " ORDER BY " . FtaModel::FIELDNAME_CODE_ARTICLE_LDC);
     if ($array) {
         //Liste des modèles concernés
         $liste = "";
         foreach ($array as $rows) {
             $liste .= $rows[FtaModel::FIELDNAME_CODE_ARTICLE_LDC] . " " . $rows[FtaModel::FIELDNAME_LIBELLE] . "<br>";
         }
         //Averissement
         $titre = UserInterfaceMessage::FR_WARNING_CLASSIFICATION_ELEMENT_TITLE;
         $message = UserInterfaceMessage::FR_WARNING_CLASSIFICATION_ELEMENT . $liste;
         Lib::showMessage($titre, $message, $redirection);
     }
 }
Esempio n. 24
0
 protected static function RecupChapitre($paramT_Liste_Processus)
 {
     $page_default = "modification_fiche";
     $first = "";
     /*
      *  Nous récupérons les chapitres obligatoirement présent ce qui implique que les autre chapitres doivent être attribués.
      */
     $reqRecup = 'SELECT ' . FtaChapitreModel::TABLENAME . '.' . FtaChapitreModel::KEYNAME . ', ' . FtaChapitreModel::TABLENAME . '.' . FtaChapitreModel::FIELDNAME_NOM_USUEL_CHAPITRE . ', ' . FtaWorkflowStructureModel::TABLENAME . '.' . FtaWorkflowStructureModel::FIELDNAME_ID_FTA_PROCESSUS . ', ' . FtaWorkflowStructureModel::TABLENAME . '.' . FtaWorkflowStructureModel::FIELDNAME_ID_FTA_ROLE . ' FROM ' . FtaChapitreModel::TABLENAME . ' LEFT JOIN ' . FtaWorkflowStructureModel::TABLENAME . ' ON ' . FtaWorkflowStructureModel::TABLENAME . '.' . FtaWorkflowStructureModel::FIELDNAME_ID_FTA_CHAPITRE . '=' . FtaChapitreModel::TABLENAME . '.' . FtaChapitreModel::KEYNAME . ' WHERE ( ' . FtaWorkflowStructureModel::TABLENAME . '.' . FtaWorkflowStructureModel::FIELDNAME_ID_FTA_ROLE . ' =' . FtaRoleModel::ID_FTA_ROLE_COMMUN;
     foreach ($paramT_Liste_Processus as $value) {
         $reqRecup .= ' OR ' . FtaWorkflowStructureModel::TABLENAME . '.' . FtaWorkflowStructureModel::FIELDNAME_ID_FTA_PROCESSUS . '=\'' . $value . '\'';
     }
     $reqRecup .= ' ) AND ' . FtaWorkflowStructureModel::FIELDNAME_ID_FTA_WORKFLOW . '=' . self::$id_fta_workflow . ' ORDER BY ' . FtaWorkflowStructureModel::TABLENAME . '.' . FtaWorkflowStructureModel::FIELDNAME_ID_FTA_ROLE . ',' . FtaWorkflowStructureModel::TABLENAME . '.' . FtaWorkflowStructureModel::FIELDNAME_ID_FTA_PROCESSUS . ',' . FtaChapitreModel::TABLENAME . '.' . FtaChapitreModel::KEYNAME;
     $arrayRecup = DatabaseOperation::convertSqlStatementWithoutKeyToArray($reqRecup);
     //Balyage des chapitres trouvés
     foreach ($arrayRecup as $rowsRecup) {
         $id_fta_chapitre = $rowsRecup[FtaChapitreModel::KEYNAME];
         $nom_usuel_fta_chapitre = $rowsRecup[FtaChapitreModel::FIELDNAME_NOM_USUEL_CHAPITRE];
         $idFtaProcessus = $rowsRecup[FtaWorkflowStructureModel::FIELDNAME_ID_FTA_PROCESSUS];
         $idFtaRole = $rowsRecup[FtaWorkflowStructureModel::FIELDNAME_ID_FTA_ROLE];
         //Dans le cas où il n'y a pas de chapitre sélectionné, sélection du chapitre identité
         if (!self::$id_fta_chapitre_encours) {
             self::$id_fta_chapitre_encours = $id_fta_chapitre;
         }
         if (self::$id_fta_chapitre_encours == $id_fta_chapitre and !self::$selectionChap) {
             $font_size = "size=" . self::FONT_SIZE_CHAPITRE_ENCOURS;
             $font_flash_color = "color=" . self::FONT_COLOR_CHAPITRE_ENCOURS;
             $font_flash = "<font " . $font_size . " " . $font_flash_color . ">";
             $image_flash1 = $font_flash . '[  ' . "</font>";
             $image_flash2 = $font_flash . '  ]' . "</font>";
             $num = 1;
         } else {
             $font_size = "";
             $image_flash1 = '-  ';
             $image_flash2 = '  -';
         }
         //Ce chapitre est-il public?
         if ($idFtaProcessus == 0) {
             $font_color = "color=" . self::FONT_COLOR_CHAPITRE_PUBLIC;
             $link = TRUE;
             $num = 1;
         } else {
             //Le chapitre est-il validé ?
             $req1 = 'SELECT ' . FtaSuiviProjetModel::KEYNAME . ' FROM ' . FtaSuiviProjetModel::TABLENAME . ' WHERE ' . FtaSuiviProjetModel::FIELDNAME_ID_FTA . '=' . self::$id_fta . ' AND ' . FtaSuiviProjetModel::FIELDNAME_ID_FTA_CHAPITRE . '=' . $id_fta_chapitre . ' AND ' . FtaSuiviProjetModel::FIELDNAME_SIGNATURE_VALIDATION_SUIVI_PROJET . '<> ' . FtaSuiviProjetModel::SIGNATURE_VALIDATION_SUIVI_PROJET_FALSE;
             $result1 = DatabaseOperation::queryPDO($req1);
             $num = DatabaseOperation::getSqlNumRows($result1);
             switch ($num) {
                 case 0:
                     /**
                      * Chapitre pas encore validé
                      *  - Chapitre encours en rouge 
                      *  - Chapitre non accessible  en noir
                      */
                     if (in_array($idFtaProcessus, self::$id_fta_processus)) {
                         $font_color = "color=" . self::FONT_COLOR_CHAPITRE_NON_VALIDEE;
                         $link = TRUE;
                         $i = "";
                         $iEnd = "";
                     } elseif (self::$id_fta_role == $idFtaRole) {
                         $font_color = "color=" . self::FONT_COLOR_CHAPITRE_NON_ACCESSIBLE;
                         $link = FALSE;
                         $i = "";
                         $iEnd = "";
                     } else {
                         $font_color = "color=" . self::FONT_COLOR_CHAPITRE_AUTRE_ROLE;
                         $i = " <i> ";
                         $iEnd = " </i> ";
                         $link = FALSE;
                     }
                     break;
                 case 1:
                     //Chapitre validé
                     $font_color = "color=" . self::FONT_COLOR_CHAPITRE_VALIDEE;
                     $link = TRUE;
                     $i = "";
                     $iEnd = "";
                     break;
                 default:
                     //Anomalie
                     $titre = 'Erreur Grave !';
                     $message = 'La fonction afficher_navigation() vient de trouver des doublons de validation des chapitres dans la table fta_suivi_projet';
                     Lib::showMessage($titre, $message, $redirection);
                     break;
             }
         }
         //Fin du test public
         //}//Fin de la colorisation
         if ($num == 0 and self::$synthese_action === 'attente') {
         } else {
             $b = $i . "<font " . $font_size . " " . $font_color . ">";
             $menu_navigation .= $image_flash1;
             if ($link) {
                 $menu_navigation .= '<a href=' . $page_default . '.php?' . 'id_fta=' . self::$id_fta . '&id_fta_chapitre_encours=' . $id_fta_chapitre . '&synthese_action=' . self::$synthese_action . '&id_fta_etat=' . self::$id_fta_etat . '&abreviation_fta_etat=' . self::$abreviation_etat . '&id_fta_role=' . self::$id_fta_role . '>';
             }
             $menu_navigation .= $b . ' ' . $nom_usuel_fta_chapitre;
             $menu_navigation .= '</a>';
             $menu_navigation .= '</font> ' . $iEnd . $image_flash2;
             /**
              * Mise en forme des chapitres de la barre de navigation regroupé par Rôle
              */
             if ($idFtaRoleTmp == $idFtaRole or !$first) {
                 $roleMenu .= $menu_navigation;
                 $menu_navigation = "";
                 $idFtaRoleTmp = $idFtaRole;
                 $first = "1";
             } else {
                 $color = FtaRoleModel::getColorByRole($idFtaRoleTmp);
                 $border = FtaRoleModel::getBoderByRole($idFtaRoleTmp, self::$id_fta_role_encours);
                 $roleMenuFinal .= "<td style='border-style:solid; border-bottom-width: {$border}; border-color: " . $color . "' >" . $roleMenu . "</td>";
                 $roleMenu = $menu_navigation;
                 $menu_navigation = "";
                 $idFtaRoleTmp = $idFtaRole;
             }
         }
     }
     $color = FtaRoleModel::getColorByRole($idFtaRoleTmp);
     $border = FtaRoleModel::getBoderByRole($idFtaRoleTmp, self::$id_fta_role_encours);
     $roleMenuFinal .= "<td style='border-style:solid; border-bottom-width: {$border}; border-color: " . $color . "' >" . $roleMenu . "</td>";
     return $roleMenuFinal;
 }
 /**
  * Retour la liste des idClassificationRaccourcis pour une classifcation donnée
  * @param int $paramIdClassificationFta2
  * @return array
  */
 public static function getArrayIdClassificationRaccourcisAssociationByIdClassificationFta2($paramIdClassificationFta2)
 {
     $array = DatabaseOperation::convertSqlStatementWithoutKeyToArray("SELECT " . self::KEYNAME . "," . self::FIELDNAME_ID_FTA_CLASSIFICATION2 . "," . self::FIELDNAME_ID_CLASSIFICATION_RACCOURCIS . " FROM " . self::TABLENAME . " WHERE " . self::FIELDNAME_ID_FTA_CLASSIFICATION2 . "=" . $paramIdClassificationFta2);
     return $array;
 }
 /**
  * On récupère le lieu du planninf de présence
  * @param int $paramIdUser
  * @param int $paramIdSemaine
  * @param int $paramIdAnnee
  * @param int $paramIdJours
  * @return string
  */
 public static function getLieuPlanningPresenceDetail($paramIdUser, $paramIdSemaine, $paramIdAnnee, $paramIdJours)
 {
     $array = DatabaseOperation::convertSqlStatementWithoutKeyToArray("SELECT " . self::FIELDNAME_LIEU_1 . " FROM " . self::TABLENAME . " WHERE " . self::FIELDNAME_ID_USER . "=" . $paramIdUser . " AND " . self::FIELDNAME_SEMAINE . "=" . $paramIdSemaine . " AND " . self::FIELDNAME_ANNEE . "=" . $paramIdAnnee . " AND " . self::FIELDNAME_JOURS . "=" . $paramIdJours);
     foreach ($array as $value) {
         $lieuValue = $value[self::FIELDNAME_LIEU_1];
     }
     return $lieuValue;
 }
Esempio n. 27
0
     FtaConditionnementModel::createPalette($idFta);
     //Redirection
     header('Location: modification_fiche.php?id_fta=' . $idFta . '&synthese_action=encours&id_fta_etat=' . $idFtaEtat . '&abreviation_fta_etat=' . $abreviationFtaEtat . '&id_fta_role=' . $idFtaRole);
     /**
      * Version avec le module rewrite
      * suppresion du comeback dans les URL
      */
     //        header('Location: modification_fiche-' . $idFta
     //                . '-encours-1-' . $idFtaEtat
     //                . '-' . $abreviationFtaEtat
     //                . '-' . $idFtaRole . '.html');
     break;
 case 2:
     //Duplication d'une Fiche Technique Article
     if ($id_fta) {
         $arrayFta = DatabaseOperation::convertSqlStatementWithoutKeyToArray('SELECT DISTINCT ' . FtaModel::KEYNAME . ' FROM ' . FtaModel::TABLENAME . ' WHERE ( ' . FtaModel::KEYNAME . ' = ' . $id_fta . ' ) ');
     } else {
         //Averissement
         $titre = "Manque de donnée id_fta";
         $message = "Veuillez saisir un id_fta existant à dupliquer .<br><br>";
         Lib::showMessage($titre, $message, $redirection);
     }
     if ($arrayFta) {
         //Redirection
         header('Location: duplication_fiche.php?' . 'id_fta=' . $id_fta . '&synthese_action=modification&abreviation_etat_destination=' . $abreviationFtaEtat . '&new_designation_commerciale_fta=' . $designationCommercialeFta . '&site_de_production=' . $siteDeProduction . '&id_fta_role=' . $idFtaRole . '&id_fta_workflow=' . $idFtaWorkflow);
     } else {
         //Averissement
         $titre = UserInterfaceMessage::FR_WARNING_DATA_ID_FTA_TITLE;
         $message = UserInterfaceMessage::FR_WARNING_DATA_ID_FTA;
         Lib::showMessage($titre, $message, $redirection);
     }
 /**
  * Non fonctionnelle
  * @param type $table
  * @param type $champ_valeur
  * @param type $champ_id_fils
  * @param type $champ_id_pere
  * @param type $id_racine
  * @param string $sql_where
  * @param type $extension
  * @return type
  */
 public static function getClassificationName($table, $champ_valeur, $champ_id_fils, $champ_id_pere, $id_racine, $sql_where, $extension)
 {
     /*
      Déclaration des variables:
     */
     /*     $table='matiere_premiere_composant';                       //nom de la table contenant l'association 'Père' / 'Fils'
             $champ_valeur='nom_matiere_premiere_composant';            //nom du champ contenant la valeur à afficher (sans le 'underscore' et le nom de la table)
             $champ_id_fils='id_matiere_premiere_composant';            //nom du champ fils contenant l'id (sans le 'underscore' et le nom de la table)
             $champ_id_pere='id_ascendant_matiere_premiere_composant';  //nom du champ père contenant l'id (sans le 'underscore' et le nom de la table)
            */
     $table;
     //nom de la table contenant l'association 'Père' / 'Fils'
     //Peux aussi être une liste de table séparé par une virgule ex: 'table1,table2'
     $champ_valeur;
     //nom du champ contenant la valeur à afficher
     $champ_id_fils;
     //nom du champ fils contenant l'id
     $champ_id_pere;
     //nom du champ père contenant l'id
     $id_racine;
     //Identifiant de l'enregistrement père racine (le premier)
     $id_recherche = $id_racine;
     //Identifiant en cours de recherche
     $id_fils;
     //Identifiant du fils en cours de traitement
     $id_pere;
     //Identifiant du pŠre en cours de traitement
     $tab;
     //Nombre de tabulation permettant un affichage en cascade de l'arborescence
     $tab_init = '    ';
     //Representation de la tabulation
     $sql_where;
     //Permet de personnaliser la clause SQL 'WHERE' comme pour insérer une jointure par exemple
     $return = '';
     //Valeur retourn‚e par la fonction
     //$return[1] --> liste de éléments séparé par une virgule
     //$return[2] --> Réprésentation de l'arborescence au format texte
     $extension = Lib::isDefined('extension');
     //Tableau d'argument optionnelle de la fonction
     //    $extension[0];             //Code HTML qui sera ajouter à la fin de la valeur dans la représentation graphique
     //    $extension[1];             //0 ou 1. Permet de terminer le code HTML créé par $extension[0] avec l'id de l'objet en cours
     //    $extension[2];             //Ordre tri: 0=Valeur, 1=Clefs Fils et 2=Clef Père
     //    $extension[3];             //Liste des id à développer, si NULL, alors tout est développé
     //    $extension[4];             //Lien lorqu'on clic sur un élément de l'arborescence (terminé par l'id)
     $tri;
     //Champ à trier
     /*
      Initialisation des variables
     */
     //$champ_valeur .= '_'.$table;
     //$champ_id_fils.= '_'.$table;
     //$champ_id_pere.= '_'.$table;
     $id_pere = $id_racine;
     $tab_arborescence = '|';
     //Signe Nouvelle Arborescence
     $tab_fils = '---> ';
     //Signe Nouveau Fils
     $tab_espace = '----->';
     //Espace de décalage
     if ($sql_where) {
         $sql_where = 'WHERE ' . $sql_where;
     }
     if (!$extension[2]) {
         $extension[2] = 1;
         //Tri par défaut
     }
     //Configuration du tri de l'arborescence
     switch ($extension[2]) {
         case 0:
             $tri = $champ_valeur;
             break;
         case 1:
             $tri = $champ_id_fils;
             break;
         case 2:
             $tri = $champ_id_pere;
             break;
     }
     $requete_principale = 'SELECT ' . $champ_id_pere . ',' . $champ_id_fils . ',' . $champ_valeur . ' FROM ' . $table . $sql_where . ' ORDER BY ' . $tri . ' ASC ';
     $array = DatabaseOperation::convertSqlStatementWithoutKeyToArray($requete_principale);
     if ($array) {
         $nombre_ligne = count($array);
     } else {
         $nombre_ligne = '0';
     }
     /*
      Corps de la fonction
     */
     //Lancement de la fonction
     //Appel recursif de la fonction
     $i = 1;
     //Affiche le niveau dans lequel on est
     $return = recursif($resultat, $id_recherche, $champ_id_pere, $champ_id_fils, $champ_valeur, $tab_fils, $tab_arborescence, $tab_espace, $return, $nombre_ligne, $extension);
     //var_dump($return);
     return $return;
 }
 /**
  * On récupère le niveau du droits d'accès acces module fta
  * 0 NON
  * 1 Consultation
  * 2 Modification
  * @param int $paramIdUser
  * @return int
  */
 public static function getAccesModuleFtaValue($paramIdUser = NULL)
 {
     if ($paramIdUser) {
         $arrayDroitsAcces = DatabaseOperation::convertSqlStatementWithoutKeyToArray('SELECT ' . self::FIELDNAME_NIVEAU_INTRANET_DROITS_ACCES . ' FROM ' . self::TABLENAME . ',' . IntranetActionsModel::TABLENAME . ' WHERE ' . self::FIELDNAME_ID_INTRANET_MODULES . '=' . IntranetModulesModel::ID_MODULES_FTA . ' AND ' . self::TABLENAME . '.' . self::FIELDNAME_ID_INTRANET_ACTIONS . ' = ' . IntranetActionsModel::TABLENAME . '.' . IntranetActionsModel::KEYNAME . ' AND ' . self::TABLENAME . '.' . self::FIELDNAME_ID_INTRANET_MODULES . ' = ' . IntranetActionsModel::TABLENAME . '.' . IntranetActionsModel::FIELDNAME_MODULE_INTRANET_ACTIONS . ' AND ' . self::FIELDNAME_ID_USER . '=' . $paramIdUser . ' AND ' . IntranetActionsModel::FIELDNAME_TAG_INTRANET_ACTIONS . '=\'' . IntranetActionsModel::VALUE_FTA . '\'');
         if ($arrayDroitsAcces) {
             foreach ($arrayDroitsAcces as $rowsDroitsAcces) {
                 $value = $rowsDroitsAcces[self::FIELDNAME_NIVEAU_INTRANET_DROITS_ACCES];
             }
         } else {
             $value = IntranetNiveauAccesModel::ACCES_MODULE_FTA_NON_VALUE;
         }
     } else {
         $value = IntranetNiveauAccesModel::ACCES_MODULE_FTA_NON_VALUE;
     }
     return $value;
 }
$nbMaxParPage = "200";
/**
 *  Calcul des enregistrements à afficher
 */
$debut = ($numeroDePageCourante - '1') * $nbMaxParPage;
$pagination = AccueilFta::paginerClassification($nbMaxParPage, $numeroDePageCourante, '4', '4', '1', '1', $nbDeResulta);
/**
 * On récupère le tableau limité des dossier Fta n'ayant pas de classification
 */
$arrayDossier = DatabaseOperation::convertSqlStatementWithoutKeyToArray("SELECT DISTINCT " . FtaModel::FIELDNAME_DOSSIER_FTA . " FROM " . FtaModel::TABLENAME . " , " . FtaActionSiteModel::TABLENAME . " , " . FtaWorkflowModel::TABLENAME . " , " . IntranetDroitsAccesModel::TABLENAME . " , " . IntranetActionsModel::TABLENAME . " , " . ClassificationFta2Model::TABLENAME . " WHERE " . FtaModel::TABLENAME . "." . FtaModel::FIELDNAME_WORKFLOW . " = " . FtaWorkflowModel::TABLENAME . "." . FtaWorkflowModel::KEYNAME . " AND " . FtaModel::TABLENAME . "." . FtaModel::FIELDNAME_ID_FTA_CLASSIFICATION2 . "=" . ClassificationFta2Model::TABLENAME . "." . ClassificationFta2Model::KEYNAME . " AND " . FtaWorkflowModel::TABLENAME . "." . FtaWorkflowModel::FIELDNAME_ID_INTRANET_ACTIONS . "=" . IntranetActionsModel::TABLENAME . "." . IntranetActionsModel::FIELDNAME_PARENT_INTRANET_ACTIONS . " AND " . IntranetDroitsAccesModel::TABLENAME . "." . IntranetDroitsAccesModel::FIELDNAME_ID_INTRANET_ACTIONS . "=" . IntranetActionsModel::TABLENAME . "." . IntranetActionsModel::KEYNAME . " AND " . FtaActionSiteModel::TABLENAME . "." . FtaActionSiteModel::FIELDNAME_ID_INTRANET_ACTIONS . " IN (" . IntranetActionsModel::TABLENAME . "." . IntranetActionsModel::KEYNAME . ")" . ' AND ( 0 ' . IntranetActionsModel::addIdIntranetAction($_SESSION[Acl::ACL_INTRANET_ACTIONS_VALIDE]) . ")" . " AND " . IntranetDroitsAccesModel::FIELDNAME_NIVEAU_INTRANET_DROITS_ACCES . "=" . IntranetNiveauAccesModel::NIVEAU_GENERIC_TRUE . " AND " . IntranetDroitsAccesModel::FIELDNAME_ID_USER . "=" . $idUser . " GROUP BY " . FtaModel::FIELDNAME_DOSSIER_FTA . " ORDER BY " . FtaWorkflowModel::TABLENAME . "." . FtaWorkflowModel::KEYNAME . "," . ClassificationFta2Model::TABLENAME . "." . ClassificationFta2Model::KEYNAME . "," . FtaModel::FIELDNAME_ID_FTA_ETAT . "," . FtaModel::FIELDNAME_CODE_ARTICLE_LDC . "," . FtaModel::FIELDNAME_DESIGNATION_COMMERCIALE . " LIMIT " . $nbMaxParPage . " OFFSET " . $debut);
/**
 * on récupère la dernière version
 */
foreach ($arrayDossier as $rowsDossier) {
    $idDossierFta = $rowsDossier[FtaModel::FIELDNAME_DOSSIER_FTA];
    $arrayContenu = DatabaseOperation::convertSqlStatementWithoutKeyToArray("SELECT " . FtaWorkflowModel::FIELDNAME_DESCRIPTION_FTA_WORKFLOW . "," . FtaModel::FIELDNAME_DOSSIER_FTA . "," . FtaModel::TABLENAME . "." . FtaModel::FIELDNAME_ID_FTA_CLASSIFICATION2 . "," . FtaModel::FIELDNAME_CODE_ARTICLE_LDC . "," . FtaModel::FIELDNAME_DESIGNATION_COMMERCIALE . " FROM " . FtaModel::TABLENAME . " , " . FtaActionSiteModel::TABLENAME . " , " . FtaWorkflowModel::TABLENAME . " , " . IntranetDroitsAccesModel::TABLENAME . " , " . IntranetActionsModel::TABLENAME . " , " . ClassificationFta2Model::TABLENAME . " WHERE " . FtaModel::FIELDNAME_DOSSIER_FTA . "=" . $idDossierFta . " AND " . FtaModel::TABLENAME . "." . FtaModel::FIELDNAME_WORKFLOW . " = " . FtaWorkflowModel::TABLENAME . "." . FtaWorkflowModel::KEYNAME . " AND " . FtaModel::TABLENAME . "." . FtaModel::FIELDNAME_ID_FTA_CLASSIFICATION2 . "=" . ClassificationFta2Model::TABLENAME . "." . ClassificationFta2Model::KEYNAME . " AND " . FtaWorkflowModel::TABLENAME . "." . FtaWorkflowModel::FIELDNAME_ID_INTRANET_ACTIONS . "=" . IntranetActionsModel::TABLENAME . "." . IntranetActionsModel::FIELDNAME_PARENT_INTRANET_ACTIONS . " AND " . IntranetDroitsAccesModel::TABLENAME . "." . IntranetDroitsAccesModel::FIELDNAME_ID_INTRANET_ACTIONS . "=" . IntranetActionsModel::TABLENAME . "." . IntranetActionsModel::KEYNAME . " AND " . FtaActionSiteModel::TABLENAME . "." . FtaActionSiteModel::FIELDNAME_ID_INTRANET_ACTIONS . " IN (" . IntranetActionsModel::TABLENAME . "." . IntranetActionsModel::KEYNAME . ")" . ' AND ( 0 ' . IntranetActionsModel::addIdIntranetAction($_SESSION[Acl::ACL_INTRANET_ACTIONS_VALIDE]) . ")" . " AND " . IntranetDroitsAccesModel::FIELDNAME_NIVEAU_INTRANET_DROITS_ACCES . "=" . IntranetNiveauAccesModel::NIVEAU_GENERIC_TRUE . " AND " . IntranetDroitsAccesModel::FIELDNAME_ID_USER . "=" . $idUser);
    if ($arrayContenu) {
        foreach ($arrayContenu as $rowsContenu) {
            $descriptionFtaWorkflow = $rowsContenu[FtaWorkflowModel::FIELDNAME_DESCRIPTION_FTA_WORKFLOW];
            $idDossier = $rowsContenu[FtaModel::FIELDNAME_DOSSIER_FTA];
            $codeArticleLdc = $rowsContenu[FtaModel::FIELDNAME_CODE_ARTICLE_LDC];
            $designationCommercialeFta = $rowsContenu[FtaModel::FIELDNAME_DESIGNATION_COMMERCIALE];
            $idClassificationFta2 = $rowsContenu[ClassificationFta2Model::KEYNAME];
            $classificationGroupe = ClassificationArborescenceArticleCategorieContenuModel::getElementClassificationFta($idClassificationFta2, ClassificationFta2Model::FIELDNAME_ID_PROPRIETAIRE_GROUPE);
            $classificationEnseigne = ClassificationArborescenceArticleCategorieContenuModel::getElementClassificationFta($idClassificationFta2, ClassificationFta2Model::FIELDNAME_ID_PROPRIETAIRE_ENSEIGNE);
            $classificationMarque = ClassificationArborescenceArticleCategorieContenuModel::getElementClassificationFta($idClassificationFta2, ClassificationFta2Model::FIELDNAME_ID_MARQUE);
            $classificationActivite = ClassificationArborescenceArticleCategorieContenuModel::getElementClassificationFta($idClassificationFta2, ClassificationFta2Model::FIELDNAME_ID_ACTIVITE);
            $classificationRayon = ClassificationArborescenceArticleCategorieContenuModel::getElementClassificationFta($idClassificationFta2, ClassificationFta2Model::FIELDNAME_ID_RAYON);
            $classificationEnvironnement = ClassificationArborescenceArticleCategorieContenuModel::getElementClassificationFta($idClassificationFta2, ClassificationFta2Model::FIELDNAME_ID_ENVIRONNEMENT);
            $classificationReseau = ClassificationArborescenceArticleCategorieContenuModel::getElementClassificationFta($idClassificationFta2, ClassificationFta2Model::FIELDNAME_ID_RESEAU);
            $classificationSaisonalite = ClassificationArborescenceArticleCategorieContenuModel::getElementClassificationFta($idClassificationFta2, ClassificationFta2Model::FIELDNAME_ID_SAISONNALITE);