/** * Affiche le tableau de récapitulatif des droits d'accès sur le module Fta * @return string */ public static function getHtmlArrayAccesRightUser() { /** * Entête du tableau */ $bloc .= "<" . "table " . "border=1 " . "width=100% " . "class=contenu " . ">" . "<th>" . "Utilisateurs" . "</th><th>" . "Accès général" . "</th><th>" . "Diffusion" . "</th><th>" . "Impression" . "</th><th>" . "Espace de travail <br>(Mettre la souris sur un espace de travail pour voir le détail) " . "</th>"; //lister les utilisateurs concernés $arrayUser = self::getArrayUserWithAccesRightsToFta(); foreach ($arrayUser as $rowsUser) { $lienWorkflow = ""; $listeRole = ""; $virgule = ""; $virgule2 = ""; //Tableau des id intranet actions Fta $arrayAction = self::getArrayIdIntranetActionWithAccesRightsToFtaByUser($rowsUser[UserModel::KEYNAME]); $bloc .= "<tr class=contenu><td>" . $rowsUser[UserModel::FIELDNAME_PRENOM] . " " . $rowsUser[UserModel::FIELDNAME_NOM] . "</td>"; /** * Vérification des droits d'accès généraux */ $checkModification = FtaController::isValueInArray(IntranetNiveauAccesModel::NIVEAU_FTA_MODIFICATION, $arrayAction); $checkConsultation = FtaController::isValueInArray(IntranetNiveauAccesModel::NIVEAU_FTA_CONSULTATION, $arrayAction); $checkDiffusion = FtaController::isValueInArray(IntranetNiveauAccesModel::NIVEAU_FTA_DIFFUSION, $arrayAction); $checkImpression = FtaController::isValueInArray(IntranetNiveauAccesModel::NIVEAU_FTA_IMPRESSION, $arrayAction); /** * Si accès Fta Modif */ if ($checkModification) { $accesGeneralValue = "Modification"; $diffusion = "Voir espaces de Travail"; /** * Identification des Id intranet action workflow */ $arrayIdIntranetParents = DatabaseOperation::convertSqlStatementWithoutKeyToArrayComplete(" SELECT " . IntranetActionsModel::KEYNAME . " FROM " . IntranetActionsModel::TABLENAME . " WHERE " . IntranetActionsModel::FIELDNAME_TAG_INTRANET_ACTIONS . "='" . IntranetActionsModel::VALUE_WORKFLOW . "' "); $arrayIdActionWorkflow = array_intersect($arrayIdIntranetParents, $arrayAction); if ($arrayIdActionWorkflow) { foreach ($arrayIdActionWorkflow as $rowsIdActionWorkflow) { $listeRole = ""; $virgule2 = ""; /** * Identification du workflow */ $arrayIdIntranetParents = DatabaseOperation::convertSqlStatementWithoutKeyToArrayComplete(" SELECT " . FtaWorkflowModel::FIELDNAME_DESCRIPTION_FTA_WORKFLOW . " FROM " . FtaWorkflowModel::TABLENAME . " WHERE " . FtaWorkflowModel::FIELDNAME_ID_INTRANET_ACTIONS . "=" . $rowsIdActionWorkflow); /** * Identification des Id intranet action role du workflow */ $arrayIdIntranetRole = DatabaseOperation::convertSqlStatementWithoutKeyToArrayComplete(" SELECT " . IntranetActionsModel::KEYNAME . " FROM " . IntranetActionsModel::TABLENAME . " WHERE " . IntranetActionsModel::FIELDNAME_TAG_INTRANET_ACTIONS . "='" . IntranetActionsModel::VALUE_ROLE . "' " . " AND " . IntranetActionsModel::FIELDNAME_PARENT_INTRANET_ACTIONS . "=" . $rowsIdActionWorkflow); $arrayIdActionRole = array_intersect($arrayIdIntranetRole, $arrayAction); if ($arrayIdActionRole) { foreach ($arrayIdActionRole as $rowsIdActionRole) { /** * Liste des rôles attribué pour le workflow */ $arrayRole = DatabaseOperation::convertSqlStatementWithoutKeyToArrayComplete(" SELECT " . FtaRoleModel::FIELDNAME_DESCRIPTION_FTA_ROLE . " FROM " . FtaRoleModel::TABLENAME . "," . FtaActionRoleModel::TABLENAME . " WHERE " . FtaActionRoleModel::FIELDNAME_ID_INTRANET_ACTIONS . "=" . $rowsIdActionRole . " AND " . FtaRoleModel::TABLENAME . "." . FtaRoleModel::KEYNAME . "=" . FtaActionRoleModel::TABLENAME . "." . FtaActionRoleModel::FIELDNAME_ID_FTA_ROLE); $listeRole .= $virgule2 . $arrayRole["0"]; $virgule2 = ", "; } } $lienWorkflow .= $virgule . "<span title=\" " . $listeRole . " \" >" . $arrayIdIntranetParents["0"] . "</span>"; $virgule = ", "; } } /** * Si accès Fta Consultation */ } elseif ($checkConsultation) { $accesGeneralValue = "Consultation"; /** * Droits de difussion */ if ($checkDiffusion) { $geoModel = new GeoModel($rowsUser[UserModel::FIELDNAME_LIEU_GEO]); $diffusion = $geoModel->getDataField(GeoModel::FIELDNAME_GEO)->getFieldValue(); } else { $diffusion = "Non"; } /** * Droits de difussion */ } else { $accesGeneralValue = "Non"; if ($checkDiffusion) { $geoModel = new GeoModel($rowsUser[UserModel::FIELDNAME_LIEU_GEO]); $diffusion = $geoModel->getDataField(GeoModel::FIELDNAME_GEO)->getFieldValue(); } else { $diffusion = "Non"; } } /** * Droits d'impression */ if ($checkImpression) { $impression = "Oui"; } else { $impression = "Non"; } $bloc .= "<td>" . $accesGeneralValue . "</td>" . "<td>" . $diffusion . "</td>" . "<td>" . $impression . "</td>" . "<td>" . $lienWorkflow . "</td></tr>"; } return $bloc; }
/** * * FIXME: IdCity is written both to the members and the address table! * This is just imitating the strategy of bw/signup.php! * JY Comment : wont fix, this redudancy is on purpose (this is so useful ...) * * This has NOT been executed: * ALTER TABLE members * MODIFY COLUMN `id` int( 11 ) NOT NULL COMMENT 'IdMember' * As a result, we do NOT use * '.$this->dao->nextId('members').', * */ public function registerBWMember($vars) { // ******************************************************************** // members // ******************************************************************** $query = ' INSERT INTO `members` ( `Username`, `IdCity`, `Gender`, `HideGender`, `created`, `BirthDate`, `HideBirthDate`, `Accomodation` ) VALUES ( \'' . $vars['username'] . '\', ' . $vars['geonameid'] . ', \'' . $vars['gender'] . '\', \'' . $vars['genderhidden'] . '\', now(), \'' . $vars['iso_date'] . '\', \'' . $vars['agehidden'] . '\', \'' . $vars['accommodation'] . '\' )'; $members = $this->dao->query($query); $memberID = $members->insertId(); $memberEntity = new Member($memberID); $vars['password'] = $memberEntity->preparePassword($vars['password']); $motherTongue = $this->createEntity('Language', $vars['mothertongue']); $memberLanguageEntity = $this->createEntity('MemberLanguage'); $memberLanguageEntity->setSpokenLanguage($memberEntity, $motherTongue, 'MotherLanguage'); // Check if selected MotherTongue is in the list of translated languages and set it as preferred language $model = new FlaglistModel(); $languages = $model->getLanguages(); $languageFilter = function ($lang) { return function ($v) use($lang) { return $v->id == $lang; }; }; $filteredLanguages = array_filter($languages, $languageFilter($motherTongue->id)); if (!empty($filteredLanguages)) { $update = "\r\n INSERT INTO\r\n memberspreferences\r\n SET\r\n IdMember = " . $memberEntity->id . ",\r\n IdPreference = 1,\r\n Value = " . $motherTongue->id; $this->dao->query($update); } $memberEntity->update(); $memberEntity->setPassword($vars['password']); // ******************************************************************** // e-mail, names/members // ******************************************************************** $cryptedfieldsEmail = MOD_crypt::insertCrypted($vars['email'], "members.Email", $memberID, $memberID, "always"); $cryptedfieldsFirstname = MOD_crypt::insertCrypted($this->dao->escape(strip_tags($vars['firstname'])), "members.FirstName", $memberID, $memberID); $cryptedfieldsSecondname = MOD_crypt::insertCrypted($this->dao->escape(strip_tags($vars['secondname'])), "members.SecondName", $memberID, $memberID); $cryptedfieldsLastname = MOD_crypt::insertCrypted($this->dao->escape(strip_tags($vars['lastname'])), "members.LastName", $memberID, $memberID); $query = ' UPDATE `members` SET `Email`=' . $cryptedfieldsEmail . ', `FirstName`=' . $cryptedfieldsFirstname . ', `SecondName`=' . $cryptedfieldsSecondname . ', `LastName`=' . $cryptedfieldsLastname . ' WHERE `id` = ' . $memberID; $this->dao->query($query); // ******************************************************************** // address/addresses // ******************************************************************** $query = ' INSERT INTO addresses ( `IdMember`, `IdCity`, `HouseNumber`, `StreetName`, `Zip`, `created`, `Explanation` ) VALUES ( ' . $memberID . ', ' . $vars['geonameid'] . ', 0, 0, 0, now(), 0)'; $s = $this->dao->query($query); if (!$s->insertId()) { $vars['errors'] = array('inserror'); return false; } // ******************************************************************** // location (where Philipp would put it) // ******************************************************************** $geomodel = new GeoModel(); if (!$geomodel->addGeonameId($vars['geonameid'], 'member_primary')) { $vars['errors'] = array('geoinserterror'); return false; } // Only for bugtesting and backwards compatibility the geo-views in our DB $CityName = "not found in cities view"; $geonameId = intval($vars['geonameid']); $sqry = "\r\n SELECT\r\n name\r\n FROM\r\n geonames_cache\r\n WHERE\r\n geonameId = {$geonameId}\r\n "; $qry = $this->dao->query($sqry); if ($qry) { $rr = $qry->fetch(PDB::FETCH_OBJ); if (isset($rr->name)) { $CityName = $rr->name; } else { MOD_log::get()->write("Signup bug [" . $sqry . "]" . " (With New Signup !)", "Signup"); } } MOD_log::get()->writeIdMember($memberID, "member <b>" . $vars['username'] . "</b> is signuping with success in city [" . $CityName . "] using language (" . $_SESSION["lang"] . " IdMember=#" . $memberID . " (With New Signup !)", "Signup"); return $memberID; }
/** * Liste des id Fta selon l'état d'avancement en exécution * @param type $paramSyntheseAction * @param type $paramRole * @param type $paramIdUser * @param type $paramIdFtaEtat * @param type $paramFtaModification * @return type */ public static function getIdFtaByEtatAvancement($paramSyntheseAction, $paramRole, $paramIdUser, $paramIdFtaEtat, $paramFtaModification, $paramLieuGeo) { $idFtaEffectue = array(); // $compteur = "0"; if ($_SESSION['CheckIdFtaRole'] != $paramRole or $_SESSION[UserModel::KEYNAME] != $paramIdUser) { Acl::setRightsAcces($paramIdUser, $paramRole); } switch ($paramSyntheseAction) { case FtaEtatModel::ETAT_AVANCEMENT_VALUE_ATTENTE: /* * On obtient les fta à vérifié dont tous les chapitres ne sont pas validés */ $arrayTmp = DatabaseOperation::convertSqlStatementWithoutKeyToArray('SELECT DISTINCT ' . FtaModel::TABLENAME . '.' . FtaModel::KEYNAME . ',' . FtaWorkflowStructureModel::TABLENAME . '.' . FtaWorkflowStructureModel::FIELDNAME_ID_FTA_PROCESSUS . ',' . FtaModel::TABLENAME . '.' . FtaModel::FIELDNAME_WORKFLOW . ' FROM ' . FtaWorkflowModel::TABLENAME . ', ' . FtaWorkflowStructureModel::TABLENAME . ', ' . FtaSuiviProjetModel::TABLENAME . ' , ' . FtaActionSiteModel::TABLENAME . ' , ' . FtaModel::TABLENAME . ' , ' . IntranetDroitsAccesModel::TABLENAME . ' , ' . IntranetActionsModel::TABLENAME . ' WHERE ' . FtaWorkflowStructureModel::TABLENAME . '.' . FtaWorkflowStructureModel::FIELDNAME_ID_FTA_PROCESSUS . ' IS NOT NULL' . ' AND ' . FtaWorkflowModel::TABLENAME . '.' . FtaWorkflowModel::KEYNAME . '=' . FtaWorkflowStructureModel::TABLENAME . '.' . FtaWorkflowStructureModel::FIELDNAME_ID_FTA_WORKFLOW . ' AND ' . FtaModel::TABLENAME . '.' . FtaModel::FIELDNAME_WORKFLOW . '=' . FtaWorkflowStructureModel::TABLENAME . '.' . FtaWorkflowStructureModel::FIELDNAME_ID_FTA_WORKFLOW . ' AND ' . FtaSuiviProjetModel::TABLENAME . '.' . FtaSuiviProjetModel::FIELDNAME_ID_FTA_CHAPITRE . '=' . FtaWorkflowStructureModel::TABLENAME . '.' . FtaWorkflowStructureModel::FIELDNAME_ID_FTA_CHAPITRE . ' AND ' . FtaActionSiteModel::TABLENAME . '.' . FtaActionSiteModel::FIELDNAME_ID_SITE . '=' . FtaModel::TABLENAME . '.' . FtaModel::FIELDNAME_SITE_PRODUCTION . ' AND ' . FtaSuiviProjetModel::TABLENAME . '.' . FtaSuiviProjetModel::FIELDNAME_ID_FTA . '=' . FtaModel::TABLENAME . '.' . FtaModel::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 ' . FtaSuiviProjetModel::FIELDNAME_SIGNATURE_VALIDATION_SUIVI_PROJET . '=' . FtaSuiviProjetModel::SIGNATURE_VALIDATION_SUIVI_PROJET_FALSE . ' AND ' . IntranetDroitsAccesModel::FIELDNAME_NIVEAU_INTRANET_DROITS_ACCES . '=' . IntranetNiveauAccesModel::NIVEAU_GENERIC_TRUE . ' AND ' . IntranetDroitsAccesModel::FIELDNAME_ID_USER . '=' . $paramIdUser . ' AND ' . FtaModel::FIELDNAME_ID_FTA_ETAT . '=' . $paramIdFtaEtat . ' AND ' . FtaWorkflowStructureModel::TABLENAME . '.' . FtaWorkflowStructureModel::FIELDNAME_ID_FTA_ROLE . '=' . $paramRole . ' AND ( 0 ' . IntranetActionsModel::addIdIntranetAction($_SESSION[Acl::ACL_INTRANET_ACTIONS_VALIDE]) . ')'); if (FtaRoleModel::isGestionnaire($paramRole)) { $arrayTmp = NULL; } if ($arrayTmp) { foreach ($arrayTmp as $rows) { $cheackIdFta = in_array($rows[FtaModel::KEYNAME], $idFtaEffectue); if (!$cheackIdFta) { $tauxDeValidadation = FtaProcessusModel::getValideProcessusEncours($rows[FtaModel::KEYNAME], $rows[FtaWorkflowStructureModel::FIELDNAME_ID_FTA_PROCESSUS], $rows[FtaWorkflowStructureModel::FIELDNAME_ID_FTA_WORKFLOW]); if ($tauxDeValidadation != '1') { $idFtaEffectue[] = $rows[FtaModel::KEYNAME]; // $compteur++; // if ($compteur == ModuleConfig::VALUE_MAX_PAR_PAGE) { // break; // } } } } } $array = DatabaseOperation::convertSqlStatementWithoutKeyToArray('SELECT DISTINCT ' . FtaModel::KEYNAME . ' FROM ' . FtaModel::TABLENAME . ' WHERE ( ' . '0' . ' ' . FtaModel::addIdFta($idFtaEffectue) . ')'); break; case FtaEtatModel::ETAT_AVANCEMENT_VALUE_EN_COURS: //Récupération des suivis de projet gérés par l'utilisateur et non validé /* * On obtient les fta à vérifié dont tous les chapitres ne sont pas validés */ $arrayTmp = DatabaseOperation::convertSqlStatementWithoutKeyToArray('SELECT DISTINCT ' . FtaModel::TABLENAME . '.' . FtaModel::KEYNAME . ',' . FtaWorkflowStructureModel::FIELDNAME_ID_FTA_PROCESSUS . ',' . FtaModel::TABLENAME . '.' . FtaModel::FIELDNAME_WORKFLOW . ' FROM ' . FtaWorkflowModel::TABLENAME . ', ' . FtaWorkflowStructureModel::TABLENAME . ', ' . FtaSuiviProjetModel::TABLENAME . ' , ' . FtaActionSiteModel::TABLENAME . ' , ' . FtaModel::TABLENAME . ' , ' . IntranetDroitsAccesModel::TABLENAME . ' , ' . IntranetActionsModel::TABLENAME . ' WHERE ' . FtaWorkflowStructureModel::TABLENAME . '.' . FtaWorkflowStructureModel::FIELDNAME_ID_FTA_PROCESSUS . ' IS NOT NULL' . ' AND ' . FtaWorkflowModel::TABLENAME . '.' . FtaWorkflowModel::KEYNAME . '=' . FtaWorkflowStructureModel::TABLENAME . '.' . FtaWorkflowStructureModel::FIELDNAME_ID_FTA_WORKFLOW . ' AND ' . FtaActionSiteModel::TABLENAME . '.' . FtaActionSiteModel::FIELDNAME_ID_FTA_WORKFLOW . '=' . FtaWorkflowStructureModel::TABLENAME . '.' . FtaWorkflowStructureModel::FIELDNAME_ID_FTA_WORKFLOW . ' AND ' . FtaModel::TABLENAME . '.' . FtaModel::FIELDNAME_WORKFLOW . '=' . FtaWorkflowStructureModel::TABLENAME . '.' . FtaWorkflowStructureModel::FIELDNAME_ID_FTA_WORKFLOW . ' AND ' . FtaSuiviProjetModel::TABLENAME . '.' . FtaSuiviProjetModel::FIELDNAME_ID_FTA_CHAPITRE . '=' . FtaWorkflowStructureModel::TABLENAME . '.' . FtaWorkflowStructureModel::FIELDNAME_ID_FTA_CHAPITRE . ' AND ' . FtaActionSiteModel::TABLENAME . '.' . FtaActionSiteModel::FIELDNAME_ID_SITE . '=' . FtaModel::TABLENAME . '.' . FtaModel::FIELDNAME_SITE_PRODUCTION . ' AND ' . FtaSuiviProjetModel::TABLENAME . '.' . FtaSuiviProjetModel::FIELDNAME_ID_FTA . '=' . FtaModel::TABLENAME . '.' . FtaModel::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 ' . FtaSuiviProjetModel::FIELDNAME_SIGNATURE_VALIDATION_SUIVI_PROJET . '=' . FtaSuiviProjetModel::SIGNATURE_VALIDATION_SUIVI_PROJET_FALSE . ' AND ' . IntranetDroitsAccesModel::FIELDNAME_NIVEAU_INTRANET_DROITS_ACCES . '=' . IntranetNiveauAccesModel::NIVEAU_GENERIC_TRUE . ' AND ' . IntranetDroitsAccesModel::FIELDNAME_ID_USER . '=' . $paramIdUser . ' AND ' . FtaModel::FIELDNAME_ID_FTA_ETAT . '=' . $paramIdFtaEtat . ' AND ' . FtaWorkflowStructureModel::TABLENAME . '.' . FtaWorkflowStructureModel::FIELDNAME_ID_FTA_ROLE . '=' . $paramRole . ' AND ( 0 ' . IntranetActionsModel::addIdIntranetAction($_SESSION[Acl::ACL_INTRANET_ACTIONS_VALIDE]) . ')'); if ($arrayTmp) { foreach ($arrayTmp as $rows) { $cheackIdFta = in_array($rows[FtaModel::KEYNAME], $idFtaEffectue); if (!$cheackIdFta) { $tauxDeValidadation = FtaProcessusModel::getFtaProcessusNonValidePrecedent($rows[FtaModel::KEYNAME], $rows[FtaProcessusModel::KEYNAME], $rows[FtaWorkflowStructureModel::FIELDNAME_ID_FTA_WORKFLOW]); /** * En cas d'oublier des chef de projet qui aurait créé une fta sans validé les informations de base */ if (FtaRoleModel::isGestionnaire($paramRole)) { $chefProjet = $tauxDeValidadation == '0'; if ($tauxDeValidadation != '0' or $chefProjet == TRUE) { $idFtaEffectue[] = $rows[FtaModel::KEYNAME]; // $compteur++; // if ($compteur == ModuleConfig::VALUE_MAX_PAR_PAGE) { // break; // } } } elseif ($tauxDeValidadation == '1') { $idFtaEffectue[] = $rows[FtaModel::KEYNAME]; // $compteur++; // if ($compteur == ModuleConfig::VALUE_MAX_PAR_PAGE) { // break; // } } } } } $array = DatabaseOperation::convertSqlStatementWithoutKeyToArray('SELECT ' . FtaModel::KEYNAME . ' FROM ' . FtaModel::TABLENAME . ' WHERE ( ' . '0' . ' ' . FtaModel::addIdFta($idFtaEffectue) . ')'); break; case FtaEtatModel::ETAT_AVANCEMENT_VALUE_EFFECTUES: //Récupération de la liste fta pour le role concernés /* * On obtient les fta à vérifié dont tous les chapitres sont validés */ $arrayTmp = DatabaseOperation::convertSqlStatementWithoutKeyToArray('SELECT DISTINCT ' . FtaModel::TABLENAME . '.' . FtaModel::KEYNAME . ',' . FtaWorkflowStructureModel::FIELDNAME_ID_FTA_PROCESSUS . ',' . FtaModel::TABLENAME . '.' . FtaModel::FIELDNAME_WORKFLOW . ' FROM ' . FtaWorkflowModel::TABLENAME . ', ' . FtaWorkflowStructureModel::TABLENAME . ', ' . FtaSuiviProjetModel::TABLENAME . ' , ' . FtaActionSiteModel::TABLENAME . ' , ' . FtaModel::TABLENAME . ' , ' . IntranetDroitsAccesModel::TABLENAME . ' , ' . IntranetActionsModel::TABLENAME . ' WHERE ' . FtaWorkflowStructureModel::TABLENAME . '.' . FtaWorkflowStructureModel::FIELDNAME_ID_FTA_PROCESSUS . ' IS NOT NULL' . ' AND ' . FtaWorkflowModel::TABLENAME . '.' . FtaWorkflowModel::KEYNAME . '=' . FtaWorkflowStructureModel::TABLENAME . '.' . FtaWorkflowStructureModel::FIELDNAME_ID_FTA_WORKFLOW . ' AND ' . FtaModel::TABLENAME . '.' . FtaModel::FIELDNAME_WORKFLOW . '=' . FtaWorkflowStructureModel::TABLENAME . '.' . FtaWorkflowStructureModel::FIELDNAME_ID_FTA_WORKFLOW . ' AND ' . FtaSuiviProjetModel::TABLENAME . '.' . FtaSuiviProjetModel::FIELDNAME_ID_FTA_CHAPITRE . '=' . FtaWorkflowStructureModel::TABLENAME . '.' . FtaWorkflowStructureModel::FIELDNAME_ID_FTA_CHAPITRE . ' AND ' . FtaActionSiteModel::TABLENAME . '.' . FtaActionSiteModel::FIELDNAME_ID_SITE . '=' . FtaModel::TABLENAME . '.' . FtaModel::FIELDNAME_SITE_PRODUCTION . ' AND ' . FtaSuiviProjetModel::TABLENAME . '.' . FtaSuiviProjetModel::FIELDNAME_ID_FTA . '=' . FtaModel::TABLENAME . '.' . FtaModel::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 ' . FtaSuiviProjetModel::FIELDNAME_SIGNATURE_VALIDATION_SUIVI_PROJET . '<>' . FtaSuiviProjetModel::SIGNATURE_VALIDATION_SUIVI_PROJET_FALSE . ' AND ' . IntranetDroitsAccesModel::FIELDNAME_NIVEAU_INTRANET_DROITS_ACCES . '=' . IntranetNiveauAccesModel::NIVEAU_GENERIC_TRUE . ' AND ' . IntranetDroitsAccesModel::FIELDNAME_ID_USER . '=' . $paramIdUser . ' AND ' . FtaModel::FIELDNAME_ID_FTA_ETAT . '=' . $paramIdFtaEtat . ' AND ' . FtaWorkflowStructureModel::TABLENAME . '.' . FtaWorkflowStructureModel::FIELDNAME_ID_FTA_ROLE . '=' . $paramRole . ' AND ( 0 ' . IntranetActionsModel::addIdIntranetAction($_SESSION[Acl::ACL_INTRANET_ACTIONS_VALIDE]) . ')'); if ($arrayTmp) { foreach ($arrayTmp as $rows) { $cheackIdFta = in_array($rows[FtaModel::KEYNAME], $idFtaEffectue); if (!$cheackIdFta) { $tauxDeValidadation = FtaProcessusModel::getValideIdFtaByRoleWorkflowProcessus($rows[FtaModel::KEYNAME], $paramRole, $rows[FtaWorkflowStructureModel::FIELDNAME_ID_FTA_WORKFLOW]); if ($tauxDeValidadation == '1') { $idFtaEffectue[] = $rows[FtaModel::KEYNAME]; // $compteur++; // if ($compteur == ModuleConfig::VALUE_MAX_PAR_PAGE) { // break; // } } } } } $array = DatabaseOperation::convertSqlStatementWithoutKeyToArray('SELECT DISTINCT ' . FtaModel::KEYNAME . ' FROM ' . FtaModel::TABLENAME . ' WHERE ( ' . '0' . ' ' . FtaModel::addIdFta($idFtaEffectue) . ')'); break; case FtaEtatModel::ETAT_AVANCEMENT_VALUE_ALL: //Toutes les fiches de l'état sélectionné if ($paramFtaModification) { $array = DatabaseOperation::convertSqlStatementWithoutKeyToArray('SELECT DISTINCT ' . FtaModel::KEYNAME . ' FROM ' . FtaModel::TABLENAME . ',' . IntranetDroitsAccesModel::TABLENAME . ',' . FtaWorkflowModel::TABLENAME . ',' . IntranetActionsModel::TABLENAME . ' , ' . FtaActionSiteModel::TABLENAME . ' WHERE ' . FtaModel::FIELDNAME_ID_FTA_ETAT . '=' . $paramIdFtaEtat . ' AND ' . IntranetDroitsAccesModel::FIELDNAME_NIVEAU_INTRANET_DROITS_ACCES . '=' . IntranetNiveauAccesModel::NIVEAU_GENERIC_TRUE . ' AND ' . IntranetDroitsAccesModel::FIELDNAME_ID_USER . '=' . $paramIdUser . ' 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 ' . FtaWorkflowModel::TABLENAME . '.' . FtaWorkflowModel::KEYNAME . '=' . FtaModel::TABLENAME . '.' . FtaModel::FIELDNAME_WORKFLOW . ' AND ( 0 ' . IntranetActionsModel::addIdIntranetAction($_SESSION[Acl::ACL_INTRANET_ACTIONS_VALIDE]) . ')' . ' AND ' . FtaActionSiteModel::TABLENAME . '.' . FtaActionSiteModel::FIELDNAME_ID_SITE . '=' . FtaModel::TABLENAME . '.' . FtaModel::FIELDNAME_SITE_PRODUCTION . ' AND ' . FtaActionSiteModel::TABLENAME . '.' . FtaActionSiteModel::FIELDNAME_ID_FTA_WORKFLOW . '=' . FtaModel::TABLENAME . '.' . FtaModel::FIELDNAME_WORKFLOW . ' AND ' . FtaActionSiteModel::TABLENAME . '.' . FtaActionSiteModel::FIELDNAME_ID_INTRANET_ACTIONS . ' IN (' . IntranetActionsModel::TABLENAME . '.' . IntranetActionsModel::KEYNAME . ')'); } else { $isSiteDeProd = GeoModel::isLieuGeoSiteDeProduction($paramLieuGeo); if ($isSiteDeProd) { $array = DatabaseOperation::convertSqlStatementWithoutKeyToArray('SELECT DISTINCT ' . FtaModel::KEYNAME . ' FROM ' . FtaModel::TABLENAME . ' WHERE ' . FtaModel::FIELDNAME_ID_FTA_ETAT . '=' . $paramIdFtaEtat . ' AND ' . FtaModel::FIELDNAME_SITE_PRODUCTION . '=' . $paramLieuGeo); } else { $array = DatabaseOperation::convertSqlStatementWithoutKeyToArray('SELECT DISTINCT ' . FtaModel::KEYNAME . ' FROM ' . FtaModel::TABLENAME . ' WHERE ' . FtaModel::FIELDNAME_ID_FTA_ETAT . '=' . $paramIdFtaEtat); } } break; } return $array; }
/** * set the location of a member */ public function setLocation($IdMember, $geonameid = false) { // Address IdCity address must only consider Populated palces (definition of cities), it also must consider the address checking process $Rank = 0; // Rank=0 means the main address, todo when we will deal with several addresses we will need to consider the other rank Values ; $IdMember = (int) $IdMember; $geonameid = (int) $geonameid; $errors = array(); if (empty($IdMember)) { // name is not set: $errors['Name'] = 'Name not set'; } if (empty($geonameid)) { // name is not set: $errors['Geonameid'] = 'Geoname not set'; } // get Member's current Location $result = $this->singleLookup("\nSELECT a.IdCity\nFROM addresses AS a\nWHERE a.IdMember = '{$IdMember}'\n AND a.rank = 0\n "); if (!isset($result) || $result->IdCity != $geonameid) { // Check Geo and maybe add location $geomodel = new GeoModel(); if (!$geomodel->getDataById($geonameid)) { // if the geonameid is not in our DB, let's add it if (!$geomodel->addGeonameId($geonameid, 'member_primary')) { $vars['errors'] = array('geoinserterror'); return false; } } else { // the geonameid is in our DB, so just update the counters //get id for usagetype: $usagetypeId = $geomodel->getUsagetypeId('member_primary')->id; $update = $geomodel->updateUsageCounter($geonameid, $usagetypeId, 'add'); } $result = $this->singleLookup("\nUPDATE addresses\nSET IdCity = {$geonameid}\nWHERE IdMember = {$IdMember} and Rank=" . $Rank); // name is not set: if (!empty($result)) { $errors['Geonameid'] = 'Geoname not set'; } $result = $this->singleLookup("\nUPDATE members\nSET IdCity = {$geonameid}\nWHERE id = {$IdMember}\n "); if (!empty($result)) { $errors['Geonameid'] = 'Member IdCity not set'; } else { $this->logWrite("The Member with the Id: " . $IdMember . " changed his location to Geo-Id: " . $geonameid, "Members"); } if (empty($errors) && ($m = $this->createEntity('Member')->findById($IdMember))) { // if a member with status NeedMore updates her/his profile, moving them back to pending if ($m->Status == 'NeedMore') { $m->Status = 'Pending'; $m->update(); } } return array('errors' => $errors, 'IdMember' => $result); } else { // geonameid hasn't changed return false; } }
$m->geonameid = $member->IdCity; $m->street = MOD_crypt::MemberReadCrypted($member->address->StreetName); $m->housenumber = MOD_crypt::MemberReadCrypted($member->address->HouseNumber); $m->zip = MOD_crypt::MemberReadCrypted($member->address->Zip); $m->birthday = date("d", strtotime($member->BirthDate)); $m->birthmonth = date("m", strtotime($member->BirthDate)); $selYear = date("Y", strtotime($member->BirthDate)); $birthYearOptions = buildBirthYearOptions($selYear); $m->gender = $member->Gender; // values from previous form submit if (!($mem_redirect = $this->layoutkit->formkit->getMemFromRedirect())) { // this is a fresh form foreach ($m as $key => $value) { $vars[$key] = $value; } $Geo = new GeoModel(); if (isset($vars['geonameid']) && !isset($vars['geonamename'])) { $vars['geonamename'] = $Geo->getDataById($vars['geonameid'])->name; } $vars['geonamecountry'] = ''; if (!isset($vars['errors'])) { $vars['errors'] = array(); } } else { $vars = $mem_redirect->post; } $lang = $this->model->get_profile_language(); $profile_language = $lang->id; $profile_language_code = $lang->ShortCode; $words = $this->getWords(); $messengers = $member->messengers();
function setXMLRecordsetBaliseArtSiteUpdateTwo(GeoModel $paramGeoModelSiteExpe, GeoModel $paramGeoModelSiteProd) { $this->XMLrecordsetBaliseArtSiteUpdateTwo = self::TABULATION . self::TABULATION . self::TABULATION . self::TABULATION . "<Recordset id=\"1\" action=\"update\">" . self::SAUT_DE_LIGNE . $this->getXMLArcadiaNoArtKey() . self::TABULATION . self::TABULATION . self::TABULATION . self::TABULATION . self::TABULATION . "<COD_SITE_GRP key=\"TRUE\">" . $paramGeoModelSiteExpe->getDataField(GeoModel::FIELDNAME_ID_SITE_GROUPE)->getFieldValue() . "</COD_SITE_GRP><!--" . $paramGeoModelSiteExpe->getDataField(GeoModel::FIELDNAME_GEO)->getFieldValue() . " -->" . self::SAUT_DE_LIGNE . self::TABULATION . self::TABULATION . self::TABULATION . self::TABULATION . self::TABULATION . "<NIVEAU key=\"TRUE\">1</NIVEAU><!-- Primare -->" . self::SAUT_DE_LIGNE . self::TABULATION . self::TABULATION . self::TABULATION . self::TABULATION . self::TABULATION . "<DATE_FIN_EFFET>" . date("d/m/Y") . "</DATE_FIN_EFFET>" . self::SAUT_DE_LIGNE . self::RECORDSET_END . self::SAUT_DE_LIGNE . self::TABULATION . self::TABULATION . self::TABULATION . self::TABULATION . "<Recordset id=\"2\" action=\"update\">" . self::SAUT_DE_LIGNE . $this->getXMLArcadiaNoArtKey() . self::TABULATION . self::TABULATION . self::TABULATION . self::TABULATION . self::TABULATION . "<COD_SITE_GRP key=\"TRUE\">" . $paramGeoModelSiteProd->getDataField(GeoModel::FIELDNAME_ID_SITE_GROUPE)->getFieldValue() . "</COD_SITE_GRP><!--" . $paramGeoModelSiteProd->getDataField(GeoModel::FIELDNAME_GEO)->getFieldValue() . " -->" . self::SAUT_DE_LIGNE . self::TABULATION . self::TABULATION . self::TABULATION . self::TABULATION . self::TABULATION . "<NIVEAU key=\"TRUE\">2</NIVEAU><!-- Secondaire -->" . self::SAUT_DE_LIGNE . self::TABULATION . self::TABULATION . self::TABULATION . self::TABULATION . self::TABULATION . "<DATE_FIN_EFFET>" . date("d/m/Y") . "</DATE_FIN_EFFET>" . self::SAUT_DE_LIGNE . self::RECORDSET_END . self::SAUT_DE_LIGNE; }
/** * Construction du Menu * @param array $paramArrayRoleWorkflow * @param array $paramRowsFtaEtatAndFta * @param string $paramHtmlTable * @param string $paramRoleNavigation * @param GeoModel $paramGeoModel * @param string $paramCreateur * @param FtaRoleModel $paramFtaRoleModel * @return string */ private static function buildMenu($paramArrayRoleWorkflow, $paramRowsFtaEtatAndFta, $paramHtmlTable, $paramRoleNavigation, GeoModel $paramGeoModel, $paramCreateur, FtaRoleModel $paramFtaRoleModel = NULL) { if ($paramRowsFtaEtatAndFta[FtaModel::FIELDNAME_CODE_ARTICLE_LDC]) { $identifiant = '<b><font size=\'2\' color=\'#0000FF\'>' . $paramRowsFtaEtatAndFta[FtaModel::FIELDNAME_CODE_ARTICLE_LDC] . '</font></b>'; } else { $identifiant = '<b><font size=\'2\' color=\'' . self::FONT_COLOR_DOSSIER_FTA . '\'>' . $paramRowsFtaEtatAndFta[FtaModel::FIELDNAME_DOSSIER_FTA] . 'v' . $paramRowsFtaEtatAndFta[FtaModel::FIELDNAME_VERSION_DOSSIER_FTA] . '</font></b>'; } if ($paramRowsFtaEtatAndFta[FtaModel::FIELDNAME_COMMENTAIRE]) { $commentaire = '<br><b><font size=\'2\' color=\'' . self::FONT_COLOR_CHAPITRE_COMMENTAIRE . '\'>' . $paramRowsFtaEtatAndFta[FtaModel::FIELDNAME_COMMENTAIRE] . '</font></b>'; } else { $commentaire = ''; } if ($paramRowsFtaEtatAndFta[FtaModel::FIELDNAME_LIBELLE]) { $nom = $paramRowsFtaEtatAndFta[FtaModel::FIELDNAME_LIBELLE]; } else { $nom = $paramRowsFtaEtatAndFta[FtaModel::FIELDNAME_DESIGNATION_COMMERCIALE]; } if (count($paramArrayRoleWorkflow) > "1") { $menu_navigation = '<' . $paramHtmlTable . '><tr><td class=titre_principal> <div align=\'left\'> ' . $identifiant . ' - ' . $nom . ' <i>(gérée par ' . $paramCreateur . ')</i></div>' . '<div align=\'left\'>' . $commentaire . '</div></td>' . '<td width=25% class=titre_principal>'; if (self::$abreviation_etat == FtaEtatModel::ETAT_ABREVIATION_VALUE_MODIFICATION) { $menu_navigation .= $paramRoleNavigation; } $menu_navigation .= '<br> Site de Production : ' . $paramGeoModel->getDataField(GeoModel::FIELDNAME_GEO)->getFieldValue() . '<br> Espace de Travail : ' . $paramRowsFtaEtatAndFta[FtaWorkflowModel::FIELDNAME_DESCRIPTION_FTA_WORKFLOW] . '</td></tr></table> <' . $paramHtmlTable . '> <tr class = titre>'; } else { $menu_navigation = '<' . $paramHtmlTable . '><tr><td class=titre_principal> <div align=\'left\'> ' . $identifiant . '- ' . $nom . ' <i>(gérée par ' . $paramCreateur . ')</i></div>' . '<div>' . $commentaire . '</div></td>' . '<td width=25% class=titre_principal>'; if (self::$abreviation_etat == FtaEtatModel::ETAT_ABREVIATION_VALUE_MODIFICATION) { $menu_navigation .= ' Rôle : ' . $paramFtaRoleModel->getDataField(FtaRoleModel::FIELDNAME_DESCRIPTION_FTA_ROLE)->getFieldValue(); } $menu_navigation .= '<br> Site de Production : ' . $paramGeoModel->getDataField(GeoModel::FIELDNAME_GEO)->getFieldValue() . '<br> Espace de Travail : ' . $paramRowsFtaEtatAndFta[FtaWorkflowModel::FIELDNAME_DESCRIPTION_FTA_WORKFLOW] . '</td></tr></table> <' . $paramHtmlTable . '> <tr class = titre>'; } return $menu_navigation; }
/** * Add location to the databse * adds a new location to geonames_cache if it does not yet exist, updates the hierarchy and usage tables **/ public function checkGeonamesCache($geonameId) { $geomodel = new GeoModel(); if (!$geomodel->checkGeonameId($geonameId, 'trip')) { return false; } else { return true; } }
$checked_vierge = 'checked'; } $HtmlList = new HtmlListSelectTagName(); /* * Worflow de FTA */ //if ($checked_duplicate) { // $isEditable = FALSE; //} else { // $isEditable = TRUE; //} $listeWorkflow = FtaWorkflowModel::showListeDeroulanteNomWorkflowByAcces($idUser, $HtmlList, TRUE, $idFtaRole, $idFtaWorkflow); /* * Site de production FTA */ $listeSiteProduction = GeoModel::showListeDeroulanteSiteProdByAcces($idUser, $HtmlList, TRUE, $SiteDeProduction); /* * ********* Fin Code PHP * ********* */ /* * ************ Début Code HTML * ************ */ echo ' <form ' . $method . ' action=' . $page_action . '> <!input type=hidden name=action value=' . $action . '> <input type=hidden name=id_fta_role value=' . $idFtaRole . '> <' . $html_table . '> <tr class=titre_principal><td> Création d\'une Fiche Technique Article (FTA)
function Footer() { $globalConfig = new GlobalConfig(); //Positionnement à 1.5cm du bas $marge_pied_page = -15; $this->SetY($marge_pied_page); //Police Arial italique 6 $this->SetFont('Arial', 'I', 6); //Commentaire de bas de page statique //$commentaire = "AGIS-SA Siège social: BP 931 - 802, rue Sainte Geneviève - ZI de Courtine 84 091 AVIGNON CEDEX 09" // . "\nTel: 04.90.80.99.99 - Fax: 04.90.80.99.80 - Fax Gestion des Ventes: 04.74.05.32.68" // ; //Commentaire de bas de page dynamique $geoModel = new GeoModel(5); $adresseGeo = $geoModel->getDataField(GeoModel::FIELDNAME_ADRESSE_GEO)->getFieldValue(); $telephoneGeo = $geoModel->getDataField(GeoModel::FIELDNAME_TELEPHONE_GEO)->getFieldValue(); $faxGeo = $geoModel->getDataField(GeoModel::FIELDNAME_FAX_GEO)->getFieldValue(); $faxCommercialeGeo = $geoModel->getDataField(GeoModel::FIELDNAME_FAX_COMMERCIAL_GEO)->getFieldValue(); $commentaire = $adresseGeo . "\nTel: " . $telephoneGeo . " - Fax : " . $faxGeo . " - Fax Gestion des Ventes : " . $faxCommercialeGeo . "\nInformations susceptibles d'être modifiées, seule l'étiquette fait foi" . " (Env: " . $globalConfig->getConf()->getExecEnvironment() . " v" . $globalConfig->getConf()->getApplicationVersion() . ") "; //Numéro de page centré //$this->MultiCell(200,3,$commentaire.'Page '.$this->PageNo(). ' sur {nb}',0,'C'); $this->MultiCell(200, 3, $commentaire, 0, 'L'); $this->SetY($marge_pied_page); $this->SetX(180); $this->MultiCell(0, 3, "\nPage " . $this->PageNo() . " sur {nb}", 0, 'C'); }
public function updateActivity($args) { // First add geo location to geonames_cache if it doesn't exist yet $locationId = $args->post['activity-location-id']; if ($locationId != 0) { $geomodel = new GeoModel(); $geomodel->addGeonameId($locationId, 'member_primary'); } else { $locationId = $this->getLoggedInMember()->IdCity; } $activity = new Activity($args->post['activity-id']); $activity->title = $args->post['activity-title']; $activity->address = $args->post['activity-address']; $activity->locationId = $locationId; $startdate = strtotime($args->post['activity-start-date']); $activity->dateTimeStart = date('Y-m-d H:i:s', $startdate); $enddate = strtotime($args->post['activity-end-date']); $activity->dateTimeEnd = date('Y-m-d H:i:s', $enddate); $activity->description = $args->post['activity-description']; $activity->public = isset($args->post['activity-public']); $activity->update(); return $activity; }
$member = $this->member; $m = new StdClass(); $m->firstname = MOD_crypt::MemberReadCrypted($member->FirstName, ''); $m->secondname = MOD_crypt::MemberReadCrypted($member->SecondName, ''); $m->lastname = MOD_crypt::MemberReadCrypted($member->LastName, ''); $m->geonameid = $member->IdCity; $m->id = $member->id; $mem_redirect = $this->layoutkit->formkit->getMemFromRedirect(); // values from previous form submit if (!$mem_redirect || !isset($mem_redirect->post['id'])) { // this is a fresh form foreach ($m as $key => $value) { $vars[$key] = $value; } if (isset($vars['geonameid']) && !isset($vars['geonamename'])) { $geo = new GeoModel(); $location = $geo->getLocationById($vars['geonameid']); if ($location) { $country = $location->getCountry(); $parent = $location->getParent(); $vars['geonamename'] = $location->name; $vars['geonamecountrycode'] = $location->fk_countrycode; $vars['latitude'] = $location->latitude; $vars['longitude'] = $location->longitude; if (isset($parent->name)) { $vars['admincode'] = $parent->name; } $vars['geonamecountry'] = $country->name; $vars['countryname'] = $country->name; } }
$siteDeProduction = $ftaModel->getDataField(FtaModel::FIELDNAME_SITE_PRODUCTION)->getFieldValue(); $description_origine_transformation_fta = $ftaModel->getDataField(FtaModel::FIELDNAME_PRODUIT_TRANSFORME)->getFieldValue(); $idFtaWorkflow = $ftaModel->getDataField(FtaModel::FIELDNAME_WORKFLOW)->getFieldValue(); switch ($description_origine_transformation_fta) { case "0": $description_origine_transformation_fta = "Non"; break; case "1": case "2": $description_origine_transformation_fta = "Oui"; break; } $NOM_origine_transformation_fta = $ftaModel->getDataField(FtaModel::FIELDNAME_PRODUIT_TRANSFORME)->getFieldLabel(); $synoptique_valide_fta = $ftaModel->getDataField(FtaModel::FIELDNAME_DESCRIPTION_DU_PRODUIT)->getFieldValue(); $NOM_synoptique_valide_fta = $ftaModel->getDataField(FtaModel::FIELDNAME_DESCRIPTION_DU_PRODUIT)->getFieldLabel(); $geoModel = new GeoModel($siteDeProduction); $site_agrement_ce = $geoModel->getDataField(GeoModel::FIELDNAME_SITE_AGREMENT_CE)->getFieldValue(); $NOM_site_agrement_ce = $geoModel->getDataField(GeoModel::FIELDNAME_SITE_AGREMENT_CE)->getFieldLabel(); //Récupération des information de classification. //Rayon $IdFtaClassification2 = $ftaModel->getDataField(FtaModel::FIELDNAME_ID_FTA_CLASSIFICATION2)->getFieldValue(); if ($IdFtaClassification2) { $rayon = ClassificationArborescenceArticleCategorieContenuModel::getElementClassificationFta($IdFtaClassification2, ClassificationFta2Model::FIELDNAME_ID_RAYON); //Activité $activite = ClassificationArborescenceArticleCategorieContenuModel::getElementClassificationFta($IdFtaClassification2, ClassificationFta2Model::FIELDNAME_ID_ACTIVITE); if ($activite) { $activite = " / " . $activite; } //Marque $marque = ClassificationArborescenceArticleCategorieContenuModel::getElementClassificationFta($IdFtaClassification2, ClassificationFta2Model::FIELDNAME_ID_MARQUE); if ($marque) {
static function findByField($field, array $args = null) { if (Database::DB()->query('SHOW TABLES LIKE \'' . Settings::$DB_PREFIX . "_" . self::$tableName . '\'')->exec()->getCount() < 1) { throw new InvalidArgumentException(get_called_class() . ' - ' . __FUNCTION__ . ': Invalid table "' . self::$tableName . '"'); } return parent::findByField($field, $args); }