コード例 #1
0
ファイル: group.php プロジェクト: mrdeadmouse/u136006
$arVisibleColumns = $lAdmin->GetVisibleHeaderColumns();
/*******************************************************************/
while ($arGroup = $dbResultList->NavNext(true, "f_")) {
    $row =& $lAdmin->AddRow($f_ID, $arGroup);
    $row->AddField("ID", $f_ID);
    $row->AddInputField("SORT", array("size" => 5));
    if (in_array("NAME", $arVisibleColumns)) {
        $arGroupLang = CForumGroup::GetLangByID($f_ID, LANG);
        $fieldShow = htmlspecialcharsbx($arGroupLang["NAME"]);
        $row->AddViewField("NAME", '<a title="' . GetMessage("FORUM_EDIT_DESCR") . '" href="' . "forum_group_edit.php?ID=" . $f_ID . "&lang=" . LANG . "&" . GetFilterParams("filter_") . '">' . $fieldShow . '</a>');
    }
    $arActions = array();
    if ($forumModulePermissions >= "R" && CForumGroup::CanUserUpdateGroup(0, $USER->GetUserGroupArray())) {
        $arActions[] = array("ICON" => "edit", "TEXT" => GetMessage("FORUM_EDIT_DESCR"), "ACTION" => $lAdmin->ActionRedirect("forum_group_edit.php?ID=" . $f_ID . "&lang=" . LANG . "&" . GetFilterParams("filter_", false)), "DEFAULT" => true);
    }
    if ($forumModulePermissions >= "W" && CForumGroup::CanUserDeleteGroup(0, $USER->GetUserGroupArray())) {
        $arActions[] = array("SEPARATOR" => true);
        $arActions[] = array("ICON" => "delete", "TEXT" => GetMessage("FORUM_DELETE_DESCR"), "ACTION" => "if(confirm('" . GetMessage('GROUP_DEL_CONF') . "')) " . $lAdmin->ActionDoGroup($f_ID, "delete"));
    }
    $row->AddActions($arActions);
}
/*******************************************************************/
$lAdmin->AddFooter(array(array("title" => GetMessage("MAIN_ADMIN_LIST_SELECTED"), "value" => $dbResultList->SelectedRowsCount()), array("counter" => true, "title" => GetMessage("MAIN_ADMIN_LIST_CHECKED"), "value" => "0")));
/*******************************************************************/
$lAdmin->AddGroupActionTable(array("delete" => GetMessage("MAIN_ADMIN_LIST_DELETE")));
if ($forumModulePermissions >= "W" && CForumGroup::CanUserAddGroup($USER->GetUserGroupArray())) {
    $aContext = array(array("TEXT" => GetMessage("FGAN_ADD_NEW"), "LINK" => "forum_group_edit.php?lang=" . LANG, "TITLE" => GetMessage("FGAN_ADD_NEW_ALT"), "ICON" => "btn_new"));
    $lAdmin->AddAdminContextMenu($aContext);
}
/*******************************************************************/
$lAdmin->CheckListMode();