<?php
require_once('inc/base.php');
require_once('useraccounts.php');
require_role([ROLE_CUSTOMER, ROLE_SYSTEMUSER]);
title("System-Benutzeraccounts");
$section = "systemuser_account";
$account = null;
$role = $_SESSION['role'];
$account = get_account_details($_GET['uid'] ?? $_SESSION['userinfo']['uid'], $_SESSION['userinfo']['customerno']);
headline("Bearbeiten von Benutzer »{$account['username']}«");
$shells = available_shells();
$defaultname = ($account['name'] ? '' : 'checked="checked" ');
$nondefaultname = ($account['name'] ? 'checked="checked" ' : '');
$customerquota = get_customer_quota();
$maxquota = $customerquota['max'] - $customerquota['assigned'] + $account['quota'];
$customer = get_customer_info($_SESSION['userinfo']['customerno']);
if ($role & ROLE_CUSTOMER) {
$customer = $_SESSION['customerinfo'];
}
$form = '';
$form .= '
<h5>Name (E-Mail-Absender, ...)</h5>
<div style="margin-left: 2em;">
<p><input type="radio" name="defaultname" id="defaultname" value="1" ' . $defaultname . '/> <label for="defaultname">Kundenname: <strong>' . $customer['name'] . '</strong></label></p>