diff --git a/htdocs/adherents/info_subscription.php b/htdocs/adherents/info_subscription.php index 3169eb49ad90e9c8d91760b8d0d47ee073cb4f00..32b061525e785bf51152068b308b2f1087ea07b3 100644 --- a/htdocs/adherents/info_subscription.php +++ b/htdocs/adherents/info_subscription.php @@ -1,5 +1,5 @@ <?php -/* Copyright (C) 2005-2009 Laurent Destailleur <eldy@users.sourceforge.net> +/* Copyright (C) 2005-2011 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2005-2006 Regis Houssin <regis@dolibarr.fr> * * This program is free software; you can redistribute it and/or modify @@ -17,10 +17,10 @@ */ /** - * \file htdocs/adherents/info.php + * \file htdocs/adherents/info_subscription.php * \ingroup member - * \brief Page des informations d'un adherent - * \version $Id: info_subscription.php,v 1.12 2011/07/31 22:23:28 eldy Exp $ + * \brief Page with information of subscriptions of a member + * \version $Id: info_subscription.php,v 1.13 2011/08/08 16:00:18 eldy Exp $ */ require("../main.inc.php"); @@ -80,5 +80,5 @@ print '</div>'; $db->close(); -llxFooter('$Date: 2011/07/31 22:23:28 $ - $Revision: 1.12 $'); +llxFooter('$Date: 2011/08/08 16:00:18 $ - $Revision: 1.13 $'); ?> diff --git a/htdocs/adherents/stats/geo.php b/htdocs/adherents/stats/geo.php index d4f77769db0da26970e0982c803ac75ab6d838b0..ced2d47e57f87b5a7d013538d43cdb32131e0d77 100755 --- a/htdocs/adherents/stats/geo.php +++ b/htdocs/adherents/stats/geo.php @@ -1,6 +1,5 @@ <?php -/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> - * Copyright (c) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net> +/* Copyright (c) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net> * * 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 @@ -17,11 +16,11 @@ */ /** - * \file htdocs/adherents/stats/index.php + * \file htdocs/adherents/stats/geo.php * \ingroup member - * \brief Page des stats - * \version $Id: geo.php,v 1.2 2011/08/03 00:45:44 eldy Exp $ -*/ + * \brief Page with geographical statistics on members + * \version $Id: geo.php,v 1.3 2011/08/08 16:00:20 eldy Exp $ + */ require("../../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/core/class/dolgraph.class.php"); @@ -37,8 +36,8 @@ $mode=GETPOST('mode')?GETPOST('mode'):''; // Security check if ($user->societe_id > 0) { - $action = ''; - $socid = $user->societe_id; + $action = ''; + $socid = $user->societe_id; } if (! $user->rights->adherent->cotisation->lire) accessforbidden(); @@ -67,34 +66,34 @@ create_exdir($dir); if ($mode) { - // Define sql - if ($mode == 'memberbycountry') - { - $label=$langs->trans("Country"); + // Define sql + if ($mode == 'memberbycountry') + { + $label=$langs->trans("Country"); $tab='statscountry'; - $data = array(); - $sql.="SELECT COUNT(d.rowid) as nb, MAX(d.datevalid) as lastdate, c.code, c.libelle as label"; - $sql.=" FROM ".MAIN_DB_PREFIX."adherent as d LEFT JOIN ".MAIN_DB_PREFIX."c_pays as c on d.pays = c.rowid"; - $sql.=" WHERE d.statut = 1"; - $sql.=" GROUP BY c.libelle, c.code"; - //print $sql; - } - if ($mode == 'memberbystate') - { + $data = array(); + $sql.="SELECT COUNT(d.rowid) as nb, MAX(d.datevalid) as lastdate, c.code, c.libelle as label"; + $sql.=" FROM ".MAIN_DB_PREFIX."adherent as d LEFT JOIN ".MAIN_DB_PREFIX."c_pays as c on d.pays = c.rowid"; + $sql.=" WHERE d.statut = 1"; + $sql.=" GROUP BY c.libelle, c.code"; + //print $sql; + } + if ($mode == 'memberbystate') + { $label=$langs->trans("Country"); - $label2=$langs->trans("State"); + $label2=$langs->trans("State"); $tab='statsstate'; - $data = array(); - $sql.="SELECT COUNT(d.rowid) as nb, MAX(d.datevalid) as lastdate, p.code, p.libelle as label, c.nom as label2"; - $sql.=" FROM ".MAIN_DB_PREFIX."adherent as d LEFT JOIN ".MAIN_DB_PREFIX."c_departements as c on d.fk_departement = c.rowid"; + $data = array(); + $sql.="SELECT COUNT(d.rowid) as nb, MAX(d.datevalid) as lastdate, p.code, p.libelle as label, c.nom as label2"; + $sql.=" FROM ".MAIN_DB_PREFIX."adherent as d LEFT JOIN ".MAIN_DB_PREFIX."c_departements as c on d.fk_departement = 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_pays as p on d.pays = p.rowid"; $sql.=" WHERE d.statut = 1"; - $sql.=" GROUP BY p.libelle, p.code, c.nom"; - //print $sql; - } + $sql.=" GROUP BY p.libelle, p.code, c.nom"; + //print $sql; + } if ($mode == 'memberbytown') { $label=$langs->trans("Country"); @@ -110,39 +109,39 @@ if ($mode) //print $sql; } - $langsen=new Translate('',$conf); + $langsen=new Translate('',$conf); $langsen->setDefaultLang('en_US'); $langsen->load("dict"); //print $langsen->trans("Country"."FI");exit; - // Define $data array - dol_syslog("Count member sql=".$sql); - $resql=$db->query($sql); - if ($resql) - { - $num=$db->num_rows($resql); - $i=0; - while ($i < $num) - { - $obj=$db->fetch_object($resql); - if ($mode == 'memberbycountry') - { - $data[]=array('label'=>(($obj->code && $langs->trans("Country".$obj->code)!="Country".$obj->code)?$langs->trans("Country".$obj->code):($obj->label?$obj->label:$langs->trans("Unknown"))), + // Define $data array + dol_syslog("Count member sql=".$sql); + $resql=$db->query($sql); + if ($resql) + { + $num=$db->num_rows($resql); + $i=0; + while ($i < $num) + { + $obj=$db->fetch_object($resql); + if ($mode == 'memberbycountry') + { + $data[]=array('label'=>(($obj->code && $langs->trans("Country".$obj->code)!="Country".$obj->code)?$langs->trans("Country".$obj->code):($obj->label?$obj->label:$langs->trans("Unknown"))), 'label_en'=>(($obj->code && $langsen->transnoentitiesnoconv("Country".$obj->code)!="Country".$obj->code)?$langsen->transnoentitiesnoconv("Country".$obj->code):($obj->label?$obj->label:$langs->trans("Unknown"))), 'code'=>$obj->code, 'nb'=>$obj->nb, 'lastdate'=>$db->jdate($obj->lastdate) - ); - } - if ($mode == 'memberbystate') - { - $data[]=array('label'=>(($obj->code && $langs->trans("Country".$obj->code)!="Country".$obj->code)?$langs->trans("Country".$obj->code):($obj->label?$obj->label:$langs->trans("Unknown"))), + ); + } + if ($mode == 'memberbystate') + { + $data[]=array('label'=>(($obj->code && $langs->trans("Country".$obj->code)!="Country".$obj->code)?$langs->trans("Country".$obj->code):($obj->label?$obj->label:$langs->trans("Unknown"))), 'label_en'=>(($obj->code && $langsen->transnoentitiesnoconv("Country".$obj->code)!="Country".$obj->code)?$langsen->transnoentitiesnoconv("Country".$obj->code):($obj->label?$obj->label:$langs->trans("Unknown"))), 'label2'=>($obj->label2?$obj->label2:$langs->trans("Unknown")), 'nb'=>$obj->nb, 'lastdate'=>$db->jdate($obj->lastdate) - ); - } + ); + } if ($mode == 'memberbytown') { $data[]=array('label'=>(($obj->code && $langs->trans("Country".$obj->code)!="Country".$obj->code)?$langs->trans("Country".$obj->code):($obj->label?$obj->label:$langs->trans("Unknown"))), @@ -153,14 +152,14 @@ if ($mode) ); } - $i++; - } - $db->free($resql); - } - else - { - dol_print_error($db); - } + $i++; + } + $db->free($resql); + } + else + { + dol_print_error($db); + } } @@ -172,101 +171,101 @@ dol_fiche_head($head, $tab, $langs->trans("Statistics"), 0, 'user'); // Print title if ($mode && ! sizeof($data)) { - print $langs->trans("NoValidatedMemberYet").'<br>'; - print '<br>'; + print $langs->trans("NoValidatedMemberYet").'<br>'; + print '<br>'; } else { - if ($mode == 'memberbycountry') print $langs->trans("MembersByCountryDesc").'<br>'; - else if ($mode == 'memberbystate') print $langs->trans("MembersByStateDesc").'<br>'; + if ($mode == 'memberbycountry') print $langs->trans("MembersByCountryDesc").'<br>'; + else if ($mode == 'memberbystate') print $langs->trans("MembersByStateDesc").'<br>'; else if ($mode == 'memberbytown') print $langs->trans("MembersByTownDesc").'<br>'; - else - { - print $langs->trans("MembersStatisticsDesc").'<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>'; + else + { + print $langs->trans("MembersStatisticsDesc").'<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>'; + } + print '<br>'; } // Show graphics if ($mode == 'memberbycountry') { - // Assume we've already included the proper headers so just call our script inline - print "\n<script type='text/javascript'>\n"; - print "google.load('visualization', '1', {'packages': ['geomap']});\n"; - print "google.setOnLoadCallback(drawMap);\n"; - print "function drawMap() {\n\tvar data = new google.visualization.DataTable();\n"; - - // Get the total number of rows - print "\tdata.addRows(".sizeof($data).");\n"; - print "\tdata.addColumn('string', 'Country');\n"; - print "\tdata.addColumn('number', 'Number');\n"; - - // loop and dump - $i=0; - foreach($data as $val) - { - //$valcountry=ucfirst($val['code']); - $valcountry=ucfirst($val['label_en']); + // Assume we've already included the proper headers so just call our script inline + print "\n<script type='text/javascript'>\n"; + print "google.load('visualization', '1', {'packages': ['geomap']});\n"; + print "google.setOnLoadCallback(drawMap);\n"; + print "function drawMap() {\n\tvar data = new google.visualization.DataTable();\n"; + + // Get the total number of rows + print "\tdata.addRows(".sizeof($data).");\n"; + print "\tdata.addColumn('string', 'Country');\n"; + print "\tdata.addColumn('number', 'Number');\n"; + + // loop and dump + $i=0; + foreach($data as $val) + { + //$valcountry=ucfirst($val['code']); + $valcountry=ucfirst($val['label_en']); // fix case of uk - if ($valcountry == 'Great Britain') { $valcountry = 'United Kingdom'; } - print "\tdata.setValue(".$i.", 0, \"".$valcountry."\");\n"; - print "\tdata.setValue(".$i.", 1, ".$val['nb'].");\n"; - // Google's Geomap only supports up to 400 entries - if ($i >= 400){ break; } - $i++; - } - - print "\tvar options = {};\n"; + if ($valcountry == 'Great Britain') { $valcountry = 'United Kingdom'; } + print "\tdata.setValue(".$i.", 0, \"".$valcountry."\");\n"; + print "\tdata.setValue(".$i.", 1, ".$val['nb'].");\n"; + // Google's Geomap only supports up to 400 entries + if ($i >= 400){ break; } + $i++; + } + + print "\tvar options = {};\n"; print "\toptions['dataMode'] = 'regions';\n"; print "\toptions['showZoomOut'] = false;\n"; //print "\toptions['zoomOutLabel'] = '".dol_escape_js($langs->transnoentitiesnoconv("Numbers"))."';\n"; - print "\toptions['width'] = ".$graphwidth.";\n"; - print "\toptions['height'] = ".$graphheight.";\n"; - print "\tvar container = document.getElementById('".$mode."');\n"; - print "\tvar geomap = new google.visualization.GeoMap(container);\n"; - print "\tgeomap.draw(data, options);\n"; - print "};\n"; - print "</script>\n"; - - // print the div tag that will contain the map - print '<div align="center" id="'.$mode.'"></div>'."\n"; - print '<br>'; + print "\toptions['width'] = ".$graphwidth.";\n"; + print "\toptions['height'] = ".$graphheight.";\n"; + print "\tvar container = document.getElementById('".$mode."');\n"; + print "\tvar geomap = new google.visualization.GeoMap(container);\n"; + print "\tgeomap.draw(data, options);\n"; + print "};\n"; + print "</script>\n"; + + // print the div tag that will contain the map + print '<div align="center" id="'.$mode.'"></div>'."\n"; + print '<br>'; } if ($mode) { - // Print array - print '<table class="border" width="100%">'; - print '<tr class="liste_titre">'; - print '<td align="center">'.$label.'</td>'; + // Print array + print '<table class="border" width="100%">'; + print '<tr class="liste_titre">'; + print '<td align="center">'.$label.'</td>'; if ($label2) print '<td align="center">'.$label2.'</td>'; - print '<td align="center">'.$langs->trans("NbOfMembers").'</td>'; - print '<td align="center">'.$langs->trans("LastMemberDate").'</td>'; - print '</tr>'; - - $oldyear=0; - $var=true; - foreach ($data as $val) - { - $year = $val['year']; - $var=!$var; - print '<tr '.$bc[$var].'>'; - print '<td align="center">'.$val['label'].'</td>'; + print '<td align="center">'.$langs->trans("NbOfMembers").'</td>'; + print '<td align="center">'.$langs->trans("LastMemberDate").'</td>'; + print '</tr>'; + + $oldyear=0; + $var=true; + foreach ($data as $val) + { + $year = $val['year']; + $var=!$var; + print '<tr '.$bc[$var].'>'; + print '<td align="center">'.$val['label'].'</td>'; if ($label2) print '<td align="center">'.$val['label2'].'</td>'; - print '<td align="right">'.$val['nb'].'</td>'; - print '<td align="right">'.dol_print_date($val['lastdate'],'dayhour').'</td>'; - print '</tr>'; - $oldyear=$year; - } + print '<td align="right">'.$val['nb'].'</td>'; + print '<td align="right">'.dol_print_date($val['lastdate'],'dayhour').'</td>'; + print '</tr>'; + $oldyear=$year; + } - print '</table>'; + print '</table>'; } @@ -275,5 +274,5 @@ dol_fiche_end(); $db->close(); -llxFooter('$Date: 2011/08/03 00:45:44 $ - $Revision: 1.2 $'); +llxFooter('$Date: 2011/08/08 16:00:20 $ - $Revision: 1.3 $'); ?> diff --git a/htdocs/admin/workflow.php b/htdocs/admin/workflow.php index aa2abd5146e651cc2dae0b857bd07d787ec1cd59..529b72793dc66a3d098df21b7f18ab72b8e25369 100755 --- a/htdocs/admin/workflow.php +++ b/htdocs/admin/workflow.php @@ -1,7 +1,7 @@ <?php /* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> * Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com> - * Copyright (C) 2005-2010 Laurent Destailleur <eldy@users.sourceforge.net> + * Copyright (C) 2005-2011 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2005-2010 Regis Houssin <regis@dolibarr.fr> * * This program is free software; you can redistribute it and/or modify @@ -19,10 +19,10 @@ */ /** - * \file htdocs/admin/societe.php + * \file htdocs/admin/workflow.php * \ingroup company - * \brief Third party module setup page - * \version $Id: workflow.php,v 1.5 2011/07/31 22:23:21 eldy Exp $ + * \brief Workflows setup page + * \version $Id: workflow.php,v 1.6 2011/08/08 16:00:18 eldy Exp $ */ require("../main.inc.php"); @@ -135,5 +135,5 @@ print '</table>'; $db->close(); -llxFooter('$Date: 2011/07/31 22:23:21 $ - $Revision: 1.5 $'); +llxFooter('$Date: 2011/08/08 16:00:18 $ - $Revision: 1.6 $'); ?> diff --git a/htdocs/projet/ganttchart.php b/htdocs/projet/ganttchart.php index e551205523fb8c4de736cf8c9985778a8c973529..17678e651abb1eb6ea4069743f34ccdef937f864 100644 --- a/htdocs/projet/ganttchart.php +++ b/htdocs/projet/ganttchart.php @@ -16,10 +16,10 @@ */ /** - * \file htdocs/projet/ganttview.php + * \file htdocs/projet/ganttchart.php * \ingroup projet - * \brief Gantt diagrame of a project - * \version $Id: ganttchart.php,v 1.7 2011/07/31 23:23:36 eldy Exp $ + * \brief Gantt diagram of a project + * \version $Id: ganttchart.php,v 1.8 2011/08/08 16:00:46 eldy Exp $ */ ?> diff --git a/htdocs/public/paypal/paymentko.php b/htdocs/public/paypal/paymentko.php index 5b3487d4f00313b66ccd4018fb808b2d299b4f38..356d460b9b01764fe57f7a9dbdaad22924aed00e 100755 --- a/htdocs/public/paypal/paymentko.php +++ b/htdocs/public/paypal/paymentko.php @@ -17,13 +17,13 @@ */ /** - * \file htdocs/public/paybox/paymentko.php - * \ingroup paybox + * \file htdocs/public/paypal/paymentko.php + * \ingroup paypal * \brief File to show page after a failed payment. * This page is called by paypal with url provided to payal competed with parameter TOKEN=xxx * This token can be used to get more informations. * \author Laurent Destailleur - * \version $Id: paymentko.php,v 1.7 2011/07/31 23:23:20 eldy Exp $ + * \version $Id: paymentko.php,v 1.8 2011/08/08 16:00:19 eldy Exp $ */ define("NOLOGIN",1); // This means this output page does not require to be logged. @@ -81,5 +81,5 @@ html_print_paypal_footer($mysoc,$langs); $db->close(); -llxFooterPaypal('$Date: 2011/07/31 23:23:20 $ - $Revision: 1.7 $'); +llxFooterPaypal('$Date: 2011/08/08 16:00:19 $ - $Revision: 1.8 $'); ?> diff --git a/htdocs/societe/notify/fiche.php b/htdocs/societe/notify/fiche.php index 15007f3a7351169a376c6ba9f40da27db756c36c..90761c9f2f9483a7d42a1f807af1b6d0ca52e925 100644 --- a/htdocs/societe/notify/fiche.php +++ b/htdocs/societe/notify/fiche.php @@ -19,9 +19,9 @@ /** * \file htdocs/societe/notify/fiche.php - * \ingroup societe, notification + * \ingroup societe notification * \brief Tab for notifications of third party - * \version $Id: fiche.php,v 1.70 2011/07/31 23:22:58 eldy Exp $ + * \version $Id: fiche.php,v 1.71 2011/08/08 16:00:16 eldy Exp $ */ require("../../main.inc.php"); @@ -349,6 +349,6 @@ if ( $soc->fetch($soc->id) ) $db->close(); -llxFooter('$Date: 2011/07/31 23:22:58 $ - $Revision: 1.70 $'); +llxFooter('$Date: 2011/08/08 16:00:16 $ - $Revision: 1.71 $'); ?>