datas = $datas; $this->editions_state_id = $id; $this->my_param = $param; } public function get_datas(){ return $this->datas; } public function get_param(){ return $this->my_param; } //un simple tableau pour la classe générique... public function show(){ global $charset,$msg,$base_path; global $javascript_path; global $show_all; $html = "
".(count($this->datas)-1)."
"; $html.=" "; for($i=0 ; $idatas) ; $i++){ $html.=" "; for($j=0 ; $jdatas[$i]) ; $j++){ $html.=" <".($i==0 ? "th" : 'td')."> ".htmlentities($this->datas[$i][$j],ENT_QUOTES,$charset)." "; } $html.=" "; if(!$show_all && ($i == 50)){ $html.=""; break; } } $html.="
datas[$i])."\" >".$msg["editions_state_view_tab_all"]."
"; return $html; } public function render_xls_file($name="state"){ $worksheet = new spreadsheetPMB(); for($i=0 ; $idatas) ; $i++){ for($j=0 ; $jdatas[$i]) ; $j++){ $worksheet->write($i,$j,$this->datas[$i][$j]); } } $worksheet->download($name.'.xls'); } }