array(T_ZBX_STR, O_MAND,P_SYS, NOT_EMPTY, NULL), "list_name"=> array(T_ZBX_STR, O_MAND,P_SYS, NOT_EMPTY, NULL), "var_name"=> array(T_ZBX_STR, O_MAND,P_SYS, NOT_EMPTY, NULL) ); check_fields($fields); $dstfrm = get_request("dstfrm", 0); // destination form $list_name = get_request("list_name", 0); // output field on destination form $var_name = get_request("var_name", 0); // second output field on destination form ?> SetHeader(array(S_NAME, S_NAME, S_SURNAME, S_TYPE)); $result = DBselect("select * from users where ".DBid2nodeid('userid')."=$ZBX_CURNODEID order by name"); while($row = DBfetch($result)) { $name = new CLink($row["alias"],"#","action"); $name->SetAction('return add_user("'.$dstfrm.'",'.$row['userid'].',"'.$row['alias'].'");'); $table->addRow(array($name, $row['name'], $row['surname'], user_type2str($row['type']))); } $table->show(); ?>