"><img src="<?php echo w2PfindImage('next.gif'); ?> " width="16" height="16" alt="next" border="0"></a> </td> </tr> </table> <?php $html = ' <form action="' . $_SERVER['REQUEST_URI'] . '" method="post" name="pickFilter" accept-charset="utf-8">'; $html .= $AppUI->_('Event Filter') . ':' . arraySelect($event_filter_list, 'event_filter', 'onChange="document.pickFilter.submit()" class="text"', $event_filter, true); if ($other_users) { $html .= $AppUI->_('Show Events for') . ':' . '<select name="show_user_events" onchange="document.pickFilter.submit()" class="text">'; if ($rows = w2PgetUsersList()) { foreach ($rows as $row) { if ($user_id == $row['user_id']) { $html .= '<option value="' . $row['user_id'] . '" selected="selected">' . $row['contact_first_name'] . ' ' . $row['contact_last_name']; } else { $html .= '<option value="' . $row['user_id'] . '">' . $row['contact_first_name'] . ' ' . $row['contact_last_name']; } } } $html .= '</select>'; } $w2p_base_url = W2P_BASE_URL; require_once W2P_BASE_DIR . '/modules/events/links_events.php'; //<script type='text/javascript' src='../jquery/jquery-1.8.1.min.js'></script> $html .= '</form>'; $html .= '<br>';
?> " alt="<?php echo $AppUI->_('Calendar'); ?> " /> </a> </td> <td nowrap="nowrap"> <select name="log_userfilter" class="text" style="width: 200px"> <?php if ($log_userfilter == 0) { echo '<option value="0" selected="selected">' . $AppUI->_('All users'); } else { echo '<option value="0">All users'; } if ($log_userfilter_users = w2PgetUsersList()) { foreach ($log_userfilter_users as $row) { $selected = ''; if ($log_userfilter == $row['user_id']) { $selected = ' selected="selected"'; } echo '<option value="' . $row['user_id'] . '"' . $selected . '>' . $row['contact_first_name'] . ' ' . $row['contact_last_name']; } } ?> </select> </td> <td nowrap="nowrap" rowspan="2"> <table> <tr><td>
<?php /* $Id$ $URL$ */ if (!defined('W2P_BASE_DIR')) { die('You should not access this file directly.'); } global $w2Pconfig, $canEdit, $stub, $where, $orderby; $users = w2PgetUsersList($stub, $where, $orderby); $canLogin = true; require W2P_BASE_DIR . '/modules/admin/vw_usr.php';
public function getPermittedUsers($module = null) { // Not as pretty as I'd like, but we can do it reasonably well. // Check to see if we are allowed to see other users. // If not we can only see ourselves. global $AppUI; $rows = w2PgetUsersList(); foreach ($rows as $row) { if ($this->isUserPermitted($row['user_id'], $module) || $row['user_id'] == $AppUI->user_id) { $userlist[$row['user_id']] = $row['contact_name']; } } // Now format the userlist as an assoc array. return $userlist; }
}); }); }); </script> <table width="100%" border="0" cellpadding="2" cellspacing="1" class="tbl"> <tr> <td> <?php if (canEdit('admin')) { ?> <form id="editholidayuser" name="editholidayuser" method="post" accept-charset="utf-8"> <div id="holiday-user"> <select name="user_id" onChange="this.form.submit();" class="text"> <option value="0"></option> <?php $users = w2PgetUsersList(); foreach ($users as $id => $user) { $selected = $user['user_id'] == $user_id ? ' selected="selected"' : ''; echo '<option value="' . $user['user_id'] . '"' . $selected . '>' . $user['contact_first_name'] . ' ' . $user['contact_last_name'] . '</option>'; } ?> </select> <a href="?m=holiday&user_id=<?php echo $AppUI->user_id; ?> "><?php echo '[' . $AppUI->_('My vacations/holidays') . ']'; ?> </a> </div> </form>