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);
dol_fiche_head($head, 'category', $langs->trans("ThirdParty"));
dol_fiche_head($head, 'category', $langs->trans("ThirdParty"),0,'company');
print '<table class="border" width="100%">';

View File

@ -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 '<table class="border" width="100%"';

View File

@ -585,7 +585,6 @@ if ($_GET["action"] == 'create')
/*
* Affichage action en mode edition ou visu
*
*/
if ($_GET["id"])
{
@ -640,7 +639,7 @@ if ($_GET["id"])
$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');
$now=gmmktime();
$delay_warning=$conf->global->MAIN_DELAY_ACTIONS_TODO*24*60*60;

View File

@ -1,6 +1,6 @@
<?php
/* 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
* 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 '<table width="100%"><tr><td>';

View File

@ -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');
/*

View File

@ -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');
/*

View File

@ -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 '<form method="POST" action="remx.php?id='.$objsoc->id.'">';

View File

@ -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 '<table width="100%" class="notopnoleftnoright">';

View File

@ -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 '<table class="noborder" width="100%">';
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].'>&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)
if ($edit)
{
if ($subdir == $conf->global->MAIN_THEME) $title=$langs->trans("ThemeCurrentlyActive");
else $title=$langs->trans("ShowPreview");
}
$var=!$var;
print '<tr '.$bc[$var].'><td colspan="'.$colspan.'">';
@ -176,7 +168,7 @@ function show_theme($fuser,$edit=0,$foruserprofile=false)
{
print '<tr '.$bc[$var].'>';
}
print '<td align="center">';
$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 '</tr>';
}
}
print '</table>';
print '</td></tr>';

View File

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

View File

@ -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<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>';
$soc = new Societe($db);
$soc->id = $_GET["socid"];
$result=$soc->fetch($_GET["socid"]);
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 '<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">';
$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 '<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"); }
dol_fiche_head($head, 'salesrepresentative', $langs->trans("ThirdParty"),0,'company');
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);
}
}
/*
* Fiche societe 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>";
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";
$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>";
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);
dol_fiche_head($head, 'document', $langs->trans("ThirdParty"));
dol_fiche_head($head, 'document', $langs->trans("ThirdParty"),0,'company');
// Construit liste des fichiers

View File

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

View File

@ -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<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>";
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></tr>";
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>';
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 '<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>';
// Societe mere
print '<tr><td>'.$langs->trans("ParentCompany").'</td><td colspan="3">';
if ($soc->parent)
{
$socm = new Societe($db);
$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 ($socm->ville?' - '.$socm->ville:'');
print '&nbsp;<a href="'.$_SERVER["PHP_SELF"].'?socid='.$_GET["socid"].'&amp;delsocid='.$socm->id.'">';
print img_delete();
print '</a><br>';
}
else
{
print $langs->trans("NoParentCompany");
}
print '</td></tr>';
print '</table>';
print "</div>\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 = "&amp;socid=".$_GET["socid"];
print_barre_liste($title, $page, "lien.php",$params,$sortfield,$sortorder,'',$num,0,'');
// Lignes des titres
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Company").'</td>';
print '<td>'.$langs->trans("Town").'</td>';
print '<td>Type<td>';
print '<td colspan="2" align="center">&nbsp;</td>';
print "</tr>\n";
// Lignes des champs de filtre
print '<form action="lien.php" method="GET" >';
print '<input type="hidden" name="socid" value="'.$_GET["socid"].'">';
print '<tr class="liste_titre">';
print '<td valign="right">';
print '<input type="text" name="search_nom" value="'.$_GET["search_nom"].'">';
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 '</td>';
print "</tr>\n";
print '</form>';
$var=True;
while ($i < min($num,$conf->liste_limit))
{
$obj = $db->fetch_object($resql);
$var=!$var;
print "<tr $bc[$var]><td>";
print $obj->nom."</td>\n";
print "<td>".$obj->ville."&nbsp;</td>\n";
print "<td>".$langs->getLabelFromKey($db,$obj->code,'c_typent','code','libelle')."</td>\n";
print '<td align="center">';
if ($obj->client==1)
{
print $langs->trans("Customer")."\n";
}
elseif ($obj->client==2)
{
print $langs->trans("Prospect")."\n";
}
else
{
print "&nbsp;";
}
print "</td><td align=\"center\">";
if ($obj->fournisseur)
{
print $langs->trans("Supplier");
}
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);
}
}
}
$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 '<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>";
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></tr>";
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>';
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 '<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>';
// Societe mere
print '<tr><td>'.$langs->trans("ParentCompany").'</td><td colspan="3">';
if ($soc->parent)
{
$socm = new Societe($db);
$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 ($socm->ville?' - '.$socm->ville:'');
print '&nbsp;<a href="'.$_SERVER["PHP_SELF"].'?socid='.$_GET["socid"].'&amp;delsocid='.$socm->id.'">';
print img_delete();
print '</a><br>';
}
else
{
print $langs->trans("NoParentCompany");
}
print '</td></tr>';
print '</table>';
print "</div>\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 = "&amp;socid=".$_GET["socid"];
print_barre_liste($title, $page, "lien.php",$params,$sortfield,$sortorder,'',$num,0,'');
// Lignes des titres
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Company").'</td>';
print '<td>'.$langs->trans("Town").'</td>';
print '<td>Type<td>';
print '<td colspan="2" align="center">&nbsp;</td>';
print "</tr>\n";
// Lignes des champs de filtre
print '<form action="lien.php" method="GET" >';
print '<input type="hidden" name="socid" value="'.$_GET["socid"].'">';
print '<tr class="liste_titre">';
print '<td valign="right">';
print '<input type="text" name="search_nom" value="'.$_GET["search_nom"].'">';
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 '</td>';
print "</tr>\n";
print '</form>';
$var=True;
while ($i < min($num,$conf->liste_limit))
{
$obj = $db->fetch_object($resql);
$var=!$var;
print "<tr $bc[$var]><td>";
print $obj->nom."</td>\n";
print "<td>".$obj->ville."&nbsp;</td>\n";
print "<td>".$langs->getLabelFromKey($db,$obj->code,'c_typent','code','libelle')."</td>\n";
print '<td align="center">';
if ($obj->client==1)
{
print $langs->trans("Customer")."\n";
}
elseif ($obj->client==2)
{
print $langs->trans("Prospect")."\n";
}
else
{
print "&nbsp;";
}
print "</td><td align=\"center\">";
if ($obj->fournisseur)
{
print $langs->trans("Supplier");
}
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);
dol_fiche_head($head, 'notify', $langs->trans("ThirdParty"));
dol_fiche_head($head, 'notify', $langs->trans("ThirdParty"),0,'company');
print '<table class="border"width="100%">';

View File

@ -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 '<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 '<td colspan="3">'.$account->number.'</td>';
print '</tr>';
if ($account->useDetailedBBAN())
{
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 '</tr>';
}
print '<td>'.$langs->trans("BankAccountNumber").'</td>';
print '<td><input size="15" type="text" class="flat" name="number" value="'.$account->number.'"></td>';
print '</tr>';
@ -223,7 +223,7 @@ if ($_GET["socid"] && $_GET["action"] == 'edit' && $user->rights->societe->creer
print '<td>'.$langs->trans("BankAccountNumberKey").'</td>';
print '<td><input size="3" type="text" class="flat" name="cle_rib" value="'.$account->cle_rib.'"></td>';
print '</tr>';
}
}
// IBAN
print '<tr><td valign="top">'.$langs->trans("IBAN").'</td>';

View File

@ -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 "<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
*/
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 '<tr><td width="25%" valign="top">'.$langs->trans("Firstname").'</td>';
print '<td colspan="2">'.$fuser->prenom.'</td>';
print "</tr>\n";
print "</table>\n";
print "<br>\n";
if ($_GET["action"] == 'edit')
{
print '<form action="clicktodial.php?id='.$_GET["id"].'" method="post">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="update">';
print '<table class="border" width="100%">';
if ($user->admin)
{
print "<tr>".'<td width="25%" valign="top">ClickToDial URL</td>';
@ -109,12 +113,12 @@ if ($_GET["id"])
print '</td>';
print '</tr>';
}
print "<tr>".'<td width="25%" valign="top">ClickToDial '.$langs->trans("Login").'</td>';
print '<td class="valeur">';
print '<input name="login" value="'.$fuser->clicktodial_login.'"></td>';
print '</tr>';
print "<tr>".'<td width="25%" valign="top">ClickToDial '.$langs->trans("Password").'</td>';
print '<td class="valeur">';
print '<input name="password" value="'.$fuser->clicktodial_password.'"></td>';
@ -129,7 +133,7 @@ if ($_GET["id"])
print ' &nbsp; &nbsp; ';
print '<input class="button" type="submit" name="cancel" value="'.$langs->trans("Cancel").'">';
print '</td></tr>';
print '</table></form>';
}
else

View File

@ -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');
/*

View File

@ -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 '<table width="100%"><tr><td>';

View File

@ -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 '<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";
// LDAP Server

View File

@ -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 '<div class="error">'.$msg.'</div>';

View File

@ -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 '<table class="border" width="100%">';

View File

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