Modif des permissions

This commit is contained in:
Rodolphe Quiedeville 2005-09-27 08:57:56 +00:00
parent 0bb5b5243b
commit d390de882a

View File

@ -24,7 +24,7 @@ require "./pre.inc.php";
$mesg = ''; $mesg = '';
if ($_POST["action"] == 'addservice' && $user->rights->telephonie->ligne->creer) if ($_POST["action"] == 'addservice' && $user->rights->telephonie->service->affecter)
{ {
$contrat = new TelephonieContrat($db); $contrat = new TelephonieContrat($db);
$contrat->id= $_GET["id"]; $contrat->id= $_GET["id"];
@ -35,7 +35,7 @@ if ($_POST["action"] == 'addservice' && $user->rights->telephonie->ligne->creer)
} }
} }
if ($_GET["action"] == 'rmservice' && $user->rights->telephonie->ligne->creer) if ($_GET["action"] == 'rmservice' && $user->rights->telephonie->service->affecter)
{ {
$contrat = new TelephonieContrat($db); $contrat = new TelephonieContrat($db);
$contrat->id= $_GET["id"]; $contrat->id= $_GET["id"];
@ -199,7 +199,7 @@ if ($_GET["id"])
print '<tr class="liste_titre"><td>Service</td>'; print '<tr class="liste_titre"><td>Service</td>';
print '<td align="right">Montant Facturé</td>'; print '<td align="right">Montant Facturé</td>';
print '<td align="right">Montant du service</td>'; print '<td align="right">Montant du service</td>';
if ($user->rights->telephonie->ligne->creer) if ($user->rights->telephonie->service->affecter)
print "<td>&nbsp;</td>\n"; print "<td>&nbsp;</td>\n";
print '<td align="center">Ajouté par</td>'; print '<td align="center">Ajouté par</td>';
print '<td align="center">Ajouté le</td></tr>'; print '<td align="center">Ajouté le</td></tr>';
@ -219,7 +219,7 @@ if ($_GET["id"])
print '<td align="right">'.price($obj->montant_fac)." euros HT</td>\n"; print '<td align="right">'.price($obj->montant_fac)." euros HT</td>\n";
print '<td align="right">'.price($obj->montant)." euros HT</td>\n"; print '<td align="right">'.price($obj->montant)." euros HT</td>\n";
if ($user->rights->telephonie->ligne->creer) if ($user->rights->telephonie->service->affecter)
{ {
print '<td align="center"><a href="services.php?id='.$contrat->id.'&amp;action=rmservice&amp;service_id='.$obj->serid.'">'; print '<td align="center"><a href="services.php?id='.$contrat->id.'&amp;action=rmservice&amp;service_id='.$obj->serid.'">';
print img_delete(); print img_delete();
@ -241,25 +241,18 @@ if ($_GET["id"])
} }
print "</table>"; print "</table>";
} }
/* /*
* Service * Service
* *
* *
*/ */
if ($user->rights->telephonie->service->affecter)
if ($user->rights->telephonie->ligne->creer)
{ {
print_fiche_titre('Ajouter un service', $mesg); print_fiche_titre('Ajouter un service', $mesg);
print '<form action="services.php?id='.$contrat->id.'" method="post">'; print '<form action="services.php?id='.$contrat->id.'" method="post">';
print '<input type="hidden" name="action" value="addservice">'; print '<input type="hidden" name="action" value="addservice">';
print '<table class="border" width="100%" cellspacing="0" cellpadding="4">'; print '<table class="border" width="100%" cellspacing="0" cellpadding="4">';
print '<tr><td valign="top" width="20%">Service</td><td valign="top" colspan="2">'; print '<tr><td valign="top" width="20%">Service</td><td valign="top" colspan="2">';