Esempio n. 1
0
 /**
  * On affiche le ou les choix de gamme famille budget si une classification est renseigné
  * @return string
  */
 function getHtmlArcadiaGammeFamileBudget()
 {
     $htmlReturn = NULL;
     $idClassificationFta2 = $this->getModel()->getDataField(FtaModel::FIELDNAME_ID_FTA_CLASSIFICATION2)->getFieldValue();
     if ($idClassificationFta2) {
         $htmlReturn = ClassificationGammeFamilleBudgetArcadiaModel::getHtmlClassificationGammeFamilleBudget($this->getModel(), $idClassificationFta2, $this->getIsEditable());
     }
     return $htmlReturn;
 }
Esempio n. 2
0
 Initialisation des variables
*/
print_page_begin($disable_full_page, $menu_file);
flush();
$page_default = substr(strrchr($_SERVER['PHP_SELF'], '/'), '1', '-4');
$page_query = $_SERVER['QUERY_STRING'];
$page_action = $page_default . '.php';
$page_pdf = $page_default . '_pdf.php';
$method = 'POST';
//Pour une url > 2000 caractères, ne pas utiliser utiliser GET
$html_table = 'table ' . 'border=0 ' . 'width=100% ' . 'class=contenu ';
$idClassifcationFta2Marque = Lib::getParameterFromRequest(ClassificationFta2Model::FIELDNAME_ID_MARQUE);
$listeDesMarque = ClassificationFta2Model::getListeDeroulanteMarque($idClassifcationFta2Marque, Chapitre::EDITABLE);
if ($idClassifcationFta2Marque) {
    $htmlTableClassificationMarqueArcadia = ClassificationMarqueArcadiaModel::getHtmlTableClassificationMarqueArcadia($idClassifcationFta2Marque);
    $htmlTableClassificationGammeFamilleBudget = ClassificationGammeFamilleBudgetArcadiaModel::getHtmlTableClassificationGammeFamilleBudgetArcadia($idClassifcationFta2Marque);
}
$message = UserInterfaceMessage::FR_CLASSIFICATION_MARQUE_MESSAGE;
$bloc .= $listeDesMarque . $htmlTableClassificationMarqueArcadia . $htmlTableClassificationGammeFamilleBudget;
/*
 Sélection du mode d'affichage
*/
switch ($output) {
    /*     * ***********
          Début Code PDF
         * *********** */
    case 'pdf':
        //Constructeur
        $pdf = new XFPDF();
        //Déclaration des variables de formatages
        $police_standard = 'Arial';
        flush();
        $page_default = substr(strrchr($_SERVER['PHP_SELF'], '/'), '1', '-4');
        $page_query = $_SERVER['QUERY_STRING'];
        $page_action = $page_default . '.php';
        $page_pdf = $page_default . '_pdf.php';
        $method = 'POST';
        //Pour une url > 2000 caractères, ne pas utiliser utiliser GET
        $html_table = 'table ' . 'border=0 ' . 'width=100% ' . 'class=contenu ';
        $id_classification_gamme_famille_budget_arcadia = ClassificationGammeFamilleBudgetArcadiaModel::createNewRecordset(array(ClassificationFta2Model::KEYNAME => $idClassifcationFta2));
        $classificationGammeFamilleBudgetModel = new ClassificationGammeFamilleBudgetArcadiaModel($id_classification_gamme_famille_budget_arcadia);
        $classificationGammeFamilleBudgetModel->setIsEditable(TRUE);
        $htmlGammeFamilleBudget = $classificationGammeFamilleBudgetModel->getHtmlDataField(ClassificationGammeFamilleBudgetArcadiaModel::FIELDNAME_ID_ARCADIA_GAMME_FAMILLE_BUDGET);
        $bloc = $htmlGammeFamilleBudget;
        break;
    case ClassificationGammeFamilleBudgetArcadiaModel::SUPPRIMER:
        $classificationGammeFamilleBudgetModel = new ClassificationGammeFamilleBudgetArcadiaModel($idClassificationGammeFamilleBudgetArcadia);
        $classificationGammeFamilleBudgetModel->deleteClassificationGammeFamilleBudget();
        header("Location: classification_modifier.php?id_fta_classification2=" . $idClassifcationFta2 . "&action=modifier&isEditable=1");
        break;
}
/*
 Sélection du mode d'affichage
*/
switch ($output) {
    /*     * ***********
          Début Code PDF
         * *********** */
    case 'pdf':
        //Constructeur
        $pdf = new XFPDF();
        //Déclaration des variables de formatages
 /**
  * Affiche le tableau d'ajout de gamme famille budget
  * @param string $paramAction
  * @return string
  */
 function getHtmlArcadiaGammeFamilleBudget($paramAction)
 {
     $idClassificationFta2 = $this->getKeyValue();
     $ClassificationGammeFamilleBudget = ClassificationGammeFamilleBudgetArcadiaModel::getArrayIdClassificationGammeFamilleBudgetByIdClassificationFta2($idClassificationFta2);
     if ($ClassificationGammeFamilleBudget) {
         $arrayClassificationGammeFamilleBudgettmp = array();
         $tablesNameAndIdForeignKeyOfClassificationGammeFamilleBudgettmp = array();
         foreach ($ClassificationGammeFamilleBudget as $rowsClassificationGammeFamilleBudget) {
             $idClassificationGammeFamilleBudgetArcadia = $rowsClassificationGammeFamilleBudget[ClassificationGammeFamilleBudgetArcadiaModel::KEYNAME];
             $arrayIdClassificationGammeFamilleBudgetArcadia[] = $idClassificationGammeFamilleBudgetArcadia;
             $ClassificationGammeFamilleBudgetArcadiaModel = new ClassificationGammeFamilleBudgetArcadiaModel($idClassificationGammeFamilleBudgetArcadia);
             /*
              * Tableau de données
              */
             $arrayClassificationGammeFamilleBudgetTmp = $ClassificationGammeFamilleBudgetArcadiaModel->getArrayClassificationGammeFamilleBudget();
             $arrayClassificationGammeFamilleBudgetArcadia = array_replace_recursive($arrayClassificationGammeFamilleBudgettmp, $arrayClassificationGammeFamilleBudgetTmp);
             $arrayClassificationGammeFamilleBudgettmp = $arrayClassificationGammeFamilleBudgetArcadia;
             /*
              * 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);
              */
             $tablesNameAndIdForeignKeyOfClassificationGammeFamilleBudgetTmp = $ClassificationGammeFamilleBudgetArcadiaModel->getTablesNameAndIdForeignkeyOfClassificationGammeFamilleBudget();
             $tablesNameAndIdForeignKeyOfClassificationGammeFamilleBudget = $tablesNameAndIdForeignKeyOfClassificationGammeFamilleBudgettmp + $tablesNameAndIdForeignKeyOfClassificationGammeFamilleBudgetTmp;
             $tablesNameAndIdForeignKeyOfClassificationGammeFamilleBudgettmp = $tablesNameAndIdForeignKeyOfClassificationGammeFamilleBudget;
             /*
              * Vérifie si pour la Fta en cours les données ClassificationGammeFamilleBudgett sont renseigné
              */
             if ($arrayClassificationGammeFamilleBudgetArcadia) {
                 $rightToAdd = FALSE;
             } else {
                 $rightToAdd = TRUE;
             }
         }
         /**
          * Labels
          */
         $className = $ClassificationGammeFamilleBudgetArcadiaModel->getClassName();
         $label = $ClassificationGammeFamilleBudgetArcadiaModel->getDataField(ClassificationGammeFamilleBudgetArcadiaModel::FIELDNAME_ID_ARCADIA_GAMME_FAMILLE_BUDGET)->getFieldLabel();
         /**
          * Initilisation du tableau html
          */
         $htmlClassificationGammeFamilleBudget = new HtmlSubForm_RNN($arrayClassificationGammeFamilleBudgetArcadia, $className, $label, $tablesNameAndIdForeignKeyOfClassificationGammeFamilleBudget);
         $htmlClassificationGammeFamilleBudget->setIsEditable($this->getIsEditable());
         $htmlClassificationGammeFamilleBudget->setRightToAdd($rightToAdd);
         $htmlClassificationGammeFamilleBudget->setLienAjouter(ClassificationGammeFamilleBudgetArcadiaModel::getAddLinkAfterClassificationGammeFamilleBudget($this->getKeyValue(), $paramAction));
         $htmlClassificationGammeFamilleBudget->setLien(ClassificationGammeFamilleBudgetArcadiaModel::getAddLinkBeforeClassificationGammeFamilleBudget($this->getKeyValue(), $paramAction));
         $htmlClassificationGammeFamilleBudget->setLienSuppression(ClassificationGammeFamilleBudgetArcadiaModel::getDeleteLinkClassificationGammeFamilleBudget($this->getKeyValue(), $paramAction, $arrayIdClassificationGammeFamilleBudgetArcadia));
         $htmlClassificationGammeFamilleBudget->setTableLabel($ClassificationGammeFamilleBudgetArcadiaModel->getTableGammeFamilleBudgetLabel());
         $return .= $htmlClassificationGammeFamilleBudget->getHtmlResult();
     } else {
         /*
          * Initialisation des modèles 
          */
         $label = self::LABEL_CLASSIFICATION_GAMME_FAMILLE_BUDGET;
         $htmlClassificationGammeFamilleBudget = new HtmlSubForm_RNN($arrayClassificationGammeFamilleBudgetArcadia, $className, $label, $tablesNameAndIdForeignKeyOfClassificationGammeFamilleBudget);
         $htmlClassificationGammeFamilleBudget->setIsEditable($this->getIsEditable());
         $htmlClassificationGammeFamilleBudget->setRightToAdd(TRUE);
         $htmlClassificationGammeFamilleBudget->setLien(ClassificationGammeFamilleBudgetArcadiaModel::getAddLinkBeforeClassificationGammeFamilleBudget($this->getKeyValue(), $paramAction));
         $return .= $htmlClassificationGammeFamilleBudget->getHtmlResult();
     }
     return $return;
 }
                $classificationGammeFamilleBudgetArcadiaModel->setIsEditable(TRUE);
                $htmlFamilleVentes = $classificationGammeFamilleBudgetArcadiaModel->getHtmlDataField(ClassificationGammeFamilleBudgetArcadiaModel::FIELDNAME_ID_ARCADIA_GAMME_FAMILLE_BUDGET);
                /**
                 * Titre
                 */
                $titre = $classificationGammeFamilleBudgetArcadiaModel->getDataField(ClassificationGammeFamilleBudgetArcadiaModel::FIELDNAME_ID_ARCADIA_GAMME_FAMILLE_BUDGET)->getFieldLabel();
                $bloc = $htmlFamilleVentes;
                break;
        }
        break;
    case ClassificationMarqueArcadiaModel::SUPPRIMER:
        if ($idClassificationMarqueArcadia) {
            $classificationMarqueArcadiaModel = new ClassificationMarqueArcadiaModel($idClassificationMarqueArcadia);
            $classificationMarqueArcadiaModel->deleteClassificationMarqueArcadia();
        } elseif ($idClassificationGammeFamilleBudgetArcadia) {
            $classificationGammeFamilleBudgetArcadiaModel = new ClassificationGammeFamilleBudgetArcadiaModel($idClassificationGammeFamilleBudgetArcadia);
            $classificationGammeFamilleBudgetArcadiaModel->deleteClassificationGammeFamilleBudgetArcadia();
        }
        header("Location: gestion_marque.php?id_Marque=" . $idMarque);
        break;
}
/*
 Sélection du mode d'affichage
*/
switch ($output) {
    /*     * ***********
          Début Code PDF
         * *********** */
    case 'pdf':
        //Constructeur
        $pdf = new XFPDF();