git.schokokeks.org
Repositories
Help
Report an Issue
webinterface.git
Code
Commits
Branches
Tags
Suche
Strukturansicht:
37ffdb6
Branches
Tags
master
ticket
webinterface.git
modules
domains
domains.php
Domain-Übersicht als Kachel-Optik
Bernd Wurst
commited
37ffdb6
at 2018-02-20 11:35:38
domains.php
Blame
History
Raw
<?php /* This file belongs to the Webinterface of schokokeks.org Hosting Written 2008-2018 by schokokeks.org Hosting, namely Bernd Wurst <bernd@schokokeks.org> Hanno Böck <hanno@schokokeks.org> 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. You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see http://creativecommons.org/publicdomain/zero/1.0/ 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. */ require_once('inc/debug.php'); require_once('inc/icons.php'); require_once('class/domain.php'); require_once('domains.php'); require_role(array(ROLE_SYSTEMUSER, ROLE_CUSTOMER)); if ($_SESSION['role'] & ROLE_CUSTOMER) $user_domains = get_domain_list($_SESSION['customerinfo']['customerno']); else $user_domains = get_domain_list($_SESSION['userinfo']['customerno'], $_SESSION['userinfo']['uid']); $useraccounts = array(); if ($_SESSION['role'] & ROLE_CUSTOMER) { $useraccounts = list_useraccounts(); } title("Domains"); output('<p>In Ihrem Account werden die folgenden Domains verwaltet:</p>'); output('<div class="domain-list">'); foreach ($user_domains as $domain) { $status = 'regular'; $locked = ''; $mailserver_lock = ''; if ($domain->mail != 'none' && $domain->mailserver_lock == 1) { $locked = 'locked'; $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.'); } $regdate = $domain->reg_date; if ($domain->provider != 'terions') { $status = 'external'; $regdate = '<em>Extern registriert</em>'; } elseif ($domain->reg_date == NULL) { $status = 'pretransfer'; $regdate = '<em>Umzug bevorstehend</em>'; } else { $status = 'regular'; $regdate = 'Registriert seit '.$regdate; } if ($domain->cancel_date) { $status = 'cancel-scheduled'; $regdate .= '<br />Gekündigt zum '.$domain->cancel_date; } if ($domain->cancel_date && $domain->cancel_date < date('Y-m-d')) { $status = 'cancelled'; } $features = array(); if ($domain->dns == 1) { if (dns_in_use($domain->id)) $features[] = 'DNS'; //if ($domain->autodns == 1) // $features[] = 'AutoDNS'; } $mailman = mailman_subdomains($domain->id); if (mail_in_use($domain->id)) $features[] = 'Mail'; if ($mailman) $features[] = 'Mailinglisten'; if (web_in_use($domain->id)) $features[] = 'Web'; if ($domain->jabber == 1) $features[] = 'Jabber'; $features = implode(', ', $features); if (! $features) $features = '<em>unbenutzt</em>'; $punycode = $domain->punycode; if ($domain->is_idn) { $punycode = "<br/><span class=\"punycode\">($punycode)</span>"; } else { $punycode = ''; } $domainname = "{$domain->fqdn}{$punycode}"; if ((!$domain->cancel_date || $domain->cancel_date > date('Y-m-d')) && have_module('contacts') && $_SESSION['role'] & ROLE_CUSTOMER && update_possible($domain->id)) { $domainname = internal_link('update', $domainname, 'id='.$domain->id); } elseif ($_SESSION['role'] & ROLE_CUSTOMER && $domain->mailserver_lock == 1) { $domainname = internal_link('verify', $domainname, 'id='.$domain->id); } $domainuser = ''; if ($_SESSION['role'] & ROLE_CUSTOMER && count($useraccounts) > 1) { // Mehrere User vorhanden $username = ''; foreach ($useraccounts as $u) { if ($u['uid'] == $domain->useraccount) { $username = $u['username']; } } if (!$username) { $username = '<em>unbekannt</em>'; } $domainuser = '<p class="domain-user">Verfügbar für Benutzer <strong>'.$username.'</strong> '.internal_link('chguser', icon_edit().' Ändern', "id={$domain->id}").'</p>'; } output(" <div class=\"domain-item {$status} {$locked}\"><p class=\"domainname\">{$domainname}</p><p class=\"regdate\">{$regdate}</p>".$domainuser."<p class=\"domain-usage\">Verwendung: {$features}{$mailserver_lock}</p></div>\n"); } output('</div>'); output("<br />"); addnew('adddomain', 'Neue Domain bestellen / hinzufügen'); ?>