コード例 #1
0
<?php

//init
require_once "libraries/ts3init.php";
//get sid and init server_instance
getSID();
if ($ts3server_rights["r_view_server"] != 1) {
    $smarty->display('../mod/default/ts3admin/notallowed.tpl');
    die;
}
$servers = array();
$serverindex = 0;
foreach ($ts3_ServerInstance as $ts3_VirtualServer) {
    try {
        $try = $ts3_VirtualServer["virtualserver_name"];
        $servers[$serverindex++] = array("virtualserver_name" => $ts3_VirtualServer["virtualserver_name"], "id" => $ts3_VirtualServer["virtualserver_id"]);
    } catch (Exception $e) {
    }
}
$smarty->assign('sid', $sid);
$serv = array();
foreach ($servers as $s) {
    $r = getTS3Rights($sid, $s["id"]);
    if ($r["r_view_vserver"] == 1) {
        $serv[] = $s;
    }
}
$smarty->assign('vservers', $serv);
$smarty->display('../mod/default/ts3admin/chooseVServer.tpl');
コード例 #2
0
ファイル: ts3admin.mod.php プロジェクト: tech-nik89/lpm4
                foreach ($groupright as $ri) {
                    $grouprightlist[$ri["uid"]] = $ri;
                    $groups[$ri["uid"]]["set"] = 1;
                    $grouprightlist[$ri["uid"]]["editurl"] = "ajax_request.php?mod=ts3admin&file=RightOption.ajax&vsid=" . $vsid . "&sid=" . $sid . "&uid=" . $ri["uid"] . "&action=askedit&type=group";
                    $grouprightlist[$ri["uid"]]["removeurl"] = "ajax_request.php?mod=ts3admin&file=RightOption.ajax&vsid=" . $vsid . "&sid=" . $sid . "&uid=" . $ri["uid"] . "&action=askremove&type=group";
                }
                $smarty->assign('userrightlist', $userrightlist);
                $smarty->assign('grouprightlist', $grouprightlist);
                $smarty->assign('users', $users);
                $smarty->assign('groups', $groups);
                $smarty->assign('vsid', $vsid);
            }
            $smarty->assign('path', $template_dir . "/rights.tpl");
        }
        break;
    default:
        $server = $db->selectList($tbl . "_servers", "ID,name,address", "true", "ID");
        if (count($server) == 0) {
            $smarty->assign('server', "none");
        } else {
            $serv = array();
            foreach ($server as $s) {
                $r = getTS3Rights($s["ID"], -1);
                if ($r["r_view_server"] == 1) {
                    $serv[] = $s;
                }
            }
            $smarty->assign('server', $serv);
        }
        $smarty->assign('path', $template_dir . "/ts3admin.tpl");
}