[CSS] +fix page header and title color
[lhc/web/www.git] / www / plugins / crayons / controleurs / rubrique_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/rubrique_introduction.html)
9 function controleurs_rubrique_introduction_dist($regs) {
10 list(,$crayon,$type,$champ,$id) = $regs;
11 $valeur = valeur_colonne_table($type, array('descriptif', 'texte'), $id);
12 if ($valeur === false) {
13 return array("$type $id $champ: " . _U('crayons:pas_de_valeur'), 6);
14 }
15
16 $n = new Crayon(
17 'rubrique-introduction-' . $id,
18 $valeur,
19 array('hauteurMini' => 234, 'controleur' => 'controleurs/rubrique_introduction')
20 );
21
22 $contexte = array(
23 'h_descriptif' => (int)ceil($n->hauteur*5/13),
24 'h_texte' => (int)ceil($n->hauteur*7/13));
25 $html = $n->formulaire($contexte);
26 $status = null;
27
28 return array($html, $status);
29 }