Revision 1457
Added by Dietmar over 13 years ago
tool.php | ||
---|---|---|
38 | 38 |
|
39 | 39 |
// Get userid for showing admin only droplets or not |
40 | 40 |
$loggedin_user = $admin->get_user_id(); |
41 |
|
|
41 |
$loggedin_group = $admin->get_groups_id(); |
|
42 |
$admin_user = ( ($admin->get_home_folder() == '') && ($admin->ami_group_member('1') ) || ($loggedin_user == '1')); |
|
43 |
|
|
42 | 44 |
// And... action |
43 | 45 |
$admintool_url = ADMIN_URL .'/admintools/index.php'; |
44 | 46 |
|
... | ... | |
47 | 49 |
?> |
48 | 50 |
|
49 | 51 |
<br /> |
50 |
<table cellpadding="0" cellspacing="0" border="0" width="100%"> |
|
52 |
<table summary="" cellpadding="0" cellspacing="0" border="0" width="100%">
|
|
51 | 53 |
<tr> |
52 | 54 |
<td valign="bottom" width="50%"> |
53 | 55 |
<button class="add" type="button" name="add_droplet" onclick="javascript: window.location = '<?php echo WB_URL; ?>/modules/droplets/add_droplet.php';"><?php echo $TEXT['ADD'].' '.$DR_TEXT['DROPLETS']; ?></button> |
... | ... | |
58 | 60 |
<td valign="top" width="50%" align="right"> |
59 | 61 |
<a href="#" onclick="javascript: window.open('<?php echo WB_URL; ?>/modules/droplets/readme/<?php echo $DR_TEXT['README']; ?>','helpwindow','width=700,height=550,directories=no,location=no,menubar=no,scrollbars=yes,status=no,toolbar=no,resizable=yes');"><?php echo $DR_TEXT['HELP']; ?></a> |
60 | 62 |
<br /><br /> |
61 |
<a href="#" onclick="javascript: window.location = '<?php echo WB_URL; ?>/modules/droplets/backup_droplets.php?id=<?php echo $admin->getIDKEY(999) . '\';">' .$DR_TEXT['BACKUP']; ?></a>
|
|
63 |
<a href="#" onclick="javascript: window.location = '<?php echo WB_URL; ?>/modules/droplets/backup_droplets.php?id=<?php echo $admin->getIDKEY(999); ?>'"><?php echo $DR_TEXT['BACKUP']; ?></a>
|
|
62 | 64 |
</td> |
63 | 65 |
</tr> |
64 | 66 |
</table> |
... | ... | |
66 | 68 |
|
67 | 69 |
<h2><?php echo $TEXT['MODIFY'].'/'.$TEXT['DELETE'].' '.$DR_TEXT['DROPLETS']; ?></h2> |
68 | 70 |
<?php |
69 |
if ($loggedin_user == '1') { |
|
71 |
// if ($loggedin_user == '1') { |
|
72 |
if ($admin_user) { |
|
70 | 73 |
$query_droplets = $database->query("SELECT * FROM ".TABLE_PREFIX."mod_droplets ORDER BY modified_when DESC"); |
71 | 74 |
} else { |
72 | 75 |
$query_droplets = $database->query("SELECT * FROM ".TABLE_PREFIX."mod_droplets WHERE admin_view <> '1' ORDER BY modified_when DESC"); |
... | ... | |
74 | 77 |
$num_droplets = $query_droplets->numRows(); |
75 | 78 |
if($num_droplets > 0) { |
76 | 79 |
?> |
77 |
<table class="row_a" border="0" cellspacing="0" cellpadding="3" width="100%"> |
|
80 |
<table summary="" class="row_a" border="0" cellspacing="0" cellpadding="3" width="100%">
|
|
78 | 81 |
<thead> |
79 | 82 |
<tr> |
80 | 83 |
<td width="3%"></td> |
... | ... | |
153 | 156 |
$query_droplets = $database->query("SELECT name FROM ".TABLE_PREFIX."mod_droplets WHERE name = '$name'"); |
154 | 157 |
return ($query_droplets->numRows() == 1); |
155 | 158 |
} |
156 |
?> |
|
157 | 159 |
Also available in: Unified diff
Preparing 2.8.2 stable, last tests