354c05a4ddd678c49bcbba458bffa7d13482139a
bernd Neue Jabber-Domains selbst...

bernd authored 14 years ago

1) <?php
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

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

Hanno Böck authored 1 year ago

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

Bernd Wurst authored 12 years ago

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

Hanno Böck authored 1 year ago

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

Bernd Wurst authored 12 years ago

10) 
11) 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.
12) */
bernd Neue Jabber-Domains selbst...

bernd authored 14 years ago

13) 
14) require_once('session/start.php');
15) 
16) require_once('class/domain.php');
17) require_once('jabberaccounts.php');
18) 
19) require_role(ROLE_CUSTOMER);
20) 
21) $section = 'jabber_accounts';
22) $title = "Domain für Jabber freischalten";
bernd Benutze überall title() sta...

bernd authored 13 years ago

23) title("Eigene Domain für Jabber-Nutzung freischalten");
bernd Neue Jabber-Domains selbst...

bernd authored 14 years ago

24) 
25) 
26) $domains = get_domain_list((int) $_SESSION['customerinfo']['customerno']);
27) DEBUG($domains);
28) 
Hanno Böck Fix not operator (!) spaces

Hanno Böck authored 6 months ago

29) if (!count($domains)) {
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

30)     system_failure("Sie haben gar keine eigenen Domains.");
bernd Neue Jabber-Domains selbst...

bernd authored 14 years ago

31) }
32) 
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 2 years ago

33) $pending_domains = [];
34) $available_domains = [];
bernd Neue Jabber-Domains selbst...

bernd authored 14 years ago

35) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

36) foreach ($domains as $d) {
37)     if ($d->jabber == 0) {
Hanno Böck Spaces between string conca...

Hanno Böck authored 6 months ago

38)         $available_domains[$d->id] = $d->domainname . '.' . $d->tld;
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

39)     }
40)     if ($d->jabber == 2) {
41)         $pending_domains[] = $d->fqdn;
42)     }
bernd Neue Jabber-Domains selbst...

bernd authored 14 years ago

43) }
44) 
45) 
46) $pending = '';
47) if (count($pending_domains) > 0) {
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

48)     $pending = '<h3>Wartend auf Freischaltung</h3>
bernd Neue Jabber-Domains selbst...

bernd authored 14 years ago

49) <p>Folgende Domains sind bereits eingetragen und werden in der kommenden Nacht im Jabber-Server registriert:</p>
50) <ul>';
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

51)     foreach ($pending_domains as $d) {
Hanno Böck Spaces between string conca...

Hanno Böck authored 6 months ago

52)         $pending .= '<li>' . $d . '</li>';
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

53)     }
54)     $pending .= '</ul>';
bernd Neue Jabber-Domains selbst...

bernd authored 14 years ago

55) }
56) 
57) 
58) output('<p>Sie können hier eine Ihrer eigenen Domains für Jabber-Nutzung freischalten. Da dafür ein Neustart des Jabber-Servers nötig ist, können Sie die Domain erst ab dem darauffolgenden Tag für eigene Jabber-Accounts nutzen.</p>
Bernd Wurst Hinweis zum TLS-Cert für ei...

Bernd Wurst authored 6 years ago

59) <p><strong>Bitte beachten Sie:</strong> Damit beim Verbinden ihrer Jabber-Accounts kein Fehler auftritt, nutzen wir für die TLS-Verschlüsselung ein Zertifikat der Webserver-Konfiguration mit dem passenden Domainnamen, sofern dort ein gültiges Zertifikat vorhanden ist. Ohne passendes Zertifikat wird beim Verbinden eines Accounts mit einer eigenen Domain ein Zertifikat-Fehler auftreten.</p>
bernd Neue Jabber-Domains selbst...

bernd authored 14 years ago

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

Hanno Böck authored 6 months ago

61) ' . html_form('jabber_new_domain', 'save', 'action=newdomain', '
62) <p>Domain wählen: ' . html_select('domain', $available_domains) . '</p>
bernd Neue Jabber-Domains selbst...

bernd authored 14 years ago

63) <input type="submit" name="submit" value="Freischalten" />
64)