/* * ************ Début Code HTML * ************ */ default: //echo $id_fta; echo ' <form method=' . $method . ' action=' . $page_action . ' name=\'form_action\'> <input type=hidden name=action value=' . $action . ' > <' . $html_table . '> <tr class=titre_principal><td> <br> Ajout d\'une nouvelle ' . $classificationArborescenceArticleCategorieContenuModel->getDataField(ClassificationArborescenceArticleCategorieContenuModel::KEYNAME)->getFieldLabel() . ' </td></tr> </table> <' . $html_table . '> <tr><td width=\'20%\'> ' . $bloc . ' </td></tr> </table> <' . $html_table . '> <tr><td> <center> <a href=gestion_elements.php?' . ClassificationArborescenceArticleCategorieModel::KEYNAME . '=' . $idElements . '>Validation</a> </center> </td></tr>
/** * Affiche le tableau d'ajout d'une famille de ventes à une activité de classification * @param string $paramIdElement * @return string */ public static function getHtmlTableClassificationElement($paramIdElement) { $ClassificationElement = self::getArrayIdClassificationElementByIdElement($paramIdElement); if ($ClassificationElement) { $arrayClassificationElementtmp = array(); $tablesNameAndIdForeignKeyOfElementtmp = array(); foreach ($ClassificationElement as $rowsClassificationElement) { $idClassificationElements = $rowsClassificationElement[self::KEYNAME]; $arrayIdClassificationElements[] = $idClassificationElements; $ClassificationArborescenceArticleCategorieContenuModel = new ClassificationArborescenceArticleCategorieContenuModel($idClassificationElements); /* * Tableau de données */ $arrayClassificationElementTmp = $ClassificationArborescenceArticleCategorieContenuModel->getArrayClassificationElements(); $arrayClassificationElements = array_replace_recursive($arrayClassificationElementtmp, $arrayClassificationElementTmp); $arrayClassificationElementtmp = $arrayClassificationElements; /* * Cette array doit être utilisé de cette manière * Array ( * nom de table, * clé étrangère de la table présenté * valeur de la clé étrangère); */ $tablesNameAndIdForeignKeyOfClassificationElementTmp = $ClassificationArborescenceArticleCategorieContenuModel->getTablesNameAndIdForeignkeyOfClassificatioElements(); $tablesNameAndIdForeignKeyOfClassificationElement = $tablesNameAndIdForeignKeyOfElementtmp + $tablesNameAndIdForeignKeyOfClassificationElementTmp; $tablesNameAndIdForeignKeyOfElementtmp = $tablesNameAndIdForeignKeyOfClassificationElement; /* * Vérifie si pour la Fta en cours les données ClassificationGammeFamilleBudgett sont renseigné */ if ($arrayClassificationElements) { $rightToAdd = Chapitre::NOT_EDITABLE; } else { $rightToAdd = Chapitre::EDITABLE; } } /** * Labels */ $className = $ClassificationArborescenceArticleCategorieContenuModel->getClassName(); $label = $ClassificationArborescenceArticleCategorieContenuModel->getDataField(self::FIELDNAME_ID_CLASSIFICATION_ARBORESCENCE_ARTICLE_CATEGORIE)->getFieldLabel(); /** * Initilisation du tableau html */ $htmlClassificationElements = new HtmlSubForm_RNN($arrayClassificationElements, $className, $label, $tablesNameAndIdForeignKeyOfClassificationElement); $htmlClassificationElements->setIsEditable(Chapitre::EDITABLE); $htmlClassificationElements->setRightToAdd($rightToAdd); $htmlClassificationElements->setLienAjouter(self::getAddLinkAfterClassificationElements($paramIdElement)); $htmlClassificationElements->setLien(self::getAddLinkBeforeClassificationElements($paramIdElement)); $htmlClassificationElements->setLienSuppression(self::getDeleteLinkClassificationElements($paramIdElement, $arrayIdClassificationElements)); $htmlClassificationElements->setTableLabel($ClassificationArborescenceArticleCategorieContenuModel->getTableClassificationElementsLabel()); $return .= $htmlClassificationElements->getHtmlResult(); } else { /* * Initialisation des modèles */ $label = self::FIELDNAME_ID_CLASSIFICATION_ARBORESCENCE_ARTICLE_CATEGORIE; $htmlClassificationElements = new HtmlSubForm_RNN($arrayClassificationElements, $className, $label, $tablesNameAndIdForeignKeyOfClassificationElement); $htmlClassificationElements->setIsEditable(Chapitre::EDITABLE); $htmlClassificationElements->setRightToAdd(Chapitre::EDITABLE); $htmlClassificationElements->setLien(self::getAddLinkBeforeClassificationElements($paramIdElement)); $return .= $htmlClassificationElements->getHtmlResult(); } return $return; }
$bloc .= "</td></tr>"; //Classification Controle de Gestion if (!$suivant_classification_arborescence_article_categorie) { $bloc .= "<{$html_table}>\n <tr class=titre><td>Code de regroupement controle de gestion\n </td></tr>\n <tr><td>\n <{$html_table}>\n <tr><td>\n " . mysql_field_desc("classification_arborescence_article", "FAMILLE_ARTICLE") . "\n </td><td>\n <input type=\"text\" name=\"FAMILLE_ARTICLE\" size=\"20\" />\n <a href=l:rp_data.mdb target=_blank>\n <img src=../lib/images/bouton_aide_point_interrogation.gif width=25 height=26 border=0 /> </a>\n </td></tr>\n <tr><td>\n " . mysql_field_desc("classification_arborescence_article", "FAMILLE_MKTG") . "\n </td><td>\n <input type=\"text\" name=\"FAMILLE_MKTG\" size=\"20\" />\n <a href=l:rp_data.mdb target=_blank>\n <img src=../lib/images/bouton_aide_point_interrogation.gif width=25 height=26 border=0 /> </a>\n </td></tr>\n </table>\n </td></tr>\n "; } $action = "valider"; $page_action = $page_default . "_post.php"; break; case "modifier": $titre = "Modification de l'élément"; $submit_label = "Modifier"; //Classification Controle de Gestion $classificationArborescenceArticleModel = new ClassificationArborescenceArticleModel($id_classification_arborescence_article); $id_classification_arborescence_article_categorie_contenu = $classificationArborescenceArticleModel->getDataField(ClassificationArborescenceArticleModel::FIELDNAME_ID_CLASSIFICATION_ARBORESCENCE_ARTICLE_CATEGORIE_CONTENU)->getFieldValue(); $classificationArborescenceArticleCategorieContenuModel = new ClassificationArborescenceArticleCategorieContenuModel($id_classification_arborescence_article_categorie_contenu); $id_classification_arborescence_article_categorie = $classificationArborescenceArticleCategorieContenuModel->getDataField(ClassificationArborescenceArticleCategorieContenuModel::FIELDNAME_ID_CLASSIFICATION_ARBORESCENCE_ARTICLE_CATEGORIE)->getFieldValue(); $classificationArborescenceArticleCategorieModel = new ClassificationArborescenceArticleCategorieModel($id_classification_arborescence_article_categorie); $suivant_classification_arborescence_article_categorie = $classificationArborescenceArticleCategorieModel->getDataField(ClassificationArborescenceArticleCategorieModel::FIELDNAME_SUIVANT_CLASSIFICATION_ARBORESCENCE_ARTICLE_CATEGORIE)->getFieldValue(); if (!$suivant_classification_arborescence_article_categorie) { $bloc .= "<" . $html_table . ">\n <tr class=titre><td>Code de regroupement controle de gestion\n </td></tr>\n <tr><td>\n <" . $html_table . ">\n <tr><td>\n " . mysql_field_desc("classification_arborescence_article", "FAMILLE_ARTICLE") . "\n </td><td>\n <input type=\"text\" name=\"FAMILLE_ARTICLE\" size=\"20\" value=\"{$FAMILLE_ARTICLE}\" />\n <a href=l:rp_data.mdb target=_blank>\n <img src=../lib/images/bouton_aide_point_interrogation.gif width=25 height=26 border=0 /> </a>\n </td></tr>\n <tr><td>\n " . mysql_field_desc("classification_arborescence_article", "FAMILLE_MKTG") . "\n </td><td>\n <input type=\"text\" name=\"FAMILLE_MKTG\" size=\"20\" value=\"{$FAMILLE_MKTG}\" />\n <a href=l:rp_data.mdb target=_blank>\n <img src=../lib/images/bouton_aide_point_interrogation.gif width=25 height=26 border=0 /> </a>\n </td></tr>\n </table>\n </td></tr>\n "; $action = "modifier"; $page_action = $page_default . "_post.php"; } else { $bloc .= " Il n'y a rien à modifier pour cet élément."; $submit_label = "Annuler"; $page_action = "index.php?liste_id={$liste_id}"; } break; } /* Sélection du mode d'affichage