idemprcaddie) die(); // création de la page switch($dest) { case "TABLEAU": require_once ("$class_path/writeexcel/class.writeexcel_workbook.inc.php"); require_once ("$class_path/writeexcel/class.writeexcel_worksheet.inc.php"); $fname = tempnam("./temp", $fichier_temp_nom.".xls"); $workbook = new writeexcel_workbook($fname); $worksheet = $workbook->addworksheet(); $worksheet->write_string(0,0,"Panier N ".$idemprcaddie); $worksheet->write_string(0,1,$myCart->name); $worksheet->write_string(0,2,$myCart->comment); break; case "TABLEAUHTML": header("Content-Type: application/download\n"); header("Content-Disposition: atachement; filename=\"tableau.xls\""); print "
" . ''. ""; break; default: header ("Content-Type: text/html; charset=$charset"); print $std_header; break; } afftab_empr_cart_objects ($idemprcaddie, $elt_flag , $elt_no_flag ) ; switch($dest) { case "TABLEAU": $workbook->close(); header("Content-Type: application/x-msexcel; name=\""."Caddie_EMPR_".$idemprcaddie.".xls"."\""); header("Content-Disposition: inline; filename=\""."Caddie_EMPR_".$idemprcaddie.".xls"."\""); $fh=fopen($fname, "rb"); fpassthru($fh); unlink($fname); break; case "TABLEAUHTML": default: if ($etat_table) echo "\n"; break; } mysql_close($dbh);