- Timestamp:
- Sep 26, 2010, 9:40:24 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpc/trunk/project/apps/frontend/modules/plot/templates/_parlementaire.php
r915 r1439 1 <?php 2 $plotarray = array('parlementaire' => $parlementaire, 'labels' => $labels, 'vacances' => $vacances, 'time' => 'lastyear'); 3 if (isset($mandat_clos)) $plotarray = array_merge($plotarray, array('mandat_clos' => true)); 1 <div id="overDiv"></div> 2 <?php $plotarray = array('parlementaire' => $parlementaire, 'time' => 'lastyear', 'questions' => 'false', 'link' => 'false'); 4 3 if (isset($options['session'])) $plotarray['time'] = $options['session']; 5 if (isset($options['questions'])) $plotarray = array_merge($plotarray, array('n_questions' => $n_questions)); 6 if (isset($options['link'])) $plotarray = array_merge($plotarray, array('link' => $options['link'])); 7 //if (isset($options['fonctions'])) $plotarray = array_merge($plotarray, array('fonctions' => $fonctions)); 4 if (isset($options['questions'])) $plotarray['questions'] = $options['questions']; 5 if (isset($options['link'])) $plotarray['link'] = $options['link']; 8 6 9 $n = count($labels);10 $presences = array_fill(1, $n, 0);11 $participations = array_fill(1, $n, 0);12 $mots = array_fill(1, $n, 0);13 7 if ($options['plot'] == 'all' || $options['plot'] == 'total') { 14 8 $plotarray = array_merge($plotarray, array('type' => 'total')); 15 for ($i = 1; $i <= $n; $i++) {16 $presences[$i] = $n_presences['hemicycle'][$i] + $n_presences['commission'][$i];17 $participations[$i] = $n_participations['hemicycle'][$i] + $n_participations['commission'][$i];18 $mots[$i] = $n_mots['hemicycle'][$i] + $n_mots['commission'][$i];19 }20 $plotarray = array_merge($plotarray, array('participations' => $participations, 'presences' => $presences, 'mots' => $mots));21 9 echo include_partial('plot/plotParlementaire', $plotarray); 22 10 } 23 11 if ($options['plot'] == 'all' || $options['plot'] == 'hemicycle') { 24 if (!isset($plotarray['type'])) {12 if (!isset($plotarray['type'])) 25 13 $plotarray = array_merge($plotarray, array('type' => 'hemicycle')); 26 $plotarray = array_merge($plotarray, array('participations' => $n_participations['hemicycle'], 'presences' => $n_presences['hemicycle'], 'mots' => $n_mots['hemicycle'])); 27 } else { 28 $plotarray['type'] = 'hemicycle'; 29 $plotarray['participations'] = $n_participations['hemicycle']; 30 $plotarray['presences'] = $n_presences['hemicycle']; 31 $plotarray['mots'] = $n_mots['hemicycle']; 32 } 14 else $plotarray['type'] = 'hemicycle'; 33 15 echo include_partial('plot/plotParlementaire', $plotarray); 34 16 } 35 17 if ($options['plot'] == 'all' || $options['plot'] == 'commission') { 36 if (!isset($plotarray['type'])) {18 if (!isset($plotarray['type'])) 37 19 $plotarray = array_merge($plotarray, array('type' => 'commission')); 38 $plotarray = array_merge($plotarray, array('participations' => $n_participations['commission'], 'presences' => $n_presences['commission'], 'mots' => $n_mots['commission']));39 } else {40 $plotarray['type'] = 'commission';41 $plotarray['participations'] = $n_participations['commission'];42 $plotarray['presences'] = $n_presences['commission'];43 $plotarray['mots'] = $n_mots['commission'];44 }45 if (!isset($plotarray['type'])) $plotarray = array_merge($plotarray, array('type' => 'commission'));46 20 else $plotarray['type'] = 'commission'; 47 $plotarray = array_merge($plotarray, array('participations' => $n_participations['commission'], 'presences' => $n_presences['commission'], 'mots' => $n_mots['commission']));48 21 echo include_partial('plot/plotParlementaire', $plotarray); 49 22 } ?>
Note: See TracChangeset
for help on using the changeset viewer.