Пример #1
0
function stream_get_value_stream($id, $account)
{
    global $mysqli;
    if (!isset($mysqli) || empty($mysqli)) {
        create_db_connection('mysqli', 'central');
    }
    global $mysqli;
    $query = $mysqli->query("SELECT * FROM `stream_streams` WHERE `id` LIKE '" . $mysqli->real_escape_string($id) . "' AND `account` LIKE '" . $mysqli->real_escape_string($account) . "' LIMIT 1");
    if (!isset($query) || empty($query) || $query->num_rows == "0") {
        return FALSE;
    } else {
        while ($row = $query->fetch_array(MYSQLI_ASSOC)) {
            if (pakketten_check_is_allowed(get_value_get('id'), 'stream', get_value_session('from_db', 'is_admin')) === FALSE) {
                return FALSE;
            } else {
                return $row;
            }
        }
    }
}
Пример #2
0
function menu_create_information_stream($page)
{
    global $lang;
    $menu = menu_create_information_default($page);
    if ($page == 'stream') {
        if (check_user_right(get_value_session('from_db', 'id'), 'stream', get_value_session('from_db', 'is_admin')) != FALSE && pakketten_check_is_allowed(get_value_get('id'), 'stream', get_value_session('from_db', 'is_admin'))) {
            if (check_user_right(get_value_session('from_db', 'id'), 'streamoverzicht', get_value_session('from_db', 'is_admin')) != FALSE) {
                if (get_value_session('from_db', 'is_admin') == '1') {
                    if (get_value_get('id') !== FALSE) {
                        if (stream_get_number_streams(get_value_get('id')) !== FALSE) {
                            $menu[$lang->translate(904)][$lang->translate(905)]['url'] = '&page=stream&type=streamoverzicht&id=' . get_value_get('id') . '';
                            $menu[$lang->translate(904)][$lang->translate(905)]['plaatje'] = '';
                        }
                    } else {
                        if (stream_get_number_streams('%') !== FALSE) {
                            $menu[$lang->translate(904)][$lang->translate(905)]['url'] = '&page=stream&type=streamoverzicht';
                            $menu[$lang->translate(904)][$lang->translate(905)]['plaatje'] = '';
                        }
                    }
                } elseif (stream_get_number_streams(get_value_get('id')) !== FALSE) {
                    $menu[$lang->translate(904)][$lang->translate(905)]['url'] = '&page=stream&type=streamoverzicht&id=' . get_value_get('id') . '';
                    $menu[$lang->translate(904)][$lang->translate(905)]['plaatje'] = '';
                }
            }
            $streams = stream_get_details('%', get_value_get('id'), 0);
            if ($streams !== FALSE) {
                foreach ($streams as $stream) {
                    //var_dump($stream['status']);
                    if ($stream['status'] == '1' && $stream['status'] != '0') {
                        $menu[$lang->translate(990) . ' ' . $stream['id']][$lang->translate(989) . ': ' . $stream['name']]['url'] = '&page=stream&type=streamstop&id=' . get_value_get('id') . '&streamid=' . $stream['id'];
                        $menu[$lang->translate(990) . ' ' . $stream['id']][$lang->translate(989) . ': ' . $stream['name']]['plaatje'] = '';
                    } else {
                        $menu[$lang->translate(990) . ' ' . $stream['id']][$lang->translate(988) . ': ' . $stream['name']]['url'] = '&page=stream&type=streamstart&id=' . get_value_get('id') . '&streamid=' . $stream['id'];
                        $menu[$lang->translate(990) . ' ' . $stream['id']][$lang->translate(988) . ': ' . $stream['name']]['plaatje'] = '';
                    }
                    if ($stream['djstatus'] == '1' && $stream['djstatus'] != '0') {
                        $menu[$lang->translate(990) . ' ' . $stream['id']][$lang->translate(992) . ': ' . $stream['name']]['url'] = '&page=stream&type=streamdjstop&id=' . get_value_get('id') . '&streamid=' . $stream['id'];
                        $menu[$lang->translate(990) . ' ' . $stream['id']][$lang->translate(992) . ': ' . $stream['name']]['plaatje'] = '';
                    } else {
                        $menu[$lang->translate(990) . ' ' . $stream['id']][$lang->translate(991) . ': ' . $stream['name']]['url'] = '&page=stream&type=streamdjstart&id=' . get_value_get('id') . '&streamid=' . $stream['id'];
                        $menu[$lang->translate(990) . ' ' . $stream['id']][$lang->translate(991) . ': ' . $stream['name']]['plaatje'] = '';
                    }
                    if ($stream['status'] == '1' && $stream['status'] != '0') {
                        $menu[$lang->translate(990) . ' ' . $stream['id']][$lang->translate(993) . ': ' . $stream['name']]['extlink'] = 'http://' . $stream['host'] . ':' . $stream['poort'] . '/' . $stream['mountpoint'];
                        $menu[$lang->translate(990) . ' ' . $stream['id']][$lang->translate(993) . ': ' . $stream['name']]['extlink']['plaatje'] = '';
                    }
                    if ($stream['status'] == '1' && $stream['status'] != '0' && $stream['type'] == 'shoutcast') {
                        $menu[$lang->translate(990) . ' ' . $stream['id']][$lang->translate(994) . ': ' . $stream['name']]['extlink'] = 'http://' . $stream['host'] . ':' . $stream['poort'] . '/';
                        $menu[$lang->translate(990) . ' ' . $stream['id']][$lang->translate(994) . ': ' . $stream['name']]['extlink']['plaatje'] = '';
                    } elseif ($stream['status'] == '1' && $stream['status'] != '0' && $stream['type'] == 'icecast') {
                        $menu[$lang->translate(990) . ' ' . $stream['id']][$lang->translate(997) . ': ' . $stream['name']]['extlink'] = 'http://' . $stream['host'] . ':' . $stream['poort'] . '/';
                        $menu[$lang->translate(990) . ' ' . $stream['id']][$lang->translate(997) . ': ' . $stream['name']]['extlink']['plaatje'] = '';
                        $menu[$lang->translate(990) . ' ' . $stream['id']][$lang->translate(998) . ': ' . $stream['name']]['extlink'] = 'http://' . $stream['host'] . ':' . $stream['poort'] . '/admin/';
                        $menu[$lang->translate(990) . ' ' . $stream['id']][$lang->translate(998) . ': ' . $stream['name']]['extlink']['plaatje'] = '';
                    }
                }
            }
            if (check_user_right(get_value_session('from_db', 'id'), 'streamtoevoegen', get_value_session('from_db', 'is_admin')) != FALSE) {
                if (get_value_session('from_db', 'is_admin') == '1') {
                    if (get_value_get('id') !== FALSE) {
                        $menu[$lang->translate(904)][$lang->translate(906)]['url'] = '&page=stream&type=streamtoevoegen&id=' . get_value_get('id') . '';
                        $menu[$lang->translate(904)][$lang->translate(906)]['plaatje'] = '';
                    }
                } else {
                    $menu[$lang->translate(904)][$lang->translate(906)]['url'] = '&page=stream&type=streamtoevoegen&id=' . get_value_get('id') . '';
                    $menu[$lang->translate(904)][$lang->translate(906)]['plaatje'] = '';
                }
            }
            if (check_user_right(get_value_session('from_db', 'id'), 'streamzoeken', get_value_session('from_db', 'is_admin')) != FALSE) {
                if (get_value_session('from_db', 'is_admin') == '1') {
                    if (get_value_get('id') !== FALSE) {
                        if (stream_get_number_streams(get_value_get('id')) !== FALSE) {
                            $menu[$lang->translate(904)][$lang->translate(907)]['url'] = '&page=stream&type=streamzoeken&id=' . get_value_get('id') . '';
                            $menu[$lang->translate(904)][$lang->translate(907)]['plaatje'] = '';
                        }
                    } else {
                        if (stream_get_number_streams('%') !== FALSE) {
                            $menu[$lang->translate(904)][$lang->translate(907)]['url'] = '&page=stream&type=streamzoeken';
                            $menu[$lang->translate(904)][$lang->translate(907)]['plaatje'] = '';
                        }
                    }
                } elseif (stream_get_number_streams(get_value_get('id')) !== FALSE) {
                    $menu[$lang->translate(904)][$lang->translate(907)]['url'] = '&page=stream&type=streamzoeken&id=' . get_value_get('id') . '';
                    $menu[$lang->translate(904)][$lang->translate(907)]['plaatje'] = '';
                }
            }
        }
    }
    return $menu;
}
Пример #3
0
function dns_do_action_superontkoppelen($id, $account, $admin = 2)
{
    global $lang;
    $data = dns_get_value_domain($id);
    if (pakketten_check_is_allowed($data['account'], 'DNS', $admin)) {
        global $mysqli_dns;
        if (!isset($mysqli_dns) || empty($mysqli_dns)) {
            create_db_connection('mysqli_dns', 'dns');
        }
        global $mysqli_dns;
        $sql = 'UPDATE `domains` SET `type` = "NATIVE", `master` = NULL, `last_check` = NULL WHERE `id` = "' . $mysqli_dns->real_escape_string($id) . '"';
        $mysqli_dns->query($sql);
        $html = '<br /><br /><p>' . $lang->translate(798) . '</p><br /><br />';
    } else {
        $html = '<br /><br />';
        $html .= $lang->translate(792) . '<br /><br />';
    }
    return $html;
}
Пример #4
0
<?php

