// oplata $tbl = $GUI->Table("sprav" . $n); if (user_can($GUI->mmenu->selected->id, $GUI->mmenu->selected->selected->id, $_SESSION["user"]["data"]["group_id"], "Редактировать")) { $tbl->RowEvent2 = "document.location.href=\"?section=sprav&subsection=1&edit=%var%\""; } /* $r = $tbl->NewColumn(); $r->Caption = "Номер"; $r->DoSort = true; $r->Key = "id"; */ $r = $tbl->NewColumn(); $r->Caption = "Наименование"; $r->DoSort = true; $r->Key = "name"; $r = $tbl->NewColumn(); $r->Caption = "В форме заказа"; $r->DoSort = true; $r->Key = "onsite"; $r->Process = "tp_payments_onsite"; $r = $tbl->NewColumn(); $r->Caption = ""; $r->Process = "tp_payments_cmds"; foreach (PaymentMethod::findAll() as $method) { $tbl->AddRow($method, "id"); } $tbl->InlineSort(true); if (user_can($GUI->mmenu->selected->id, $GUI->mmenu->selected->selected->id, $_SESSION["user"]["data"]["group_id"], "Добавить")) { $GUI->cmdmenu->AddItem("Добавить", "?section=sprav&subsection=1&add"); } }