2016-02-08 16:51:29 +01:00
< ? php
2011-08-08 18:00:16 +02:00
/* Copyright ( c ) 2004 - 2011 Laurent Destailleur < eldy @ users . sourceforge . net >
2011-06-21 14:39:09 +02:00
*
* 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
2013-01-16 15:36:08 +01:00
* the Free Software Foundation ; either version 3 of the License , or
2011-06-21 14:39:09 +02:00
* ( at your option ) any later version .
*
* This program is distributed in the hope that it will be useful ,
* but WITHOUT ANY WARRANTY ; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
* GNU General Public License for more details .
*
* You should have received a copy of the GNU General Public License
2019-09-23 21:55:30 +02:00
* along with this program . If not , see < https :// www . gnu . org / licenses />.
2011-06-21 14:39:09 +02:00
*/
/**
2011-08-08 18:00:16 +02:00
* \file htdocs / adherents / stats / geo . php
2011-06-21 14:39:09 +02:00
* \ingroup member
2011-08-08 18:00:16 +02:00
* \brief Page with geographical statistics on members
*/
2011-06-21 14:39:09 +02:00
2012-08-22 23:24:21 +02:00
require '../../main.inc.php' ;
2012-08-22 23:11:24 +02:00
require_once DOL_DOCUMENT_ROOT . '/core/lib/member.lib.php' ;
2014-12-08 19:05:22 +01:00
require_once DOL_DOCUMENT_ROOT . '/core/lib/functions2.lib.php' ;
2013-06-05 16:24:32 +02:00
require_once DOL_DOCUMENT_ROOT . '/core/class/dolgraph.class.php' ;
2021-02-15 20:13:38 +01:00
require_once DOL_DOCUMENT_ROOT . '/adherents/class/adherent.class.php' ;
2011-06-21 14:39:09 +02:00
2020-04-10 10:59:32 +02:00
$graphwidth = DolGraph :: getDefaultGraphSizeForStats ( 'width' , 700 );
2011-06-21 14:39:09 +02:00
$mapratio = 0.5 ;
$graphheight = round ( $graphwidth * $mapratio );
2020-04-10 10:59:32 +02:00
$mode = GETPOST ( 'mode' ) ? GETPOST ( 'mode' ) : '' ;
2011-06-21 14:39:09 +02:00
// Security check
2020-05-21 09:12:18 +02:00
if ( $user -> socid > 0 ) {
2020-10-31 14:32:18 +01:00
$action = '' ;
$socid = $user -> socid ;
2011-06-21 14:39:09 +02:00
}
2020-04-10 10:59:32 +02:00
$result = restrictedArea ( $user , 'adherent' , '' , '' , 'cotisation' );
2011-06-21 14:39:09 +02:00
$year = strftime ( " %Y " , time ());
2021-06-14 01:11:39 +02:00
$startyear = $year - ( empty ( $conf -> global -> MAIN_STATS_GRAPHS_SHOW_N_YEARS ) ? 2 : max ( 1 , min ( 10 , $conf -> global -> MAIN_STATS_GRAPHS_SHOW_N_YEARS )));
2020-04-10 10:59:32 +02:00
$endyear = $year ;
2011-06-21 14:39:09 +02:00
2018-09-07 10:40:36 +02:00
// Load translation files required by the page
2020-09-21 01:28:26 +02:00
$langs -> loadLangs ( array ( " companies " , " members " , " banks " ));
2011-06-21 14:39:09 +02:00
/*
* View
*/
2021-02-15 20:13:38 +01:00
$memberstatic = new Adherent ( $db );
2020-04-10 10:59:32 +02:00
$arrayjs = array ( 'https://www.google.com/jsapi' );
2021-03-01 00:19:52 +01:00
if ( ! empty ( $conf -> dol_use_jmobile )) {
$arrayjs = array ();
}
2011-06-21 14:39:09 +02:00
2020-04-10 10:59:32 +02:00
$title = $langs -> trans ( " Statistics " );
2021-03-01 00:19:52 +01:00
if ( $mode == 'memberbycountry' ) {
$title = $langs -> trans ( " MembersStatisticsByCountries " );
}
if ( $mode == 'memberbystate' ) {
$title = $langs -> trans ( " MembersStatisticsByState " );
}
if ( $mode == 'memberbytown' ) {
$title = $langs -> trans ( " MembersStatisticsByTown " );
}
if ( $mode == 'memberbyregion' ) {
$title = $langs -> trans ( " MembersStatisticsByRegion " );
}
2014-04-10 22:13:59 +02:00
2019-01-27 11:55:16 +01:00
llxHeader ( '' , $title , '' , '' , 0 , 0 , $arrayjs );
2011-06-21 14:39:09 +02:00
2021-02-15 20:13:38 +01:00
print load_fiche_titre ( $title , '' , $memberstatic -> picto );
2011-06-21 14:39:09 +02:00
2021-03-16 18:42:35 +01:00
//dol_mkdir($dir);
2011-06-21 14:39:09 +02:00
2020-05-21 09:12:18 +02:00
if ( $mode ) {
2020-10-31 14:32:18 +01:00
// Define sql
if ( $mode == 'memberbycountry' ) {
$label = $langs -> trans ( " Country " );
$tab = 'statscountry' ;
$data = array ();
2021-03-16 18:42:35 +01:00
$sql = " SELECT COUNT(DISTINCT d.rowid) as nb, COUNT(s.rowid) as nbsubscriptions, MAX(d.datevalid) as lastdate, MAX(s.dateadh) as lastsubscriptiondate, c.code, c.label " ;
2020-10-31 14:32:18 +01:00
$sql .= " FROM " . MAIN_DB_PREFIX . " adherent as d " ;
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . " c_country as c on d.country = c.rowid " ;
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . " subscription as s ON s.fk_adherent = d.rowid " ;
$sql .= " WHERE d.entity IN ( " . getEntity ( 'adherent' ) . " ) " ;
2021-06-14 12:24:58 +02:00
$sql .= " AND d.statut <> " . Adherent :: STATUS_DRAFT ;
2020-10-31 14:32:18 +01:00
$sql .= " GROUP BY c.label, c.code " ;
//print $sql;
}
2014-04-10 22:13:59 +02:00
2020-05-21 09:12:18 +02:00
if ( $mode == 'memberbystate' ) {
$label = $langs -> trans ( " Country " );
2020-10-31 14:32:18 +01:00
$label2 = $langs -> trans ( " State " );
$tab = 'statsstate' ;
$data = array ();
2021-03-16 18:42:35 +01:00
$sql = " SELECT COUNT(DISTINCT d.rowid) as nb, COUNT(s.rowid) as nbsubscriptions, MAX(d.datevalid) as lastdate, MAX(s.dateadh) as lastsubscriptiondate, co.code, co.label, c.nom as label2 " ; //
2020-10-31 14:32:18 +01:00
$sql .= " FROM " . MAIN_DB_PREFIX . " adherent as d " ;
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . " c_departements as c on d.state_id = c.rowid " ;
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . " c_regions as r on c.fk_region = r.code_region " ;
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . " c_country as co on d.country = co.rowid " ;
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . " subscription as s ON s.fk_adherent = d.rowid " ;
$sql .= " WHERE d.entity IN ( " . getEntity ( 'adherent' ) . " ) " ;
2021-06-14 12:24:58 +02:00
$sql .= " AND d.statut <> " . Adherent :: STATUS_DRAFT ;
2020-10-31 14:32:18 +01:00
$sql .= " GROUP BY co.label, co.code, c.nom " ;
//print $sql;
}
if ( $mode == 'memberbyregion' ) { //
$label = $langs -> trans ( " Country " );
$label2 = $langs -> trans ( " Region " ); //département
$tab = 'statsregion' ; //onglet
$data = array (); //tableau de donnée
2021-03-16 18:42:35 +01:00
$sql = " SELECT COUNT(DISTINCT d.rowid) as nb, COUNT(s.rowid) as nbsubscriptions, MAX(d.datevalid) as lastdate, MAX(s.dateadh) as lastsubscriptiondate, co.code, co.label, r.nom as label2 " ;
2020-10-31 14:32:18 +01:00
$sql .= " FROM " . MAIN_DB_PREFIX . " adherent as d " ;
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . " c_departements as c on d.state_id = c.rowid " ;
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . " c_regions as r on c.fk_region = r.code_region " ;
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . " c_country as co on d.country = co.rowid " ;
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . " subscription as s ON s.fk_adherent = d.rowid " ;
$sql .= " WHERE d.entity IN ( " . getEntity ( 'adherent' ) . " ) " ;
2021-06-14 12:24:58 +02:00
$sql .= " AND d.statut <> " . Adherent :: STATUS_DRAFT ;
2020-10-31 14:32:18 +01:00
$sql .= " GROUP BY co.label, co.code, r.nom " ; //+
//print $sql;
}
if ( $mode == 'memberbytown' ) {
$label = $langs -> trans ( " Country " );
$label2 = $langs -> trans ( " Town " );
$tab = 'statstown' ;
$data = array ();
2021-03-16 18:42:35 +01:00
$sql = " SELECT COUNT(DISTINCT d.rowid) as nb, COUNT(s.rowid) as nbsubscriptions, MAX(d.datevalid) as lastdate, MAX(s.dateadh) as lastsubscriptiondate, c.code, c.label, d.town as label2 " ;
2020-10-31 14:32:18 +01:00
$sql .= " FROM " . MAIN_DB_PREFIX . " adherent as d " ;
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . " c_country as c on d.country = c.rowid " ;
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . " subscription as s ON s.fk_adherent = d.rowid " ;
$sql .= " WHERE d.entity IN ( " . getEntity ( 'adherent' ) . " ) " ;
2021-06-14 12:45:13 +02:00
$sql .= " AND d.statut <> " . Adherent :: STATUS_DRAFT ;
2020-10-31 14:32:18 +01:00
$sql .= " GROUP BY c.label, c.code, d.town " ;
//print $sql;
}
$langsen = new Translate ( '' , $conf );
$langsen -> setDefaultLang ( 'en_US' );
$langsen -> load ( " dict " );
//print $langsen->trans("Country"."FI");exit;
// Define $data array
dol_syslog ( " Count member " , LOG_DEBUG );
$resql = $db -> query ( $sql );
if ( $resql ) {
$num = $db -> num_rows ( $resql );
$i = 0 ;
while ( $i < $num ) {
$obj = $db -> fetch_object ( $resql );
if ( $mode == 'memberbycountry' ) {
2021-10-17 13:45:28 +02:00
$data [] = array ( 'label' => (( $obj -> code && $langs -> trans ( " Country " . $obj -> code ) != " Country " . $obj -> code ) ? img_picto ( '' , DOL_URL_ROOT . '/theme/common/flags/' . strtolower ( $obj -> code ) . '.png' , '' , 1 ) . ' ' . $langs -> trans ( " Country " . $obj -> code ) : ( $obj -> label ? $obj -> label : '<span class="opacitymedium">' . $langs -> trans ( " Unknown " ) . '</span>' )),
'label_en' => (( $obj -> code && $langsen -> transnoentitiesnoconv ( " Country " . $obj -> code ) != " Country " . $obj -> code ) ? $langsen -> transnoentitiesnoconv ( " Country " . $obj -> code ) : ( $obj -> label ? $obj -> label : '<span class="opacitymedium">' . $langs -> trans ( " Unknown " ) . '</span>' )),
'code' => $obj -> code ,
'nb' => $obj -> nb ,
'lastdate' => $db -> jdate ( $obj -> lastdate ),
'lastsubscriptiondate' => $db -> jdate ( $obj -> lastsubscriptiondate )
2020-10-31 14:32:18 +01:00
);
}
if ( $mode == 'memberbyregion' ) { //+
2020-05-21 09:12:18 +02:00
$data [] = array (
2021-10-17 13:45:28 +02:00
'label' => (( $obj -> code && $langs -> trans ( " Country " . $obj -> code ) != " Country " . $obj -> code ) ? img_picto ( '' , DOL_URL_ROOT . '/theme/common/flags/' . strtolower ( $obj -> code ) . '.png' , '' , 1 ) . ' ' . $langs -> trans ( " Country " . $obj -> code ) : ( $obj -> label ? $obj -> label : '<span class="opacitymedium">' . $langs -> trans ( " Unknown " ) . '</span>' )),
'label_en' => (( $obj -> code && $langsen -> transnoentitiesnoconv ( " Country " . $obj -> code ) != " Country " . $obj -> code ) ? $langsen -> transnoentitiesnoconv ( " Country " . $obj -> code ) : ( $obj -> label ? $obj -> label : '<span class="opacitymedium">' . $langs -> trans ( " Unknown " ) . '</span>' )),
'label2' => ( $obj -> label2 ? $obj -> label2 : '<span class="opacitymedium">' . $langs -> trans ( " Unknown " ) . '</span>' ),
2019-02-03 14:29:45 +01:00
'nb' => $obj -> nb ,
2019-03-07 12:22:24 +01:00
'lastdate' => $db -> jdate ( $obj -> lastdate ),
2020-10-31 14:32:18 +01:00
'lastsubscriptiondate' => $db -> jdate ( $obj -> lastsubscriptiondate )
);
}
if ( $mode == 'memberbystate' ) {
2021-10-17 13:45:28 +02:00
$data [] = array ( 'label' => (( $obj -> code && $langs -> trans ( " Country " . $obj -> code ) != " Country " . $obj -> code ) ? img_picto ( '' , DOL_URL_ROOT . '/theme/common/flags/' . strtolower ( $obj -> code ) . '.png' , '' , 1 ) . ' ' . $langs -> trans ( " Country " . $obj -> code ) : ( $obj -> label ? $obj -> label : '<span class="opacitymedium">' . $langs -> trans ( " Unknown " ) . '</span>' )),
'label_en' => (( $obj -> code && $langsen -> transnoentitiesnoconv ( " Country " . $obj -> code ) != " Country " . $obj -> code ) ? $langsen -> transnoentitiesnoconv ( " Country " . $obj -> code ) : ( $obj -> label ? $obj -> label : '<span class="opacitymedium">' . $langs -> trans ( " Unknown " ) . '</span>' )),
'label2' => ( $obj -> label2 ? $obj -> label2 : '<span class="opacitymedium">' . $langs -> trans ( " Unknown " ) . '</span>' ),
'nb' => $obj -> nb ,
'lastdate' => $db -> jdate ( $obj -> lastdate ),
'lastsubscriptiondate' => $db -> jdate ( $obj -> lastsubscriptiondate )
2020-10-31 14:32:18 +01:00
);
}
if ( $mode == 'memberbytown' ) {
2021-10-17 13:45:28 +02:00
$data [] = array ( 'label' => (( $obj -> code && $langs -> trans ( " Country " . $obj -> code ) != " Country " . $obj -> code ) ? img_picto ( '' , DOL_URL_ROOT . '/theme/common/flags/' . strtolower ( $obj -> code ) . '.png' , '' , 1 ) . ' ' . $langs -> trans ( " Country " . $obj -> code ) : ( $obj -> label ? $obj -> label : '<span class="opacitymedium">' . $langs -> trans ( " Unknown " ) . '</span>' )),
'label_en' => (( $obj -> code && $langsen -> transnoentitiesnoconv ( " Country " . $obj -> code ) != " Country " . $obj -> code ) ? $langsen -> transnoentitiesnoconv ( " Country " . $obj -> code ) : ( $obj -> label ? $obj -> label : '<span class="opacitymedium">' . $langs -> trans ( " Unknown " ) . '</span>' )),
'label2' => ( $obj -> label2 ? $obj -> label2 : '<span class="opacitymedium">' . $langs -> trans ( " Unknown " ) . '</span>' ),
'nb' => $obj -> nb ,
'lastdate' => $db -> jdate ( $obj -> lastdate ),
'lastsubscriptiondate' => $db -> jdate ( $obj -> lastsubscriptiondate )
2020-10-31 14:32:18 +01:00
);
}
$i ++ ;
}
$db -> free ( $resql );
} else {
dol_print_error ( $db );
}
2011-06-21 14:39:09 +02:00
}
2021-03-16 18:42:35 +01:00
$head = member_stats_prepare_head ( $memberstatic );
2011-06-21 14:39:09 +02:00
2021-02-15 20:13:38 +01:00
print dol_get_fiche_head ( $head , $tab , '' , - 1 , '' );
2011-06-21 14:39:09 +02:00
// Print title
2020-05-21 09:12:18 +02:00
if ( $mode && ! count ( $data )) {
2020-10-31 14:32:18 +01:00
print $langs -> trans ( " NoValidatedMemberYet " ) . '<br>' ;
print '<br>' ;
2020-05-21 00:47:16 +02:00
} else {
2021-03-01 00:19:52 +01:00
if ( $mode == 'memberbycountry' ) {
print '<span class="opacitymedium">' . $langs -> trans ( " MembersByCountryDesc " ) . '</span><br>' ;
} elseif ( $mode == 'memberbystate' ) {
print '<span class="opacitymedium">' . $langs -> trans ( " MembersByStateDesc " ) . '</span><br>' ;
} elseif ( $mode == 'memberbytown' ) {
print '<span class="opacitymedium">' . $langs -> trans ( " MembersByTownDesc " ) . '</span><br>' ;
} elseif ( $mode == 'memberbyregion' ) {
print '<span class="opacitymedium">' . $langs -> trans ( " MembersByRegion " ) . '</span><br>' ; //+
} else {
2020-10-31 14:32:18 +01:00
print '<span class="opacitymedium">' . $langs -> trans ( " MembersStatisticsDesc " ) . '</span><br>' ;
print '<br>' ;
print '<a href="' . $_SERVER [ " PHP_SELF " ] . '?mode=memberbycountry">' . $langs -> trans ( " MembersStatisticsByCountries " ) . '</a><br>' ;
print '<br>' ;
print '<a href="' . $_SERVER [ " PHP_SELF " ] . '?mode=memberbystate">' . $langs -> trans ( " MembersStatisticsByState " ) . '</a><br>' ;
print '<br>' ;
print '<a href="' . $_SERVER [ " PHP_SELF " ] . '?mode=memberbytown">' . $langs -> trans ( " MembersStatisticsByTown " ) . '</a><br>' ;
print '<br>' ; //+
2020-04-10 10:59:32 +02:00
print '<a href="' . $_SERVER [ " PHP_SELF " ] . '?mode=memberbyregion">' . $langs -> trans ( " MembersStatisticsByRegion " ) . '</a><br>' ; //+
2020-10-31 14:32:18 +01:00
}
print '<br>' ;
2011-06-21 14:39:09 +02:00
}
// Show graphics
2020-05-21 09:12:18 +02:00
if ( count ( $arrayjs ) && $mode == 'memberbycountry' ) {
2020-10-31 14:32:18 +01:00
$color_file = DOL_DOCUMENT_ROOT . '/theme/' . $conf -> theme . '/theme_vars.inc.php' ;
2021-03-01 00:19:52 +01:00
if ( is_readable ( $color_file )) {
2021-04-06 22:18:32 +02:00
include $color_file ;
2021-03-01 00:19:52 +01:00
}
2020-10-31 14:32:18 +01:00
// Assume we've already included the proper headers so just call our script inline
// More doc: https://developers.google.com/chart/interactive/docs/gallery/geomap?hl=fr-FR
print " \n <script type='text/javascript'> \n " ;
print " google.load('visualization', '1', { 'packages': ['geomap']}); \n " ;
print " google.setOnLoadCallback(drawMap); \n " ;
print " function drawMap() { \n \t var data = new google.visualization.DataTable(); \n " ;
// Get the total number of rows
print " \t data.addRows( " . count ( $data ) . " ); \n " ;
print " \t data.addColumn('string', 'Country'); \n " ;
print " \t data.addColumn('number', 'Number'); \n " ;
// loop and dump
$i = 0 ;
foreach ( $data as $val ) {
$valcountry = strtoupper ( $val [ 'code' ]); // Should be ISO-3166 code (faster)
//$valcountry=ucfirst($val['label_en']);
2021-03-01 00:19:52 +01:00
if ( $valcountry == 'Great Britain' ) {
$valcountry = 'United Kingdom' ;
} // fix case of uk (when we use labels)
2020-10-31 14:32:18 +01:00
print " \t data.setValue( " . $i . " , 0, \" " . $valcountry . " \" ); \n " ;
print " \t data.setValue( " . $i . " , 1, " . $val [ 'nb' ] . " ); \n " ;
// Google's Geomap only supports up to 400 entries
2021-03-01 00:19:52 +01:00
if ( $i >= 400 ) {
break ;
}
2020-10-31 14:32:18 +01:00
$i ++ ;
}
print " \t var options = { }; \n " ;
print " \t options['dataMode'] = 'regions'; \n " ;
print " \t options['showZoomOut'] = false; \n " ;
//print "\toptions['zoomOutLabel'] = '".dol_escape_js($langs->transnoentitiesnoconv("Numbers"))."';\n";
print " \t options['width'] = " . $graphwidth . " ; \n " ;
print " \t options['height'] = " . $graphheight . " ; \n " ;
print " \t options['colors'] = [0x " . colorArrayToHex ( $theme_datacolor [ 1 ], 'BBBBBB' ) . " , 0x " . colorArrayToHex ( $theme_datacolor [ 0 ], '444444' ) . " ]; \n " ;
print " \t var container = document.getElementById(' " . $mode . " '); \n " ;
print " \t var geomap = new google.visualization.GeoMap(container); \n " ;
print " \t geomap.draw(data, options); \n " ;
print " }; \n " ;
print " </script> \n " ;
// print the div tag that will contain the map
print '<div class="center" id="' . $mode . '"></div>' . " \n " ;
2011-06-21 14:39:09 +02:00
}
2020-05-21 09:12:18 +02:00
if ( $mode ) {
2020-10-31 14:32:18 +01:00
// Print array
2020-09-21 01:28:26 +02:00
print '<div class="div-table-responsive">' ; // You can use div-table-responsive-no-min if you dont need reserved height for your table
print '<table class="liste centpercent">' ;
2020-10-31 14:32:18 +01:00
print '<tr class="liste_titre">' ;
print '<td>' . $label . '</td>' ;
2021-03-16 18:42:35 +01:00
if ( isset ( $label2 )) {
2021-03-01 00:19:52 +01:00
print '<td class="center">' . $label2 . '</td>' ;
}
2020-10-31 14:32:18 +01:00
print '<td class="right">' . $langs -> trans ( " NbOfMembers " ) . ' <span class="opacitymedium">(' . $langs -> trans ( " AllTime " ) . ')</span></td>' ;
print '<td class="center">' . $langs -> trans ( " LastMemberDate " ) . '</td>' ;
print '<td class="center">' . $langs -> trans ( " LatestSubscriptionDate " ) . '</td>' ;
print '</tr>' ;
foreach ( $data as $val ) {
2021-08-31 20:15:41 +02:00
$year = isset ( $val [ 'year' ]) ? $val [ 'year' ] : '' ;
2020-10-31 14:32:18 +01:00
print '<tr class="oddeven">' ;
print '<td>' . $val [ 'label' ] . '</td>' ;
2021-03-16 18:42:35 +01:00
if ( isset ( $label2 )) {
2021-03-01 00:19:52 +01:00
print '<td class="center">' . $val [ 'label2' ] . '</td>' ;
}
2020-10-31 14:32:18 +01:00
print '<td class="right">' . $val [ 'nb' ] . '</td>' ;
print '<td class="center">' . dol_print_date ( $val [ 'lastdate' ], 'dayhour' ) . '</td>' ;
print '<td class="center">' . dol_print_date ( $val [ 'lastsubscriptiondate' ], 'dayhour' ) . '</td>' ;
print '</tr>' ;
}
print '</table>' ;
print '</div>' ;
2011-06-21 14:39:09 +02:00
}
2020-10-27 18:19:31 +01:00
print dol_get_fiche_end ();
2011-06-21 14:39:09 +02:00
2018-07-28 14:29:28 +02:00
// End of page
2011-08-27 16:24:16 +02:00
llxFooter ();
2012-11-21 23:01:36 +01:00
$db -> close ();