} } } else { $html .= '<br /><br />' . $lang->translate(663) . '<br /><br />'; } } else { $html .= '<br /><br />' . $lang->translate(663) . '<br /><br />'; } } elseif (get_value_get('type') == 'bekijken' && check_user_right(get_value_session('from_db', 'id'), 'pakketbekijken', get_value_session('from_db', 'is_admin')) !== FALSE) { $pakket = pakketten_get_value_details(get_value_session('from_db', 'id'), get_value_get('id'), get_value_session('from_db', 'is_admin')); if ($pakket !== FALSE) { if (get_value_get('p') == "dns") { if (check_user_subuser(get_value_session('from_db', 'id'), $pakket['user_id'], $type = 3) !== FALSE || $pakket['user_id'] == get_value_session('from_db', 'id') || get_value_session('from_db', 'is_admin') == '1') { $pakket_name = $pakket['pakket_name']; $domain_pakket_limit = dns_get_value_pakket($pakket['pakket_id'], 'domain'); $template_pakket_limit = dns_get_value_pakket($pakket['pakket_id'], 'template'); $domain_pakket_used = dns_get_value_current_usage($pakket['pakket_id'], 'domain'); $template_pakket_used = dns_get_value_current_usage($pakket['pakket_id'], 'template'); $domain_total_limit = pakketten_get_value_size_dns($pakket['user_id'], 'domain'); $template_total_limit = pakketten_get_value_size_dns($pakket['user_id'], 'template'); $domain_total_used = pakketten_get_value_used_dns($pakket['user_id'], 'domain'); $template_total_used = pakketten_get_value_used_dns($pakket['user_id'], 'template'); $html .= '<br />'; $userdata = get_userdata($pakket['user_id']); $html .= '<p>' . $lang->translate(670) . '<b>' . $userdata['username'] . '</b><br />'; $html .= '' . $lang->translate(671) . '<br /><br /></p>'; $html .= '<div class="tablestop1"><table>'; $html .= '<tr><td>' . $lang->translate(1200) . '</td><td>' . $lang->translate(664) . '</td><td>' . $lang->translate(665) . '</td></tr>'; $html .= '<tr><td>' . $lang->translate(690) . '</td><td> - </td><td>' . $pakket_name . '</td></tr>'; $html .= '<tr><td>' . $lang->translate(666) . '</td><td>' . $domain_pakket_used . '</td><td>' . $domain_pakket_limit . '</td></tr>'; $html .= '<tr><td>' . $lang->translate(667) . '</td><td>' . $template_pakket_used . '</td><td>' . $template_pakket_limit . '</td></tr>';
function pakketten_get_value_size_dns($userid, $typ = 'domain') { $pakketten = pakketten_get_value_overview($userid, 'dns'); $useddomains = 0; $usedtemplates = 0; if (is_array($pakketten) !== FALSE) { foreach ($pakketten as $product) { if ($product['user_id'] == $userid) { $useddomains = $useddomains + dns_get_value_pakket($product['pakket_id'], 'domain'); $usedtemplates = $usedtemplates + dns_get_value_pakket($product['pakket_id'], 'template'); } } } if ($typ == 'domain') { return $useddomains; } else { return $usedtemplates; } }