} } icms_cp_header(); icms_adminMenu(11, _AM_SPROFILE_FINDUSER); $objectTable = new icms_ipf_view_Table($profile_smartuser_handler, $criteria, array()); $objectTable->addWithSelectedActions(array('export_sel' => _CO_ICMS_EXPORT)); $objectTable->setTableId('profile_users'); $objectTable->addColumn(new icms_ipf_view_Column('uname', 'center', 100, 'getUserLink', false, _AM_SPROFILE_UNAME)); $objectTable->addColumn(new icms_ipf_view_Column('email', 'center', 100, 'getUserEail', false, _AM_SPROFILE_EMAIL)); foreach ($fields as $key => $custom_field) { if (!in_array($key, $hidden_fields_results)) { $objectTable->addColumn(new icms_ipf_view_Column($key, 'center', 100, false, false, $custom_field->getVar('field_title'))); } } $objectTable->addActionButton('export', _SUBMIT, _AM_SPROFILE_EXPORT_ALL); $objectTable->renderD(); unset($criteria); break; case 'with_selected_actions': if ($_POST["selected_action"] == 'export_sel') { $criteria = new icms_db_criteria_Compo(); $criteria->add(new icms_db_criteria_Item('uid', '(' . implode(', ', $_POST['selected_icms_persistableobjects']) . ')', 'IN')); $fields = $profile_smartuser_handler->getFields(); $export_fields = array(); foreach ($custom_fields as $key => $custom_field) { if ($custom_field->getVar('exportable') == '1') { $export_fields[] = $key; } } $icms_export = new icms_ipf_export_Handler($profile_smartuser_handler, $criteria, $export_fields); $icms_export->render(time() . '_users.csv');