New: Add picto on tab titles

This commit is contained in:
Laurent Destailleur 2009-08-05 17:19:55 +00:00
parent bd749f6748
commit 0baf06d2d1
25 changed files with 473 additions and 584 deletions

View File

@ -141,7 +141,7 @@ if ($_GET["socid"])
*/ */
$head = societe_prepare_head($soc); $head = societe_prepare_head($soc);
dol_fiche_head($head, 'category', $langs->trans("ThirdParty")); dol_fiche_head($head, 'category', $langs->trans("ThirdParty"),0,'company');
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';

View File

@ -102,7 +102,7 @@ if ($_GET["action"] == 'delete')
/* /*
* Affiche onglet * View
*/ */
llxHeader(); llxHeader();
@ -144,7 +144,7 @@ if ($objectid > 0)
$head[$h][1] = $langs->trans('Info'); $head[$h][1] = $langs->trans('Info');
$h++; $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 // Affichage fiche action en mode visu
print '<table class="border" width="100%"'; print '<table class="border" width="100%"';

View File

@ -585,7 +585,6 @@ if ($_GET["action"] == 'create')
/* /*
* Affichage action en mode edition ou visu * Affichage action en mode edition ou visu
*
*/ */
if ($_GET["id"]) if ($_GET["id"])
{ {
@ -640,7 +639,7 @@ if ($_GET["id"])
$head[$h][1] = $langs->trans('Info'); $head[$h][1] = $langs->trans('Info');
$h++; $h++;
dol_fiche_head($head, $hselected, $langs->trans("Action")); dol_fiche_head($head, $hselected, $langs->trans("Action"),0,'task');
$now=gmmktime(); $now=gmmktime();
$delay_warning=$conf->global->MAIN_DELAY_ACTIONS_TODO*24*60*60; $delay_warning=$conf->global->MAIN_DELAY_ACTIONS_TODO*24*60*60;

View File

@ -1,6 +1,6 @@
<?php <?php
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@ -18,11 +18,11 @@
*/ */
/** /**
\file htdocs/comm/action/info.php * \file htdocs/comm/action/info.php
\ingroup agenda * \ingroup agenda
\brief Page des informations d'une action * \brief Page des informations d'une action
\version $Id$ * \version $Id$
*/ */
require("./pre.inc.php"); require("./pre.inc.php");
require_once(DOL_DOCUMENT_ROOT."/lib/functions2.lib.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(); llxHeader();
@ -67,7 +67,7 @@ $head[$h][1] = $langs->trans('Info');
$hselected=$h; $hselected=$h;
$h++; $h++;
dol_fiche_head($head, $hselected, $langs->trans("Action")); dol_fiche_head($head, $hselected, $langs->trans("Action"),0,'task');
print '<table width="100%"><tr><td>'; print '<table width="100%"><tr><td>';

View File

@ -124,7 +124,6 @@ if ($mode == 'search')
} }
} }
llxHeader('',$langs->trans('CustomerCard')); llxHeader('',$langs->trans('CustomerCard'));
$userstatic=new User($db); $userstatic=new User($db);
@ -149,7 +148,7 @@ if ($socid > 0)
$head = societe_prepare_head($objsoc); $head = societe_prepare_head($objsoc);
dol_fiche_head($head, 'customer', $langs->trans("ThirdParty")); dol_fiche_head($head, 'customer', $langs->trans("ThirdParty"),0,'company');
/* /*

View File

@ -89,7 +89,7 @@ if ($_socid > 0)
*/ */
$head = societe_prepare_head($objsoc); $head = societe_prepare_head($objsoc);
dol_fiche_head($head, 'relativediscount', $langs->trans("ThirdParty")); dol_fiche_head($head, 'relativediscount', $langs->trans("ThirdParty"),0,'company');
/* /*

View File

@ -123,7 +123,7 @@ if ($_socid > 0)
*/ */
$head = societe_prepare_head($objsoc); $head = societe_prepare_head($objsoc);
dol_fiche_head($head, 'absolutediscount', $langs->trans("ThirdParty")); dol_fiche_head($head, 'absolutediscount', $langs->trans("ThirdParty"),0,'company');
print '<form method="POST" action="remx.php?id='.$objsoc->id.'">'; print '<form method="POST" action="remx.php?id='.$objsoc->id.'">';

View File

@ -94,7 +94,7 @@ if ($socid > 0)
*/ */
$head = societe_prepare_head($societe); $head = societe_prepare_head($societe);
dol_fiche_head($head, 'compta', $langs->trans("ThirdParty")); dol_fiche_head($head, 'compta', $langs->trans("ThirdParty"),0,'company');
print '<table width="100%" class="notopnoleftnoright">'; print '<table width="100%" class="notopnoleftnoright">';

View File

