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

@ -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;

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,11 +18,11 @@
*/ */
/** /**
\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); $head=societe_prepare_head2($soc);
dol_fiche_head($head, 'salesrepresentative', $langs->trans("ThirdParty")); dol_fiche_head($head, 'salesrepresentative', $langs->trans("ThirdParty"),0,'company');
/* /*
* Fiche soci<EFBFBD>t<EFBFBD> en mode visu * Fiche societe en mode visu
*/ */
print '<table class="border" width="100%">'; 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 width="20%">'.$langs->trans('Name').'</td><td colspan="3">'.$soc->nom.'</td></tr>';
print '<tr><td>'; print '<tr><td>';
print $langs->trans('CustomerCode').'</td><td width="20%">'; print $langs->trans('CustomerCode').'</td><td width="20%">';
print $soc->code_client; print $soc->code_client;
if ($soc->check_codeclient() <> 0) print ' '.$langs->trans("WrongCustomerCode"); if ($soc->check_codeclient() <> 0) print ' '.$langs->trans("WrongCustomerCode");
print '</td><td>'.$langs->trans('Prefix').'</td><td>'.$soc->prefix_comm.'</td></tr>'; 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>"; print "<tr><td valign=\"top\">".$langs->trans('Address')."</td><td colspan=\"3\">".nl2br($soc->adresse)."</td></tr>";
print '<tr><td>'.$langs->trans('Zip').'</td><td>'.$soc->cp."</td>"; print '<tr><td>'.$langs->trans('Zip').'</td><td>'.$soc->cp."</td>";
print '<td>'.$langs->trans('Town').'</td><td>'.$soc->ville."</td></tr>"; 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('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 '<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 '<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">'; print '<tr><td>'.$langs->trans('Web').'</td><td colspan="3">';
if ($soc->url) { print '<a href="http://'.$soc->url.'">http://'.$soc->url.'</a>'; } if ($soc->url) { print '<a href="http://'.$soc->url.'">http://'.$soc->url.'</a>'; }
print '</td></tr>'; print '</td></tr>';
// Liste les commerciaux // Liste les commerciaux
print '<tr><td valign="top">'.$langs->trans("SalesRepresentatives").'</td>'; print '<tr><td valign="top">'.$langs->trans("SalesRepresentatives").'</td>';
print '<td colspan="3">'; print '<td colspan="3">';
$sql = "SELECT u.rowid, u.name, u.firstname"; $sql = "SELECT u.rowid, u.name, u.firstname";
$sql .= " FROM ".MAIN_DB_PREFIX."user as u"; $sql .= " FROM ".MAIN_DB_PREFIX."user as u";
$sql .= " , ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql .= " , ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql .= " WHERE sc.fk_soc =".$soc->id; $sql .= " WHERE sc.fk_soc =".$soc->id;
$sql .= " AND sc.fk_user = u.rowid"; $sql .= " AND sc.fk_user = u.rowid";
$sql .= " ORDER BY u.name ASC "; $sql .= " ORDER BY u.name ASC ";
$resql = $db->query($sql); $resql = $db->query($sql);
if ($resql) if ($resql)
{ {
$num = $db->num_rows($resql); $num = $db->num_rows($resql);
$i = 0; $i = 0;
while ($i < $num) while ($i < $num)
{ {
$obj = $db->fetch_object($resql); $obj = $db->fetch_object($resql);
if (!$user->rights->societe->client->voir) if (!$user->rights->societe->client->voir)
{ {
print '<a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$obj->rowid.'">'; print '<a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$obj->rowid.'">';
print img_object($langs->trans("ShowUser"),"user").' '; print img_object($langs->trans("ShowUser"),"user").' ';
print stripslashes($obj->firstname)." " .stripslashes($obj->name)."\n"; print stripslashes($obj->firstname)." " .stripslashes($obj->name)."\n";
print '</a><br>'; print '</a><br>';
$i++; $i++;
} }
else else
{ {
print '<a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$obj->rowid.'">'; print '<a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$obj->rowid.'">';
print img_object($langs->trans("ShowUser"),"user").' '; print img_object($langs->trans("ShowUser"),"user").' ';
print $obj->firstname." " .$obj->name."\n"; print $obj->firstname." " .$obj->name."\n";
print '</a>&nbsp;'; print '</a>&nbsp;';
print '<a href="commerciaux.php?socid='.$_GET["socid"].'&amp;delcommid='.$obj->rowid.'">'; print '<a href="commerciaux.php?socid='.$_GET["socid"].'&amp;delcommid='.$obj->rowid.'">';
print img_delete(); print img_delete();
print '</a><br>'; print '</a><br>';
$i++; $i++;
} }
} }
$db->free($resql); $db->free($resql);
} }
else else
{ {
dol_print_error($db); dol_print_error($db);
} }
if($i == 0) { print $langs->trans("NoSalesRepresentativeAffected"); } if($i == 0) { print $langs->trans("NoSalesRepresentativeAffected"); }
print "</td></tr>"; print "</td></tr>";
print '</table>'; print '</table>';
print "</div>\n"; print "</div>\n";
if ($user->rights->societe->creer && $user->rights->societe->client->voir) if ($user->rights->societe->creer && $user->rights->societe->client->voir)
{ {
/* /*
* Liste * Liste
* *
*/ */
$langs->load("users"); $langs->load("users");
$title=$langs->trans("ListOfUsers"); $title=$langs->trans("ListOfUsers");
$sql = "SELECT u.rowid, u.name, u.firstname, u.login"; $sql = "SELECT u.rowid, u.name, u.firstname, u.login";
$sql .= " FROM ".MAIN_DB_PREFIX."user as u"; $sql .= " FROM ".MAIN_DB_PREFIX."user as u";
$sql .= " ORDER BY u.name ASC "; $sql .= " ORDER BY u.name ASC ";
$resql = $db->query($sql); $resql = $db->query($sql);
if ($resql) if ($resql)
{ {
$num = $db->num_rows($resql); $num = $db->num_rows($resql);
$i = 0; $i = 0;
print_titre($title); print_titre($title);
// Lignes des titres // Lignes des titres
print '<table class="noborder" width="100%">'; print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Name").'</td>'; print '<td>'.$langs->trans("Name").'</td>';
print '<td>'.$langs->trans("Login").'</td>'; print '<td>'.$langs->trans("Login").'</td>';
print '<td>&nbsp;</td>'; print '<td>&nbsp;</td>';
print "</tr>\n"; print "</tr>\n";
$var=True; $var=True;
while ($i < $num) while ($i < $num)
{ {
$obj = $db->fetch_object($resql); $obj = $db->fetch_object($resql);
$var=!$var; $var=!$var;
print "<tr $bc[$var]><td>"; print "<tr $bc[$var]><td>";
print '<a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$obj->rowid.'">'; print '<a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$obj->rowid.'">';
print img_object($langs->trans("ShowUser"),"user").' '; print img_object($langs->trans("ShowUser"),"user").' ';
print stripslashes($obj->firstname)." " .stripslashes($obj->name)."\n"; print stripslashes($obj->firstname)." " .stripslashes($obj->name)."\n";
print '</a>'; print '</a>';
print '</td><td>'.$obj->login.'</td>'; 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 '<td><a href="commerciaux.php?socid='.$_GET["socid"].'&amp;commid='.$obj->rowid.'">'.$langs->trans("Add").'</a></td>';
print '</tr>'."\n"; print '</tr>'."\n";
$i++; $i++;
} }
print "</table>"; print "</table>";
$db->free($resql); $db->free($resql);
} }
else else
{ {
dol_print_error($db); 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;
} }
} }
@ -90,190 +90,190 @@ llxHeader();
if($_GET["socid"]) if($_GET["socid"])
{ {
$soc = new Societe($db); $soc = new Societe($db);
$soc->id = $_GET["socid"]; $soc->id = $_GET["socid"];
$soc->fetch($_GET["socid"]); $soc->fetch($_GET["socid"]);
$head=societe_prepare_head2($soc); $head=societe_prepare_head2($soc);
dol_fiche_head($head, 'links', $langs->trans("ThirdParty")); dol_fiche_head($head, 'links', $langs->trans("ThirdParty"),0,'company');
/* /*
* Fiche soci<EFBFBD>t<EFBFBD> en mode visu * Fiche societe en mode visu
*/ */
print '<table class="border" width="100%">'; 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 width="20%">'.$langs->trans('Name').'</td><td colspan="3">'.$soc->nom.'</td></tr>';
print '<tr><td>'; print '<tr><td>';
print $langs->trans('CustomerCode').'</td><td width="20%">'; print $langs->trans('CustomerCode').'</td><td width="20%">';
print $soc->code_client; print $soc->code_client;
if ($soc->check_codeclient() <> 0) print ' '.$langs->trans("WrongCustomerCode"); if ($soc->check_codeclient() <> 0) print ' '.$langs->trans("WrongCustomerCode");
print '</td><td>'.$langs->trans('Prefix').'</td><td>'.$soc->prefix_comm.'</td></tr>'; 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>"; print "<tr><td valign=\"top\">".$langs->trans('Address')."</td><td colspan=\"3\">".nl2br($soc->adresse)."</td></tr>";
print "<tr><td>".$langs->trans('Zip')."</td><td>".$soc->cp."</td>"; print "<tr><td>".$langs->trans('Zip')."</td><td>".$soc->cp."</td>";
print "<td>".$langs->trans('Town')."</td><td>".$soc->ville."</td></tr>"; print "<td>".$langs->trans('Town')."</td><td>".$soc->ville."</td></tr>";
print "<tr><td>".$langs->trans('Country')."</td><td colspan=\"3\">".$soc->pays."</td></tr>"; print "<tr><td>".$langs->trans('Country')."</td><td colspan=\"3\">".$soc->pays."</td></tr>";
print '<tr><td>'.$langs->trans('Phone').'</td><td>'.dol_print_phone($soc->tel,$soc->pays_code,0,$soc->id,'AC_TEL').'</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 '<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">'; print '<tr><td>'.$langs->trans('Web').'</td><td colspan="3">';
if ($soc->url) { print '<a href="http://'.$soc->url.'">http://'.$soc->url.'</a>'; } if ($soc->url) { print '<a href="http://'.$soc->url.'">http://'.$soc->url.'</a>'; }
print '</td></tr>'; print '</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>'.$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>'.$langs->transcountry('ProfId2',$soc->pays_code).'</td><td>'.$soc->siret.'</td></tr>'; print '<td>'.$langs->transcountry('ProfId2',$soc->pays_code).'</td><td>'.$soc->siret.'</td></tr>';
print '<tr><td>'.$langs->transcountry('ProfId3',$soc->pays_code).'</td><td>'.$soc->ape.'</td><td colspan="2">&nbsp;</td></tr>'; print '<tr><td>'.$langs->transcountry('ProfId3',$soc->pays_code).'</td><td>'.$soc->ape.'</td><td colspan="2">&nbsp;</td></tr>';
print '<tr><td>'.$langs->trans("Capital").'</td><td colspan="3">'.$soc->capital.' '.$langs->trans("Currency".$conf->monnaie).'</td></tr>'; print '<tr><td>'.$langs->trans("Capital").'</td><td colspan="3">'.$soc->capital.' '.$langs->trans("Currency".$conf->monnaie).'</td></tr>';
// Societe mere // Societe mere
print '<tr><td>'.$langs->trans("ParentCompany").'</td><td colspan="3">'; print '<tr><td>'.$langs->trans("ParentCompany").'</td><td colspan="3">';
if ($soc->parent) if ($soc->parent)
{ {
$socm = new Societe($db); $socm = new Societe($db);
$socm->fetch($soc->parent); $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.")":""); 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 ($socm->ville?' - '.$socm->ville:'');
print '&nbsp;<a href="'.$_SERVER["PHP_SELF"].'?socid='.$_GET["socid"].'&amp;delsocid='.$socm->id.'">'; print '&nbsp;<a href="'.$_SERVER["PHP_SELF"].'?socid='.$_GET["socid"].'&amp;delsocid='.$socm->id.'">';
print img_delete(); print img_delete();
print '</a><br>'; print '</a><br>';
} }
else else
{ {
print $langs->trans("NoParentCompany"); print $langs->trans("NoParentCompany");
} }
print '</td></tr>'; print '</td></tr>';
print '</table>'; print '</table>';
print "</div>\n"; print "</div>\n";
if ($_GET["select"] > 0) if ($_GET["select"] > 0)
{ {
$socm = new Societe($db); $socm = new Societe($db);
$socm->id = $_GET["select"]; $socm->id = $_GET["select"];
$socm->fetch($_GET["select"]); $socm->fetch($_GET["select"]);
} }
else else
{ {
if ($user->rights->societe->creer) if ($user->rights->societe->creer)
{ {
$page=$_GET["page"]; $page=$_GET["page"];
if ($page == -1) { $page = 0 ; } if ($page == -1) { $page = 0 ; }
$offset = $conf->liste_limit * $page ; $offset = $conf->liste_limit * $page ;
$pageprev = $page - 1; $pageprev = $page - 1;
$pagenext = $page + 1; $pagenext = $page + 1;
/* /*
* Liste * Liste
* *
*/ */
$title=$langs->trans("CompanyList"); $title=$langs->trans("CompanyList");
$sql = "SELECT s.rowid as socid, s.nom, s.ville, s.prefix_comm, s.client, s.fournisseur,"; $sql = "SELECT s.rowid as socid, s.nom, s.ville, s.prefix_comm, s.client, s.fournisseur,";
$sql.= " te.code, te.libelle"; $sql.= " te.code, te.libelle";
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s,"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s,";
$sql.= " ".MAIN_DB_PREFIX."c_typent as te"; $sql.= " ".MAIN_DB_PREFIX."c_typent as te";
$sql.= " WHERE s.fk_typent = te.id"; $sql.= " WHERE s.fk_typent = te.id";
if (strlen(trim($_GET["search_nom"]))) if (strlen(trim($_GET["search_nom"])))
{ {
$sql .= " AND s.nom LIKE '%".$_GET["search_nom"]."%'"; $sql .= " AND s.nom LIKE '%".$_GET["search_nom"]."%'";
} }
$sql .= " ORDER BY s.nom ASC " . $db->plimit($conf->liste_limit+1, $offset); $sql .= " ORDER BY s.nom ASC " . $db->plimit($conf->liste_limit+1, $offset);
$resql = $db->query($sql); $resql = $db->query($sql);
if ($resql) if ($resql)
{ {
$num = $db->num_rows($resql); $num = $db->num_rows($resql);
$i = 0; $i = 0;
$params = "&amp;socid=".$_GET["socid"]; $params = "&amp;socid=".$_GET["socid"];
print_barre_liste($title, $page, "lien.php",$params,$sortfield,$sortorder,'',$num,0,''); print_barre_liste($title, $page, "lien.php",$params,$sortfield,$sortorder,'',$num,0,'');
// Lignes des titres // Lignes des titres
print '<table class="noborder" width="100%">'; print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Company").'</td>'; print '<td>'.$langs->trans("Company").'</td>';
print '<td>'.$langs->trans("Town").'</td>'; print '<td>'.$langs->trans("Town").'</td>';
print '<td>Type<td>'; print '<td>Type<td>';
print '<td colspan="2" align="center">&nbsp;</td>'; print '<td colspan="2" align="center">&nbsp;</td>';
print "</tr>\n"; print "</tr>\n";
// Lignes des champs de filtre // Lignes des champs de filtre
print '<form action="lien.php" method="GET" >'; print '<form action="lien.php" method="GET" >';
print '<input type="hidden" name="socid" value="'.$_GET["socid"].'">'; print '<input type="hidden" name="socid" value="'.$_GET["socid"].'">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td valign="right">'; print '<td valign="right">';
print '<input type="text" name="search_nom" value="'.$_GET["search_nom"].'">'; print '<input type="text" name="search_nom" value="'.$_GET["search_nom"].'">';
print '</td><td colspan="5" align="right">'; 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 '<input type="image" class="liste_titre" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/search.png" alt="'.$langs->trans("Search").'">';
print '</td>'; print '</td>';
print "</tr>\n"; print "</tr>\n";
print '</form>'; print '</form>';
$var=True; $var=True;
while ($i < min($num,$conf->liste_limit)) while ($i < min($num,$conf->liste_limit))
{ {
$obj = $db->fetch_object($resql); $obj = $db->fetch_object($resql);
$var=!$var; $var=!$var;
print "<tr $bc[$var]><td>"; print "<tr $bc[$var]><td>";
print $obj->nom."</td>\n"; print $obj->nom."</td>\n";
print "<td>".$obj->ville."&nbsp;</td>\n"; print "<td>".$obj->ville."&nbsp;</td>\n";
print "<td>".$langs->getLabelFromKey($db,$obj->code,'c_typent','code','libelle')."</td>\n"; print "<td>".$langs->getLabelFromKey($db,$obj->code,'c_typent','code','libelle')."</td>\n";
print '<td align="center">'; print '<td align="center">';
if ($obj->client==1) if ($obj->client==1)
{ {
print $langs->trans("Customer")."\n"; print $langs->trans("Customer")."\n";
} }
elseif ($obj->client==2) elseif ($obj->client==2)
{ {
print $langs->trans("Prospect")."\n"; print $langs->trans("Prospect")."\n";
} }
else else
{ {
print "&nbsp;"; print "&nbsp;";
} }
print "</td><td align=\"center\">"; print "</td><td align=\"center\">";
if ($obj->fournisseur) if ($obj->fournisseur)
{ {
print $langs->trans("Supplier"); print $langs->trans("Supplier");
} }
else else
{ {
print "&nbsp;"; print "&nbsp;";
} }
print '</td>'; print '</td>';
// Lien S<>lectionner // Lien S<>lectionner
print '<td align="center"><a href="lien.php?socid='.$_GET["socid"].'&amp;select='.$obj->socid.'">'.$langs->trans("Select").'</a>'; print '<td align="center"><a href="lien.php?socid='.$_GET["socid"].'&amp;select='.$obj->socid.'">'.$langs->trans("Select").'</a>';
print '</td>'; print '</td>';
print '</tr>'."\n"; print '</tr>'."\n";
$i++; $i++;
} }
print "</table>"; print "</table>";
print '<br>'; print '<br>';
$db->free($resql); $db->free($resql);
} }
else else
{ {
dol_print_error($db); 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;

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

@ -49,6 +49,9 @@ if ($_POST["action"] == 'update' && ! $_POST['cancel'])
/*
* 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

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();