3ef995c2108fe77d22c0b556fb9717cb848bc48f
bernd Neue Zertifikatsverwaltung

bernd authored 16 years ago

1) <?php
Hanno Böck Add newlines before comment...

Hanno Böck authored 9 months ago

2) 
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 13 years ago

3) /*
4) This file belongs to the Webinterface of schokokeks.org Hosting
5) 
Hanno Böck Change license from CC0 to...

Hanno Böck authored 3 years ago

6) Written by schokokeks.org Hosting, namely
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 13 years ago

7)   Bernd Wurst <bernd@schokokeks.org>
8)   Hanno Böck <hanno@schokokeks.org>
9) 
Hanno Böck Change license from CC0 to...

Hanno Böck authored 3 years ago

10) This code is published under a 0BSD license.
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 13 years ago

11) 
12) Nevertheless, in case you use a significant part of this code, we ask (but not require, see the license) that you keep the authors' names in place and return your changes to the public. We would be especially happy if you tell us what you're going to do with this code.
13) */
bernd Neue Zertifikatsverwaltung

bernd authored 16 years ago

14) 
15) require_once("certs.php");
16) require_role(ROLE_SYSTEMUSER);
17) 
Bernd Wurst Interface für Zertifikate i...

Bernd Wurst authored 9 years ago

18) title("Zertifikate");
bernd Neue Zertifikatsverwaltung

bernd authored 16 years ago

19) 
Hanno Böck Spaces between string conca...

Hanno Böck authored 2 years ago

20) output('<p>Bei ' . config('company_name') . ' können Sie Ihre eigenen Zertifikate nutzen. Wir verwenden dafür (wenn nicht anders vereinbart) die SNI-Technik.
hanno text reduziert

hanno authored 16 years ago

21) Beim Anlegen von Webserver-Konfigurationen können Sie dann eines Ihrer Zertifikate für jede Konfiguration auswählen.</p>
bernd Neue Zertifikatsverwaltung

bernd authored 16 years ago

22) 
23) <h4>Ihre bisher vorhandenen Zertifikate</h4>
24) ');
25) 
26) $certs = user_certs();
27) 
Hanno Fix coding style with php-c...

Hanno authored 7 years ago

28) if (count($certs) > 0) {
29)     output("<table><tr><th>Name/Details</th><th>CommonName</th><th>Gültig ab</th><th>Gültig bis</th><th>&#160;</th></tr>");
30)     foreach ($certs as $c) {
Hanno Böck codingstyle, spaces between...

Hanno Böck authored 2 years ago

31)         $style = "";
Hanno Fix coding style with php-c...

Hanno authored 7 years ago

32)         if ($c['valid_until'] <= date('Y-m-d')) {
Hanno Böck codingstyle, spaces between...

Hanno Böck authored 2 years ago

33)             $style = ' style="background-color: #f88;" ';
34)         } elseif ($c['valid_until'] <= date('Y-m-d', time() + (30 * 24 * 3600)) && !cert_is_letsencrypt($c['id'])) {
35)             $style = ' style="background-color: #ff8;" ';
Hanno Fix coding style with php-c...

Hanno authored 7 years ago

36)         }
Hanno Böck Spaces between string conca...

Hanno Böck authored 2 years ago

37)         output("<tr><td{$style}>" . internal_link('showcert', filter_output_html($c['subject']), "mode=cert&id={$c['id']}") . "</td><td{$style}>" . filter_output_html($c['cn']) . "</td><td{$style}>{$c['valid_from']}</td><td{$style}>{$c['valid_until']}</td><td>" . internal_link('newcert', '<img src="' . $prefix . 'images/refresh.png" title="Neue Version des Zertifikats einspielen" />', 'replace=' . $c['id']) . " &#160; " . internal_link('savecert', '<img src="' . $prefix . 'images/delete.png" />', 'action=delete&id=' . $c['id']) . "</td></tr>");
bernd Farbige Markierung wenn ein...

bernd authored 13 years ago

38)     }
Hanno Fix coding style with php-c...

Hanno authored 7 years ago

39)     output("</table>");
40) } else {
41)     output('<p><em>Bisher haben Sie keine Zertifikate eingetragen</em></p>');
bernd Neue Zertifikatsverwaltung

bernd authored 16 years ago

42) }
43) 
Bernd Wurst Neuer Workflow für Cert-Rep...

Bernd Wurst authored 12 years ago

44) addnew('newcert', 'Neues Zertifikat erzeugen / eintragen');
45) 
bernd Neue Zertifikatsverwaltung

bernd authored 16 years ago

46) 
bernd CSR-Erstellung

bernd authored 16 years ago

47) 
48) $csr = user_csr();
Hanno Fix coding style with php-c...

Hanno authored 7 years ago

49) if (count($csr) > 0) {
50)     output('<h3>offene CSRs</h3>');
51)     output("<table><tr><th>Host-/Domainname</th><th>Bitlänge</th><th>Erzeugt am</th><th>&#160;</th></tr>");
52)     foreach ($csr as $c) {
Hanno Böck Spaces between string conca...

Hanno Böck authored 2 years ago

53)         output("<tr><td>" . internal_link('showcert', $c['hostname'], 'mode=csr&id=' . $c['id']) . "</td><td>{$c['bits']}</td><td>{$c['created']}</td><td>" . internal_link('savecert', '<img src="' . $prefix . 'images/delete.png" />', 'action=deletecsr&id=' . $c['id']) . " &#160; " . internal_link('certfromcsr', '<img src="' . $prefix . 'images/ok.png" alt="Zertifikat hinzufügen" title="Zertifikat hinzufügen" />', "id={$c['id']}") . "</td></tr>");
Hanno Fix coding style with php-c...

Hanno authored 7 years ago

54)     }
55)     output("</table>");