@ -27,10 +27,10 @@ function user_prepare_head($user)
{ {
global $langs, $conf; global $langs, $conf;
$langs->load("users"); $langs->load("users");
$h = 0; $h = 0;
$head = array(); $head = array();
$head[$h][0] = DOL_URL_ROOT.'/user/fiche.php?id='.$user->id; $head[$h][0] = DOL_URL_ROOT.'/user/fiche.php?id='.$user->id;
$head[$h][1] = $langs->trans("UserCard"); $head[$h][1] = $langs->trans("UserCard");
$head[$h][2] = 'user'; $head[$h][2] = 'user';
@ -44,7 +44,7 @@ function user_prepare_head($user)
$head[$h][2] = 'ldap'; $head[$h][2] = 'ldap';
$h++; $h++;
} }
$head[$h][0] = DOL_URL_ROOT.'/user/perms.php?id='.$user->id; $head[$h][0] = DOL_URL_ROOT.'/user/perms.php?id='.$user->id;
$head[$h][1] = $langs->trans("UserRights"); $head[$h][1] = $langs->trans("UserRights");
$head[$h][2] = 'rights'; $head[$h][2] = 'rights';
@ -55,14 +55,6 @@ function user_prepare_head($user)
$head[$h][2] = 'guisetup'; $head[$h][2] = 'guisetup';
$h++; $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) if ($conf->clicktodial->enabled)
{ {
$head[$h][0] = DOL_URL_ROOT.'/user/clicktodial.php?id='.$user->id; $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) function group_prepare_head($group)
{ {
global $langs, $conf; global $langs, $conf;
$h = 0; $h = 0;
$head = array(); $head = array();
$head[$h][0] = DOL_URL_ROOT.'/user/group/fiche.php?id='.$group->id; $head[$h][0] = DOL_URL_ROOT.'/user/group/fiche.php?id='.$group->id;
$head[$h][1] = $langs->trans("GroupCard"); $head[$h][1] = $langs->trans("GroupCard");
$head[$h][2] = 'group'; $head[$h][2] = 'group';
@ -105,7 +97,7 @@ function group_prepare_head($group)
$head[$h][2] = 'ldap'; $head[$h][2] = 'ldap';
$h++; $h++;
} }
$head[$h][0] = DOL_URL_ROOT.'/user/group/perms.php?id='.$group->id; $head[$h][0] = DOL_URL_ROOT.'/user/group/perms.php?id='.$group->id;
$head[$h][1] = $langs->trans("GroupRights"); $head[$h][1] = $langs->trans("GroupRights");
$head[$h][2] = 'rights'; $head[$h][2] = 'rights';
@ -120,17 +112,17 @@ function group_prepare_head($group)
* \param fuser User concerned or '' for global theme * \param fuser User concerned or '' for global theme
* \param edit 1 to add edit form * \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; global $conf,$langs,$dirtheme,$bc;
$selected_theme=$conf->global->MAIN_THEME; $selected_theme=$conf->global->MAIN_THEME;
if (! empty($fuser)) $selected_theme=$fuser->conf->MAIN_THEME; if (! empty($fuser)) $selected_theme=$fuser->conf->MAIN_THEME;
$colspan=2; $colspan=2;
if ($foruserprofile) $colspan=4; if ($foruserprofile) $colspan=4;
$thumbsbyrow=6; $thumbsbyrow=6;
print '<table class="noborder" width="100%">'; print '<table class="noborder" width="100%">';
if ($foruserprofile) if ($foruserprofile)
@ -153,14 +145,14 @@ function show_theme($fuser,$edit=0,$foruserprofile=false)
print '<td '.$bc[$var].' align="left" nowrap="nowrap" width="20%"><input '.$bc[$var].' name="check_MAIN_THEME"'.($edit?'':' disabled').' type="checkbox" '.($selected_theme?" checked":"").'> '.$langs->trans("UsePersonalValue").'</td>'; print '<td '.$bc[$var].' align="left" nowrap="nowrap" width="20%"><input '.$bc[$var].' name="check_MAIN_THEME"'.($edit?'':' disabled').' type="checkbox" '.($selected_theme?" checked":"").'> '.$langs->trans("UsePersonalValue").'</td>';
print '<td '.$bc[$var].'>&nbsp;</td></tr>'; print '<td '.$bc[$var].'>&nbsp;</td></tr>';
} }
if ($edit) print '<a href="'.$_SERVER["PHP_SELF"].($edit?'?action=edit&theme=':'?theme=').$subdir.'" style="font-weight: normal;" alt="'.$langs->trans("Preview").'">'; if ($edit) print '<a href="'.$_SERVER["PHP_SELF"].($edit?'?action=edit&theme=':'?theme=').$subdir.'" style="font-weight: normal;" alt="'.$langs->trans("Preview").'">';
if ($edit) if ($edit)
{ {
if ($subdir == $conf->global->MAIN_THEME) $title=$langs->trans("ThemeCurrentlyActive"); if ($subdir == $conf->global->MAIN_THEME) $title=$langs->trans("ThemeCurrentlyActive");
else $title=$langs->trans("ShowPreview"); else $title=$langs->trans("ShowPreview");
} }
$var=!$var; $var=!$var;
print '<tr '.$bc[$var].'><td colspan="'.$colspan.'">'; print '<tr '.$bc[$var].'><td colspan="'.$colspan.'">';
@ -176,7 +168,7 @@ function show_theme($fuser,$edit=0,$foruserprofile=false)
{ {
print '<tr '.$bc[$var].'>'; print '<tr '.$bc[$var].'>';
} }
print '<td align="center">'; print '<td align="center">';
$file=$dirtheme."/".$subdir."/thumb.png"; $file=$dirtheme."/".$subdir."/thumb.png";
if (! file_exists($file)) $file=$dirtheme."/common/nophoto.jpg"; if (! file_exists($file)) $file=$dirtheme."/common/nophoto.jpg";
@ -210,7 +202,7 @@ function show_theme($fuser,$edit=0,$foruserprofile=false)
$i++; $i++;
} }
print '</tr>'; print '</tr>';
} }
print '</table>'; print '</table>';
print '</td></tr>'; print '</td></tr>';

View File

@ -954,7 +954,7 @@ else
$head = societe_prepare_head($soc); $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 // Confirm delete third party

View File

