function Users_view($users, $order_by, $arrived_count, $active_count, $force_active_count, $freeloads_count, $tshirts_count, $voucher_count) { foreach ($users as &$user) { $user['Nick'] = User_Nick_render($user); $user['Gekommen'] = glyph_bool($user['Gekommen']); $user['Aktiv'] = glyph_bool($user['Aktiv']); $user['force_active'] = glyph_bool($user['force_active']); $user['lastLogIn'] = date(_('m/d/Y h:i a'), $user['lastLogIn']); $user['actions'] = table_buttons(array(button_glyph(page_link_to('admin_user') . '&id=' . $user['UID'], 'edit', 'btn-xs'))); } $users[] = array('Nick' => '<strong>' . _('Sum') . '</strong>', 'Gekommen' => $arrived_count, 'Aktiv' => $active_count, 'force_active' => $force_active_count, 'Tshirt' => $tshirts_count, 'actions' => '<strong>' . count($users) . '</strong>'); return page_with_title(_('All users'), array(msg(), buttons(array(button(page_link_to('register'), glyph('plus') . _('New user')))), table(array('Nick' => Users_table_header_link('Nick', _('Nick'), $order_by), 'Vorname' => Users_table_header_link('Vorname', _('First Name'), $order_by), 'Name' => Users_table_header_link('Name', _('Name'), $order_by), 'gender' => Users_table_header_link('gender', _('Gender'), $order_by), 'Handy' => Users_table_header_link('Mobile', _('Mobile'), $order_by), 'Telefon' => Users_table_header_link('Phone', _('Phone'), $order_by), 'Gekommen' => Users_table_header_link('Gekommen', _('Available'), $order_by), 'Aktiv' => Users_table_header_link('Aktiv', _('Active'), $order_by), 'force_active' => Users_table_header_link('force_active', _('Forced'), $order_by), 'kommentar' => Users_table_header_link('kommentar', _('Additional Info'), $order_by), 'lastLogIn' => Users_table_header_link('lastLogIn', _('Last login'), $order_by), 'actions' => ''), $users))); }
function Users_view($users, $order_by, $arrived_count, $active_count, $force_active_count, $freeloads_count, $tshirts_count, $voucher_count) { global $user; foreach ($users as &$user_item) { $user_item['Nick'] = User_Nick_render($user_item); $user_item['Gekommen'] = glyph_bool($user_item['Gekommen']); $user_item['got_voucher'] = $user_item['got_voucher']; $user_item['kiffel'] = glyph_bool($user_item['kiffel']); $user_item['Aktiv'] = glyph_bool($user_item['Aktiv']); $user_item['force_active'] = glyph_bool($user_item['force_active']); $user_item['Tshirt'] = glyph_bool($user_item['Tshirt']); $user_item['lastLogIn'] = date(_('m/d/Y h:i a'), $user_item['lastLogIn']); $user_item['actions'] = table_buttons(array(button_glyph(page_link_to('admin_user') . '&id=' . $user_item['UID'], 'edit', 'btn-xs'))); } $users[] = array('Nick' => '<strong>' . _('Sum') . '</strong>', 'Gekommen' => $arrived_count, 'got_voucher' => $voucher_count, 'Aktiv' => $active_count, 'force_active' => $force_active_count, 'freeloads' => $freeloads_count, 'Tshirt' => $tshirts_count, 'actions' => '<strong>' . count($users) . '</strong>'); return page_with_title(_('All users'), array(msg(), buttons(array(button(page_link_to('register'), glyph('plus') . _('New user')), button(page_link_to('admin_export_users') . "&type=csv&key=" . $user['api_key'], _('Export CSV')), button(page_link_to('admin_export_users') . "&type=mail&key=" . $user['api_key'], _('Export Mail')))), table(array('Nick' => Users_table_header_link('Nick', _('Nick'), $order_by), 'Vorname' => Users_table_header_link('Vorname', _('Prename'), $order_by), 'Name' => Users_table_header_link('Name', _('Name'), $order_by), 'Handy' => Users_table_header_link('Handy', _('Handy'), $order_by), 'Gekommen' => Users_table_header_link('Gekommen', _('Arrived'), $order_by), 'kiffel' => Users_table_header_link('kiffel', _('KIFfel'), $order_by), 'got_voucher' => Users_table_header_link('got_voucher', _('Voucher'), $order_by), 'freeloads' => _('Freeloads'), 'Aktiv' => Users_table_header_link('Aktiv', _('Active'), $order_by), 'force_active' => Users_table_header_link('force_active', _('Forced'), $order_by), 'Tshirt' => Users_table_header_link('Tshirt', _('T-Shirt'), $order_by), 'Size' => Users_table_header_link('Size', _('Size'), $order_by), 'lastLogIn' => Users_table_header_link('lastLogIn', _('Last login'), $order_by), 'actions' => ''), $users))); }