public function AddScript($fichier) { $balise = new SBalise(BAL_SCRIPT); $balise->AddProp(PROP_TYPE, TYPE_JAVASCRIPT); $balise->AddProp(PROP_SRC, $fichier); $this->scripts[] = $balise; }
public function AddStyle($fichier) { $style = new SBalise(BAL_LINK); $style->AddProp(PROP_REL, 'stylesheet'); $style->AddProp(PROP_TYPE, 'text/css'); $style->AddProp(PROP_HREF, $fichier); $this->styles[] = $style; }
public function __construct($titre, $idDeclencheur, $class, $id = '', $idTab = '') { parent::__construct($class, $id, $idTab); $popDiv = new SBalise(BAL_DIV); $popDiv->AddClass(TYPEPOP_SLIDECLICK); parent::Attach($popDiv); $declencheur = new SBalise(BAL_DIV); $declencheur->AddClass('jq_popdiv_declencheur'); $declencheur->SetText($idDeclencheur); $popDiv->Attach($declencheur); $bal = new SBalise(BAL_DIV); $bal->AddProp(PROP_ID, $idDeclencheur); $tab = new STableau(true); $tab->AddLigne(); $cellule = $tab->AddCellule(); $element = new SElement($class . ''); $element->SetText('+'); $cellule = $tab->AddCellule(); $element = new SElement($class . ''); $element->SetText($titre); $bal->Attach($tab); $popDiv->Attach($bal); $this->div = new SBalise(BAL_DIV); $this->div->AddClass('jq_popdiv_div'); $popDiv->Attach($this->div); }
public function __construct($titre = '', $titreListeGauche = '', $titreListeDroite = '', $elementsListeGauche = '', $elementsListeDroite = '') { parent::__construct(); if ($titre !== '') { $this->AddLigne(); $cellule = $this->AddCellule(); $cellule->SetText($titre); } $this->AddLigne(); $cellule = $this->AddCellule(); $conteneur = new SBalise(BAL_DIV); $conteneur->AddProp(PROP_CLASS, $class); $cellule->Attach($conteneur); $tabListe = new Tableau(); $conteneur->Attach($tabListe); if ($titreListeGauche !== '' && $titreListeDroite !== '') { $tabListe->AddLigne(); $cellule = $tabListe->AddCellule(); $cellule->SetText($titreListeGauche); $cellule = $tabListe->AddCellule(); $cellule->SetText($titreListeDroite); } $tabListe->AddLigne(); $this->listeGauche = $tabListe->AddCellule(); $this->listeDroite = $tabListe->AddCellule(); if ($elementsListeGauche !== '' && is_array($elementsListeGauche)) { $this->RemplirListeGauche($elementsListeGauche); } if ($elementsListeDroite !== '' && is_array($elementsListeDroite)) { $this->RemplirListeDroite($elementsListeDroite); } }
protected function ConstruireElemFonctionJSOnClick($elem, $element) { if ($this->foncJsOnClick === '') { $divFonc = new SBalise(BAL_DIV); $divFonc->AddClass(LISTE_JQ_ELEMENT_FONCTION); $divFonc->AddProp(PROP_STYLE, 'display:none'); $divFonc->SetText(AJAXFONC_AJOUTERAUCONTEXTE); $elem->Attach($divFonc); } else { parent::ConstruireElemFonctionJSOnClick($elem, $element); } }
public function AjouterElement($id, $libelle, $description = '') { if ($id != '' && $libelle != '') { $this->liste->AddLigne(); $cellule = $this->liste->AddCellule(); $cellule->AddProp(PROP_ID, $this->prefixIdClass . $this->prefixIdComp . SELECT_ELEMENT . $id); $cellule->AddProp(PROP_CLASS, $this->prefixIdClass . SELECT_ELEMENT); $jsFonc = new JsFonction(JS_INPUTSELECT_ONMOUSEDOWNELEMENT_NAME, 4); $jsFonc->AddParamThis(); $jsFonc->AddParamText($this->prefixIdClass . $this->prefixIdComp . SELECT_LISTE); $jsFonc->AddParamText($this->prefixIdClass . SELECT_VALEUREDIT); $jsFonc->AddParamText($this->prefixIdClass . $this->prefixIdComp . SELECT_INFO); $cellule->AddProp(PROP_ONMOUSEDOWN, $jsFonc->BuildJS()); $jsFonc = new JsFonction(JS_INPUTSELECT_ONMOUSEUPELEMENT_NAME, 4); $jsFonc->AddParamThis(); $jsFonc->AddParamText($this->prefixIdClass . $this->prefixIdComp . SELECT_LISTE); $jsFonc->AddParamText($this->prefixIdClass . SELECT_VALEUREDIT); $jsFonc->AddParamText($this->prefixIdClass . $this->prefixIdComp . SELECT_INFO); $cellule->AddProp(PROP_ONMOUSEUP, $jsFonc->BuildJS()); $jsFonc = new JsFonction(JS_INPUTSELECT_ONMOUSEOVERELEMENT_NAME, 5); $jsFonc->AddParamThis(); $jsFonc->AddParamEvent(); $jsFonc->AddParamText($this->prefixIdClass . $this->prefixIdComp . SELECT_LISTE); $jsFonc->AddParamText($this->prefixIdClass . SELECT_VALEUREDIT); $jsFonc->AddParamText($this->prefixIdClass . $this->prefixIdComp . SELECT_INFO); $cellule->AddProp(PROP_ONMOUSEOVER, $jsFonc->BuildJS()); $jsFonc = new JsFonction(JS_INPUTSELECT_ONMOUSEOUTELEMENT_NAME, 5); $jsFonc->AddParamThis(); $jsFonc->AddParamEvent(); $jsFonc->AddParamText($this->prefixIdClass . $this->prefixIdComp . SELECT_LISTE); $jsFonc->AddParamText($this->prefixIdClass . SELECT_VALEUREDIT); $jsFonc->AddParamText($this->prefixIdClass . $this->prefixIdComp . SELECT_INFO); $cellule->AddProp(PROP_ONMOUSEOUT, $jsFonc->BuildJS()); $divId = new SBalise(BAL_DIV); $divId->AddProp(PROP_CLASS, SELECT_ID); $divId->AddProp(PROP_STYLE, 'display: none'); $divId->SetText($id); $cellule->Attach($divId); $divLibelle = new SBalise(BAL_DIV); $divLibelle->AddProp(PROP_CLASS, SELECT_LIBELLE); $divLibelle->SetText($libelle); $cellule->Attach($divLibelle); if ($description !== '') { $divDescription = new SBalise(BAL_DIV); $divDescription->AddProp(PROP_CLASS, SELECT_DESCRIPTION); $divDescription->AddProp(PROP_STYLE, 'display: none'); $divDescription->SetText($description); $cellule->Attach($divDescription); } } }
protected function ConstruireElemConsultation(&$element, $titre = '', $contenu = '', $deplie = true) { $elem = parent::ConstruireElemConsultation($element); $elem->AddClass(LISTE_JQ_ELEM_PLIANT); $divTitre = new SBalise(BAL_DIV); $divTitre->AddClass(LISTE_JQ_ELEM_TITRE); $elemTitre = new SElemOrg(1, 2, $this->prefixIdClass . LISTECLASS_ELEMTITRE . $this->Niveau(), true); $elemTitre->AjouterClasse(LISTECLASS_ELEMTITRE . $this->Niveau()); if ($titre === '') { $titre = $this->ConstruireElemConsultationTitre($element); } if (is_string($titre)) { $elemTitreChamp = new SElement($this->prefixIdClass . LISTECLASS_ELEMTITRECHAMP . $this->Niveau()); $elemTitreChamp->AjouterClasse(LISTECLASS_ELEMTITRECHAMP . $this->Niveau()); $elemTitreChamp->SetText($titre); $elemTitre->AttacherCellule(1, 1, $elemTitreChamp); } else { $elemTitre->AttacherCellule(1, 1, $titre); } //$elemTitre->SetCelluleDominante(1, 1); $elemTitre->SetLargeurCellule(1, 1, '100%'); $elemTitre->AjouterPropCellule(1, 2, PROP_STYLE, 'min-width: 20px'); $elemTitre->AjouterClasseCellule(1, 2, LISTE_JQ_ELEM_INDIC); $elemIndic = new SElement($this->prefixIdClass . LISTECLASS_ELEMINDIC . $this->Niveau()); $elemIndic->AjouterClasse(LISTECLASS_ELEMINDIC . $this->Niveau()); //$elemIndic->AddClass(LISTE_JQ_ELEM_INDIC); if ($deplie === true) { $elemIndic->SetText('-'); } else { $elemIndic->SetText('+'); } $elemTitre->AttacherCellule(1, 2, $elemIndic); $divTitre->Attach($elemTitre); $elem->Attach($divTitre); $divContenu = new SBalise(BAL_DIV); $divContenu->AddClass(LISTE_JQ_ELEM_CONTENU); $elemContenu = new SElement($this->prefixIdClass . LISTECLASS_ELEMCONTENU . $this->Niveau(), false); $elemContenu->AjouterClasse(LISTECLASS_ELEMCONTENU . $this->Niveau()); if ($this->chargementContenuDiffere === false) { if ($contenu === '') { $contenu = $this->ConstruireElemConsultationContenu($element); } if (is_string($contenu) || is_int($contenu)) { $elemContenu->SetText($contenu); } else { $elemContenu->Attach($contenu); } } $divContenu->Attach($elemContenu); $elem->Attach($divContenu); if ($this->chargementContenuDiffere === true) { // Construction de la fonction appelée en cas de changement de page. $divChargeContenuFonc = new SBalise(BAL_DIV); $divChargeContenuFonc->AddClass(LISTE_JQ_ELEM_CONTENU_CHARGEFONC); $divChargeContenuFonc->SetText($this->foncAjaxRechargement); $divChargeContenuFonc->AddProp(PROP_STYLE, 'display:none'); $elem->Attach($divChargeContenuFonc); // Construction des paramètres pour la fonction appelée en cas de changement de page. $divChargeContenuParam = new SBalise(BAL_DIV); $divChargeContenuParam->AddClass(LISTE_JQ_ELEM_CONTENU_CHARGEPARAM); $param = 'contexte=' . $this->contexte . '&' . $this->contexte . '[contenu][' . $this->TypeSynchro() . '][' . $this->Numero() . ']'; $divChargeContenuParam->SetText(to_html($param)); $divChargeContenuParam->AddProp(PROP_STYLE, 'display:none'); $elem->Attach($divChargeContenuParam); } return $elem; }
$titre->SetText('Vive le Texas!!'); // Meta. $metaUTF8 = new SBalise(BAL_META); $metaUTF8->AddProp(PROP_HTTPEQUIV, 'Content-Type'); $metaUTF8->AddProp(PROP_CONTENT, 'text/html; charset=utf-8'); $metaCss = new SBalise(BAL_META); $metaCss->AddProp(PROP_HTTPEQUIV, 'Content-Style-Type'); $metaCss->AddProp(PROP_CONTENT, 'text/css'); $metaIE8 = new SBalise(BAL_META); $metaIE8->AddProp(PROP_HTTPEQUIV, 'X-UA-Compatible'); $metaIE8->AddProp(PROP_CONTENT, 'IE=8'); $metaNoCache1 = new SBalise(BAL_META); $metaNoCache1->AddProp(PROP_HTTPEQUIV, 'Pragma'); $metaNoCache1->AddProp(PROP_CONTENT, 'no-cache'); $metaNoCache2 = new SBalise(BAL_META); $metaNoCache2->AddProp(PROP_HTTPEQUIV, 'Cache-Control'); $metaNoCache2->AddProp(PROP_CONTENT, 'no-cache'); // Ajout des différents fichiers CSS (ordre important!!!). $css = CssListeStyles::GetInstance(); $css->AddStyle(CSS_GLOBAL_FILE); /*$css->AddStyle(CSS_GENERAL_FILE); //$css->AddStyle(CSS_AMI_FILE); $css->AddStyle(CSS_BARREINFO_FILE); $css->AddStyle(CSS_CONNEXION_FILE); //$css->AddStyle(CSS_EVENEMENT_FILE); //$css->AddStyle(CSS_EDITIONPRESENTATION_FILE); //$css->AddStyle(CSS_FORUM_FILE); //$css->AddStyle(CSS_MENU_FILE);*/ $css->AddStyle(CSS_ORGANISATION_FILE); //$css->AddStyle(CSS_TEST_FILE); // Ajout des différents fichiers Javascript (ordre important!!!).
$cadreInfo->FusionnerCellule(2, 1, 0, 5); //$cadreInfo->SetCelluleDominante(1, 3); $cadreInfo->AjouterPropCellule(1, 1, PROP_ID, CADRE_INFO_JOUEUR); $cadreInfo->AjouterPropCellule(1, 2, PROP_WIDTH, '50%'); $cadreInfo->AjouterPropCellule(1, 3, PROP_ID, CADRE_INFO_GROUPE); //$cadreInfo->AjouterPropCellule(1, 3, PROP_ID, CADRE_INFO_AJAX); $cadreInfo->AjouterPropCellule(1, 4, PROP_WIDTH, '50%'); $cadreInfo->AjouterPropCellule(1, 5, PROP_ID, CADRE_INFO_LANGUE); $cadreInfo->AjouterPropCellule(1, 6, PROP_ID, CADRE_INFO_COMMUNAUTE); $cadreInfo->AjouterPropCellule(2, 1, PROP_ID, CADRE_INFO_ERREUR); $elem = new SElement(FORM_ERREURS); $cadreInfo->AttacherCellule(2, 1, $elem); $cellule->Attach($cadreInfo); // Cadre qui permet de redimensionner l'image (passée comme background-image au body) en fonction de la résolution d'affichage du client. $backgroundCadre = new SBalise(BAL_DIV); $backgroundCadre->AddProp(PROP_ID, CADRE_BACKGROUND); $image = new SImage('', '', ''); $image->AddProp(PROP_ID, CADRE_BACKGROUND . '_image'); $backgroundCadre->Attach($image); // Cadre qui contient tout le reste (menu, contenu, pub, ...). $mainCadre = new STableau(); $mainCadre->AddProp(PROP_ID, CADRE_PRINCIPAL); $org = new SOrganiseur(2, 3, true, false); $org->AddProp(PROP_ID, 'tab_contenu'); $org->AjouterPropCellule(1, 2, PROP_ID, CADRE_BANNIERE); $org->AjouterPropCellule(2, 1, PROP_ID, CADRE_MENU); $org->AjouterPropCellule(2, 2, PROP_ID, CADRE_CONTENU); $org->AjouterPropCellule(2, 3, PROP_ID, CADRE_CHAT); $cadreBanniere = new SElemOrg(4, 3, CADRE_BANNIERE, true, false, true); $cadreBanniere->FusionnerCellule(2, 1, 1, 0); $cadreBanniere->FusionnerCellule(2, 3, 1, 0);
public function AjouterReference($nomRef) { // Référentiel. $divRef = new SBalise(BAL_DIV); $divRef->SetText($nomRef); $divRef->AddClass(INPUTSELECT_JQ_REF); $divRef->AddProp(PROP_STYLE, 'display:none'); $this->Attach($divRef); }
protected function ConstruireListe() { $divElem = NULL; if ($this->rechargement === false) { $this->AjouterClasse($this->prefixIdClass . LISTECLASS . $this->Niveau(), false); $this->AjouterClasse(LISTECLASS . $this->Niveau()); // Construction de la partie triable de la liste si elle l'est. $this->ConstruireListeTriable(); // Construction de la fonction appelée en cas de changement de page. $divChangePageFonc = new SBalise(BAL_DIV); $divChangePageFonc->AddClass(LISTE_JQ_PAGE_CHANGEFONC); $divChangePageFonc->SetText($this->foncAjaxRechargement); $divChangePageFonc->AddProp(PROP_STYLE, 'display: none;'); $this->Attach($divChangePageFonc); // Construction des paramètres pour la fonction appelée en cas de changement de page. $divChangePageParam = new SBalise(BAL_DIV); $divChangePageParam->AddClass(LISTE_JQ_PAGE_CHANGEPARAM); $param = 'contexte=' . $this->contexte . '&' . $this->contexte . '[page][' . $this->TypeSynchro() . '][' . $this->Numero() . ']'; $divChangePageParam->SetText(to_ajax($param)); $divChangePageParam->AddProp(PROP_STYLE, 'display: none;'); $this->Attach($divChangePageParam); // Construction du type de synchronisation de la liste (utilisé pour recharger une liste via ajax). $divTypeSynchro = new SBalise(BAL_DIV); $divTypeSynchro->AddClass(LISTE_JQ_TYPESYNCHRO); $divTypeSynchro->SetText($this->TypeSynchroPage()); $divTypeSynchro->AddProp(PROP_STYLE, 'display: none;'); $this->Attach($divTypeSynchro); // Construction du numéro de la liste (utilisé pour recharger une liste unique via ajax). $divNumero = new SBalise(BAL_DIV); $divNumero->AddClass(LISTE_JQ_NUMERO); $divNumero->SetText(strval($this->Numero())); $divNumero->AddProp(PROP_STYLE, 'display: none;'); $this->Attach($divNumero); // Construction du niveau de la liste (utilisé pour savoir si la liste est contenu dans une autre). $divNiveau = new SBalise(BAL_DIV); $divNiveau->AddClass(LISTE_JQ_NIVEAU); $divNiveau->SetText(strval($this->Niveau())); $divNiveau->AddProp(PROP_STYLE, 'display: none;'); $this->Attach($divNiveau); // Construction de la ligne de titre. $ligneTitre = $this->ConstruireLigneTitre(); if ($ligneTitre !== NULL) { $this->Attach($ligneTitre); } // Construction d'une ligne de changement de page. $changePage = $this->ConstruireChangementPage(); if ($changePage !== NULL) { $this->Attach($changePage); } $divElem = new SBalise(BAL_DIV); $divElem->AddClass(LISTE_JQ_LISTE); if ($this->Triable()) { $divElem->AddClass($this->typeLiaison); } $elemModele = $this->ConstruireElementModele(); if ($elemModele !== NULL) { $divElem->Attach($elemModele); } $this->Attach($divElem); } // Construction des éléments de la liste. $ordre = 0; $poidsJavascriptMax = GSession::PoidsJavascriptMax(); $noSupp = false; foreach ($this->elements as &$element) { if (GSession::PoidsJavascript() <= $poidsJavascriptMax) { $elem = $this->ConstruireElement($element, $ordre); if ($element[LISTE_ELEMENT_ACTION] == LISTE_ELEMACTION_CREAT) { GSession::PoidsJavascript(8); } else { if ($element[LISTE_ELEMENT_ACTION] == LISTE_ELEMACTION_MODIF && array_key_exists(LISTE_ELEMENT_MODIFIE, $element) && $element[LISTE_ELEMENT_MODIFIE] === true) { GSession::PoidsJavascript(2); } } if ($this->rechargement === false) { $divElem->Attach($elem); } else { $element[LISTE_ELEMENT_CONTENU] = $elem; } $ordre++; } else { $noSupp = true; GReponse::AjouterElementSuite($this->contexte); break; } } // Suppression des éléments qui ne font plus partie de la liste. if ($noSupp === false && $this->listeSuppressions !== NULL) { foreach ($this->listeSuppressions as $id => $elemSupp) { $elementSupp = array(); $elementSupp[LISTE_ELEMENT_ID] = $id; $elementSupp[LISTE_ELEMENT_ACTION] = LISTE_ELEMACTION_SUPP; GSession::PoidsJavascript(1); $this->elements[] = $elementSupp; // Suppression du contexte. if (array_key_exists($id, $this->listeContexte)) { unset($this->listeContexte[$id]); } } } if ($this->rechargement === false) { // Construction d'une ligne de changement de page. $changePage = $this->ConstruireChangementPage(); if ($changePage !== NULL) { $this->Attach($changePage); } // Construction de l'élément de création. if ($this->HasDroitCreation()) { $elemCreat = $this->ConstruireElementCreation(); if ($elemCreat) { GSession::PoidsJavascript(8); $this->Attach($elemCreat); } } } else { if ($this->HasDroitCreation()) { // Rechargement des listes pour l'élément création. foreach ($this->champs as $nomChamp => $champ) { $this->GetDifferentielForListeElementCreation($nomChamp); } } } // Sauvegarde de la liste dans le contexte. // Si on a changé de page, on supprime l'ancienne liste du contexte. GContexte::Liste($this->contexte, $this->TypeSynchroPage(), $this->listeContexte); }
protected function ConstruireListe() { $this->AjouterClasse($this->prefixIdClass . LISTECLASS . $this->Niveau(), false); $this->AjouterClasse(LISTECLASS . $this->Niveau()); $this->AddClass(LISTE_JQ); /*// Construction de la fonction appelée en cas de changement de page. $divChangePageFonc = new SBalise(BAL_DIV); $divChangePageFonc->AddClass(LISTE_JQ_PAGE_CHANGEFONC); $divChangePageFonc->SetText($this->foncAjaxRechargement); $divChangePageFonc->AddProp(PROP_STYLE, 'display:none'); $this->Attach($divChangePageFonc); // Construction des paramètres pour la fonction appelée en cas de changement de page. $divChangePageParam = new SBalise(BAL_DIV); $divChangePageParam->AddClass(LISTE_JQ_PAGE_CHANGEPARAM); $param = 'contexte='.$this->contexte.'&'.$this->contexte.'[page]['.$this->TypeSynchro().']['.$this->Numero().']'; $divChangePageParam->SetText(to_html($param)); $divChangePageParam->AddProp(PROP_STYLE, 'display:none'); $this->Attach($divChangePageParam);*/ // Construction du type de synchronisation de la liste (utilisé pour recharger une liste via ajax). $divTypeSynchro = new SBalise(BAL_DIV); $divTypeSynchro->AddClass(LISTE_JQ_TYPESYNCHRO); $divTypeSynchro->SetText($this->TypeSynchroPage()); $divTypeSynchro->AddProp(PROP_STYLE, 'display:none'); $this->Attach($divTypeSynchro); // Construction du numéro de la liste (utilisé pour recharger une liste unique via ajax). $divNumero = new SBalise(BAL_DIV); $divNumero->AddClass(LISTE_JQ_NUMERO); $divNumero->SetText(strval($this->Numero())); $divNumero->AddProp(PROP_STYLE, 'display:none'); $this->Attach($divNumero); // Construction du niveau de la liste (utilisé pour savoir si la liste est contenu dans une autre). $divNiveau = new SBalise(BAL_DIV); $divNiveau->AddClass(LISTE_JQ_NIVEAU); $divNiveau->SetText(strval($this->Niveau())); $divNiveau->AddProp(PROP_STYLE, 'display:none'); $this->Attach($divNiveau); // Construction de la ligne de titre. $ligneTitre = $this->ConstruireLigneTitre(); if ($ligneTitre !== NULL) { $this->Attach($ligneTitre); } // Construction d'une ligne de changement de page. $changePage = $this->ConstruireChangementPage(); if ($changePage !== NULL) { $this->Attach($changePage); } $divElem = new SBalise(BAL_DIV); $divElem->AddClass(LISTE_JQ_LISTE); $this->Attach($divElem); // Construction des éléments de la liste. $poidsJavascriptMax = GSession::PoidsJavascriptMax(); $noSupp = false; $id = 0; foreach ($this->elements as &$element) { $element[LISTE_ELEMENT_ID] = strval($id); $elem = $this->ConstruireElement($element); GSession::PoidsJavascript(1); $divElem->Attach($elem); $id++; } }
public function __construct($prefixIdClass, $typeInput = '', $oblig = false, $retour = '', $chemin = '', $extensions = '', $id = '', $info = '', $erreur = '', $type = '', $contexte = '', $niveau = '') { parent::__construct(BAL_DIV); GSession::PoidsJavascript(1); $this->select == NULL; $this->prefixIdClass = $prefixIdClass; $this->niveau = $niveau; if ($typeInput === INPUTFILE_TYPE_LISTEFICHIER) { $this->AddClass(LISTEINPUTFILE_JQ); } else { if ($typeInput === '' || $typeInput === INPUTFILE_TYPE_FICHIER) { $this->AddClass(INPUTFILE_JQ); } } $this->AddClass('jq_fill'); if ($oblig == true) { $this->AddClass('jq_input_form_oblig'); } $elem = new SElement($this->prefixIdClass . INPUTFILE . $this->niveau, true, '', '', false); $elem->AjouterClasse(INPUTFILE . $this->niveau); $this->Attach($elem); $org = new SOrganiseur(1, 2, true); $org->SetCelluleDominante(1, 1); $elem->Attach($org); // Select. $rechargeFonc = ''; $rechargeParam = ''; if ($contexte !== '') { $rechargeFonc = AJAXFONC_CHARGERREFERENTIELCONTEXTE; $rechargeParam = to_html('contexte=' . $contexte); } $this->select = new SInputSelect($this->prefixIdClass, INPUTSELECT_TYPE_FICHIER, $oblig, $retour, $info, $erreur, $type, '', '', $rechargeFonc, $rechargeParam, '', '', $niveau); $org->AttacherCellule(1, 1, $this->select); // InputFile. $action = ''; switch ($type) { default: if ($type === '') { $type = INPUTFILE_TYPE_FICHIER; } $action = PATH_SERVER_HTTP . 'fonctions/General/fUploadFichier.php'; } // - Input. $div = new SBalise(BAL_DIV); $div->AddClass(INPUTFILE_JQ_NEWINPUT); $div->AddProp(PROP_STYLE, 'overflow:hidden;'); $form = new SBalise(BAL_FORM); $form->AddProp(PROP_ACTION, $action); $form->AddProp(PROP_METHOD, 'post'); $form->AddProp(PROP_ENCTYPE, 'multipart/form-data'); //$form->AddStyle('display:none;'); $div->Attach($form); $rand = mt_rand(); $file = new SInput('', 'file', '', ''); $file->AddProp(PROP_NAME, 'fichierUp' . $rand); $file->AddStyle('display:none;'); $form->Attach($file); $fileType = new SInput('', 'hidden', '', ''); $fileType->AddProp(PROP_NAME, 'type' . $rand); $fileType->AddProp(PROP_VALUE, $type); $form->Attach($fileType); $fileId = new SInput('', 'hidden', '', ''); $fileId->AddProp(PROP_NAME, 'id' . $rand); $fileId->AddProp(PROP_VALUE, $id); $form->Attach($fileId); /*$fileFrame = new SInput('', 'hidden', '', ''); $fileFrame->AddClass(INPUTFILE_JQ_IFRAMEINPUT); $fileFrame->AddProp(PROP_NAME, 'iframe'.$rand); $form->Attach($fileFrame);*/ $org->AttacherCellule(1, 2, $div); // - Declencheur. //$element = new SElement($this->prefixIdClass.INPUTFILE_NEWDECLENCHEUR.$this->niveau, false); //$element->AjouterClasse(INPUTFILE_NEWDECLENCHEUR.$this->niveau); $element = new SElement($this->prefixIdClass . INPUTNEW_DECLENCHEUR . $this->niveau, false); $element->AjouterClasse(INPUTNEW_DECLENCHEUR . $this->niveau); $element->AddClass(INPUTFILE_JQ_NEWDECLENCHEUR); $org->AttacherCellule(1, 2, $element); //if ($chemin !== '') // $this->GetNomsFichiers($chemin); }