コード例 #1
0
function pakketten_get_value_size_stream($userid, $typ = 'listeners')
{
    $pakketten = pakketten_get_value_overview($userid, 'stream');
    $usedlisteners = 0;
    if (is_array($pakketten) !== FALSE) {
        foreach ($pakketten as $product) {
            if ($product['user_id'] == $userid) {
                $usedlisteners = $usedlisteners + stream_get_value_pakket($product['pakket_id'], 'listeners');
            }
        }
    }
    if ($typ == 'listeners') {
        return $usedlisteners;
    } else {
        return FALSE;
    }
}
コード例 #2
0
         } else {
             $html .= '<br /><p>' . $lang->translate(658) . '</p><br />';
         }
     } else {
         $html .= '<br /><p>' . $lang->translate(658) . '</p><br />';
     }
 } else {
     //$type = $lang->translate(631); // dns
     //$type = $lang->translate(632); // vps
     if (get_value_session('from_db', 'is_admin') == '1') {
         if (pakketten_get_value_overview('%', '%', get_value_session('from_db', 'is_admin')) != FALSE) {
             $num = 1;
         } else {
             $num = 0;
         }
     } elseif (pakketten_get_value_overview(get_value_session('from_db', 'id'), '%') != FALSE) {
         $num = 1;
     } else {
         $num = 0;
     }
     if ($num == 1) {
         //$options = '<option value="0"></option>';
         if (check_user_right(get_value_session('from_db', 'id'), 'dns', get_value_session('from_db', 'is_admin')) !== FALSE) {
             $options .= '<option value="1">' . $lang->translate(631) . '</option>';
             // dns
         }
         if (check_user_right(get_value_session('from_db', 'id'), 'dns', get_value_session('from_db', 'is_admin')) !== FALSE) {
             $options .= '<option value="2">' . $lang->translate(679) . '</option>';
             // streaming
         }
         //$options .= '<option value="2">'.$lang->translate(632).'</option>'; // vps
コード例 #3
0
         } else {
             $html .= '<br /><p>' . $lang->translate(562) . '</p><br /><br />';
         }
     } else {
         $html .= '<br /><p>' . $lang->translate(562) . '</p><br /><br />';
     }
 } elseif (get_value_get('type') == 'verwijderen') {
     $html = '<b>' . $lang->translate(551) . '</b><br /><br />';
     if (check_user_right(get_value_session('from_db', 'id'), 'klantbekijken', get_value_session('from_db', 'is_admin')) != FALSE) {
         if (check_user_subuser(get_value_session('from_db', 'id'), get_value_get('id')) != FALSE || get_value_session('from_db', 'is_admin') == '1') {
             $succes = 0;
             if (get_value_post('submit')) {
                 if (get_subusers(get_value_get('id'), 3) !== FALSE) {
                     $html .= '<br /><br />' . $lang->translate(570) . '<br /><br />';
                 } else {
                     $pakketten = pakketten_get_value_overview(get_value_get('id'), '%');
                     if ($pakketten !== FALSE) {
                         foreach ($pakketten as $pakket) {
                             pakketten_do_action_verwijder(get_value_get('id'), $pakket['id']);
                         }
                     }
                     $sql = 'DELETE FROM `user_subuser` WHERE `subuserid` LIKE "' . $mysqli->real_escape_string(get_value_get('id')) . '"';
                     record_change_user(get_value_get('id'));
                     $sql2 = 'DELETE FROM `user` WHERE `id` LIKE "' . $mysqli->real_escape_string(get_value_get('id')) . '"';
                     $mysqli->query($sql);
                     $mysqli->query($sql2);
                     $succes = 1;
                 }
             }
             if ($succes !== 0) {
                 $html .= '<br /><br />' . $lang->translate(554) . '<br /><br />';