@ -18,12 +18,12 @@
*/ */
/** /**
\file htdocs/societe/commerciaux.php \file htdocs/societe/commerciaux.php
\ingroup societe \ingroup societe
\brief Page d'affectations des commerciaux aux societes \brief Page d'affectations des commerciaux aux societes
\version $Id$ \version $Id$
*/ */
require("./pre.inc.php"); require("./pre.inc.php");
require_once(DOL_DOCUMENT_ROOT."/lib/company.lib.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($_GET["socid"] && $_GET["commid"])
{ {
if ($user->rights->societe->creer) if ($user->rights->societe->creer)
{ {
$soc = new Societe($db); $soc = new Societe($db);
$soc->id = $_GET["socid"]; $soc->id = $_GET["socid"];
$soc->fetch($_GET["socid"]); $soc->fetch($_GET["socid"]);
$soc->add_commercial($user, $_GET["commid"]); $soc->add_commercial($user, $_GET["commid"]);
Header("Location: commerciaux.php?socid=".$soc->id); Header("Location: commerciaux.php?socid=".$soc->id);
} }
else else
{ {
Header("Location: commerciaux.php?socid=".$_GET["socid"]); Header("Location: commerciaux.php?socid=".$_GET["socid"]);
} }
} }
if($_GET["socid"] && $_GET["delcommid"]) if($_GET["socid"] && $_GET["delcommid"])
{ {
if ($user->rights->societe->creer) if ($user->rights->societe->creer)
{ {
$soc = new Societe($db); $soc = new Societe($db);
$soc->id = $_GET["socid"]; $soc->id = $_GET["socid"];
$soc->fetch($_GET["socid"]); $soc->fetch($_GET["socid"]);
$soc->del_commercial($user, $_GET["delcommid"]); $soc->del_commercial($user, $_GET["delcommid"]);
Header("Location: commerciaux.php?socid=".$soc->id); Header("Location: commerciaux.php?socid=".$soc->id);
exit; exit;
} }
else else
{ {
Header("Location: commerciaux.php?socid=".$_GET["socid"]); Header("Location: commerciaux.php?socid=".$_GET["socid"]);
exit; exit;
} }
} }
/* /*
* View * View
*/ */
llxHeader(); llxHeader();
if ($_GET["socid"]) if ($_GET["socid"])
{ {
$soc = new Societe($db); $soc = new Societe($db);
$soc->id = $_GET["socid"]; $soc->id = $_GET["socid"];
$result=$soc->fetch($_GET["socid"]); $result=$soc->fetch($_GET["socid"]);
$head=societe_prepare_head2($soc);
dol_fiche_head($head, 'salesrepresentative', $langs->trans("ThirdParty"));
/*
* Fiche soci<EFBFBD>t<EFBFBD> en mode visu
*/
print '<table class="border" width="100%">';
print '<tr><td width="20%">'.$langs->trans('Name').'</td><td colspan="3">'.$soc->nom.'</td></tr>';
print '<tr><td>';
print $langs->trans('CustomerCode').'</td><td width="20%">';
print $soc->code_client;
if ($soc->check_codeclient() <> 0) print ' '.$langs->trans("WrongCustomerCode");
print '</td><td>'.$langs->trans('Prefix').'</td><td>'.$soc->prefix_comm.'</td></tr>';
print "<tr><td valign=\"top\">".$langs->trans('Address')."</td><td colspan=\"3\">".nl2br($soc->adresse)."</td></tr>"; $head=societe_prepare_head2($soc);
print '<tr><td>'.$langs->trans('Zip').'</td><td>'.$soc->cp."</td>";
print '<td>'.$langs->trans('Town').'</td><td>'.$soc->ville."</td></tr>";
print '<tr><td>'.$langs->trans('Country').'</td><td colspan="3">'.$soc->pays.'</td>';
print '<tr><td>'.$langs->trans('Phone').'</td><td>'.dol_print_phone($soc->tel,$soc->pays_code,0,$soc->id,'AC_TEL').'</td>';
print '<td>'.$langs->trans('Fax').'</td><td>'.dol_print_phone($soc->fax,$soc->pays_code,0,$soc->id,'AC_FAX').'</td></tr>';
print '<tr><td>'.$langs->trans('Web').'</td><td colspan="3">';
if ($soc->url) { print '<a href="http://'.$soc->url.'">http://'.$soc->url.'</a>'; }
print '</td></tr>';
// Liste les commerciaux
print '<tr><td valign="top">'.$langs->trans("SalesRepresentatives").'</td>';
print '<td colspan="3">';
$sql = "SELECT u.rowid, u.name, u.firstname"; dol_fiche_head($head, 'salesrepresentative', $langs->trans("ThirdParty"),0,'company');
$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 '<a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$obj->rowid.'">';
print img_object($langs->trans("ShowUser"),"user").' ';
print stripslashes($obj->firstname)." " .stripslashes($obj->name)."\n";
print '</a><br>';
$i++;
}
else
{
print '<a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$obj->rowid.'">';
print img_object($langs->trans("ShowUser"),"user").' ';
print $obj->firstname." " .$obj->name."\n";
print '</a>&nbsp;';
print '<a href="commerciaux.php?socid='.$_GET["socid"].'&amp;delcommid='.$obj->rowid.'">';
print img_delete();
print '</a><br>';
$i++;
}
}
$db->free($resql);
}
else
{
dol_print_error($db);
}
if($i == 0) { print $langs->trans("NoSalesRepresentativeAffected"); }
print "</td></tr>"; /*
* Fiche societe en mode visu
print '</table>'; */
print "</div>\n";
print '<table class="border" width="100%">';
print '<tr><td width="20%">'.$langs->trans('Name').'</td><td colspan="3">'.$soc->nom.'</td></tr>';
if ($user->rights->societe->creer && $user->rights->societe->client->voir)
{ print '<tr><td>';
/* print $langs->trans('CustomerCode').'</td><td width="20%">';
* Liste print $soc->code_client;
* if ($soc->check_codeclient() <> 0) print ' '.$langs->trans("WrongCustomerCode");
*/ print '</td><td>'.$langs->trans('Prefix').'</td><td>'.$soc->prefix_comm.'</td></tr>';
$langs->load("users"); print "<tr><td valign=\"top\">".$langs->trans('Address')."</td><td colspan=\"3\">".nl2br($soc->adresse)."</td></tr>";
$title=$langs->trans("ListOfUsers");
print '<tr><td>'.$langs->trans('Zip').'</td><td>'.$soc->cp."</td>";
$sql = "SELECT u.rowid, u.name, u.firstname, u.login"; print '<td>'.$langs->trans('Town').'</td><td>'.$soc->ville."</td></tr>";
$sql .= " FROM ".MAIN_DB_PREFIX."user as u";
$sql .= " ORDER BY u.name ASC "; print '<tr><td>'.$langs->trans('Country').'</td><td colspan="3">'.$soc->pays.'</td>';
$resql = $db->query($sql); print '<tr><td>'.$langs->trans('Phone').'</td><td>'.dol_print_phone($soc->tel,$soc->pays_code,0,$soc->id,'AC_TEL').'</td>';
if ($resql) print '<td>'.$langs->trans('Fax').'</td><td>'.dol_print_phone($soc->fax,$soc->pays_code,0,$soc->id,'AC_FAX').'</td></tr>';
{
$num = $db->num_rows($resql); print '<tr><td>'.$langs->trans('Web').'</td><td colspan="3">';
$i = 0; if ($soc->url) { print '<a href="http://'.$soc->url.'">http://'.$soc->url.'</a>'; }
print '</td></tr>';
print_titre($title);
// Liste les commerciaux
// Lignes des titres print '<tr><td valign="top">'.$langs->trans("SalesRepresentatives").'</td>';
print '<table class="noborder" width="100%">'; print '<td colspan="3">';
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Name").'</td>'; $sql = "SELECT u.rowid, u.name, u.firstname";
print '<td>'.$langs->trans("Login").'</td>'; $sql .= " FROM ".MAIN_DB_PREFIX."user as u";
print '<td>&nbsp;</td>'; $sql .= " , ".MAIN_DB_PREFIX."societe_commerciaux as sc";
print "</tr>\n"; $sql .= " WHERE sc.fk_soc =".$soc->id;
$sql .= " AND sc.fk_user = u.rowid";
$var=True; $sql .= " ORDER BY u.name ASC ";
while ($i < $num) $resql = $db->query($sql);
{ if ($resql)
$obj = $db->fetch_object($resql); {
$var=!$var; $num = $db->num_rows($resql);
print "<tr $bc[$var]><td>"; $i = 0;
print '<a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$obj->rowid.'">';
print img_object($langs->trans("ShowUser"),"user").' '; while ($i < $num)
print stripslashes($obj->firstname)." " .stripslashes($obj->name)."\n"; {
print '</a>'; $obj = $db->fetch_object($resql);
print '</td><td>'.$obj->login.'</td>';
print '<td><a href="commerciaux.php?socid='.$_GET["socid"].'&amp;commid='.$obj->rowid.'">'.$langs->trans("Add").'</a></td>'; if (!$user->rights->societe->client->voir)
{
print '</tr>'."\n"; print '<a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$obj->rowid.'">';
$i++; print img_object($langs->trans("ShowUser"),"user").' ';
} print stripslashes($obj->firstname)." " .stripslashes($obj->name)."\n";
print '</a><br>';
print "</table>"; $i++;
$db->free($resql); }
} else
else {
{ print '<a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$obj->rowid.'">';
dol_print_error($db); print img_object($langs->trans("ShowUser"),"user").' ';
} print $obj->firstname." " .$obj->name."\n";
} print '</a>&nbsp;';
print '<a href="commerciaux.php?socid='.$_GET["socid"].'&amp;delcommid='.$obj->rowid.'">';
print img_delete();
print '</a><br>';
$i++;
}
}
$db->free($resql);
}
else
{
dol_print_error($db);
}
if($i == 0) { print $langs->trans("NoSalesRepresentativeAffected"); }
print "</td></tr>";
print '</table>';
print "</div>\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 '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Name").'</td>';
print '<td>'.$langs->trans("Login").'</td>';
print '<td>&nbsp;</td>';
print "</tr>\n";
$var=True;
while ($i < $num)
{
$obj = $db->fetch_object($resql);
$var=!$var;
print "<tr $bc[$var]><td>";
print '<a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$obj->rowid.'">';
print img_object($langs->trans("ShowUser"),"user").' ';
print stripslashes($obj->firstname)." " .stripslashes($obj->name)."\n";
print '</a>';
print '</td><td>'.$obj->login.'</td>';
print '<td><a href="commerciaux.php?socid='.$_GET["socid"].'&amp;commid='.$obj->rowid.'">'.$langs->trans("Add").'</a></td>';
print '</tr>'."\n";
$i++;
}
print "</table>";
$db->free($resql);
}
else
{
dol_print_error($db);
}
}
} }