fix_is_included($index);
if (check_user_right(get_value_session('from_db', 'id'), 'stream', get_value_session('from_db', 'is_admin')) !== FALSE && pakketten_check_is_allowed(get_value_session('from_db', 'id'), 'stream', get_value_session('from_db', 'is_admin'))) {
    $html = '<b>' . $lang->translate(908) . '</b>';
    if (get_value_get('type') == 'streamoverzicht' && check_user_right(get_value_session('from_db', 'id'), 'streamoverzicht', get_value_session('from_db', 'is_admin')) !== FALSE && get_value_get('id') !== FALSE) {
        $html .= stream_create_html_overview(get_value_get('id'));
    } elseif (get_value_get('type') == 'streamzoeken' && check_user_right(get_value_session('from_db', 'id'), 'streamzoeken', get_value_session('from_db', 'is_admin')) !== FALSE && get_value_get('id') !== FALSE) {
        if (get_value_post('submit')) {
            $search = stream_do_action_search(get_value_get('id'), get_value_post('search'), get_value_session('from_db', 'is_admin'));
            if ($search === FALSE) {
                $html .= '<br /><br />' . $lang->translate(718) . '<br /><br />';
            } else {
                $html .= $search;
            }
        } else {
            $html .= stream_create_html_search();
        }
    } elseif (get_value_get('type') == 'streamtoevoegen' && check_user_right(get_value_session('from_db', 'id'), 'streamtoevoegen', get_value_session('from_db', 'is_admin')) !== FALSE && get_value_get('id') !== FALSE) {
        if (get_value_post('submit') != FALSE) {
            $html .= stream_do_action_toevoegen(get_value_get('id'), get_value_session('from_db', 'is_admin'));
        } else {
            $html .= stream_create_html_toevoegen(get_value_get('id'), get_value_session('from_db', 'is_admin'));
        }
    } elseif (get_value_get('type') == 'streambekijken' && check_user_right(get_value_session('from_db', 'id'), 'streambekijken', get_value_session('from_db', 'is_admin')) !== FALSE && get_value_get('id') !== FALSE) {
        $html .= stream_create_html_streamdetails(get_value_get('id'), get_value_get('streamid'), 'bekijk', get_value_session('from_db', 'is_admin'));
    } elseif (get_value_get('type') == 'streambewerken' && check_user_right(get_value_session('from_db', 'id'), 'streambewerken', get_value_session('from_db', 'is_admin')) !== FALSE && get_value_get('id') !== FALSE) {
        if (get_value_post('submit')) {
            $replace = stream_do_action_replace_streamdetails(get_value_get('id'), get_value_get('streamid'), get_value_session('from_db', 'is_admin'));
            if ($replace === FALSE) {
                $html .= '<br /><br />' . $lang->translate(934) . '<br />';