This commit is contained in:
Rodolphe Quiedeville 2007-11-07 13:34:12 +00:00
parent 71a949142e
commit dde91d065f

View File

@ -61,12 +61,16 @@ if ($_GET["action"] == "all")
if ( $resql = $db->query( $sql) ) if ( $resql = $db->query( $sql) )
{ {
while ($row = $db->fetch_row($resql)) while ($row = $db->fetch_row($resql))
{
foreach ($socs as $soc)
{ {
$sql_i = "INSERT INTO ".MAIN_DB_PREFIX."societe_perms "; $sql_i = "INSERT INTO ".MAIN_DB_PREFIX."societe_perms ";
$sql_i.= " (fk_soc,fk_user,pread,pwrite,pperms) "; $sql_i.= " (fk_soc,fk_user,pread,pwrite,pperms) ";
$sql_i.= " VALUES ($socs[0],$row[0],1,1,1) "; $sql_i.= " VALUES ($soc,$row[0],1,1,1) ";
$resql_i = $db->query( $sql_i ); $resql_i = $db->query( $sql_i );
}
} }
$db->free($resql); $db->free($resql);
@ -106,8 +110,6 @@ print "<tr $bc[$var]><td>Toutes les permissions a tout le monde</td>";
print '<td align="center"><a href="perms.php?action=all">Appliquer</a>'; print '<td align="center"><a href="perms.php?action=all">Appliquer</a>';
print '</tr>'; print '</tr>';
print '</table>'; print '</table>';
print '</div>'; print '</div>';