228 |
kaklik |
1 |
<h1><?php echo $sg->translator->_g("Access Control") ?></h1> |
|
|
2 |
|
|
|
3 |
<form action="<?php echo $_SERVER['PHP_SELF'] ?>" method="post"> |
|
|
4 |
<input type="hidden" name="action" value="savepermissions" /> |
|
|
5 |
<input type="hidden" name="gallery" value="<?php echo $sg->gallery->idEntities() ?>" /> |
|
|
6 |
|
|
|
7 |
<table class="formTable"> |
|
|
8 |
<tr> |
|
|
9 |
<td><?php echo $sg->translator->_g("Owner") ?></td> |
|
|
10 |
<td><?php |
|
|
11 |
if($sg->user->isAdmin()) |
|
|
12 |
echo '<input type="text" name="sgOwner" value="'.$sg->gallery->owner.'" />'; |
|
|
13 |
else |
|
|
14 |
echo '<strong>'.$sg->gallery->owner.'</strong>'; |
|
|
15 |
?></td> |
|
|
16 |
</tr> |
|
|
17 |
<tr> |
|
|
18 |
<td><?php echo $sg->translator->_g("Groups") ?></td> |
|
|
19 |
<td><input type="text" name="sgGroups" value="<?php echo $sg->gallery->groups ?>" /></td> |
|
|
20 |
</tr> |
|
|
21 |
<tr> |
|
|
22 |
<td><?php echo $sg->translator->_g("access control|Read") ?></td> |
|
|
23 |
<td><div class="inputbox"> |
|
|
24 |
<?php |
|
|
25 |
if(($sg->gallery->permissions & SG_IHR_READ) == SG_IHR_READ) $checked = 0; |
|
|
26 |
elseif($sg->gallery->permissions & SG_GRP_READ) $checked = 1; |
|
|
27 |
elseif($sg->gallery->permissions & SG_WLD_READ) $checked = 2; |
|
|
28 |
else $checked = 3; |
|
|
29 |
?> |
|
|
30 |
<label for="sgOwnRead"><input type="radio" class="radio" id="sgOwnRead" name="sgRead" value="owner" <?php if($checked == 3) echo 'checked="true" '; ?>/> <?php echo $sg->translator->_g("permissions|Owner") ?></label> |
|
|
31 |
<label for="sgGrpRead"><input type="radio" class="radio" id="sgGrpRead" name="sgRead" value="group" <?php if($checked == 1) echo 'checked="true" '; ?>/> <?php echo $sg->translator->_g("permissions|Group") ?></label> |
|
|
32 |
<label for="sgWldRead"><input type="radio" class="radio" id="sgWldRead" name="sgRead" value="world" <?php if($checked == 2) echo 'checked="true" '; ?>/> <?php echo $sg->translator->_g("permissions|World") ?></label> |
|
|
33 |
<?php if(!$sg->gallery->isRoot()): ?> |
|
|
34 |
<label for="sgIhrRead"><input type="radio" class="radio" id="sgIhrRead" name="sgRead" value="inherit" <?php if($checked == 0) echo 'checked="true" '; ?>/> <?php echo $sg->translator->_g("permissions|Inherit") ?></label> |
|
|
35 |
<?php endif; ?> |
|
|
36 |
</div></td> |
|
|
37 |
</tr> |
|
|
38 |
<tr> |
|
|
39 |
<td><?php echo $sg->translator->_g("access control|Edit") ?></td> |
|
|
40 |
<td><div class="inputbox"> |
|
|
41 |
<?php |
|
|
42 |
if(($sg->gallery->permissions & SG_IHR_EDIT) == SG_IHR_EDIT) $checked = 0; |
|
|
43 |
elseif($sg->gallery->permissions & SG_GRP_EDIT) $checked = 1; |
|
|
44 |
elseif($sg->gallery->permissions & SG_WLD_EDIT) $checked = 2; |
|
|
45 |
else $checked = 3; |
|
|
46 |
?> |
|
|
47 |
<label for="sgOwnEdit"><input type="radio" class="radio" id="sgOwnEdit" name="sgEdit" value="owner" <?php if($checked == 3) echo 'checked="true" '; ?>/> <?php echo $sg->translator->_g("permissions|Owner") ?></label> |
|
|
48 |
<label for="sgGrpEdit"><input type="radio" class="radio" id="sgGrpEdit" name="sgEdit" value="group" <?php if($checked == 1) echo 'checked="true" '; ?>/> <?php echo $sg->translator->_g("permissions|Group") ?></label> |
|
|
49 |
<label for="sgWldEdit"><input type="radio" class="radio" id="sgWldEdit" name="sgEdit" value="world" <?php if($checked == 2) echo 'checked="true" '; ?>/> <?php echo $sg->translator->_g("permissions|World") ?></label> |
|
|
50 |
<?php if(!$sg->gallery->isRoot()): ?> |
|
|
51 |
<label for="sgIhrEdit"><input type="radio" class="radio" id="sgIhrEdit" name="sgEdit" value="inherit" <?php if($checked == 0) echo 'checked="true" '; ?>/> <?php echo $sg->translator->_g("permissions|Inherit") ?></label> |
|
|
52 |
<?php endif; ?> |
|
|
53 |
</div></td> |
|
|
54 |
</tr> |
|
|
55 |
<tr> |
|
|
56 |
<td><?php echo $sg->translator->_g("access control|Add") ?></td> |
|
|
57 |
<td><div class="inputbox"> |
|
|
58 |
<?php |
|
|
59 |
if(($sg->gallery->permissions & SG_IHR_ADD) == SG_IHR_ADD) $checked = 0; |
|
|
60 |
elseif($sg->gallery->permissions & SG_GRP_ADD) $checked = 1; |
|
|
61 |
elseif($sg->gallery->permissions & SG_WLD_ADD) $checked = 2; |
|
|
62 |
else $checked = 3; |
|
|
63 |
?> |
|
|
64 |
<label for="sgOwnAdd"><input type="radio" class="radio" id="sgOwnAdd" name="sgAdd" value="owner" <?php if($checked == 3) echo 'checked="true" '; ?>/> <?php echo $sg->translator->_g("permissions|Owner") ?></label> |
|
|
65 |
<label for="sgGrpAdd"><input type="radio" class="radio" id="sgGrpAdd" name="sgAdd" value="group" <?php if($checked == 1) echo 'checked="true" '; ?>/> <?php echo $sg->translator->_g("permissions|Group") ?></label> |
|
|
66 |
<label for="sgWldAdd"><input type="radio" class="radio" id="sgWldAdd" name="sgAdd" value="world" <?php if($checked == 2) echo 'checked="true" '; ?>/> <?php echo $sg->translator->_g("permissions|World") ?></label> |
|
|
67 |
<?php if(!$sg->gallery->isRoot()): ?> |
|
|
68 |
<label for="sgIhrAdd"><input type="radio" class="radio" id="sgIhrAdd" name="sgAdd" value="inherit" <?php if($checked == 0) echo 'checked="true" '; ?>/> <?php echo $sg->translator->_g("permissions|Inherit") ?></label> |
|
|
69 |
<?php endif; ?> |
|
|
70 |
</div></td> |
|
|
71 |
</tr> |
|
|
72 |
<tr> |
|
|
73 |
<td><?php echo $sg->translator->_g("access control|Delete") ?></td> |
|
|
74 |
<td><div class="inputbox"> |
|
|
75 |
<?php |
|
|
76 |
if(($sg->gallery->permissions & SG_IHR_DELETE) == SG_IHR_DELETE) $checked = 0; |
|
|
77 |
elseif($sg->gallery->permissions & SG_GRP_DELETE) $checked = 1; |
|
|
78 |
elseif($sg->gallery->permissions & SG_WLD_DELETE) $checked = 2; |
|
|
79 |
else $checked = 3; |
|
|
80 |
?> |
|
|
81 |
<label for="sgOwnDelete"><input type="radio" class="radio" id="sgOwnDelete" name="sgDelete" value="owner" <?php if($checked == 3) echo 'checked="true" '; ?>/> <?php echo $sg->translator->_g("permissions|Owner") ?></label> |
|
|
82 |
<label for="sgGrpDelete"><input type="radio" class="radio" id="sgGrpDelete" name="sgDelete" value="group" <?php if($checked == 1) echo 'checked="true" '; ?>/> <?php echo $sg->translator->_g("permissions|Group") ?></label> |
|
|
83 |
<label for="sgWldDelete"><input type="radio" class="radio" id="sgWldDelete" name="sgDelete" value="world" <?php if($checked == 2) echo 'checked="true" '; ?>/> <?php echo $sg->translator->_g("permissions|World") ?></label> |
|
|
84 |
<?php if(!$sg->gallery->isRoot()): ?> |
|
|
85 |
<label for="sgIhrDelete"><input type="radio" class="radio" id="sgIhrDelete" name="sgDelete" value="inherit" <?php if($checked == 0) echo 'checked="true" '; ?>/> <?php echo $sg->translator->_g("permissions|Inherit") ?></label> |
|
|
86 |
<?php endif; ?> |
|
|
87 |
</div></td> |
|
|
88 |
</tr> |
|
|
89 |
<tr> |
|
|
90 |
<td></td> |
|
|
91 |
<td><input type="submit" class="button" value="<?php /*"*/ echo $sg->translator->_g("Save Changes") ?>" /></td> |
|
|
92 |
</tr> |
|
|
93 |
</table> |
|
|
94 |
|
|
|
95 |
</form> |