23c50b6858f94d5abb7af26209056f8f97b8dd7b
bernd webinterface => /webinterface

bernd authored 17 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) 
Bernd Wurst Copyright year update

Bernd Wurst authored 6 years ago

5) Written 2008-2018 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) 
9) To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty.
10) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

11) You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

12) http://creativecommons.org/publicdomain/zero/1.0/
13) 
14) 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.
15) */
bernd webinterface => /webinterface

bernd authored 17 years ago

16) 
17) require_once('inc/debug.php');
18) 
Bernd Wurst Domain-Übersicht als Kachel...

Bernd Wurst authored 6 years ago

19) require_once('inc/icons.php');
bernd webinterface => /webinterface

bernd authored 17 years ago

20) 
bernd Domain-Klasse benutzen

bernd authored 16 years ago

21) require_once('class/domain.php');
bernd Bessere Darstellung des Dom...

bernd authored 14 years ago

22) require_once('domains.php');
bernd webinterface => /webinterface

bernd authored 17 years ago

23) 
24) require_role(array(ROLE_SYSTEMUSER, ROLE_CUSTOMER));
25) 
Bernd Wurst Kennzeichne Domains korrekt...

Bernd Wurst authored 4 years ago

26) if (have_role(ROLE_CUSTOMER) && !have_role(ROLE_SYSTEMUSER)) {
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

27)     $user_domains = get_domain_list($_SESSION['customerinfo']['customerno']);
28) } else {
29)     $user_domains = get_domain_list($_SESSION['userinfo']['customerno'], $_SESSION['userinfo']['uid']);
30) }
bernd webinterface => /webinterface

bernd authored 17 years ago

31) 
Bernd Wurst Session aufräumen, Weiterle...

Bernd Wurst authored 6 years ago

32) // Session-Variablen aufräumen
33) unset($_SESSION['domains_detail_domainname']);
34) unset($_SESSION['domains_detail_owner']);
35) unset($_SESSION['domains_detail_admin_c']);
36) unset($_SESSION['domains_detail_detach']);
37) unset($_SESSION['domains_domainreg_owner']);
38) unset($_SESSION['domains_domainreg_admin_c']);
39) unset($_SESSION['domains_domainreg_detach']);
40) unset($_SESSION['domains_domainreg_domainname']);
41) 
bernd Benutze überall title() sta...

bernd authored 13 years ago

42) title("Domains");
bernd webinterface => /webinterface

bernd authored 17 years ago

43) 
Bernd Wurst Domain-Übersicht als Kachel...

Bernd Wurst authored 6 years ago

44) output('<p>In Ihrem Account werden die folgenden Domains verwaltet:</p>');
45) 
46) output('<div class="domain-list">');
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

47) foreach ($user_domains as $domain) {
48)     $status = 'regular';
49)     $locked = '';
50)     $mailserver_lock = '';
51)     if ($domain->mail != 'none' && $domain->mailserver_lock == 1) {
52)         $locked = 'locked';
53)         $mailserver_lock = '<br><strong>Mail-Verarbeitung eingeschränkt!</strong>'.footnote('Diese Domain ist extern registriert und wurde noch nicht bestätigt. Momentan ist daher der Mail-Empfang auf dieser Domain nicht möglich.');
54)     }
55)     $regdate = $domain->reg_date;
56)     if ($domain->status == 'prereg') {
57)         $status = 'prereg';
58)         $regdate = '<em>Registrierung nicht abgeschlossen</em>';
59)     } elseif ($domain->status == 'transferfailed') {
60)         $status = 'pretransfer';
61)         $regdate = '<em>Umzug gescheitert</em>';
62)     } elseif ($domain->status == 'pretransfer') {
63)         $status = 'pretransfer';
64)         $regdate = '<em>Umzug bevorstehend</em>';
65)     } elseif ($domain->provider != 'terions') {
66)         $status = 'external';
67)         $regdate = '<em>Extern registriert</em>';
68)     } elseif ($domain->reg_date == null) {
69)         $status = 'pretransfer';
70)         $regdate = '<em>Umzug bevorstehend</em>';
71)     } else {
72)         $status = 'regular';
73)         $regdate = 'Registriert seit '.$regdate;
74)     }
75)     if ($domain->cancel_date) {
76)         $status = 'cancel-scheduled';
77)         $regdate .= '<br />Gekündigt zum '.$domain->cancel_date;
78)     }
79)     if ($domain->cancel_date && $domain->cancel_date < date('Y-m-d')) {
80)         $status = 'cancelled';
Bernd Wurst Domain-Übersicht als Kachel...

Bernd Wurst authored 6 years ago

81)     }
Bernd Wurst Kennzeichne Domains korrekt...

Bernd Wurst authored 4 years ago

82)     if (isset($_SESSION['customerinfo']['customerno']) && $domain->kunde != $_SESSION['customerinfo']['customerno']) {
83)         $status = 'foreign';
84)         $regdate = '<em>Zuständige Kundennummer: '.$domain->kunde.'</em>';
85)     }
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

86) 
87)     $features = array();
88)     if ($domain->dns == 1) {
89)         if (dns_in_use($domain->id)) {
90)             $features[] = 'DNS';
91)         }
92)         //if ($domain->autodns == 1)
bernd Bessere Darstellung des Dom...

bernd authored 14 years ago

93)     //  $features[] = 'AutoDNS';
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

94)     }
95)     $mailman = mailman_subdomains($domain->id);
96)     if (mail_in_use($domain->id)) {
97)         $features[] = 'Mail';
98)     }
99)     if ($mailman) {
100)         $features[] = 'Mailinglisten';
101)     }
102)     if (web_in_use($domain->id)) {
103)         $features[] = 'Web';
104)     }
105)     if ($domain->jabber == 1) {
106)         $features[] = 'Jabber';
107)     }
108) 
109)     $features = implode(', ', $features);
110)     if (! $features) {
111)         $features = '<em>unbenutzt</em>';
112)     }
113)     $punycode = $domain->punycode;
114)     if ($domain->is_idn) {
115)         $punycode = "<br/><span class=\"punycode\">($punycode)</span>";
116)     } else {
117)         $punycode = '';
118)     }
119)     $domainname = "{$domain->fqdn}{$punycode}";
Bernd Wurst Kennzeichne Domains korrekt...

Bernd Wurst authored 4 years ago

120)     if (have_role(ROLE_CUSTOMER) && $status != 'foreign') {
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

121)         $domainname = internal_link('detail', $domainname, 'id='.$domain->id);
122)     }
123)     output("  <div class=\"domain-item {$status} {$locked}\"><p class=\"domainname\">{$domainname}</p><p class=\"regdate\">{$regdate}</p><p class=\"domain-usage\">Verwendung: {$features}{$mailserver_lock}</p></div>\n");
bernd webinterface => /webinterface

bernd authored 17 years ago

124) }
Bernd Wurst Domain-Übersicht als Kachel...

Bernd Wurst authored 6 years ago

125) output('</div>');
bernd webinterface => /webinterface

bernd authored 17 years ago

126) output("<br />");
Bernd Wurst Blende Aktionen aus, wenn d...

Bernd Wurst authored 6 years ago

127) 
128) if (have_role(ROLE_CUSTOMER) && config('http.net-apikey')) {
Bernd Wurst Text geändert für DOmain hi...

Bernd Wurst authored 5 years ago

129)     addnew('adddomain', 'Neue Domain bestellen oder externe Domain hinzufügen');