Last change
on this file since 162 was
69,
checked in by guille, 17 years ago
|
Se agrego Plugin Crayon y se actualizaron los esqueletos para que funcione
|
File size:
812 bytes
|
Rev | Line | |
---|
[69] | 1 | <?php |
---|
| 2 | // un controleur php + html |
---|
| 3 | // html == avec un modele, controleurs/article_introduction.html) |
---|
| 4 | function controleurs_article_introduction_dist($regs) { |
---|
| 5 | list(,$crayon,$type,$champ,$id) = $regs; |
---|
| 6 | $valeur = valeur_colonne_table($type, array('descriptif', 'chapo', 'texte'), $id); |
---|
| 7 | if ($valeur === false) { |
---|
| 8 | return array("$type $id $champ: " . _U('crayons:pas_de_valeur'), 6); |
---|
| 9 | } |
---|
| 10 | |
---|
| 11 | $n = new Crayon('article-introduction-' . $id, $valeur, |
---|
| 12 | array('hauteurMini' => 234, |
---|
| 13 | 'controleur' => 'controleurs/article_introduction')); |
---|
| 14 | |
---|
| 15 | $contexte = array( |
---|
| 16 | 'h_descriptif' => (int)ceil($n->hauteur*2/13), |
---|
| 17 | 'h_chapo' => (int)ceil($n->hauteur*4/13), |
---|
| 18 | 'h_texte' => (int)ceil($n->hauteur*4/13)); |
---|
| 19 | $html = $n->formulaire($contexte); |
---|
| 20 | $status = NULL; |
---|
| 21 | |
---|
| 22 | return array($html, $status); |
---|
| 23 | } |
---|
| 24 | |
---|
| 25 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.