addworksheet(); $worksheet->write(0,0,$msg[350].": ".$msg['edit_resa_menu_a_traiter']); $worksheet->write(2,0,$msg[366]); $worksheet->write(2,1,$msg["empr_nom_prenom"]); $worksheet->write(2,2,$msg["edit_resa_empr_location"]); $worksheet->write(2,3,$msg[233]); $worksheet->write(2,4,$msg["edit_resa_expl_location"]); $worksheet->write(2,5,$msg[295]); $worksheet->write(2,6,$msg[296]); $worksheet->write(2,7,$msg[297]); $worksheet->write(2,8,$msg[294]); $worksheet->write(2,9,$msg[232]); if ($pmb_transferts_actif=="1") $worksheet->write(2,10,$msg["edit_resa_loc_retrait"]); $tableau_resa = resa_list_resa_a_traiter () ; $line = 0; for ($j=0; $j< count($tableau_resa); $j++) { $tableau_expl_dispo = array(); if ($no_notice!=$tableau_resa[$j]['resa_idnotice'] || $no_bulletin!=$tableau_resa[$j]['resa_idbulletin']) { $no_notice=$tableau_resa[$j]['resa_idnotice'] ; $no_bulletin=$tableau_resa[$j]['resa_idbulletin'] ; $tableau_expl_dispo = expl_dispo ($no_notice, $no_bulletin) ; } if (count($tableau_expl_dispo)) { for ($i=0;$iwrite(($line+3),0,$tableau_resa[$j]['rank']); $worksheet->write(($line+3),1,$tableau_resa[$j]['resa_empr']); $worksheet->write(($line+3),2,$tableau_resa[$j]['resa_empr_loc_libelle']); $worksheet->write(($line+3),3,$tableau_resa[$j]['resa_tit']); $worksheet->write(($line+3),4,$tableau_expl_dispo[$i]['location']); $worksheet->write(($line+3),5,$tableau_expl_dispo[$i]['section']); $worksheet->write(($line+3),6,$tableau_expl_dispo[$i]['expl_cote']); $worksheet->write(($line+3),7,$tableau_expl_dispo[$i]['statut']); $worksheet->write(($line+3),8,$tableau_expl_dispo[$i]['support']); $worksheet->write(($line+3),9,$tableau_expl_dispo[$i]['expl_cb']); if ($pmb_transferts_actif=="1") $worksheet->write(($line+3),10,$tableau_resa[$j]['loc_retrait_libelle']); $line++; } } } } $workbook->close(); $fh=fopen($fname, "rb"); fpassthru($fh); unlink($fname); break; case "TABLEAUHTML": echo "

".$msg[350]." > ".$msg['edit_resa_menu_a_traiter']."

" ; $aff_final .= " ".$msg[366]." ".$msg["empr_nom_prenom"]." ".$msg["edit_resa_empr_location"]." ".$msg[233]." ".$msg["edit_resa_expl_location"]." $msg[295] $msg[296] $msg[297] $msg[294] $msg[232]"; if ($pmb_transferts_actif=="1") $aff_final .= "" . $msg["edit_resa_loc_retrait"] . ""; $aff_final .=""; $tableau_resa = resa_list_resa_a_traiter () ; for ($j=0; $j< count($tableau_resa); $j++) { $tableau_expl_dispo = array(); if ($no_notice!=$tableau_resa[$j]['resa_idnotice'] || $no_bulletin!=$tableau_resa[$j]['resa_idbulletin']) { $no_notice=$tableau_resa[$j]['resa_idnotice'] ; $no_bulletin=$tableau_resa[$j]['resa_idbulletin'] ; $tableau_expl_dispo = expl_dispo ($no_notice, $no_bulletin) ; } if (count($tableau_expl_dispo)) { for ($i=0;$i ".$tableau_resa[$j]['resa_empr']." ".$tableau_resa[$j]['resa_empr_loc_libelle']." ".$tableau_resa[$j]['resa_tit']." ".$tableau_expl_dispo[$i]['location']." ".$tableau_expl_dispo[$i]['section']." ".$tableau_expl_dispo[$i]['expl_cote']." ".$tableau_expl_dispo[$i]['statut']." ".$tableau_expl_dispo[$i]['support']." ".$tableau_expl_dispo[$i]['expl_cb'].""; if ($pmb_transferts_actif=="1") $aff_final .= "".$tableau_resa[$j]['loc_retrait_libelle'].""; $aff_final .= ""; } } } } if ($aff_final) print "$aff_final
"; break; default: echo "

