Example #1
0
		$table->width = '100%';
		$table->class = 'listing';
		$table->data = array ();
		$table->size = array ();
		$table->style = array ();
		$table->head[0] = __('Full name');
		$table->head[1] = __('Full report');
		$table->head[2] = __('Monthly report');
		$table->head[3] = __('Assigned WO\'s');
		$table->head[4] = __('Assigned tickets');	
		foreach ($users as $user) {

			$data = array ();

			// CHECK ACK !!
			if (user_visible_for_me ($config["id_user"], $user["id_usuario"], "")){
				$data[0] = "<a href='index.php?sec=users&sec2=godmode/usuarios/configurar_usuarios&update_user="******"id_usuario"]."'>".$user["nombre_real"]." ( ". $user["id_usuario"]." ) "."</a>";

				$data[1] = "<a href='index.php?sec=users&sec2=operation/user_report/report_full&only_projects=1&wu_reporter=".$user["id_usuario"]."'>". "<img title='".__("Full report")."' src='images/page_white_stack.png'>" . "</a>";

				$data[2] = "<a href='index.php?sec=users&sec2=operation/user_report/monthly&id=".$user["id_usuario"]."'><img src='images/clock.png'></a>";
				$data[3] = "<a href='index.php?sec=projects&sec2=operation/workorders/wo&owner=".$user["id_usuario"]."'><img src='images/paste_plain.png'></a>";
				$data[4] = "<a href='index.php?sec=incidents&sec2=operation/incidents/incident_search&search_id_user="******"id_usuario"]."'><img src='images/incident.png'></a>";
				array_push ($table->data, $data);
			}
		}
		print_table ($table);
	}
}

// KB
Example #2
0
// GNU General Public License for more details.

// Load global vars
global $config;

check_login ();

$id_user = (string) get_parameter ('id');

$user = get_db_row ('tusuario', 'id_usuario', $id_user);
if ($user === false) {
	no_permission ();
	return;
}

if (! user_visible_for_me ($config["id_user"], $id_user)) {
	audit_db ($config["id_user"], $config["REMOTE_ADDR"], "ACL Forbidden", "User ".$config["id_user"]." tried to access to user detail of '$id_user'");
	no_permission ();
}

echo '<h2>'.__('User details').'</h2>';
echo '<h4>'.$id_user.'</h4>';

$upload_avatar = (bool) get_parameter ('upload_avatar');
$update_user = (bool) get_parameter ('update_user');

$has_permission = false;
if ($id_user == $config['id_user']) {
	$has_permission = true;
} else {
	$groups = get_user_groups ($id_user);
Example #3
0
echo "<form method='post' action='index.php?sec=users&sec2=operation/user_report/report_weekly'>";
working_weeks_combo();
echo "</td><td>";
echo "<input type=submit class='next' value='" . __('Update') . "'>";
echo "</form>";
echo "</table>";
echo '<table width="90%" class="listing">';
echo "<th>" . __('User ID');
echo "<th>" . __('Workunit report');
echo "<th>" . __('Graph overview');
echo "<th>" . __('Total hours');
$sql0 = "SELECT * FROM tusuario";
if ($res0 = mysql_query($sql0)) {
    while ($row0 = mysql_fetch_array($res0)) {
        // Can current user have access to this user ?
        if (user_visible_for_me($config["id_user"], $row0["id_usuario"], "IM") == 1 or user_visible_for_me($config["id_user"], $row0["id_usuario"], "PM") == 1) {
            $nombre = $row0["id_usuario"];
            $avatar = $row0["avatar"];
            $sql = "SELECT SUM(duration) FROM tworkunit WHERE timestamp > '{$begin_week}' AND timestamp < '{$end_week}' AND id_user = '******'";
            if ($res = mysql_query($sql)) {
                $row = mysql_fetch_array($res);
            }
            echo "<tr><td>";
            echo "<img src='images/avatars/" . $avatar . ".png' class='avatar_small'> ";
            if ($config["enteprise"] == 1) {
                $sql1 = 'SELECT * FROM tusuario_perfil WHERE id_usuario = "' . $nombre . '"';
                $result1 = mysql_query($sql1);
                echo "<a href='#' class='tip'>&nbsp;<span>";
                if (mysql_num_rows($result1)) {
                    while ($row1 = mysql_fetch_array($result1)) {
                        echo dame_perfil($row1["id_perfil"]) . "/ ";