array(T_ZBX_STR, O_MAND,P_SYS, NOT_EMPTY, NULL), "new_group"=> array(T_ZBX_STR, O_OPT,P_SYS, NOT_EMPTY, NULL), "select"=> array(T_ZBX_STR, O_OPT, P_SYS|P_ACT, NULL, NULL) ); check_fields($fields); $dstfrm = get_request("dstfrm", 0); // destination form $new_group = get_request('new_group', array()); ?> 0) { ?> AddVar('dstfrm', $dstfrm); $form->SetName('groups'); $table = new CTableInfo(S_NO_GROUPS_DEFINED); $table->SetHeader(array( array( new CCheckBox("all_groups",NULL, "CheckAll('".$form->GetName()."','all_groups');"), S_NAME) )); $result = DBselect('select * from usrgrp where '.DBin_node('usrgrpid').' order by name'); while($row = DBfetch($result)) { $table->AddRow(array( array( new CCheckBox('new_group['.$row['usrgrpid'].']', isset($new_group[$row['usrgrpid']]), NULL, $row['name']), $row['name']) )); } $table->SetFooter(new CButton('select', S_SELECT)); $form->AddItem($table); $form->Show(); ?>