View File

@ -126,7 +126,7 @@ if ($socid > 0)
$html=new Form($db); $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 // Construit liste des fichiers

View File

@ -53,7 +53,7 @@ $soc->info($socid);
*/ */
$head = societe_prepare_head($soc); $head = societe_prepare_head($soc);
dol_fiche_head($head, 'info', $langs->trans("ThirdParty")); dol_fiche_head($head, 'info', $langs->trans("ThirdParty"),0,'company');

View File

@ -18,11 +18,11 @@
*/ */
/** /**
\file htdocs/societe/lien.php \file htdocs/societe/lien.php
\ingroup societe \ingroup societe
\brief Page of links to other third parties \brief Page of links to other third parties
\version $Id$ \version $Id$
*/ */
require("./pre.inc.php"); require("./pre.inc.php");
require_once(DOL_DOCUMENT_ROOT."/lib/company.lib.php"); require_once(DOL_DOCUMENT_ROOT."/lib/company.lib.php");
@ -39,47 +39,47 @@ $result = restrictedArea($user, 'societe','','');
/* /*
* Actions * Actions
*/ */
// Positionne companie parente // Positionne companie parente
if($_GET["socid"] && $_GET["select"]) if($_GET["socid"] && $_GET["select"])
{ {
if ($user->rights->societe->creer) if ($user->rights->societe->creer)
{ {
$soc = new Societe($db); $soc = new Societe($db);
$soc->id = $_GET["socid"]; $soc->id = $_GET["socid"];
$soc->fetch($_GET["socid"]); $soc->fetch($_GET["socid"]);
$soc->set_parent($_GET["select"]); $soc->set_parent($_GET["select"]);
Header("Location: lien.php?socid=".$soc->id); Header("Location: lien.php?socid=".$soc->id);
exit; exit;
} }
else else
{ {
Header("Location: lien.php?socid=".$_GET["socid"]); Header("Location: lien.php?socid=".$_GET["socid"]);
exit; exit;
} }
} }
// Supprime companie parente // Supprime companie parente
if($_GET["socid"] && $_GET["delsocid"]) if($_GET["socid"] && $_GET["delsocid"])
{ {
if ($user->rights->societe->creer) if ($user->rights->societe->creer)
{ {
$soc = new Societe($db); $soc = new Societe($db);
$soc->id = $_GET["socid"]; $soc->id = $_GET["socid"];
$soc->fetch($_GET["socid"]); $soc->fetch($_GET["socid"]);
$soc->remove_parent($_GET["delsocid"]); $soc->remove_parent($_GET["delsocid"]);
Header("Location: lien.php?socid=".$soc->id); Header("Location: lien.php?socid=".$soc->id);
exit; exit;
} }
else else
{ {
Header("Location: lien.php?socid=".$_GET["socid"]); Header("Location: lien.php?socid=".$_GET["socid"]);
exit; exit;
} }
} }
@ -89,191 +89,191 @@ llxHeader();
if($_GET["socid"]) 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<EFBFBD>t<EFBFBD> en mode visu
*/
print '<table class="border" width="100%">';
print '<tr><td width="20%">'.$langs->trans('Name').'</td><td colspan="3">'.$soc->nom.'</td></tr>';
print '<tr><td>';
print $langs->trans('CustomerCode').'</td><td width="20%">';
print $soc->code_client;
if ($soc->check_codeclient() <> 0) print ' '.$langs->trans("WrongCustomerCode");
print '</td><td>'.$langs->trans('Prefix').'</td><td>'.$soc->prefix_comm.'</td></tr>';
print "<tr><td valign=\"top\">".$langs->trans('Address')."</td><td colspan=\"3\">".nl2br($soc->adresse)."</td></tr>"; $soc = new Societe($db);
$soc->id = $_GET["socid"];
print "<tr><td>".$langs->trans('Zip')."</td><td>".$soc->cp."</td>"; $soc->fetch($_GET["socid"]);
print "<td>".$langs->trans('Town')."</td><td>".$soc->ville."</td></tr>";
$head=societe_prepare_head2($soc);
print "<tr><td>".$langs->trans('Country')."</td><td colspan=\"3\">".$soc->pays."</td></tr>";
dol_fiche_head($head, 'links', $langs->trans("ThirdParty"),0,'company');
print '<tr><td>'.$langs->trans('Phone').'</td><td>'.dol_print_phone($soc->tel,$soc->pays_code,0,$soc->id,'AC_TEL').'</td>';
print '<td>'.$langs->trans('Fax').'</td><td>'.dol_print_phone($soc->fax,$soc->pays_code,0,$soc->id,'AC_FAX').'</td></tr>'; /*
* Fiche societe en mode visu
print '<tr><td>'.$langs->trans('Web').'</td><td colspan="3">'; */
if ($soc->url) { print '<a href="http://'.$soc->url.'">http://'.$soc->url.'</a>'; }
print '</td></tr>'; print '<table class="border" width="100%">';
print '<tr><td width="20%">'.$langs->trans('Name').'</td><td colspan="3">'.$soc->nom.'</td></tr>';
print '<tr><td>'.$langs->transcountry('ProfId1',$soc->pays_code).'</td><td><a target="_blank" href="http://www.societe.com/cgi-bin/recherche?rncs='.$soc->siren.'">'.$soc->siren.'</a>&nbsp;</td>';
print '<tr><td>';
print '<td>'.$langs->transcountry('ProfId2',$soc->pays_code).'</td><td>'.$soc->siret.'</td></tr>'; print $langs->trans('CustomerCode').'</td><td width="20%">';
print $soc->code_client;
print '<tr><td>'.$langs->transcountry('ProfId3',$soc->pays_code).'</td><td>'.$soc->ape.'</td><td colspan="2">&nbsp;</td></tr>'; if ($soc->check_codeclient() <> 0) print ' '.$langs->trans("WrongCustomerCode");
print '<tr><td>'.$langs->trans("Capital").'</td><td colspan="3">'.$soc->capital.' '.$langs->trans("Currency".$conf->monnaie).'</td></tr>'; print '</td><td>'.$langs->trans('Prefix').'</td><td>'.$soc->prefix_comm.'</td></tr>';
// Societe mere print "<tr><td valign=\"top\">".$langs->trans('Address')."</td><td colspan=\"3\">".nl2br($soc->adresse)."</td></tr>";
print '<tr><td>'.$langs->trans("ParentCompany").'</td><td colspan="3">';
if ($soc->parent) print "<tr><td>".$langs->trans('Zip')."</td><td>".$soc->cp."</td>";
{ print "<td>".$langs->trans('Town')."</td><td>".$soc->ville."</td></tr>";
$socm = new Societe($db);
$socm->fetch($soc->parent); print "<tr><td>".$langs->trans('Country')."</td><td colspan=\"3\">".$soc->pays."</td></tr>";
print '<a href="'.DOL_URL_ROOT.'/soc.php?socid='.$socm->id.'">'.img_object($langs->trans("ShowCompany"),'company').' '.$socm->nom.'</a>'.($socm->code_client?"(".$socm->code_client.")":"");
print ($socm->ville?' - '.$socm->ville:''); print '<tr><td>'.$langs->trans('Phone').'</td><td>'.dol_print_phone($soc->tel,$soc->pays_code,0,$soc->id,'AC_TEL').'</td>';
print '&nbsp;<a href="'.$_SERVER["PHP_SELF"].'?socid='.$_GET["socid"].'&amp;delsocid='.$socm->id.'">'; print '<td>'.$langs->trans('Fax').'</td><td>'.dol_print_phone($soc->fax,$soc->pays_code,0,$soc->id,'AC_FAX').'</td></tr>';
print img_delete();
print '</a><br>'; print '<tr><td>'.$langs->trans('Web').'</td><td colspan="3">';
} if ($soc->url) { print '<a href="http://'.$soc->url.'">http://'.$soc->url.'</a>'; }
else print '</td></tr>';
{
print $langs->trans("NoParentCompany"); print '<tr><td>'.$langs->transcountry('ProfId1',$soc->pays_code).'</td><td><a target="_blank" href="http://www.societe.com/cgi-bin/recherche?rncs='.$soc->siren.'">'.$soc->siren.'</a>&nbsp;</td>';
}
print '</td></tr>'; print '<td>'.$langs->transcountry('ProfId2',$soc->pays_code).'</td><td>'.$soc->siret.'</td></tr>';
print '</table>'; print '<tr><td>'.$langs->transcountry('ProfId3',$soc->pays_code).'</td><td>'.$soc->ape.'</td><td colspan="2">&nbsp;</td></tr>';
print "</div>\n"; print '<tr><td>'.$langs->trans("Capital").'</td><td colspan="3">'.$soc->capital.' '.$langs->trans("Currency".$conf->monnaie).'</td></tr>';
// Societe mere
if ($_GET["select"] > 0) print '<tr><td>'.$langs->trans("ParentCompany").'</td><td colspan="3">';
{ if ($soc->parent)
$socm = new Societe($db); {
$socm->id = $_GET["select"]; $socm = new Societe($db);
$socm->fetch($_GET["select"]); $socm->fetch($soc->parent);
} print '<a href="'.DOL_URL_ROOT.'/soc.php?socid='.$socm->id.'">'.img_object($langs->trans("ShowCompany"),'company').' '.$socm->nom.'</a>'.($socm->code_client?"(".$socm->code_client.")":"");
else print ($socm->ville?' - '.$socm->ville:'');
{ print '&nbsp;<a href="'.$_SERVER["PHP_SELF"].'?socid='.$_GET["socid"].'&amp;delsocid='.$socm->id.'">';
if ($user->rights->societe->creer) print img_delete();
{ print '</a><br>';
}
$page=$_GET["page"]; else
{
if ($page == -1) { $page = 0 ; } print $langs->trans("NoParentCompany");
}
$offset = $conf->liste_limit * $page ; print '</td></tr>';
$pageprev = $page - 1;
$pagenext = $page + 1; print '</table>';
print "</div>\n";
/*
* Liste
* if ($_GET["select"] > 0)
*/ {
$socm = new Societe($db);
$title=$langs->trans("CompanyList"); $socm->id = $_GET["select"];
$socm->fetch($_GET["select"]);
$sql = "SELECT s.rowid as socid, s.nom, s.ville, s.prefix_comm, s.client, s.fournisseur,"; }
$sql.= " te.code, te.libelle"; else
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s,"; {
$sql.= " ".MAIN_DB_PREFIX."c_typent as te"; if ($user->rights->societe->creer)
$sql.= " WHERE s.fk_typent = te.id"; {
if (strlen(trim($_GET["search_nom"])))
{ $page=$_GET["page"];
$sql .= " AND s.nom LIKE '%".$_GET["search_nom"]."%'";
} if ($page == -1) { $page = 0 ; }
$sql .= " ORDER BY s.nom ASC " . $db->plimit($conf->liste_limit+1, $offset);
$offset = $conf->liste_limit * $page ;
$resql = $db->query($sql); $pageprev = $page - 1;
if ($resql) $pagenext = $page + 1;
{
$num = $db->num_rows($resql); /*
$i = 0; * Liste
*
$params = "&amp;socid=".$_GET["socid"]; */
print_barre_liste($title, $page, "lien.php",$params,$sortfield,$sortorder,'',$num,0,''); $title=$langs->trans("CompanyList");
// Lignes des titres $sql = "SELECT s.rowid as socid, s.nom, s.ville, s.prefix_comm, s.client, s.fournisseur,";
print '<table class="noborder" width="100%">'; $sql.= " te.code, te.libelle";
print '<tr class="liste_titre">'; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s,";
print '<td>'.$langs->trans("Company").'</td>'; $sql.= " ".MAIN_DB_PREFIX."c_typent as te";
print '<td>'.$langs->trans("Town").'</td>'; $sql.= " WHERE s.fk_typent = te.id";
print '<td>Type<td>'; if (strlen(trim($_GET["search_nom"])))
print '<td colspan="2" align="center">&nbsp;</td>'; {
print "</tr>\n"; $sql .= " AND s.nom LIKE '%".$_GET["search_nom"]."%'";
}
// Lignes des champs de filtre $sql .= " ORDER BY s.nom ASC " . $db->plimit($conf->liste_limit+1, $offset);
print '<form action="lien.php" method="GET" >';
print '<input type="hidden" name="socid" value="'.$_GET["socid"].'">'; $resql = $db->query($sql);
print '<tr class="liste_titre">'; if ($resql)
print '<td valign="right">'; {
print '<input type="text" name="search_nom" value="'.$_GET["search_nom"].'">'; $num = $db->num_rows($resql);
print '</td><td colspan="5" align="right">'; $i = 0;
print '<input type="image" class="liste_titre" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/search.png" alt="'.$langs->trans("Search").'">';
print '</td>'; $params = "&amp;socid=".$_GET["socid"];
print "</tr>\n";
print '</form>'; print_barre_liste($title, $page, "lien.php",$params,$sortfield,$sortorder,'',$num,0,'');
$var=True; // Lignes des titres
print '<table class="noborder" width="100%">';
while ($i < min($num,$conf->liste_limit)) print '<tr class="liste_titre">';
{ print '<td>'.$langs->trans("Company").'</td>';
$obj = $db->fetch_object($resql); print '<td>'.$langs->trans("Town").'</td>';
$var=!$var; print '<td>Type<td>';
print "<tr $bc[$var]><td>"; print '<td colspan="2" align="center">&nbsp;</td>';
print $obj->nom."</td>\n"; print "</tr>\n";
print "<td>".$obj->ville."&nbsp;</td>\n";
print "<td>".$langs->getLabelFromKey($db,$obj->code,'c_typent','code','libelle')."</td>\n"; // Lignes des champs de filtre
print '<td align="center">'; print '<form action="lien.php" method="GET" >';
if ($obj->client==1) print '<input type="hidden" name="socid" value="'.$_GET["socid"].'">';
{ print '<tr class="liste_titre">';
print $langs->trans("Customer")."\n"; print '<td valign="right">';
} print '<input type="text" name="search_nom" value="'.$_GET["search_nom"].'">';
elseif ($obj->client==2) print '</td><td colspan="5" align="right">';
{ print '<input type="image" class="liste_titre" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/search.png" alt="'.$langs->trans("Search").'">';
print $langs->trans("Prospect")."\n"; print '</td>';
} print "</tr>\n";
else print '</form>';
{
print "&nbsp;"; $var=True;
}
print "</td><td align=\"center\">"; while ($i < min($num,$conf->liste_limit))
if ($obj->fournisseur) {
{ $obj = $db->fetch_object($resql);
print $langs->trans("Supplier"); $var=!$var;
} print "<tr $bc[$var]><td>";
else print $obj->nom."</td>\n";
{ print "<td>".$obj->ville."&nbsp;</td>\n";
print "&nbsp;"; print "<td>".$langs->getLabelFromKey($db,$obj->code,'c_typent','code','libelle')."</td>\n";
} print '<td align="center">';
if ($obj->client==1)
print '</td>'; {
// Lien S<>lectionner print $langs->trans("Customer")."\n";
print '<td align="center"><a href="lien.php?socid='.$_GET["socid"].'&amp;select='.$obj->socid.'">'.$langs->trans("Select").'</a>'; }
print '</td>'; elseif ($obj->client==2)
{
print '</tr>'."\n"; print $langs->trans("Prospect")."\n";
$i++; }
} else
{
print "</table>"; print "&nbsp;";
print '<br>'; }
$db->free($resql); print "</td><td align=\"center\">";
} if ($obj->fournisseur)
else {
{ print $langs->trans("Supplier");
dol_print_error($db); }
} else
} {
} print "&nbsp;";
}
print '</td>';
// Lien S<>lectionner
print '<td align="center"><a href="lien.php?socid='.$_GET["socid"].'&amp;select='.$obj->socid.'">'.$langs->trans("Select").'</a>';
print '</td>';
print '</tr>'."\n";
$i++;
}
print "</table>";
print '<br>';
$db->free($resql);
}
else
{
dol_print_error($db);
}
}
}
} }

