3 if (!defined("_ECRIRE_INC_VERSION")) return;
5 // un controleur php + html
6 // html == avec un modele, controleurs/article_introduction.html)
7 function controleurs_article_introduction_dist($regs) {
8 list(,$crayon,$type,$champ,$id) = $regs;
9 $valeur = valeur_colonne_table($type, array('descriptif', 'chapo', 'texte'), $id);
10 if ($valeur === false) {
11 return array("$type $id $champ: " . _U('crayons:pas_de_valeur'), 6);
14 $n = new Crayon('article-introduction-' . $id, $valeur,
15 array('hauteurMini' => 234,
16 'controleur' => 'controleurs/article_introduction'));
19 'h_descriptif' => (int)ceil($n->hauteur
*2/13),
20 'h_chapo' => (int)ceil($n->hauteur
*4/13),
21 'h_texte' => (int)ceil($n->hauteur
*4/13));
22 $html = $n->formulaire($contexte);
25 return array($html, $status);