summaryrefslogtreecommitdiff
path: root/buildmaster/gpg-keys.php
blob: db990c2a662fd9e39c4af8aeaaa53a5e5c9b9de3 (plain)
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
<?php
require_once "../init.php";
require_once BASE . "/lib/mysql.php";

  $result = mysql_run_query(
    "SELECT" .
    " GROUP_CONCAT(`email_actions`.`name`) AS `action`," .
    "`persons`.`name` AS `person`," .
    "`gpg_keys`.`fingerprint`" .
    " FROM `email_actions`" .
    mysql_join_email_actions_allowed_email_actions() .
    " RIGHT" . mysql_join_allowed_email_actions_gpg_keys() .
    mysql_join_gpg_keys_persons() .
    " GROUP BY `gpg_keys`.`id`" .
    " ORDER BY `persons`.`name`"
  );

?>
<html>
  <head>
    <title>list of gpg-keys</title>
  </head>
  <body>
<?php
show_warning_on_offline_slave();

  print "<table border=1>\n";
  if ($result->num_rows > 0) {
    print "<tr><th>person</th><th>action</th><th>fingerprint</th></tr>\n";
    while ($row = $result -> fetch_assoc()) {
      foreach ($row as $key => $value) {
        if ($value=="") {
          $row[$key]="&nbsp;";
        }
      }
      print "<tr>";
      print "<td>" . $row["person"] . "</td>";
      print "<td>" . $row["action"] . "</td>";
      print "<td><a href=\"http://pgp.mit.edu/pks/lookup?op=get&search=0x" .
        substr($row["fingerprint"],-16) .
        "\">" . $row["fingerprint"] . "</a></td>";
      print "</tr>\n";
    }
  }
  print "</table>\n";

?>
</body></html>