\n";
$boucle = count ($acl) - 1;
for ($loop=1 ;$loop < $boucle; $loop++) {
$test=explode(":",$acl[$loop]);
for ($i=0 ; $i < count ($test) ; $i++) {
$test[$i]=trim($test[$i]);
}
if ( ! ($test[0]=="# owner" || $test[0]=="# group" || $test[0]=="mask" || ($test[0]=="default"&&$test[1]=="mask"))) {
echo "\n";
}
if ($test[0]=="# owner") {
$proprio=$test[1];
}
if ($test[0]=="# group") {
$groupeproprio=$test[1];
}
if ($test[0]=="other") {
$nom[$loop]="Autres";
echo "$nom[$loop]";
$lecture=substr($test[2],0,1);
$ecriture=substr($test[2],-2,1);
$execution=substr($test[2],-1);
}
if ($test[0]=="user") {
if ($test[1]!= "") {
$nom[$loop]="Utilisateur ".$test[1];
echo "$nom[$loop]";
$lecture=substr($test[2],0,1);
$ecriture=substr($test[2],-2,1);
$execution=substr($test[2],-1);
}
if ($test[1] == "") {
$nom[$loop]="Proprietaire ".$proprio;
echo "$nom[$loop]";
$lecture=substr($test[2],0,1);
$ecriture=substr($test[2],-2,1);
$execution=substr($test[2],-1);
}
}
if ($test[0]=="group") {
if ($test[1]!= "") {
$nom[$loop]="Groupe ".$test[1];
echo "$nom[$loop]";
$lecture=substr($test[2],0,1);
$ecriture=substr($test[2],-2,1);
$execution=substr($test[2],-1);
}
if ($test[1] == "") {
$nom[$loop]="Groupe proprietaire ".$groupeproprio;
echo "$nom[$loop]";
$lecture=substr($test[2],0,1);
$ecriture=substr($test[2],-2,1);
$execution=substr($test[2],-1);
}
}
elseif ($test[0]=="default") {
if ($test[1]=="other") {
$nom[$loop]="Heritage autres";
echo "$nom[$loop]";
$lecture=substr($test[3],0,1);
$ecriture=substr($test[3],-2,1);
$execution=substr($test[3],-1);
}
if ($test[1]=="user") {
if ($test[2]!= "") {
$nom[$loop]="Heritage utilisateur ".$test[2];
echo "$nom[$loop]";
$lecture=substr($test[3],0,1);
$ecriture=substr($test[3],-2,1);
$execution=substr($test[3],-1);
}
if ($test[2] == "") {
$nom[$loop]="Heritage proprietaire ".$proprio;
echo "$nom[$loop]";
$lecture=substr($test[3],0,1);
$ecriture=substr($test[3],-2,1);
$execution=substr($test[3],-1);
}
}
if ($test[1]=="group") {
if ($test[2]!= "") {
$nom[$loop]="Heritage groupe ".$test[2];
echo "$nom[$loop]";
$lecture=substr($test[3],0,1);
$ecriture=substr($test[3],-2,1);
$execution=substr($test[3],-1);
}
if ($test[2] == "") {
$nom[$loop]="Heritage groupe proprietaire ".$groupeproprio;
echo "$nom[$loop]";
$lecture=substr($test[3],0,1);
$ecriture=substr($test[3],-2,1);
$execution=substr($test[3],-1);
}
}
}
if ( ! ($test[0]=="# owner" || (($test[0]=="default")&&($test[1]=="mask")) || $test[0]=="# group" || $test[0]=="mask")) {
echo " \n";
$nomformulaire[$a] = "lecture".$nom[$loop] ;
if ($lecture =="r") {
echo "\n \n";
}
else echo "\n \n";
$a= $a +1;
$nomformulaire[$a] = "ecriture".$nom[$loop];
if ($ecriture =="w") {
echo "\n \n";
}
else echo "\n \n";
$a = $a +1;
$nomformulaire[$a] = "execution".$nom[$loop];
if ($execution =="x") {
echo "\n \n";
}
else echo "\n \n";
$a= $a + 1;
$nomformulaire[$a] = "supprimer".$nom[$loop];
if (!(($test[0] == "user"&&$test[1]=="") || ($test[0] == "group"&& $test[1]=="") || $test[0]=="other" || ($test[1] == "user"&&$test[2]=="") || ($test[1] == "group"&& $test[2]=="") || $test[1]=="other" )) {
if (!isset($valide)) {
echo "\n \n";
}
}
$a= $a +1;
echo " \n";
}
}
$noms = implode(",",$nom);
echo "