forked from mkay/Exim4UI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathadmingroup.php
73 lines (71 loc) · 3.08 KB
/
admingroup.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<?php
include_once dirname(__FILE__) . '/config/variables.php';
include_once dirname(__FILE__) . '/config/authpostmaster.php';
include_once dirname(__FILE__) . '/config/functions.php';
?>
<!DOCTYPE HTML>
<html lang="en">
<head>
<title><?php echo _('Exim4U') . ': ' . _('List groups'); ?></title>
<meta charset="utf-8" />
<link rel="stylesheet" href="css/bootstrap.min.css" />
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/scripts.js"></script>
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<body>
<div class="container">
<?php include dirname(__FILE__) . '/config/header.php'; ?>
<div class="navbar">
<div class="navbar-inner">
<ul id="menu" class="nav">
<li><a href="admingroupadd.php"><?php echo _('Add Group'); ?></a></li>
<li><a href="admin.php"><?php echo _('Main Menu'); ?></a></li>
<li><a href="logout.php"><?php echo _('Logout'); ?></a></li>
</ul>
</div>
</div>
<table>
<tr>
<th></th>
<th><?php echo _('Email address'); ?></th>
<th><?php echo _('Is public'); ?></th>
<th><?php echo _('Enabled'); ?></th>
</tr>
<?php
$query = "SELECT id, name, is_public, enabled FROM groups
WHERE domain_id = '{$_SESSION['domain_id']}'
ORDER BY NAME ASC";
$result = $db->query($query);
while ($row = $result->fetchRow()) {
?>
<tr>
<td>
<a href="admingroupdelete.php?group_id=<?php echo $row['id']; ?>&localpart=<?php echo $row['name']; ?>">
<img title="<?php print _('Delete group') . $row['name']; ?>" src="images/trashcan.gif" alt="trashcan" />
</a>
</td>
<td>
<a href="admingroupchange.php?group_id=<?php echo $row['id']; ?>" title="<?php print _('Click to modify ') . $row['name']; ?>"><?php echo $row['name'].'@'.$_SESSION['domain']; ?></a>
</td>
<td>
<?php if ('Y' == $row['is_public']) { ?>
<img class="check" src="images/check.gif" title="<?php print _('Anyone can write to') . ' '. $row['name']; ?>">
<?php } ?>
</td>
<td>
<?php if ('1' == $row['enabled']) { ?>
<img class="check" src="images/check.gif" title="<?php print $row['name'] . _(' is enabled'); ?>">
<?php } ?>
</td>
</tr>
<?php
}
?>
</table>
</div>
</body>
</html>