Modif permissions

This commit is contained in:
Rodolphe Quiedeville 2005-09-06 15:57:44 +00:00
parent 05ed858673
commit ff6abd47ed
2 changed files with 7 additions and 5 deletions

View File

@ -61,10 +61,11 @@ print '<br />';
$sql = "SELECT distinct statut, count(*) as cc";
$sql .= " FROM ".MAIN_DB_PREFIX."telephonie_contrat as l";
if ($user->rights->telephonie->ligne->lire_restreint)
{
$sql .= " WHERE l.fk_commercial_suiv = ".$user->id;
}
$sql .= ",".MAIN_DB_PREFIX."societe_perms as sp";
$sql .= " WHERE l.fk_client_comm = sp.fk_soc";
$sql .= " AND sp.fk_user = ".$user->id." AND sp.pread = 1";
$sql .= " GROUP BY statut";
if ($db->query($sql))

View File

@ -117,7 +117,8 @@ if ($_GET["id"])
print '</td><td width="50%" valign="top" align="center">';
$file = $img_root.$contrat->id."/graphgain.png";
if (file_exists($file))
if (file_exists($file) && $user->rights->telephonie->ligne->gain)
{
print '<img src="'.DOL_URL_ROOT.'/telephonie/showgraph.php?graph='.$file.'" alt="CA Mensuel">';
}