<?php
require_once('inc/debug.php');
require_once('inc/icons.php');
require_once('inc/security.php');
require_role([ROLE_CUSTOMER]);
require_once('class/domain.php');
require_once('contactapi.php');
function new_contact()
{
return ["id" => null,
"state" => null,
"lastchange" => time(),
"nic_handle" => null,
"nic_id" => null,
"salutation" => null,
"company" => null,
"name" => null,
"address" => null,
"zip" => null,
"city" => null,
"country" => "DE",
"phone" => null,
"mobile" => null,
"fax" => null,
"email" => null,
"pgp_id" => null,
"pgp_key" => null,
"customer" => $_SESSION['customerinfo']['customerno'], ];
}
function get_contact($id, $customer = null)
{
$c = $_SESSION['customerinfo']['customerno'];
if ($customer != null && have_role(ROLE_SYSADMIN)) {
$c = $customer;