".$msg[350]." > ".$msg['edit_resa_menu_a_traiter']."

"; // affichage du résultat echo "
Export tableau EXCEL   Export tableau HTML  
"; if ($pmb_transferts_actif=="1" || $pmb_location_reservation) { echo $msg["edit_resa_expl_location_filter"]." "; if ($f_loc=="") $f_loc = $deflt_resas_location; echo gen_liste ("SELECT idlocation, location_libelle FROM docs_location order by location_libelle", "idlocation", "location_libelle", "f_loc", "document.forms['form-$current_module-list'].dest.value='';document.forms['form-$current_module-list'].submit();", $f_loc, -1,"",0, $msg["all_location"]); echo $msg["edit_resa_expl_available_filter"]." "; echo gen_liste ("SELECT idlocation, location_libelle FROM docs_location order by location_libelle", "idlocation", "location_libelle", "f_dispo_loc", "document.forms['form-$current_module-list'].dest.value='';document.forms['form-$current_module-list'].submit();", $f_dispo_loc, -1,"",0, $msg["all_location"]); } echo "  "; echo "

"; $aff_final .= " ".$msg[366]." ".$msg["empr_nom_prenom"]." ".$msg["edit_resa_empr_location"]." ".$msg[233]." ".$msg["edit_resa_expl_location"]." $msg[295] $msg[296] $msg[297] $msg[294] $msg[232]"; if ($pmb_transferts_actif=="1") $aff_final .= "" . $msg["edit_resa_loc_retrait"] . ""; $aff_final .= ""; $tableau_resa = resa_list_resa_a_traiter () ; //echo "
" ; print_r($tableau_resa); echo "
" ; for ($j=0; $j< count($tableau_resa); $j++) { $tableau_expl_dispo = array(); if ($no_notice!=$tableau_resa[$j]['resa_idnotice'] || $no_bulletin!=$tableau_resa[$j]['resa_idbulletin']) { $no_notice=$tableau_resa[$j]['resa_idnotice'] ; $no_bulletin=$tableau_resa[$j]['resa_idbulletin'] ; $tableau_expl_dispo = expl_dispo ($no_notice, $no_bulletin) ; //echo "
" ; print_r($tableau_expl_dispo); echo "
" ; } if (count($tableau_expl_dispo)) { for ($i=0;$i ".$tableau_resa[$j]['resa_empr']." ".$tableau_resa[$j]['resa_empr_loc_libelle']." ".$tableau_resa[$j]['resa_tit']." ".$tableau_expl_dispo[$i]['location']." ".$tableau_expl_dispo[$i]['section']." ".$tableau_expl_dispo[$i]['expl_cote']." ".$tableau_expl_dispo[$i]['statut']." ".$tableau_expl_dispo[$i]['support']." ".$tableau_expl_dispo[$i]['expl_cb'].""; if ($pmb_transferts_actif=="1") $aff_final .= "".$tableau_resa[$j]['loc_retrait_libelle'].""; $aff_final .= ""; } } } } if ($aff_final) print pmb_bidi("\n\n$aff_final
\n\n") ; if (SESSrights & EDIT_AUTH) print pmb_bidi("".$msg['lien_traiter_reservations'].""); break; } // echo "
"; print_r($tableau); echo "
"; break; case "resa_planning" : echo "

".$msg[350]." > ".$msg['edit_resa_planning_menu']."

"; print planning_list (0, 0, "", EDIT_INFO_GESTION) ; break; case "resa" : default: echo "

".$msg[350]." > ".$msg['edit_resa_menu']."

"; print resa_list (0, 0, 0) ; break; }