<?php
$tpl->newBlock("osnovna_polja");
$tpl->assign("naslov", "Skupina");
$tpl->assign("vsebina", $r['ime']);

$tpl->newBlock("multipla_polja");
$tpl->assign("naslov", "Pravice");
$results = $db->query("SELECT pravica, modul_link FROM core_modules AS p LEFT JOIN core_groups AS d ON p.id = d.modul_id WHERE enabled = 1 AND group_id = '$r[id]'");
while($rs = $results->fetch())
{
	switch($rs['pravica'])
	{
		case 1:
			$pravica = "branje in pisanje";
		break;
		case 2:
			$pravica = "samo branje";
		break;
		case 3:
			$pravica = "ni dostopa";
		break;
		default:
			$pravica = "ni določeno";
		break;
	}
	$tpl->newBlock("multipla_polja_vsebina");
	$tpl->assign("vsebina", "Modul ".$rs['modul_link'].": ".$pravica);
}

?>