array(), 'cols' => array() ); //tableau de données public function get_datas(){ global $tcd; $value = explode("_",$tcd); for($i=1 ; $idatas) ; $i++){ if(!in_array($this->datas[$i][$value[1]],$this->datas_tcd['cols'])){ $this->datas_tcd['cols'][] = $this->datas[$i][$value[1]]; } $this->datas_tcd['values'][$this->datas[$i][$value[0]]][$this->datas[$i][$value[1]]]++; } return $this->datas_tcd; } public function get_form(){ global $charset,$msg; global $tcd; $form = "
"; return $form; } //un simple tableau pour la classe générique... public function show(){ global $charset,$msg; global $javascript_path; $html = $this->get_form(); $this->get_datas(); if(count($this->datas_tcd['values'])){ $html.= "
"; foreach($this->datas_tcd['cols'] as $label){ $html.= " "; } $html.= " "; foreach($this->datas_tcd['values'] as $row => $cols){ $html.= " "; foreach($this->datas_tcd['cols'] as $key){ $html.= " "; } $html.= " "; } $html.="
".htmlentities($label,ENT_QUOTES,$charset)."
".htmlentities($row,ENT_QUOTES,$charset)."".htmlentities(($cols[$key] ? $cols[$key] : 0),ENT_QUOTES,$charset)."
"; } $html.="
"; return $html; } }