示例#1
0
} else {
    $tpl->assign('arr_pct', '0');
}
$tpl->assign('pct_display', $tpl->fetch("pct.tpl"));
// ========================
// = display events table =
// ========================
if ($kga['usr']['usr_sts'] == 0) {
    $arr_evt = get_arr_evt_by_pct("all", -2);
} else {
    $arr_evt = get_arr_evt_by_pct($kga['usr']['usr_grp'], -2);
}
foreach ($arr_evt as $row => $evt_data) {
    $grp_names = array();
    foreach (evt_get_grps($evt_data['evt_ID']) as $grp_id) {
        $data = grp_get_data($grp_id);
        $grp_names[] = $data['grp_name'];
    }
    $arr_evt[$row]['groups'] = implode(", ", $grp_names);
}
if (count($arr_evt) > 0) {
    $tpl->assign('arr_evt', $arr_evt);
} else {
    $tpl->assign('arr_evt', '0');
}
$tpl->assign('evt_display', $tpl->fetch("evt.tpl"));
$tpl->assign('selected_evt_filter', -2);
$tpl->assign('curr_user', $kga['usr']['usr_name']);
if ($kga['usr']['usr_sts'] == 0) {
    $tpl->assign('arr_grp', get_arr_grp(get_cookie('ap_ext_show_deleted_groups', 0)));
} else {
示例#2
0
        $i = 0;
        foreach ($arr as $row) {
            $arr_grp_name[$i] = $row['grp_name'];
            $arr_grp_ID[$i] = $row['grp_ID'];
            $i++;
        }
        $tpl->assign('arr_grp_ID', $arr_grp_ID);
        $tpl->assign('arr_grp_name', $arr_grp_name);
        $tpl->assign('usr_details', $usr_details);
        $tpl->display("edituser.tpl");
        break;
    case "editGrp":
        // =============================
        // = Builds edit-group dialogue =
        // =============================
        $grp_details = grp_get_data($_REQUEST['id']);
        $arr = get_arr_usr();
        $i = 0;
        foreach ($arr as $row) {
            $arr_usr_name[$i] = $row['usr_name'];
            $arr_usr_ID[$i] = $row['usr_ID'];
            $i++;
        }
        $grp_selection = grp_get_ldrs($_REQUEST['id']);
        $tpl->assign('grp_selection', $grp_selection);
        $tpl->assign('arr_usr_ID', $arr_usr_ID);
        $tpl->assign('arr_usr_name', $arr_usr_name);
        $tpl->assign('grp_details', $grp_details);
        $tpl->display("editgroup.tpl");
        break;
}
示例#3
0
function get_grp($id)
{
    return grp_get_data($id);
}