[CSS] +fix page header and title color
[lhc/web/www.git] / www / plugins / crayons / controleurs / article_introduction.php
1 <?php
2
3 if (!defined('_ECRIRE_INC_VERSION')) {
4 return;
5 }
6
7 // un controleur php + html
8 // html == avec un modele, controleurs/article_introduction.html)
9 function controleurs_article_introduction_dist($regs) {
10 list(,$crayon,$type,$champ,$id) = $regs;
11 $valeur = valeur_colonne_table($type, array('descriptif', 'chapo', 'texte'), $id);
12 if ($valeur === false) {
13 return array("$type $id $champ: " . _U('crayons:pas_de_valeur'), 6);
14 }
15
16 $n = new Crayon('article-introduction-' . $id, $valeur, array('hauteurMini' => 234, 'controleur' => 'controleurs/article_introduction'));
17
18 $contexte = array(
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);
23 $status = null;
24
25 return array($html, $status);
26 }