Justian0 adlı üyeden alıntı: mesajı görüntüle
Ben yetkilendirme yaparken en basit şekilde yapmıştım çünkü kurumsal bir site idi kasmamıştım hiç uyguladığım mantık şu örnek veriyorum gelen kişi yetkisi 1 ise bu işlemi yapabilir değilse yapamaz alanı gösterme ve işlem yapmaya çalışırsa yapmasın gibi if else mantığı
Zaten ben de o yöntemi kullanıyordum normalde. Fakat kullanıcı gruplarında bazı bölümlere giriş izni verdiğin zaman bir gruba bölüm içinde upload izni verirken diğerinde sadece download izni veriyorsun. Forum kategorilerinde oluşturulan mantığı düşün.

--R10.NET; Flood Engellendi -->-> Yeni yazılan mesaj 11:48:31 -->-> Daha önceki mesaj 11:39:23 --

function userauth ($auth, $usergroup, $accesstype){
	//Access Type
	$G	= "0"; // User Group
	$R 	= "1"; // Read
	$W 	= "2"; // Write
	$D 	= "3"; // Delete
	$U 	= "4"; // Upload
	$DL	= "5"; // Download
	$M	= "6"; // Management
	$useraccess = explode(',', $auth);
	for ($i=0; $i<=count($useraccess); $i++):
		if(@$useraccess[$i][$G]==$usergroup):
			if($type=="R"): $userauth = $useraccess[$i][$R]; endif;
			if($type=="W"): $userauth = $useraccess[$i][$W]; endif;
			if($type=="D"): $userauth = $useraccess[$i][$D]; endif;
			if($type=="U"): $userauth = $useraccess[$i][$U]; endif;
			if($type=="DL"): $userauth = $useraccess[$i][$DL]; endif;
			if($type=="M"): $userauth = $useraccess[$i][$M]; endif;
			if($type=="G"): $userauth = $useraccess[$i][$R]; endif;
		endif;
	endfor;
	return $userauth;
}
Şöyle bir fonksiyon yaptım ama ne kadar sağlıklı çalışır bilemiyorum.

// Şimdi kodlarımı test ettim. Sorunsuz bir şekilde çalışıyor.