diff --git a/htdocs/admin/system/about.php b/htdocs/admin/system/about.php index db16c024c13..889885bb6ea 100644 --- a/htdocs/admin/system/about.php +++ b/htdocs/admin/system/about.php @@ -51,8 +51,8 @@ print ''; print $langs->trans("Developpers").':'; print ''; //print "
\n"; diff --git a/htdocs/core/modules/export/export_excel.modules.php b/htdocs/core/modules/export/export_excel.modules.php index 734b38f601a..05a2c68f5d9 100644 --- a/htdocs/core/modules/export/export_excel.modules.php +++ b/htdocs/core/modules/export/export_excel.modules.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2006-2015 Laurent Destailleur * Copyright (C) 2012 Marcos GarcĂ­a * * This program is free software; you can redistribute it and/or modify @@ -65,8 +65,21 @@ class ExportExcel extends ModeleExports $this->version='1.30'; // Driver version // If driver use an external library, put its name here - $this->label_lib='PhpExcel'; - $this->version_lib='1.7.8'; + if (! empty($conf->global->MAIN_USE_PHP_WRITEEXCEL)) + { + require_once PHP_WRITEEXCEL_PATH.'class.writeexcel_workbookbig.inc.php'; + require_once PHP_WRITEEXCEL_PATH.'class.writeexcel_worksheet.inc.php'; + require_once PHP_WRITEEXCEL_PATH.'functions.writeexcel_utility.inc.php'; + $this->label_lib='PhpWriteExcel'; + $this->version_lib='unknown'; + } + else + { + require_once PHPEXCEL_PATH.'PHPExcel.php'; + require_once PHPEXCEL_PATH.'PHPExcel/Style/Alignment.php'; + $this->label_lib='PhpExcel'; + $this->version_lib='1.8.0'; // No way to get info from library + } $this->disabled = (in_array(constant('PHPEXCEL_PATH'),array('disabled','disabled/'))?1:0); // A condition to disable module (used for native debian packages) diff --git a/htdocs/core/modules/export/export_excel2007.modules.php b/htdocs/core/modules/export/export_excel2007.modules.php index 4f37a2e323e..dcb649e780d 100644 --- a/htdocs/core/modules/export/export_excel2007.modules.php +++ b/htdocs/core/modules/export/export_excel2007.modules.php @@ -64,10 +64,23 @@ class ExportExcel2007 extends ExportExcel $this->picto='mime/xls'; // Picto $this->version='1.30'; // Driver version - // If driver use an external library, put its name here - $this->label_lib='PhpExcel'; - $this->version_lib='1.7.8'; - + // If driver use an external library, put its name here + if (! empty($conf->global->MAIN_USE_PHP_WRITEEXCEL)) + { + require_once PHP_WRITEEXCEL_PATH.'class.writeexcel_workbookbig.inc.php'; + require_once PHP_WRITEEXCEL_PATH.'class.writeexcel_worksheet.inc.php'; + require_once PHP_WRITEEXCEL_PATH.'functions.writeexcel_utility.inc.php'; + $this->label_lib='PhpWriteExcel'; + $this->version_lib='unknown'; + } + else + { + require_once PHPEXCEL_PATH.'PHPExcel.php'; + require_once PHPEXCEL_PATH.'PHPExcel/Style/Alignment.php'; + $this->label_lib='PhpExcel'; + $this->version_lib='1.8.0'; // No way to get info from library + } + $this->disabled = (in_array(constant('PHPEXCEL_PATH'),array('disabled','disabled/'))?1:0); // A condition to disable module (used for native debian packages) $this->row=0; diff --git a/htdocs/exports/index.php b/htdocs/exports/index.php index d76c6f506d5..bf002ccde96 100644 --- a/htdocs/exports/index.php +++ b/htdocs/exports/index.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2005-2015 Laurent Destailleur * * 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 @@ -52,7 +52,7 @@ print $langs->trans("FormatedExportDesc3").'
'; print '
'; -print '
'; +print '
'; // List export set @@ -110,7 +110,7 @@ if (count($export->array_export_code)) print '
'; print '
'; -print '
'; +print '
'; // List of available export format diff --git a/htdocs/imports/import.php b/htdocs/imports/import.php index c2dbcae5a37..c46854ec5c1 100644 --- a/htdocs/imports/import.php +++ b/htdocs/imports/import.php @@ -1,7 +1,7 @@ +/* Copyright (C) 2005-2015 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin - * Copyright (C) 2012 Christophe Battarel + * Copyright (C) 2012 Christophe Battarel * * 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 diff --git a/htdocs/imports/index.php b/htdocs/imports/index.php index ada73d97559..360e713f9ab 100644 --- a/htdocs/imports/index.php +++ b/htdocs/imports/index.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2005-2015 Laurent Destailleur * * 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 @@ -48,7 +48,7 @@ print $langs->trans("FormatedImportDesc2").'
'; print '
'; -print '
'; +print '
'; // List of import set @@ -101,7 +101,7 @@ print '
'; print '
'; -print '
'; +print '
'; // List of available import format diff --git a/htdocs/langs/en_US/other.lang b/htdocs/langs/en_US/other.lang index 5cb000408da..83cb5c7e428 100644 --- a/htdocs/langs/en_US/other.lang +++ b/htdocs/langs/en_US/other.lang @@ -204,6 +204,7 @@ ClickHereToGoTo=Click here to go to %s YouMustClickToChange=You must however first click on the following link to validate this password change ForgetIfNothing=If you didn't request this change, just forget this email. Your credentials are kept safe. IfAmountHigherThan=If amount higher than %s +SourcesRepository=Repository for sources ##### Calendar common ##### AddCalendarEntry=Add entry in calendar %s diff --git a/htdocs/user/hierarchy.php b/htdocs/user/hierarchy.php index b2090501789..a1118242a66 100644 --- a/htdocs/user/hierarchy.php +++ b/htdocs/user/hierarchy.php @@ -1,7 +1,7 @@ * Copyright (C) 2005 Eric Seigne - * Copyright (C) 2006-2011 Laurent Destailleur + * Copyright (C) 2006-2015 Laurent Destailleur * Copyright (C) 2007 Patrick Raguin * Copyright (C) 2005-2012 Regis Houssin * @@ -116,7 +116,7 @@ $nbofentries=(count($data) - 1); if ($nbofentries > 0) { - print ''; + print ''; tree_recur($data,$data[0],0); print ''; } diff --git a/htdocs/user/index.php b/htdocs/user/index.php index 97c93316330..97b6feac508 100644 --- a/htdocs/user/index.php +++ b/htdocs/user/index.php @@ -45,6 +45,7 @@ $search_login=GETPOST('search_login','alpha'); $search_lastname=GETPOST('search_lastname','alpha'); $search_firstname=GETPOST('search_firstname','alpha'); $search_statut=GETPOST('search_statut','alpha'); +$search_thirdparty=GETPOST('search_thirdparty','alpha'); $sortfield = GETPOST('sortfield','alpha'); $sortorder = GETPOST('sortorder','alpha'); @@ -90,19 +91,14 @@ else { $sql.= " WHERE u.entity IN (".getEntity('user',1).")"; } -if (! empty($socid)) $sql.= " AND u.fk_soc = ".$socid; -if (! empty($search_user)) -{ - $sql.= " AND (u.login LIKE '%".$db->escape($search_user)."%' OR u.lastname LIKE '%".$db->escape($search_user)."%' OR u.firstname LIKE '%".$db->escape($search_user)."%')"; -} +if ($socid > 0) $sql.= " AND u.fk_soc = ".$socid; +if ($search_user != '') $sql.=natural_search(array('u.login', 'u.lastname', 'u.firstname'), $search_user); +if ($search_thirdparty != '') $sql.=natural_search(array('s.nom'), $search_thirdparty); if ($search_login != '') $sql.= natural_search("u.login", $search_login); if ($search_lastname != '') $sql.= natural_search("u.lastname", $search_lastname); if ($search_firstname != '') $sql.= natural_search("u.firstname", $search_firstname); -if ($search_statut != '' && $search_statut >= 0) -{ - $sql.= " AND (u.statut=".$search_statut.")"; -} -if ($sall) $sql.= " AND (u.login LIKE '%".$db->escape($sall)."%' OR u.lastname LIKE '%".$db->escape($sall)."%' OR u.firstname LIKE '%".$db->escape($sall)."%' OR u.email LIKE '%".$db->escape($sall)."%' OR u.note LIKE '%".$db->escape($sall)."%')"; +if ($search_statut != '' && $search_statut >= 0) $sql.= " AND (u.statut=".$search_statut.")"; +if ($sall) $sql.= natural_search(array('u.login', 'u.lastname', 'u.firstname', 'u.email', 'u.note'), $sall); $sql.=$db->order($sortfield,$sortorder); $result = $db->query($sql); @@ -133,13 +129,14 @@ if ($result) print_liste_field_titre(''); print "\n"; - // SearchBar - $colspan=4; + // Search bar + $colspan=3; if (! empty($conf->multicompany->enabled) && empty($conf->multicompany->transverse_mode)) $colspan++; print ''; print ''; print ''; print ''; + print ''; print ' '; // Status