<?php
//<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
//sigurnost:
if (!defined('SIGURICA')) die('Nedozvoljen pristup!');
if ($prava_pristup_admin!=1) die('Nedozvoljen pristup!');

$admin_id=$_GET[admin_id];

$sql99 = "select username from b7_user where id='$admin_id'";
$rez99=mysql_query($sql99,$conn);
if ($rez99) $num99=mysql_num_rows($rez99);
if ($num99==1) {
	$row99=mysql_fetch_array($rez99);
	$username=$row99[0];
	
	$sql = "select * from b7_users_prava where id='$admin_id'";
	$rez = mysql_query($sql, $conn);
	if ($rez) $num = mysql_num_rows($rez);
	if ($num > 0)
	{
		$row = mysql_fetch_array($rez);
		$q_power_user = $row["power_user"];
		$q_limit_user = $row["limit_user"];
		$q_pristup_admin = $row["pristup_admin"];
		$q_pristup_vijesti = $row["pristup_vijesti"];
		$q_vijesti_kat = $row["vijesti_kat"];
		$q_pristup_upload = $row["pristup_upload"];
		$q_upload_kat = $row["upload_kat"];
		$q_pristup_sadrzaj = $row["pristup_sadrzaj"];
		$q_rubrika_uredi = $row["rubrika_uredi"];
		$q_kategorija_uredi = $row["kategorija_uredi"];
		$q_kategorija_dodaj = $row["kategorija_dodaj"];
		$q_stranica_dodaj = $row["stranica_dodaj"];
		$q_paragraf_php = $row["paragraf_php"];
	} 

?>
<div id="main_content">
<h1>Uređivanje prava za korisnika: <?php echo $username;?></h1>
<form method="post" action="glavna.php?modul=admin&amp;akcija=update_prava_admin" enctype="multipart/form-data" onSubmit="return checkrequired(this)">
<p>
<?php if ($q_power_user == 1)  {$check1 = 'checked="checked"';} else {$check1 = '';} ?>
<label><a href="#" class="help" onMouseover="ddrivetip('Korisnik je power user (vidi sve napredne mogućnosti webadmina)', 200)"; onMouseout="hideddrivetip()">Power user</a>:</label>
<input tabindex="1" type="checkbox" name="q_power_user" value="1" <?php echo $check1;?> /><br />
</p>
<p>
<?php if ($q_limit_user == 1)  {$check1 = 'checked="checked"';} else {$check1 = '';} ?>
<label><a href="#" class="help" onMouseover="ddrivetip('Korisnik je limitirani user (ne vidi sve napredne mogućnosti webadmina)', 200)"; onMouseout="hideddrivetip()">Limit user</a>:</label>
<input tabindex="2" type="checkbox" name="q_limit_user" value="1" <?php echo $check1;?> /><br />
</p>
<p>
<?php if ($q_pristup_admin == 1)  {$check1 = 'checked="checked"';} else {$check1 = '';} ?>
<label><a href="#" class="help" onMouseover="ddrivetip('Korisnik može pristupiti djelu za uređivanje korisnika i parametara web stranica', 200)"; onMouseout="hideddrivetip()">Administracija korisnika i site parametara</a>:</label>
<input tabindex="3" type="checkbox" name="q_pristup_admin" value="1" <?php echo $check1;?> /><br />
</p>
<p>
<?php if ($q_pristup_vijesti == 1)  {$check1 = 'checked="checked"';} else {$check1 = '';} ?>
<label><a href="#" class="help" onMouseover="ddrivetip('Korisnik ima pristup uređivanju vijest', 200)"; onMouseout="hideddrivetip()">Pristup vijestima</a>:</label>
<input tabindex="4" type="checkbox" name="q_pristup_vijesti" value="1" <?php echo $check1;?> /><br />
</p>
<p>
<?php if ($q_vijesti_kat == 1)  {$check1 = 'checked="checked"';} else {$check1 = '';} ?>
<label><a href="#" class="help" onMouseover="ddrivetip('Korisnik može uređivati i dodavati kategorije vijesti', 200)"; onMouseout="hideddrivetip()">Uređivanje kategorija vijesti</a>:</label>
<input tabindex="5" type="checkbox" name="q_vijesti_kat" value="1" <?php echo $check1;?> /><br />
</p>
<p>
<?php if ($q_pristup_upload == 1)  {$check1 = 'checked="checked"';} else {$check1 = '';} ?>
<label><a href="#" class="help" onMouseover="ddrivetip('Korisnik može pristupiti modulu za upload sadržaja', 200)"; onMouseout="hideddrivetip()">Pristup upload manageru</a>:</label>
<input tabindex="6" type="checkbox" name="q_pristup_upload" value="1" <?php echo $check1;?> /><br />
</p>
<p>
<?php if ($q_upload_kat == 1)  {$check1 = 'checked="checked"';} else {$check1 = '';} ?>
<label><a href="#" class="help" onMouseover="ddrivetip('Korisnik može uređivati i dodavati kategorije u modulu za upload sadržaja', 200)"; onMouseout="hideddrivetip()">Uređivanje kategorija u upload manageru</a>:</label>
<input tabindex="7" type="checkbox" name="q_upload_kat" value="1" <?php echo $check1;?> /><br />
</p>
<p>
<?php if ($q_pristup_sadrzaj == 1)  {$check1 = 'checked="checked"';} else {$check1 = '';} ?>
<label><a href="#" class="help" onMouseover="ddrivetip('Korisnik može uređivati sadržaj (stranice)', 200)"; onMouseout="hideddrivetip()">Uređivanje sadržaja</a>:</label>
<input tabindex="8" type="checkbox" name="q_pristup_sadrzaj" value="1" <?php echo $check1;?> /><br />
</p>
<p>
<?php if ($q_rubrika_uredi == 1)  {$check1 = 'checked="checked"';} else {$check1 = '';} ?>
<label><a href="#" class="help" onMouseover="ddrivetip('Korisnik može uređivati i dodavati rubrike', 200)"; onMouseout="hideddrivetip()">Uređivanje i dodavanje "Rubrika"</a>:</label>
<input tabindex="9" type="checkbox" name="q_rubrika_uredi" value="1" <?php echo $check1;?> /><br />
</p>
<p>
<?php if ($q_kategorija_uredi == 1)  {$check1 = 'checked="checked"';} else {$check1 = '';} ?>
<label><a href="#" class="help" onMouseover="ddrivetip('Korisnik može uređivati kategorije', 200)"; onMouseout="hideddrivetip()">Uređivanje "Kategorija"</a>:</label>
<input tabindex="10" type="checkbox" name="q_kategorija_uredi" value="1" <?php echo $check1;?> /><br />
</p>
<p>
<?php if ($q_kategorija_dodaj == 1)  {$check1 = 'checked="checked"';} else {$check1 = '';} ?>
<label><a href="#" class="help" onMouseover="ddrivetip('Korisnik može dodavati kategorije', 200)"; onMouseout="hideddrivetip()">Dodavanje "Kategorija"</a>:</label>
<input tabindex="11" type="checkbox" name="q_kategorija_dodaj" value="1" <?php echo $check1;?> /><br />
</p>
<p>
<?php if ($q_stranica_dodaj == 1)  {$check1 = 'checked="checked"';} else {$check1 = '';} ?>
<label><a href="#" class="help" onMouseover="ddrivetip('Korisnik može dodavati novi sadržaj (stranice)', 200)"; onMouseout="hideddrivetip()">Dodavanje "Stranica"</a>:</label>
<input tabindex="12" type="checkbox" name="q_stranica_dodaj" value="1" <?php echo $check1;?> /><br />
</p>
<p>
<?php if ($q_paragraf_php == 1)  {$check1 = 'checked="checked"';} else {$check1 = '';} ?>
<label><a href="#" class="help" onMouseover="ddrivetip('Korisnik može dodavati i uređivati php/html kod na stranicama (samo za napredne korisnike)', 200)"; onMouseout="hideddrivetip()">Uređivanje PHP/HTML paragrafa</a>:</label>
<input tabindex="13" type="checkbox" name="q_paragraf_php" value="1" <?php echo $check1;?> /><br />
</p>
<p>
<input type="hidden" name="admin_id" value="<?php echo $admin_id;?>" />
<input tabindex="14" name="posalji" class="submit" type="submit" value="Pošalji" />
</p>
</form>
<br />
<br />
<a class="gray_normal toggleopacity" href="glavna.php?modul=admin"><img src="slike/action_back.gif" width="16" height="16" alt="" border="0" /> <b>Odustani!</b></a>
<br />
<br />
</div>
<?php
} else {
	echo '<div class="greska">Ne postojeći zapis u bazi!</div>'."\n";
}
?>