View File

@ -100,7 +100,7 @@ if ( $soc->fetch($soc->id) )
$head = societe_prepare_head($soc); $head = societe_prepare_head($soc);
dol_fiche_head($head, 'notify', $langs->trans("ThirdParty")); dol_fiche_head($head, 'notify', $langs->trans("ThirdParty"),0,'company');
print '<table class="border"width="100%">'; print '<table class="border"width="100%">';

View File

@ -92,7 +92,7 @@ llxHeader();
$head=societe_prepare_head2($soc); $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 = new CompanyBankAccount($db);
$account->socid=$soc->id; $account->socid=$soc->id;
@ -108,7 +108,7 @@ $account->fetch($soc->id);
if ($_GET["socid"] && $_GET["action"] != 'edit') if ($_GET["socid"] && $_GET["action"] != 'edit')
{ {
// Check BBAN // Check BBAN
if (! checkBanForAccount($account)) if (! checkBanForAccount($account))
{ {
print '<div class="warning">'.$langs->trans("RIBControlError").'</div><br>'; print '<div class="warning">'.$langs->trans("RIBControlError").'</div><br>';
} }
@ -132,7 +132,7 @@ if ($_GET["socid"] && $_GET["action"] != 'edit')
print '<tr><td>'.$langs->trans("BankAccountNumber").'</td>'; print '<tr><td>'.$langs->trans("BankAccountNumber").'</td>';
print '<td colspan="3">'.$account->number.'</td>'; print '<td colspan="3">'.$account->number.'</td>';
print '</tr>'; print '</tr>';
if ($account->useDetailedBBAN()) if ($account->useDetailedBBAN())
{ {
print '<tr><td>'.$langs->trans("BankAccountNumberKey").'</td>'; print '<tr><td>'.$langs->trans("BankAccountNumberKey").'</td>';
@ -213,7 +213,7 @@ if ($_GET["socid"] && $_GET["action"] == 'edit' && $user->rights->societe->creer
print '<td><input size="8" type="text" class="flat" name="code_guichet" value="'.$account->code_guichet.'"></td>'; print '<td><input size="8" type="text" class="flat" name="code_guichet" value="'.$account->code_guichet.'"></td>';
print '</tr>'; print '</tr>';
} }
print '<td>'.$langs->trans("BankAccountNumber").'</td>'; print '<td>'.$langs->trans("BankAccountNumber").'</td>';
print '<td><input size="15" type="text" class="flat" name="number" value="'.$account->number.'"></td>'; print '<td><input size="15" type="text" class="flat" name="number" value="'.$account->number.'"></td>';
print '</tr>'; print '</tr>';
@ -223,7 +223,7 @@ if ($_GET["socid"] && $_GET["action"] == 'edit' && $user->rights->societe->creer
print '<td>'.$langs->trans("BankAccountNumberKey").'</td>'; print '<td>'.$langs->trans("BankAccountNumberKey").'</td>';
print '<td><input size="3" type="text" class="flat" name="cle_rib" value="'.$account->cle_rib.'"></td>'; print '<td><input size="3" type="text" class="flat" name="cle_rib" value="'.$account->cle_rib.'"></td>';
print '</tr>'; print '</tr>';
} }
// IBAN // IBAN
print '<tr><td valign="top">'.$langs->trans("IBAN").'</td>'; print '<tr><td valign="top">'.$langs->trans("IBAN").'</td>';

View File

@ -69,7 +69,7 @@ if ($socid > 0)
*/ */
$head = societe_prepare_head($societe); $head = societe_prepare_head($societe);
dol_fiche_head($head, 'note', $langs->trans("ThirdParty")); dol_fiche_head($head, 'note', $langs->trans("ThirdParty"),0,'company');
print "<form method=\"post\" action=\"".DOL_URL_ROOT."/societe/socnote.php\">"; print "<form method=\"post\" action=\"".DOL_URL_ROOT."/societe/socnote.php\">";

View File

@ -1,105 +0,0 @@
<?php
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2008 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
* 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 '<table class="border" width="100%">';
print '<tr><td width="25%" valign="top">'.$langs->trans("Lastname").'</td>';
print '<td class="valeur">'.$fuser->nom.'</td></tr>';
print '<tr><td width="25%" valign="top">'.$langs->trans("Firstname").'</td>';
print '<td class="valeur">'.$fuser->prenom.'</td>';
print "</tr>\n";
print '<tr><td width="25%" valign="top">'.$langs->trans("Login").'</td>';
print '<td class="valeur">'.$fuser->login.'</td></tr>';
print '<tr><td width="25%" valign="top">'.$langs->trans("EMail").'</td>';
print '<td class="valeur"><a href="mailto:'.$fuser->email.'">'.$fuser->email.'</a></td>';
print "</tr>\n";
//...
print "</table>\n";
print "</div>\n";
/*
* Barre d'actions
*
*/
print '<div class="tabsAction">';
if ($user->admin)
{
// print '<a class="butAction" href="addon.php?id='.$fuser->id.'&amp;action=create_bk4u_login">'.$langs->trans("Créer login Bookmark4u").'</a>';
}
print "</div>\n";
print "<br>\n";
}
$db->close();
llxFooter('$Date$ - $Revision$');
?>

View File

@ -35,20 +35,23 @@ $form = new Form($db);
/* /*
* Actions * Actions
*/ */
if ($_POST["action"] == 'update' && ! $_POST['cancel']) if ($_POST["action"] == 'update' && ! $_POST['cancel'])
{ {
$edituser = new User($db, $_GET["id"]); $edituser = new User($db, $_GET["id"]);
$edituser->clicktodial_login = $_POST["login"]; $edituser->clicktodial_login = $_POST["login"];
$edituser->clicktodial_password = $_POST["password"]; $edituser->clicktodial_password = $_POST["password"];
$edituser->clicktodial_poste = $_POST["poste"]; $edituser->clicktodial_poste = $_POST["poste"];
$result=$edituser->update_clicktodial(); $result=$edituser->update_clicktodial();
} }
/*
* View
*/
llxHeader("","ClickToDial"); llxHeader("","ClickToDial");
@ -65,7 +68,8 @@ if ($_GET["id"])
*/ */
$head = user_prepare_head($fuser); $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 * Fiche en mode visu
@ -89,18 +93,18 @@ if ($_GET["id"])
print '<tr><td width="25%" valign="top">'.$langs->trans("Firstname").'</td>'; print '<tr><td width="25%" valign="top">'.$langs->trans("Firstname").'</td>';
print '<td colspan="2">'.$fuser->prenom.'</td>'; print '<td colspan="2">'.$fuser->prenom.'</td>';
print "</tr>\n"; print "</tr>\n";
print "</table>\n"; print "</table>\n";
print "<br>\n"; print "<br>\n";
if ($_GET["action"] == 'edit') if ($_GET["action"] == 'edit')
{ {
print '<form action="clicktodial.php?id='.$_GET["id"].'" method="post">'; print '<form action="clicktodial.php?id='.$_GET["id"].'" method="post">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="update">'; print '<input type="hidden" name="action" value="update">';
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';
if ($user->admin) if ($user->admin)
{ {
print "<tr>".'<td width="25%" valign="top">ClickToDial URL</td>'; print "<tr>".'<td width="25%" valign="top">ClickToDial URL</td>';
@ -109,12 +113,12 @@ if ($_GET["id"])
print '</td>'; print '</td>';
print '</tr>'; print '</tr>';
} }
print "<tr>".'<td width="25%" valign="top">ClickToDial '.$langs->trans("Login").'</td>'; print "<tr>".'<td width="25%" valign="top">ClickToDial '.$langs->trans("Login").'</td>';
print '<td class="valeur">'; print '<td class="valeur">';
print '<input name="login" value="'.$fuser->clicktodial_login.'"></td>'; print '<input name="login" value="'.$fuser->clicktodial_login.'"></td>';
print '</tr>'; print '</tr>';
print "<tr>".'<td width="25%" valign="top">ClickToDial '.$langs->trans("Password").'</td>'; print "<tr>".'<td width="25%" valign="top">ClickToDial '.$langs->trans("Password").'</td>';
print '<td class="valeur">'; print '<td class="valeur">';
print '<input name="password" value="'.$fuser->clicktodial_password.'"></td>'; print '<input name="password" value="'.$fuser->clicktodial_password.'"></td>';
@ -129,7 +133,7 @@ if ($_GET["id"])
print ' &nbsp; &nbsp; '; print ' &nbsp; &nbsp; ';
print '<input class="button" type="submit" name="cancel" value="'.$langs->trans("Cancel").'">'; print '<input class="button" type="submit" name="cancel" value="'.$langs->trans("Cancel").'">';
print '</td></tr>'; print '</td></tr>';
print '</table></form>'; print '</table></form>';
} }
else else

View File

@ -757,7 +757,7 @@ else
$head = user_prepare_head($fuser); $head = user_prepare_head($fuser);
$title = $langs->trans("User"); $title = $langs->trans("User");
dol_fiche_head($head, 'user', $title); dol_fiche_head($head, 'user', $title, 0, 'user');
/* /*

View File

@ -52,7 +52,7 @@ $fuser->info($_GET["id"]);
$head = user_prepare_head($fuser); $head = user_prepare_head($fuser);
$title = $langs->trans("User"); $title = $langs->trans("User");
dol_fiche_head($head, 'info', $title); dol_fiche_head($head, 'info', $title, 0, 'user');
print '<table width="100%"><tr><td>'; print '<table width="100%"><tr><td>';

View File

@ -18,11 +18,11 @@
*/ */
/** /**
\file htdocs/user/ldap.php * \file htdocs/user/ldap.php
\ingroup ldap * \ingroup ldap
\brief Page fiche LDAP utilisateur * \brief Page fiche LDAP utilisateur
\version $Id$ * \version $Id$
*/ */
require("./pre.inc.php"); require("./pre.inc.php");
require_once(DOL_DOCUMENT_ROOT."/lib/usergroups.lib.php"); require_once(DOL_DOCUMENT_ROOT."/lib/usergroups.lib.php");
@ -79,7 +79,7 @@ if ($_GET["action"] == 'dolibarr2ldap')
/* /*
* Affichage page * View
*/ */
llxHeader(); llxHeader();
@ -93,7 +93,7 @@ $form = new Form($db);
$head = user_prepare_head($fuser); $head = user_prepare_head($fuser);
$title = $langs->trans("User"); $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 // LDAP DN
print '<tr><td>LDAP '.$langs->trans("LDAPUserDn").'</td><td class="valeur">'.$conf->global->LDAP_USER_DN."</td></tr>\n"; print '<tr><td>LDAP '.$langs->trans("LDAPUserDn").'</td><td class="valeur">'.$conf->global->LDAP_USER_DN."</td></tr>\n";
// LDAP Clé // LDAP Cl<EFBFBD>
print '<tr><td>LDAP '.$langs->trans("LDAPNamingAttribute").'</td><td class="valeur">'.$conf->global->LDAP_KEY_USERS."</td></tr>\n"; print '<tr><td>LDAP '.$langs->trans("LDAPNamingAttribute").'</td><td class="valeur">'.$conf->global->LDAP_KEY_USERS."</td></tr>\n";
// LDAP Server // LDAP Server

View File

@ -83,7 +83,7 @@ if ($id)
$head = user_prepare_head($fuser); $head = user_prepare_head($fuser);
$title = $langs->trans("User"); $title = $langs->trans("User");
dol_fiche_head($head, 'note', $title); dol_fiche_head($head, 'note', $title, 0, 'user');
if ($msg) print '<div class="error">'.$msg.'</div>'; if ($msg) print '<div class="error">'.$msg.'</div>';

View File

@ -105,16 +105,16 @@ if ($_POST["action"] == 'update' && ($caneditfield || $user->admin))
/*
* View
*/
llxHeader(); llxHeader();
/*
* Affichage onglets
*/
$head = user_prepare_head($fuser); $head = user_prepare_head($fuser);
$title = $langs->trans("User"); $title = $langs->trans("User");
dol_fiche_head($head, 'guisetup', $title); dol_fiche_head($head, 'guisetup', $title, 0, 'user');
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';

View File

@ -95,7 +95,7 @@ $fuser->getrights();
$head = user_prepare_head($fuser); $head = user_prepare_head($fuser);
$title = $langs->trans("User"); $title = $langs->trans("User");
dol_fiche_head($head, 'rights', $title); dol_fiche_head($head, 'rights', $title, 0, 'user');
$db->begin(); $db->begin();