- Timestamp:
- Sep 28, 2010, 7:34:40 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpc/trunk/project/apps/frontend/modules/plot/actions/components.class.php
r1463 r1472 157 157 $this->data = array(); 158 158 $this->data['groupes'] = array('UMP' => array(),'NC' => array(),'SRC' => array(),'GDR' => array(), 'NI' => array()); 159 $this->data['titres'] = array(" Députés", "Interventions", "Amendements", "Propositions", "Quest. Orales", "Quest. Écrites");159 $this->data['titres'] = array(" Députés", "Interventions", "Amendements", "Propositions", "Quest. Orales", "Quest. Écrites"); 160 160 $n = count($this->data['titres']); 161 161 $stats = unserialize(Doctrine::getTable('VariableGlobale')->findOneByChamp('stats_groupes')->value); … … 193 193 $this->data['totaux'][$i] += $this->data['groupes'][$groupe][$i]; 194 194 foreach ($this->data['groupes'] as $groupe => $arr) 195 for ($i=0;$i<$n;$i++) 196 $this->data['groupes'][$groupe][$i] = $this->data['groupes'][$groupe][$i] / $this->data['totaux'][$i] * 100; 195 for ($i=0;$i<$n;$i++) { 196 $tmp = round($this->data['groupes'][$groupe][$i] / $this->data['totaux'][$i] * 1000)/10; 197 $this->data['groupes'][$groupe][$i] = round($this->data['groupes'][$groupe][$i] / $this->data['totaux'][$i] * 1000)/10; 198 } 199 for ($i=0;$i<$n;$i++) 200 $this->data['totaux'][$i] = preg_replace('/(\d)(\d{3})$/', '\\1 \\2', $this->data['totaux'][$i]); 197 201 } 198 202
Note: See TracChangeset
for help on using the changeset viewer.