diff --git a/htdocs/admin/compta.php b/htdocs/admin/compta.php index 38ba28e9fa4..ab6a0052341 100644 --- a/htdocs/admin/compta.php +++ b/htdocs/admin/compta.php @@ -166,6 +166,6 @@ print "\n"; print '

'; print ''; -$db->close(); llxFooter(); +$db->close(); diff --git a/htdocs/admin/confexped.php b/htdocs/admin/confexped.php index f8d13421b24..91d3b82286c 100644 --- a/htdocs/admin/confexped.php +++ b/htdocs/admin/confexped.php @@ -158,6 +158,5 @@ print ''; print info_admin($langs->trans("NoNeedForDeliveryReceipts")); -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/admin/external_rss.php b/htdocs/admin/external_rss.php index 81f6c093d5e..f18a3fe86b6 100644 --- a/htdocs/admin/external_rss.php +++ b/htdocs/admin/external_rss.php @@ -5,7 +5,7 @@ * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2005-2011 Regis Houssin - * Copyright (C) 2011 Juanjo Menent + * Copyright (C) 2011 Juanjo Menent * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -320,6 +320,5 @@ else } -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/admin/ldap.php b/htdocs/admin/ldap.php index fadde40dbed..92c4d20670b 100644 --- a/htdocs/admin/ldap.php +++ b/htdocs/admin/ldap.php @@ -325,6 +325,5 @@ if (function_exists("ldap_connect")) } } -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/admin/ldap_contacts.php b/htdocs/admin/ldap_contacts.php index 56b755bf64a..4901c127e8b 100644 --- a/htdocs/admin/ldap_contacts.php +++ b/htdocs/admin/ldap_contacts.php @@ -337,7 +337,6 @@ if (function_exists("ldap_connect")) } } +llxFooter(); $db->close(); -llxFooter(); - diff --git a/htdocs/admin/ldap_groups.php b/htdocs/admin/ldap_groups.php index 20b94023358..90946f5ea44 100644 --- a/htdocs/admin/ldap_groups.php +++ b/htdocs/admin/ldap_groups.php @@ -257,6 +257,5 @@ if (function_exists("ldap_connect")) } } -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/admin/ldap_users.php b/htdocs/admin/ldap_users.php index 70a94e5817a..dbed44ca5d0 100644 --- a/htdocs/admin/ldap_users.php +++ b/htdocs/admin/ldap_users.php @@ -452,6 +452,5 @@ if (function_exists("ldap_connect")) } } -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/admin/perms.php b/htdocs/admin/perms.php index aaf2f91688a..2e0ba0873bf 100644 --- a/htdocs/admin/perms.php +++ b/htdocs/admin/perms.php @@ -218,7 +218,5 @@ print ''; print ''; - -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/admin/prelevement.php b/htdocs/admin/prelevement.php index 1a3fd19aa1c..410851b640b 100644 --- a/htdocs/admin/prelevement.php +++ b/htdocs/admin/prelevement.php @@ -284,6 +284,5 @@ if (! empty($conf->global->MAIN_MODULE_NOTIFICATION)) } */ -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/admin/proxy.php b/htdocs/admin/proxy.php index 4591c4636a8..1f6e45223b4 100644 --- a/htdocs/admin/proxy.php +++ b/htdocs/admin/proxy.php @@ -208,6 +208,5 @@ print ''; print ''; -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/admin/supplier_proposal.php b/htdocs/admin/supplier_proposal.php index c10592487da..069c90ead8a 100644 --- a/htdocs/admin/supplier_proposal.php +++ b/htdocs/admin/supplier_proposal.php @@ -603,6 +603,7 @@ print " ".$langs->trans("Value")."\n"; print "\n"; print "\n ".$langs->trans("PathDirectory")."\n ".$conf->supplier_proposal->dir_output."\n\n"; print "\n
"; + llxFooter(); $db->close(); diff --git a/htdocs/admin/taxes.php b/htdocs/admin/taxes.php index b1ce8ef5dab..0336547fd14 100644 --- a/htdocs/admin/taxes.php +++ b/htdocs/admin/taxes.php @@ -226,6 +226,5 @@ print ''; print ''; -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/api/admin/explorer.php b/htdocs/api/admin/explorer.php index 154e8d163c1..44a14f99675 100644 --- a/htdocs/api/admin/explorer.php +++ b/htdocs/api/admin/explorer.php @@ -162,4 +162,5 @@ foreach($listofapis['v1'] as $key => $val) } llxFooter(); +$db->close(); diff --git a/htdocs/asterisk/wrapper.php b/htdocs/asterisk/wrapper.php index f168de78b6e..bcd5957dbb3 100644 --- a/htdocs/asterisk/wrapper.php +++ b/htdocs/asterisk/wrapper.php @@ -190,3 +190,4 @@ else { } llxFooter(); +$db->close(); diff --git a/htdocs/bookmarks/admin/bookmark.php b/htdocs/bookmarks/admin/bookmark.php index bd249055773..b622aa1d9dd 100644 --- a/htdocs/bookmarks/admin/bookmark.php +++ b/htdocs/bookmarks/admin/bookmark.php @@ -82,6 +82,5 @@ print ''; -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/cashdesk/admin/cashdesk.php b/htdocs/cashdesk/admin/cashdesk.php index c9b6804ef33..de60e8b80cf 100644 --- a/htdocs/cashdesk/admin/cashdesk.php +++ b/htdocs/cashdesk/admin/cashdesk.php @@ -188,6 +188,5 @@ print '
\n"; -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/categories/admin/categorie.php b/htdocs/categories/admin/categorie.php index 12b4d3ced81..d1af6bdafb2 100644 --- a/htdocs/categories/admin/categorie.php +++ b/htdocs/categories/admin/categorie.php @@ -121,5 +121,5 @@ print ''; print ''; -$db->close(); -llxFooter(); \ No newline at end of file +llxFooter(); +$db->close(); \ No newline at end of file diff --git a/htdocs/comm/action/info.php b/htdocs/comm/action/info.php index 93881b35564..7c2001d925d 100644 --- a/htdocs/comm/action/info.php +++ b/htdocs/comm/action/info.php @@ -64,6 +64,5 @@ print ''; print '
'; -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/comm/action/rapport/index.php b/htdocs/comm/action/rapport/index.php index 066df5fb39e..21e85c89756 100644 --- a/htdocs/comm/action/rapport/index.php +++ b/htdocs/comm/action/rapport/index.php @@ -150,7 +150,5 @@ else dol_print_error($db); } - -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/comm/mailing/info.php b/htdocs/comm/mailing/info.php index bbd10849f42..77245f74766 100644 --- a/htdocs/comm/mailing/info.php +++ b/htdocs/comm/mailing/info.php @@ -63,6 +63,5 @@ if ($mil->fetch($_REQUEST["id"]) >= 0) print ''; } -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/comm/multiprix.php b/htdocs/comm/multiprix.php index 6f8c0b70b86..645bdc580b4 100644 --- a/htdocs/comm/multiprix.php +++ b/htdocs/comm/multiprix.php @@ -171,6 +171,5 @@ if ($_socid > 0) } -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/comm/prospect/recap-prospect.php b/htdocs/comm/prospect/recap-prospect.php index 5d7358a806e..fe0fdc55b58 100644 --- a/htdocs/comm/prospect/recap-prospect.php +++ b/htdocs/comm/prospect/recap-prospect.php @@ -89,7 +89,5 @@ else dol_print_error($db); } - -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/comm/recap-client.php b/htdocs/comm/recap-client.php index 405ca2d4a11..71add817dc5 100644 --- a/htdocs/comm/recap-client.php +++ b/htdocs/comm/recap-client.php @@ -88,7 +88,5 @@ else dol_print_error($db); } - -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/comm/remise.php b/htdocs/comm/remise.php index 0edcdcd0c1d..a08e0a66a6f 100644 --- a/htdocs/comm/remise.php +++ b/htdocs/comm/remise.php @@ -199,6 +199,5 @@ if ($socid > 0) } -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/comm/remx.php b/htdocs/comm/remx.php index ba85d593fce..07989b457de 100644 --- a/htdocs/comm/remx.php +++ b/htdocs/comm/remx.php @@ -544,6 +544,5 @@ if ($socid > 0) } -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/commande/info.php b/htdocs/commande/info.php index bae932857fe..ae0dd789064 100644 --- a/htdocs/commande/info.php +++ b/htdocs/commande/info.php @@ -62,7 +62,5 @@ print ''; print ''; - -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/compta/bank/bilan.php b/htdocs/compta/bank/bilan.php index 7e44778b9bd..c1d668df8d7 100644 --- a/htdocs/compta/bank/bilan.php +++ b/htdocs/compta/bank/bilan.php @@ -89,6 +89,5 @@ print "".$langs->trans("BankBalance").""; -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/compta/bank/budget.php b/htdocs/compta/bank/budget.php index c35dec41e7d..666ad0085e1 100644 --- a/htdocs/compta/bank/budget.php +++ b/htdocs/compta/bank/budget.php @@ -97,6 +97,5 @@ else } print ""; -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/compta/bank/card.php b/htdocs/compta/bank/card.php index fb8383cd91a..dbe0722c77d 100644 --- a/htdocs/compta/bank/card.php +++ b/htdocs/compta/bank/card.php @@ -1041,8 +1041,5 @@ else } - - -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/compta/bank/info.php b/htdocs/compta/bank/info.php index cfc0c10d0a5..a1952ab5957 100644 --- a/htdocs/compta/bank/info.php +++ b/htdocs/compta/bank/info.php @@ -62,7 +62,5 @@ print ''; print ''; - -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/compta/bank/search.php b/htdocs/compta/bank/search.php index 0fd5336af7e..5bdca142a91 100644 --- a/htdocs/compta/bank/search.php +++ b/htdocs/compta/bank/search.php @@ -353,7 +353,5 @@ if ($_POST["action"] == "search" && ! $num) print $langs->trans("NoRecordFound"); } - -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/compta/bank/treso.php b/htdocs/compta/bank/treso.php index cbdb769789f..db7f37cb3e5 100644 --- a/htdocs/compta/bank/treso.php +++ b/htdocs/compta/bank/treso.php @@ -339,6 +339,5 @@ else print $langs->trans("ErrorBankAccountNotFound"); } -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/compta/bank/virement.php b/htdocs/compta/bank/virement.php index 4e323893d85..1a3294a2f15 100644 --- a/htdocs/compta/bank/virement.php +++ b/htdocs/compta/bank/virement.php @@ -188,6 +188,5 @@ print '
"; -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/compta/clients.php b/htdocs/compta/clients.php index 14751d308c4..6c2d9023902 100644 --- a/htdocs/compta/clients.php +++ b/htdocs/compta/clients.php @@ -210,6 +210,5 @@ else dol_print_error($db); } -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/compta/deplacement/info.php b/htdocs/compta/deplacement/info.php index dcdc8c9baf0..1e0279263e3 100644 --- a/htdocs/compta/deplacement/info.php +++ b/htdocs/compta/deplacement/info.php @@ -58,6 +58,5 @@ if ($id) print '
'; } -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/compta/facture/info.php b/htdocs/compta/facture/info.php index 8611381d486..24164b5709a 100644 --- a/htdocs/compta/facture/info.php +++ b/htdocs/compta/facture/info.php @@ -54,6 +54,5 @@ print ''; print ''; -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/compta/localtax/card.php b/htdocs/compta/localtax/card.php index b5140c54842..aded1c6aa1f 100644 --- a/htdocs/compta/localtax/card.php +++ b/htdocs/compta/localtax/card.php @@ -269,8 +269,6 @@ if ($id) print ""; } - +llxFooter(); $db->close(); -llxFooter(); - diff --git a/htdocs/compta/localtax/clients.php b/htdocs/compta/localtax/clients.php index 31eaf4375c3..ac30e529839 100644 --- a/htdocs/compta/localtax/clients.php +++ b/htdocs/compta/localtax/clients.php @@ -318,7 +318,5 @@ if($conf->global->$calc ==0){ } print ''; - -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/compta/localtax/index.php b/htdocs/compta/localtax/index.php index c3512fdcc1e..3bed627402e 100644 --- a/htdocs/compta/localtax/index.php +++ b/htdocs/compta/localtax/index.php @@ -280,6 +280,5 @@ print ''; print ''; print ''; -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/compta/localtax/quadri_detail.php b/htdocs/compta/localtax/quadri_detail.php index 0e88980796b..7c1e99b3537 100644 --- a/htdocs/compta/localtax/quadri_detail.php +++ b/htdocs/compta/localtax/quadri_detail.php @@ -663,6 +663,5 @@ else $i++; } -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/compta/localtax/reglement.php b/htdocs/compta/localtax/reglement.php index bfe0cb828c0..54530b14443 100644 --- a/htdocs/compta/localtax/reglement.php +++ b/htdocs/compta/localtax/reglement.php @@ -92,6 +92,5 @@ else dol_print_error($db); } -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/compta/paiement/avalider.php b/htdocs/compta/paiement/avalider.php index 489997011b0..6a891b72bda 100644 --- a/htdocs/compta/paiement/avalider.php +++ b/htdocs/compta/paiement/avalider.php @@ -118,6 +118,5 @@ if ($resql) print ""; } -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/compta/paiement/index.php b/htdocs/compta/paiement/index.php index 8575db70288..7f1597b5afc 100644 --- a/htdocs/compta/paiement/index.php +++ b/htdocs/compta/paiement/index.php @@ -31,8 +31,5 @@ llxHeader(); print load_fiche_titre("Payments"); - - -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/compta/paiement/info.php b/htdocs/compta/paiement/info.php index 84ef52c3a80..143ef55e987 100644 --- a/htdocs/compta/paiement/info.php +++ b/htdocs/compta/paiement/info.php @@ -63,6 +63,5 @@ print ''; print ''; -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/compta/paiement_charge.php b/htdocs/compta/paiement_charge.php index 30a3d17ab3f..a68f3445305 100644 --- a/htdocs/compta/paiement_charge.php +++ b/htdocs/compta/paiement_charge.php @@ -323,7 +323,5 @@ if ($_GET["action"] == 'create') print "\n"; } - -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/compta/prelevement/create.php b/htdocs/compta/prelevement/create.php index 7e81e181d11..7fd5cb10483 100644 --- a/htdocs/compta/prelevement/create.php +++ b/htdocs/compta/prelevement/create.php @@ -299,7 +299,5 @@ else dol_print_error($db); } - -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/compta/prelevement/demandes.php b/htdocs/compta/prelevement/demandes.php index 364e073676b..22679af2110 100644 --- a/htdocs/compta/prelevement/demandes.php +++ b/htdocs/compta/prelevement/demandes.php @@ -157,5 +157,5 @@ else dol_print_error($db); } - llxFooter(); +$db->close(); diff --git a/htdocs/compta/prelevement/fiche-rejet.php b/htdocs/compta/prelevement/fiche-rejet.php index 161227aa121..d520abccbcf 100644 --- a/htdocs/compta/prelevement/fiche-rejet.php +++ b/htdocs/compta/prelevement/fiche-rejet.php @@ -178,6 +178,5 @@ else dol_print_error($db); } -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/compta/prelevement/fiche-stat.php b/htdocs/compta/prelevement/fiche-stat.php index 83de06bc13c..c2316578130 100644 --- a/htdocs/compta/prelevement/fiche-stat.php +++ b/htdocs/compta/prelevement/fiche-stat.php @@ -159,6 +159,5 @@ if ($prev_id) } } -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/compta/prelevement/list.php b/htdocs/compta/prelevement/list.php index 9274a885105..d0c6792a785 100644 --- a/htdocs/compta/prelevement/list.php +++ b/htdocs/compta/prelevement/list.php @@ -192,7 +192,5 @@ else dol_print_error($db); } -$db->close(); - - llxFooter(); +$db->close(); diff --git a/htdocs/compta/prelevement/rejets.php b/htdocs/compta/prelevement/rejets.php index 30eafa40efa..78a11e898df 100644 --- a/htdocs/compta/prelevement/rejets.php +++ b/htdocs/compta/prelevement/rejets.php @@ -124,6 +124,5 @@ else dol_print_error($db); } -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/compta/sociales/index.php b/htdocs/compta/sociales/index.php index 639bf51fefd..6df15c9ba8e 100644 --- a/htdocs/compta/sociales/index.php +++ b/htdocs/compta/sociales/index.php @@ -247,9 +247,5 @@ else dol_print_error($db); } - - - -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/compta/tva/card.php b/htdocs/compta/tva/card.php index ed80ee21a4e..674e800a168 100644 --- a/htdocs/compta/tva/card.php +++ b/htdocs/compta/tva/card.php @@ -372,7 +372,5 @@ if ($id) print ""; } - -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/compta/tva/index.php b/htdocs/compta/tva/index.php index a5f45d0c72c..6445eb09f02 100644 --- a/htdocs/compta/tva/index.php +++ b/htdocs/compta/tva/index.php @@ -252,7 +252,5 @@ print ""; print ''; print ''; - -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/compta/tva/quadri.php b/htdocs/compta/tva/quadri.php index a8434a70868..0e4a66146aa 100644 --- a/htdocs/compta/tva/quadri.php +++ b/htdocs/compta/tva/quadri.php @@ -313,7 +313,5 @@ print ''; echo ''; echo ''; - -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/compta/tva/quadri_detail.php b/htdocs/compta/tva/quadri_detail.php index cedc38a2143..8175744a75d 100644 --- a/htdocs/compta/tva/quadri_detail.php +++ b/htdocs/compta/tva/quadri_detail.php @@ -638,6 +638,5 @@ else } echo ''; -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/compta/tva/quarter_report.php b/htdocs/compta/tva/quarter_report.php index e906b65ed4f..61d019894e8 100644 --- a/htdocs/compta/tva/quarter_report.php +++ b/htdocs/compta/tva/quarter_report.php @@ -707,6 +707,5 @@ if (!is_array($x_coll) || !is_array($x_paye)) { } print ''; -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/compta/ventilation/card.php b/htdocs/compta/ventilation/card.php index 463f8884242..59ed7fe9cde 100644 --- a/htdocs/compta/ventilation/card.php +++ b/htdocs/compta/ventilation/card.php @@ -160,6 +160,5 @@ else print "Error ID incorrect"; } -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/compta/ventilation/fournisseur/card.php b/htdocs/compta/ventilation/fournisseur/card.php index 9c69b613697..dc376de7c06 100644 --- a/htdocs/compta/ventilation/fournisseur/card.php +++ b/htdocs/compta/ventilation/fournisseur/card.php @@ -144,6 +144,5 @@ else print "Error ID incorrect"; } -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/compta/ventilation/fournisseur/list.php b/htdocs/compta/ventilation/fournisseur/list.php index 5213a4686be..888f9152240 100644 --- a/htdocs/compta/ventilation/fournisseur/list.php +++ b/htdocs/compta/ventilation/fournisseur/list.php @@ -100,6 +100,6 @@ else { print $db->error(); } -$db->close(); llxFooter(); +$db->close(); diff --git a/htdocs/contrat/info.php b/htdocs/contrat/info.php index 53af58a2415..2067247dbf6 100644 --- a/htdocs/contrat/info.php +++ b/htdocs/contrat/info.php @@ -55,6 +55,5 @@ print ''; print ''; -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/cron/info.php b/htdocs/cron/info.php index 1e13bd725b3..334a5da6890 100644 --- a/htdocs/cron/info.php +++ b/htdocs/cron/info.php @@ -55,6 +55,5 @@ dol_print_object_info($object); print ''; print ''; - -$db->close(); -llxFooter(); \ No newline at end of file +llxFooter(); +$db->close(); \ No newline at end of file