From 0baf06d2d139bf5d092ebd28f088d793c8517205 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 5 Aug 2009 17:19:55 +0000 Subject: [PATCH] New: Add picto on tab titles --- htdocs/categories/categorie.php | 2 +- htdocs/comm/action/document.php | 4 +- htdocs/comm/action/fiche.php | 3 +- htdocs/comm/action/info.php | 18 +- htdocs/comm/fiche.php | 3 +- htdocs/comm/remise.php | 2 +- htdocs/comm/remx.php | 2 +- htdocs/compta/fiche.php | 2 +- htdocs/lib/usergroups.lib.php | 40 ++- htdocs/soc.php | 2 +- htdocs/societe/commerciaux.php | 360 +++++++++++++------------- htdocs/societe/document.php | 2 +- htdocs/societe/info.php | 2 +- htdocs/societe/lien.php | 438 ++++++++++++++++---------------- htdocs/societe/notify/fiche.php | 2 +- htdocs/societe/rib.php | 10 +- htdocs/societe/socnote.php | 2 +- htdocs/user/addon.php | 105 -------- htdocs/user/clicktodial.php | 24 +- htdocs/user/fiche.php | 2 +- htdocs/user/info.php | 2 +- htdocs/user/ldap.php | 16 +- htdocs/user/note.php | 2 +- htdocs/user/param_ihm.php | 10 +- htdocs/user/perms.php | 2 +- 25 files changed, 473 insertions(+), 584 deletions(-) delete mode 100644 htdocs/user/addon.php diff --git a/htdocs/categories/categorie.php b/htdocs/categories/categorie.php index 10657039279..f273e637bc1 100644 --- a/htdocs/categories/categorie.php +++ b/htdocs/categories/categorie.php @@ -141,7 +141,7 @@ if ($_GET["socid"]) */ $head = societe_prepare_head($soc); - dol_fiche_head($head, 'category', $langs->trans("ThirdParty")); + dol_fiche_head($head, 'category', $langs->trans("ThirdParty"),0,'company'); print ''; diff --git a/htdocs/comm/action/document.php b/htdocs/comm/action/document.php index 957b32c546e..e55f82869ec 100755 --- a/htdocs/comm/action/document.php +++ b/htdocs/comm/action/document.php @@ -102,7 +102,7 @@ if ($_GET["action"] == 'delete') /* - * Affiche onglet + * View */ llxHeader(); @@ -144,7 +144,7 @@ if ($objectid > 0) $head[$h][1] = $langs->trans('Info'); $h++; - dol_fiche_head($head, $hselected, $langs->trans("Action")); + dol_fiche_head($head, $hselected, $langs->trans("Action"),0,'task'); // Affichage fiche action en mode visu print '
trans('Info'); $h++; - dol_fiche_head($head, $hselected, $langs->trans("Action")); + dol_fiche_head($head, $hselected, $langs->trans("Action"),0,'task'); $now=gmmktime(); $delay_warning=$conf->global->MAIN_DELAY_ACTIONS_TODO*24*60*60; diff --git a/htdocs/comm/action/info.php b/htdocs/comm/action/info.php index aca84ebff93..37039a39656 100644 --- a/htdocs/comm/action/info.php +++ b/htdocs/comm/action/info.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2008 Laurent Destailleur + * Copyright (C) 2004-2009 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 @@ -18,11 +18,11 @@ */ /** - \file htdocs/comm/action/info.php - \ingroup agenda - \brief Page des informations d'une action - \version $Id$ -*/ + * \file htdocs/comm/action/info.php + * \ingroup agenda + * \brief Page des informations d'une action + * \version $Id$ + */ require("./pre.inc.php"); require_once(DOL_DOCUMENT_ROOT."/lib/functions2.lib.php"); @@ -40,9 +40,9 @@ if ($user->societe_id > 0) } + /* - * Visualisation de la fiche - * + * View */ llxHeader(); @@ -67,7 +67,7 @@ $head[$h][1] = $langs->trans('Info'); $hselected=$h; $h++; -dol_fiche_head($head, $hselected, $langs->trans("Action")); +dol_fiche_head($head, $hselected, $langs->trans("Action"),0,'task'); print '
'; diff --git a/htdocs/soc.php b/htdocs/soc.php index 355746e48cd..7c960062eec 100644 --- a/htdocs/soc.php +++ b/htdocs/soc.php @@ -954,7 +954,7 @@ else $head = societe_prepare_head($soc); - dol_fiche_head($head, 'company', $langs->trans("ThirdParty")); + dol_fiche_head($head, 'company', $langs->trans("ThirdParty"),0,'company'); // Confirm delete third party diff --git a/htdocs/societe/commerciaux.php b/htdocs/societe/commerciaux.php index 0c2ad851abe..e887bffba1b 100644 --- a/htdocs/societe/commerciaux.php +++ b/htdocs/societe/commerciaux.php @@ -18,12 +18,12 @@ */ /** - \file htdocs/societe/commerciaux.php - \ingroup societe - \brief Page d'affectations des commerciaux aux societes - \version $Id$ -*/ - + \file htdocs/societe/commerciaux.php + \ingroup societe + \brief Page d'affectations des commerciaux aux societes + \version $Id$ + */ + require("./pre.inc.php"); require_once(DOL_DOCUMENT_ROOT."/lib/company.lib.php"); @@ -40,201 +40,201 @@ $result = restrictedArea($user, 'societe','',''); /* -* Actions -*/ + * Actions + */ if($_GET["socid"] && $_GET["commid"]) { - if ($user->rights->societe->creer) - { - $soc = new Societe($db); - $soc->id = $_GET["socid"]; - $soc->fetch($_GET["socid"]); - $soc->add_commercial($user, $_GET["commid"]); + if ($user->rights->societe->creer) + { + $soc = new Societe($db); + $soc->id = $_GET["socid"]; + $soc->fetch($_GET["socid"]); + $soc->add_commercial($user, $_GET["commid"]); - Header("Location: commerciaux.php?socid=".$soc->id); - } - else - { - Header("Location: commerciaux.php?socid=".$_GET["socid"]); - } + Header("Location: commerciaux.php?socid=".$soc->id); + } + else + { + Header("Location: commerciaux.php?socid=".$_GET["socid"]); + } } if($_GET["socid"] && $_GET["delcommid"]) { - if ($user->rights->societe->creer) - { - $soc = new Societe($db); - $soc->id = $_GET["socid"]; - $soc->fetch($_GET["socid"]); - $soc->del_commercial($user, $_GET["delcommid"]); + if ($user->rights->societe->creer) + { + $soc = new Societe($db); + $soc->id = $_GET["socid"]; + $soc->fetch($_GET["socid"]); + $soc->del_commercial($user, $_GET["delcommid"]); - Header("Location: commerciaux.php?socid=".$soc->id); - exit; - } - else - { - Header("Location: commerciaux.php?socid=".$_GET["socid"]); - exit; - } + Header("Location: commerciaux.php?socid=".$soc->id); + exit; + } + else + { + Header("Location: commerciaux.php?socid=".$_GET["socid"]); + exit; + } } /* -* View -*/ + * View + */ llxHeader(); if ($_GET["socid"]) { - $soc = new Societe($db); - $soc->id = $_GET["socid"]; - $result=$soc->fetch($_GET["socid"]); - - $head=societe_prepare_head2($soc); - - dol_fiche_head($head, 'salesrepresentative', $langs->trans("ThirdParty")); - - /* - * Fiche soci�t� en mode visu - */ - - print '
'; diff --git a/htdocs/comm/fiche.php b/htdocs/comm/fiche.php index 646810d52a5..437a285d12f 100644 --- a/htdocs/comm/fiche.php +++ b/htdocs/comm/fiche.php @@ -124,7 +124,6 @@ if ($mode == 'search') } } - llxHeader('',$langs->trans('CustomerCard')); $userstatic=new User($db); @@ -149,7 +148,7 @@ if ($socid > 0) $head = societe_prepare_head($objsoc); - dol_fiche_head($head, 'customer', $langs->trans("ThirdParty")); + dol_fiche_head($head, 'customer', $langs->trans("ThirdParty"),0,'company'); /* diff --git a/htdocs/comm/remise.php b/htdocs/comm/remise.php index 76bb3fd7f5f..46c602d5641 100644 --- a/htdocs/comm/remise.php +++ b/htdocs/comm/remise.php @@ -89,7 +89,7 @@ if ($_socid > 0) */ $head = societe_prepare_head($objsoc); - dol_fiche_head($head, 'relativediscount', $langs->trans("ThirdParty")); + dol_fiche_head($head, 'relativediscount', $langs->trans("ThirdParty"),0,'company'); /* diff --git a/htdocs/comm/remx.php b/htdocs/comm/remx.php index 980093e0bee..56c7079960e 100644 --- a/htdocs/comm/remx.php +++ b/htdocs/comm/remx.php @@ -123,7 +123,7 @@ if ($_socid > 0) */ $head = societe_prepare_head($objsoc); - dol_fiche_head($head, 'absolutediscount', $langs->trans("ThirdParty")); + dol_fiche_head($head, 'absolutediscount', $langs->trans("ThirdParty"),0,'company'); print '
'; diff --git a/htdocs/compta/fiche.php b/htdocs/compta/fiche.php index 3f51630ea96..2786518d9a0 100644 --- a/htdocs/compta/fiche.php +++ b/htdocs/compta/fiche.php @@ -94,7 +94,7 @@ if ($socid > 0) */ $head = societe_prepare_head($societe); - dol_fiche_head($head, 'compta', $langs->trans("ThirdParty")); + dol_fiche_head($head, 'compta', $langs->trans("ThirdParty"),0,'company'); print ''; diff --git a/htdocs/lib/usergroups.lib.php b/htdocs/lib/usergroups.lib.php index f7b5ca3b3b0..c3e49045f9a 100644 --- a/htdocs/lib/usergroups.lib.php +++ b/htdocs/lib/usergroups.lib.php @@ -27,10 +27,10 @@ function user_prepare_head($user) { global $langs, $conf; $langs->load("users"); - + $h = 0; $head = array(); - + $head[$h][0] = DOL_URL_ROOT.'/user/fiche.php?id='.$user->id; $head[$h][1] = $langs->trans("UserCard"); $head[$h][2] = 'user'; @@ -44,7 +44,7 @@ function user_prepare_head($user) $head[$h][2] = 'ldap'; $h++; } - + $head[$h][0] = DOL_URL_ROOT.'/user/perms.php?id='.$user->id; $head[$h][1] = $langs->trans("UserRights"); $head[$h][2] = 'rights'; @@ -55,14 +55,6 @@ function user_prepare_head($user) $head[$h][2] = 'guisetup'; $h++; - if ($conf->bookmark4u->enabled) - { - $head[$h][0] = DOL_URL_ROOT.'/user/addon.php?id='.$user->id; - $head[$h][1] = $langs->trans("Other"); - $head[$h][2] = 'other'; - $h++; - } - if ($conf->clicktodial->enabled) { $head[$h][0] = DOL_URL_ROOT.'/user/clicktodial.php?id='.$user->id; @@ -88,10 +80,10 @@ function user_prepare_head($user) function group_prepare_head($group) { global $langs, $conf; - + $h = 0; $head = array(); - + $head[$h][0] = DOL_URL_ROOT.'/user/group/fiche.php?id='.$group->id; $head[$h][1] = $langs->trans("GroupCard"); $head[$h][2] = 'group'; @@ -105,7 +97,7 @@ function group_prepare_head($group) $head[$h][2] = 'ldap'; $h++; } - + $head[$h][0] = DOL_URL_ROOT.'/user/group/perms.php?id='.$group->id; $head[$h][1] = $langs->trans("GroupRights"); $head[$h][2] = 'rights'; @@ -120,17 +112,17 @@ function group_prepare_head($group) * \param fuser User concerned or '' for global theme * \param edit 1 to add edit form */ -function show_theme($fuser,$edit=0,$foruserprofile=false) +function show_theme($fuser,$edit=0,$foruserprofile=false) { global $conf,$langs,$dirtheme,$bc; - - + + $selected_theme=$conf->global->MAIN_THEME; if (! empty($fuser)) $selected_theme=$fuser->conf->MAIN_THEME; - + $colspan=2; if ($foruserprofile) $colspan=4; - + $thumbsbyrow=6; print '
'; if ($foruserprofile) @@ -153,14 +145,14 @@ function show_theme($fuser,$edit=0,$foruserprofile=false) print ''; print ''; } - + if ($edit) print ''; - if ($edit) + if ($edit) { if ($subdir == $conf->global->MAIN_THEME) $title=$langs->trans("ThemeCurrentlyActive"); else $title=$langs->trans("ShowPreview"); } - + $var=!$var; print ''; } - + print ''; - } + } print '
'.$langs->trans("UsePersonalValue").' 
'; @@ -176,7 +168,7 @@ function show_theme($fuser,$edit=0,$foruserprofile=false) { print '
'; $file=$dirtheme."/".$subdir."/thumb.png"; if (! file_exists($file)) $file=$dirtheme."/common/nophoto.jpg"; @@ -210,7 +202,7 @@ function show_theme($fuser,$edit=0,$foruserprofile=false) $i++; } print '
'; print '
'; - print ''; - - print ''; + $soc = new Societe($db); + $soc->id = $_GET["socid"]; + $result=$soc->fetch($_GET["socid"]); - print ""; - - print '"; - print '"; - - print ''; - - print ''; - print ''; - - print ''; - - // Liste les commerciaux - print ''; - print '"; - - print '
'.$langs->trans('Name').''.$soc->nom.'
'; - print $langs->trans('CustomerCode').''; - print $soc->code_client; - if ($soc->check_codeclient() <> 0) print ' '.$langs->trans("WrongCustomerCode"); - print ''.$langs->trans('Prefix').''.$soc->prefix_comm.'
".$langs->trans('Address')."".nl2br($soc->adresse)."
'.$langs->trans('Zip').''.$soc->cp."'.$langs->trans('Town').''.$soc->ville."
'.$langs->trans('Country').''.$soc->pays.'
'.$langs->trans('Phone').''.dol_print_phone($soc->tel,$soc->pays_code,0,$soc->id,'AC_TEL').''.$langs->trans('Fax').''.dol_print_phone($soc->fax,$soc->pays_code,0,$soc->id,'AC_FAX').'
'.$langs->trans('Web').''; - if ($soc->url) { print 'http://'.$soc->url.''; } - print '
'.$langs->trans("SalesRepresentatives").''; + $head=societe_prepare_head2($soc); - $sql = "SELECT u.rowid, u.name, u.firstname"; - $sql .= " FROM ".MAIN_DB_PREFIX."user as u"; - $sql .= " , ".MAIN_DB_PREFIX."societe_commerciaux as sc"; - $sql .= " WHERE sc.fk_soc =".$soc->id; - $sql .= " AND sc.fk_user = u.rowid"; - $sql .= " ORDER BY u.name ASC "; - - $resql = $db->query($sql); - if ($resql) - { - $num = $db->num_rows($resql); - $i = 0; - - while ($i < $num) - { - $obj = $db->fetch_object($resql); - - if (!$user->rights->societe->client->voir) - { - print ''; - print img_object($langs->trans("ShowUser"),"user").' '; - print stripslashes($obj->firstname)." " .stripslashes($obj->name)."\n"; - print '
'; - $i++; - } - else - { - print ''; - print img_object($langs->trans("ShowUser"),"user").' '; - print $obj->firstname." " .$obj->name."\n"; - print ' '; - print ''; - print img_delete(); - print '
'; - $i++; - } - } - - $db->free($resql); - } - else - { - dol_print_error($db); - } - if($i == 0) { print $langs->trans("NoSalesRepresentativeAffected"); } + dol_fiche_head($head, 'salesrepresentative', $langs->trans("ThirdParty"),0,'company'); - print "
'; - print "\n"; - - - if ($user->rights->societe->creer && $user->rights->societe->client->voir) - { - /* - * Liste - * - */ - - $langs->load("users"); - $title=$langs->trans("ListOfUsers"); - - $sql = "SELECT u.rowid, u.name, u.firstname, u.login"; - $sql .= " FROM ".MAIN_DB_PREFIX."user as u"; - $sql .= " ORDER BY u.name ASC "; - - $resql = $db->query($sql); - if ($resql) - { - $num = $db->num_rows($resql); - $i = 0; - - print_titre($title); - - // Lignes des titres - print ''; - print ''; - print ''; - print ''; - print ''; - print "\n"; - - $var=True; - - while ($i < $num) - { - $obj = $db->fetch_object($resql); - $var=!$var; - print "'; - print ''; - - print ''."\n"; - $i++; - } - - print "
'.$langs->trans("Name").''.$langs->trans("Login").' 
"; - print ''; - print img_object($langs->trans("ShowUser"),"user").' '; - print stripslashes($obj->firstname)." " .stripslashes($obj->name)."\n"; - print ''; - print ''.$obj->login.''.$langs->trans("Add").'
"; - $db->free($resql); - } - else - { - dol_print_error($db); - } - } + /* + * Fiche societe en mode visu + */ + + print ''; + print ''; + + print ''; + + print ""; + + print '"; + print '"; + + print ''; + + print ''; + print ''; + + print ''; + + // Liste les commerciaux + print ''; + print '"; + + print '
'.$langs->trans('Name').''.$soc->nom.'
'; + print $langs->trans('CustomerCode').''; + print $soc->code_client; + if ($soc->check_codeclient() <> 0) print ' '.$langs->trans("WrongCustomerCode"); + print ''.$langs->trans('Prefix').''.$soc->prefix_comm.'
".$langs->trans('Address')."".nl2br($soc->adresse)."
'.$langs->trans('Zip').''.$soc->cp."'.$langs->trans('Town').''.$soc->ville."
'.$langs->trans('Country').''.$soc->pays.'
'.$langs->trans('Phone').''.dol_print_phone($soc->tel,$soc->pays_code,0,$soc->id,'AC_TEL').''.$langs->trans('Fax').''.dol_print_phone($soc->fax,$soc->pays_code,0,$soc->id,'AC_FAX').'
'.$langs->trans('Web').''; + if ($soc->url) { print 'http://'.$soc->url.''; } + print '
'.$langs->trans("SalesRepresentatives").''; + + $sql = "SELECT u.rowid, u.name, u.firstname"; + $sql .= " FROM ".MAIN_DB_PREFIX."user as u"; + $sql .= " , ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + $sql .= " WHERE sc.fk_soc =".$soc->id; + $sql .= " AND sc.fk_user = u.rowid"; + $sql .= " ORDER BY u.name ASC "; + + $resql = $db->query($sql); + if ($resql) + { + $num = $db->num_rows($resql); + $i = 0; + + while ($i < $num) + { + $obj = $db->fetch_object($resql); + + if (!$user->rights->societe->client->voir) + { + print ''; + print img_object($langs->trans("ShowUser"),"user").' '; + print stripslashes($obj->firstname)." " .stripslashes($obj->name)."\n"; + print '
'; + $i++; + } + else + { + print ''; + print img_object($langs->trans("ShowUser"),"user").' '; + print $obj->firstname." " .$obj->name."\n"; + print ' '; + print ''; + print img_delete(); + print '
'; + $i++; + } + } + + $db->free($resql); + } + else + { + dol_print_error($db); + } + if($i == 0) { print $langs->trans("NoSalesRepresentativeAffected"); } + + print "
'; + print "\n"; + + + if ($user->rights->societe->creer && $user->rights->societe->client->voir) + { + /* + * Liste + * + */ + + $langs->load("users"); + $title=$langs->trans("ListOfUsers"); + + $sql = "SELECT u.rowid, u.name, u.firstname, u.login"; + $sql .= " FROM ".MAIN_DB_PREFIX."user as u"; + $sql .= " ORDER BY u.name ASC "; + + $resql = $db->query($sql); + if ($resql) + { + $num = $db->num_rows($resql); + $i = 0; + + print_titre($title); + + // Lignes des titres + print ''; + print ''; + print ''; + print ''; + print ''; + print "\n"; + + $var=True; + + while ($i < $num) + { + $obj = $db->fetch_object($resql); + $var=!$var; + print "'; + print ''; + + print ''."\n"; + $i++; + } + + print "
'.$langs->trans("Name").''.$langs->trans("Login").' 
"; + print ''; + print img_object($langs->trans("ShowUser"),"user").' '; + print stripslashes($obj->firstname)." " .stripslashes($obj->name)."\n"; + print ''; + print ''.$obj->login.''.$langs->trans("Add").'
"; + $db->free($resql); + } + else + { + dol_print_error($db); + } + } } diff --git a/htdocs/societe/document.php b/htdocs/societe/document.php index f36fa3a891e..ebbeb789d44 100644 --- a/htdocs/societe/document.php +++ b/htdocs/societe/document.php @@ -126,7 +126,7 @@ if ($socid > 0) $html=new Form($db); - dol_fiche_head($head, 'document', $langs->trans("ThirdParty")); + dol_fiche_head($head, 'document', $langs->trans("ThirdParty"),0,'company'); // Construit liste des fichiers diff --git a/htdocs/societe/info.php b/htdocs/societe/info.php index 7f3265b5d50..9e87722f872 100644 --- a/htdocs/societe/info.php +++ b/htdocs/societe/info.php @@ -53,7 +53,7 @@ $soc->info($socid); */ $head = societe_prepare_head($soc); -dol_fiche_head($head, 'info', $langs->trans("ThirdParty")); +dol_fiche_head($head, 'info', $langs->trans("ThirdParty"),0,'company'); diff --git a/htdocs/societe/lien.php b/htdocs/societe/lien.php index 3c8763fa1b6..504cff7fca6 100644 --- a/htdocs/societe/lien.php +++ b/htdocs/societe/lien.php @@ -18,11 +18,11 @@ */ /** - \file htdocs/societe/lien.php - \ingroup societe - \brief Page of links to other third parties - \version $Id$ -*/ + \file htdocs/societe/lien.php + \ingroup societe + \brief Page of links to other third parties + \version $Id$ + */ require("./pre.inc.php"); require_once(DOL_DOCUMENT_ROOT."/lib/company.lib.php"); @@ -39,47 +39,47 @@ $result = restrictedArea($user, 'societe','',''); /* -* Actions -*/ + * Actions + */ // Positionne companie parente if($_GET["socid"] && $_GET["select"]) { - if ($user->rights->societe->creer) - { - $soc = new Societe($db); - $soc->id = $_GET["socid"]; - $soc->fetch($_GET["socid"]); - $soc->set_parent($_GET["select"]); + if ($user->rights->societe->creer) + { + $soc = new Societe($db); + $soc->id = $_GET["socid"]; + $soc->fetch($_GET["socid"]); + $soc->set_parent($_GET["select"]); - Header("Location: lien.php?socid=".$soc->id); - exit; - } - else - { - Header("Location: lien.php?socid=".$_GET["socid"]); - exit; - } + Header("Location: lien.php?socid=".$soc->id); + exit; + } + else + { + Header("Location: lien.php?socid=".$_GET["socid"]); + exit; + } } // Supprime companie parente if($_GET["socid"] && $_GET["delsocid"]) { - if ($user->rights->societe->creer) - { - $soc = new Societe($db); - $soc->id = $_GET["socid"]; - $soc->fetch($_GET["socid"]); - $soc->remove_parent($_GET["delsocid"]); + if ($user->rights->societe->creer) + { + $soc = new Societe($db); + $soc->id = $_GET["socid"]; + $soc->fetch($_GET["socid"]); + $soc->remove_parent($_GET["delsocid"]); - Header("Location: lien.php?socid=".$soc->id); - exit; - } - else - { - Header("Location: lien.php?socid=".$_GET["socid"]); - exit; - } + Header("Location: lien.php?socid=".$soc->id); + exit; + } + else + { + Header("Location: lien.php?socid=".$_GET["socid"]); + exit; + } } @@ -89,191 +89,191 @@ llxHeader(); if($_GET["socid"]) { - - $soc = new Societe($db); - $soc->id = $_GET["socid"]; - $soc->fetch($_GET["socid"]); - - $head=societe_prepare_head2($soc); - - dol_fiche_head($head, 'links', $langs->trans("ThirdParty")); - - /* - * Fiche soci�t� en mode visu - */ - - print ''; - print ''; - - print ''; - print ""; - - print ""; - print ""; - - print ""; - - print ''; - print ''; - - print ''; - - print ''; - - print ''; - - print ''; - print ''; - - // Societe mere - print ''; - - print '
'.$langs->trans('Name').''.$soc->nom.'
'; - print $langs->trans('CustomerCode').''; - print $soc->code_client; - if ($soc->check_codeclient() <> 0) print ' '.$langs->trans("WrongCustomerCode"); - print ''.$langs->trans('Prefix').''.$soc->prefix_comm.'
".$langs->trans('Address')."".nl2br($soc->adresse)."
".$langs->trans('Zip')."".$soc->cp."".$langs->trans('Town')."".$soc->ville."
".$langs->trans('Country')."".$soc->pays."
'.$langs->trans('Phone').''.dol_print_phone($soc->tel,$soc->pays_code,0,$soc->id,'AC_TEL').''.$langs->trans('Fax').''.dol_print_phone($soc->fax,$soc->pays_code,0,$soc->id,'AC_FAX').'
'.$langs->trans('Web').''; - if ($soc->url) { print 'http://'.$soc->url.''; } - print '
'.$langs->transcountry('ProfId1',$soc->pays_code).''.$soc->siren.' '.$langs->transcountry('ProfId2',$soc->pays_code).''.$soc->siret.'
'.$langs->transcountry('ProfId3',$soc->pays_code).''.$soc->ape.' 
'.$langs->trans("Capital").''.$soc->capital.' '.$langs->trans("Currency".$conf->monnaie).'
'.$langs->trans("ParentCompany").''; - if ($soc->parent) - { - $socm = new Societe($db); - $socm->fetch($soc->parent); - print ''.img_object($langs->trans("ShowCompany"),'company').' '.$socm->nom.''.($socm->code_client?"(".$socm->code_client.")":""); - print ($socm->ville?' - '.$socm->ville:''); - print ' '; - print img_delete(); - print '
'; - } - else - { - print $langs->trans("NoParentCompany"); - } - print '
'; - print "\n"; - - - if ($_GET["select"] > 0) - { - $socm = new Societe($db); - $socm->id = $_GET["select"]; - $socm->fetch($_GET["select"]); - } - else - { - if ($user->rights->societe->creer) - { - - $page=$_GET["page"]; - - if ($page == -1) { $page = 0 ; } - - $offset = $conf->liste_limit * $page ; - $pageprev = $page - 1; - $pagenext = $page + 1; - - /* - * Liste - * - */ - - $title=$langs->trans("CompanyList"); - - $sql = "SELECT s.rowid as socid, s.nom, s.ville, s.prefix_comm, s.client, s.fournisseur,"; - $sql.= " te.code, te.libelle"; - $sql.= " FROM ".MAIN_DB_PREFIX."societe as s,"; - $sql.= " ".MAIN_DB_PREFIX."c_typent as te"; - $sql.= " WHERE s.fk_typent = te.id"; - if (strlen(trim($_GET["search_nom"]))) - { - $sql .= " AND s.nom LIKE '%".$_GET["search_nom"]."%'"; - } - $sql .= " ORDER BY s.nom ASC " . $db->plimit($conf->liste_limit+1, $offset); - - $resql = $db->query($sql); - if ($resql) - { - $num = $db->num_rows($resql); - $i = 0; - - $params = "&socid=".$_GET["socid"]; - - print_barre_liste($title, $page, "lien.php",$params,$sortfield,$sortorder,'',$num,0,''); - - // Lignes des titres - print ''; - print ''; - print ''; - print ''; - print ''; - print "\n"; - - // Lignes des champs de filtre - print ''; - print ''; - print ''; - print ''; - print "\n"; - print ''; - - $var=True; - - while ($i < min($num,$conf->liste_limit)) - { - $obj = $db->fetch_object($resql); - $var=!$var; - print "\n"; - print "\n"; - print "\n"; - print ''; - // Lien S�lectionner - print ''; - - print ''."\n"; - $i++; - } - - print "
'.$langs->trans("Company").''.$langs->trans("Town").'Type'; - print ' 
'; - print ''; - print ''; - print ''; - print '
"; - print $obj->nom."".$obj->ville." ".$langs->getLabelFromKey($db,$obj->code,'c_typent','code','libelle')."'; - if ($obj->client==1) - { - print $langs->trans("Customer")."\n"; - } - elseif ($obj->client==2) - { - print $langs->trans("Prospect")."\n"; - } - else - { - print " "; - } - print ""; - if ($obj->fournisseur) - { - print $langs->trans("Supplier"); - } - else - { - print " "; - } - - print ''.$langs->trans("Select").''; - print '
"; - print '
'; - $db->free($resql); - } - else - { - dol_print_error($db); - } - } - } + $soc = new Societe($db); + $soc->id = $_GET["socid"]; + $soc->fetch($_GET["socid"]); + + $head=societe_prepare_head2($soc); + + dol_fiche_head($head, 'links', $langs->trans("ThirdParty"),0,'company'); + + /* + * Fiche societe en mode visu + */ + + print ''; + print ''; + + print ''; + + print ""; + + print ""; + print ""; + + print ""; + + print ''; + print ''; + + print ''; + + print ''; + + print ''; + + print ''; + print ''; + + // Societe mere + print ''; + + print '
'.$langs->trans('Name').''.$soc->nom.'
'; + print $langs->trans('CustomerCode').''; + print $soc->code_client; + if ($soc->check_codeclient() <> 0) print ' '.$langs->trans("WrongCustomerCode"); + print ''.$langs->trans('Prefix').''.$soc->prefix_comm.'
".$langs->trans('Address')."".nl2br($soc->adresse)."
".$langs->trans('Zip')."".$soc->cp."".$langs->trans('Town')."".$soc->ville."
".$langs->trans('Country')."".$soc->pays."
'.$langs->trans('Phone').''.dol_print_phone($soc->tel,$soc->pays_code,0,$soc->id,'AC_TEL').''.$langs->trans('Fax').''.dol_print_phone($soc->fax,$soc->pays_code,0,$soc->id,'AC_FAX').'
'.$langs->trans('Web').''; + if ($soc->url) { print 'http://'.$soc->url.''; } + print '
'.$langs->transcountry('ProfId1',$soc->pays_code).''.$soc->siren.' '.$langs->transcountry('ProfId2',$soc->pays_code).''.$soc->siret.'
'.$langs->transcountry('ProfId3',$soc->pays_code).''.$soc->ape.' 
'.$langs->trans("Capital").''.$soc->capital.' '.$langs->trans("Currency".$conf->monnaie).'
'.$langs->trans("ParentCompany").''; + if ($soc->parent) + { + $socm = new Societe($db); + $socm->fetch($soc->parent); + print ''.img_object($langs->trans("ShowCompany"),'company').' '.$socm->nom.''.($socm->code_client?"(".$socm->code_client.")":""); + print ($socm->ville?' - '.$socm->ville:''); + print ' '; + print img_delete(); + print '
'; + } + else + { + print $langs->trans("NoParentCompany"); + } + print '
'; + print "\n"; + + + if ($_GET["select"] > 0) + { + $socm = new Societe($db); + $socm->id = $_GET["select"]; + $socm->fetch($_GET["select"]); + } + else + { + if ($user->rights->societe->creer) + { + + $page=$_GET["page"]; + + if ($page == -1) { $page = 0 ; } + + $offset = $conf->liste_limit * $page ; + $pageprev = $page - 1; + $pagenext = $page + 1; + + /* + * Liste + * + */ + + $title=$langs->trans("CompanyList"); + + $sql = "SELECT s.rowid as socid, s.nom, s.ville, s.prefix_comm, s.client, s.fournisseur,"; + $sql.= " te.code, te.libelle"; + $sql.= " FROM ".MAIN_DB_PREFIX."societe as s,"; + $sql.= " ".MAIN_DB_PREFIX."c_typent as te"; + $sql.= " WHERE s.fk_typent = te.id"; + if (strlen(trim($_GET["search_nom"]))) + { + $sql .= " AND s.nom LIKE '%".$_GET["search_nom"]."%'"; + } + $sql .= " ORDER BY s.nom ASC " . $db->plimit($conf->liste_limit+1, $offset); + + $resql = $db->query($sql); + if ($resql) + { + $num = $db->num_rows($resql); + $i = 0; + + $params = "&socid=".$_GET["socid"]; + + print_barre_liste($title, $page, "lien.php",$params,$sortfield,$sortorder,'',$num,0,''); + + // Lignes des titres + print ''; + print ''; + print ''; + print ''; + print ''; + print "\n"; + + // Lignes des champs de filtre + print ''; + print ''; + print ''; + print ''; + print "\n"; + print ''; + + $var=True; + + while ($i < min($num,$conf->liste_limit)) + { + $obj = $db->fetch_object($resql); + $var=!$var; + print "\n"; + print "\n"; + print "\n"; + print ''; + // Lien S�lectionner + print ''; + + print ''."\n"; + $i++; + } + + print "
'.$langs->trans("Company").''.$langs->trans("Town").'Type'; + print ' 
'; + print ''; + print ''; + print ''; + print '
"; + print $obj->nom."".$obj->ville." ".$langs->getLabelFromKey($db,$obj->code,'c_typent','code','libelle')."'; + if ($obj->client==1) + { + print $langs->trans("Customer")."\n"; + } + elseif ($obj->client==2) + { + print $langs->trans("Prospect")."\n"; + } + else + { + print " "; + } + print ""; + if ($obj->fournisseur) + { + print $langs->trans("Supplier"); + } + else + { + print " "; + } + + print ''.$langs->trans("Select").''; + print '
"; + print '
'; + $db->free($resql); + } + else + { + dol_print_error($db); + } + } + } } diff --git a/htdocs/societe/notify/fiche.php b/htdocs/societe/notify/fiche.php index f2baea6de42..aa57ff6cf96 100644 --- a/htdocs/societe/notify/fiche.php +++ b/htdocs/societe/notify/fiche.php @@ -100,7 +100,7 @@ if ( $soc->fetch($soc->id) ) $head = societe_prepare_head($soc); - dol_fiche_head($head, 'notify', $langs->trans("ThirdParty")); + dol_fiche_head($head, 'notify', $langs->trans("ThirdParty"),0,'company'); print ''; diff --git a/htdocs/societe/rib.php b/htdocs/societe/rib.php index d144ef5099b..e3960e1d452 100644 --- a/htdocs/societe/rib.php +++ b/htdocs/societe/rib.php @@ -92,7 +92,7 @@ llxHeader(); $head=societe_prepare_head2($soc); -dol_fiche_head($head, 'rib', $langs->trans("ThirdParty")); +dol_fiche_head($head, 'rib', $langs->trans("ThirdParty"),0,'company'); $account = new CompanyBankAccount($db); $account->socid=$soc->id; @@ -108,7 +108,7 @@ $account->fetch($soc->id); if ($_GET["socid"] && $_GET["action"] != 'edit') { // Check BBAN - if (! checkBanForAccount($account)) + if (! checkBanForAccount($account)) { print '
'.$langs->trans("RIBControlError").'

'; } @@ -132,7 +132,7 @@ if ($_GET["socid"] && $_GET["action"] != 'edit') print ''; print ''; print ''; - + if ($account->useDetailedBBAN()) { print ''; @@ -213,7 +213,7 @@ if ($_GET["socid"] && $_GET["action"] == 'edit' && $user->rights->societe->creer print ''; print ''; } - + print ''; print ''; print ''; @@ -223,7 +223,7 @@ if ($_GET["socid"] && $_GET["action"] == 'edit' && $user->rights->societe->creer print ''; print ''; print ''; - } + } // IBAN print ''; diff --git a/htdocs/societe/socnote.php b/htdocs/societe/socnote.php index 77c979ed79c..18ddbfcad93 100644 --- a/htdocs/societe/socnote.php +++ b/htdocs/societe/socnote.php @@ -69,7 +69,7 @@ if ($socid > 0) */ $head = societe_prepare_head($societe); - dol_fiche_head($head, 'note', $langs->trans("ThirdParty")); + dol_fiche_head($head, 'note', $langs->trans("ThirdParty"),0,'company'); print ""; diff --git a/htdocs/user/addon.php b/htdocs/user/addon.php deleted file mode 100644 index a6155452ed2..00000000000 --- a/htdocs/user/addon.php +++ /dev/null @@ -1,105 +0,0 @@ - - * Copyright (C) 2004-2008 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 - * the Free Software Foundation; either version 2 of the License, or - * (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 - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * $Id$ - */ - -/** - \file htdocs/user/addon.php - \brief Onglet addon de la fiche utilisateur - \version $Revision$ -*/ - -require("./pre.inc.php"); -require_once(DOL_DOCUMENT_ROOT."/lib/usergroups.lib.php"); - -$langs->load("users"); - -$form = new Form($db); - - -llxHeader("","Addon Utilisateur"); - - -/* ************************************************************************** */ -/* */ -/* */ -/* ************************************************************************** */ - - -if ($_GET["id"]) -{ - $fuser = new User($db, $_GET["id"]); - $fuser->fetch(); - - - /* - * Affichage onglets - */ - $head = user_prepare_head($fuser); - - dol_fiche_head($head, 'other', $langs->trans("User")); - - - /* - * Fiche en mode visu - */ - - print '
'.$langs->trans("BankAccountNumber").''.$account->number.'
'.$langs->trans("BankAccountNumberKey").'
'.$langs->trans("BankAccountNumber").'
'.$langs->trans("BankAccountNumberKey").'
'.$langs->trans("IBAN").'
'; - - print ''; - print ''; - print ''; - print ''; - print "\n"; - - print ''; - print ''; - print ''; - print ''; - print "\n"; - - //... - - print "
'.$langs->trans("Lastname").''.$fuser->nom.'
'.$langs->trans("Firstname").''.$fuser->prenom.'
'.$langs->trans("Login").''.$fuser->login.'
'.$langs->trans("EMail").''.$fuser->email.'
\n"; - - print "\n"; - - - /* - * Barre d'actions - * - */ - print '
'; - - if ($user->admin) - { -// print ''.$langs->trans("Créer login Bookmark4u").''; - } - - print "
\n"; - print "
\n"; - -} - - - -$db->close(); - -llxFooter('$Date$ - $Revision$'); -?> diff --git a/htdocs/user/clicktodial.php b/htdocs/user/clicktodial.php index 5960825054d..757e1e011b9 100644 --- a/htdocs/user/clicktodial.php +++ b/htdocs/user/clicktodial.php @@ -35,20 +35,23 @@ $form = new Form($db); /* * Actions */ - + if ($_POST["action"] == 'update' && ! $_POST['cancel']) { $edituser = new User($db, $_GET["id"]); - + $edituser->clicktodial_login = $_POST["login"]; $edituser->clicktodial_password = $_POST["password"]; $edituser->clicktodial_poste = $_POST["poste"]; - + $result=$edituser->update_clicktodial(); } +/* + * View + */ llxHeader("","ClickToDial"); @@ -65,7 +68,8 @@ if ($_GET["id"]) */ $head = user_prepare_head($fuser); - dol_fiche_head($head, 'clicktodial', $langs->trans("User")); + $title = $langs->trans("User"); + dol_fiche_head($head, 'clicktodial', $title, 0, 'user'); /* * Fiche en mode visu @@ -89,18 +93,18 @@ if ($_GET["id"]) print ''.$langs->trans("Firstname").''; print ''.$fuser->prenom.''; print "\n"; - + print "\n"; print "
\n"; - + if ($_GET["action"] == 'edit') { print ''; print ''; print ''; print ''; - + if ($user->admin) { print "".''; @@ -109,12 +113,12 @@ if ($_GET["id"]) print ''; print ''; } - + print "".''; print ''; print ''; - + print "".''; print ''; @@ -129,7 +133,7 @@ if ($_GET["id"]) print '     '; print ''; print ''; - + print '
ClickToDial URL
ClickToDial '.$langs->trans("Login").''; print '
ClickToDial '.$langs->trans("Password").''; print '
'; } else diff --git a/htdocs/user/fiche.php b/htdocs/user/fiche.php index 58f3ab44ab5..86ffa2d77fe 100644 --- a/htdocs/user/fiche.php +++ b/htdocs/user/fiche.php @@ -757,7 +757,7 @@ else $head = user_prepare_head($fuser); $title = $langs->trans("User"); - dol_fiche_head($head, 'user', $title); + dol_fiche_head($head, 'user', $title, 0, 'user'); /* diff --git a/htdocs/user/info.php b/htdocs/user/info.php index df838a214a2..729ee34750e 100644 --- a/htdocs/user/info.php +++ b/htdocs/user/info.php @@ -52,7 +52,7 @@ $fuser->info($_GET["id"]); $head = user_prepare_head($fuser); $title = $langs->trans("User"); -dol_fiche_head($head, 'info', $title); +dol_fiche_head($head, 'info', $title, 0, 'user'); print '\n"; -// LDAP Clé +// LDAP Cl� print '\n"; // LDAP Server diff --git a/htdocs/user/note.php b/htdocs/user/note.php index eac624e9d8b..5a3dce893a4 100644 --- a/htdocs/user/note.php +++ b/htdocs/user/note.php @@ -83,7 +83,7 @@ if ($id) $head = user_prepare_head($fuser); $title = $langs->trans("User"); - dol_fiche_head($head, 'note', $title); + dol_fiche_head($head, 'note', $title, 0, 'user'); if ($msg) print '
'.$msg.'
'; diff --git a/htdocs/user/param_ihm.php b/htdocs/user/param_ihm.php index 0837403e529..bd39eacb3ad 100644 --- a/htdocs/user/param_ihm.php +++ b/htdocs/user/param_ihm.php @@ -105,16 +105,16 @@ if ($_POST["action"] == 'update' && ($caneditfield || $user->admin)) +/* + * View + */ + llxHeader(); - -/* - * Affichage onglets - */ $head = user_prepare_head($fuser); $title = $langs->trans("User"); -dol_fiche_head($head, 'guisetup', $title); +dol_fiche_head($head, 'guisetup', $title, 0, 'user'); print '
'; diff --git a/htdocs/user/ldap.php b/htdocs/user/ldap.php index ae73cf993c8..276e6d40077 100644 --- a/htdocs/user/ldap.php +++ b/htdocs/user/ldap.php @@ -18,11 +18,11 @@ */ /** - \file htdocs/user/ldap.php - \ingroup ldap - \brief Page fiche LDAP utilisateur - \version $Id$ -*/ + * \file htdocs/user/ldap.php + * \ingroup ldap + * \brief Page fiche LDAP utilisateur + * \version $Id$ + */ require("./pre.inc.php"); require_once(DOL_DOCUMENT_ROOT."/lib/usergroups.lib.php"); @@ -79,7 +79,7 @@ if ($_GET["action"] == 'dolibarr2ldap') /* - * Affichage page + * View */ llxHeader(); @@ -93,7 +93,7 @@ $form = new Form($db); $head = user_prepare_head($fuser); $title = $langs->trans("User"); -dol_fiche_head($head, 'ldap', $title); +dol_fiche_head($head, 'ldap', $title, 0, 'user'); /* @@ -146,7 +146,7 @@ if ($conf->global->LDAP_SERVER_TYPE == "activedirectory") // LDAP DN print '
LDAP '.$langs->trans("LDAPUserDn").''.$conf->global->LDAP_USER_DN."
LDAP '.$langs->trans("LDAPNamingAttribute").''.$conf->global->LDAP_KEY_USERS."
'; diff --git a/htdocs/user/perms.php b/htdocs/user/perms.php index 5c28e727ca6..e9af7285e49 100644 --- a/htdocs/user/perms.php +++ b/htdocs/user/perms.php @@ -95,7 +95,7 @@ $fuser->getrights(); $head = user_prepare_head($fuser); $title = $langs->trans("User"); -dol_fiche_head($head, 'rights', $title); +dol_fiche_head($head, 'rights', $title, 0, 'user'); $db->begin();