Exemplo n.º 1
0
	$new = false;
	
	$project_permission = get_project_access ($config['id_user'], $project['id']);
	if (!$project_permission['read']) {
		continue;
	}
	$data = array ();
	
	// Project name
	$data[0] = '<a href="index.php?sec=projects&sec2=operation/projects/project_detail&id_project='.$project['id'].'">'.$project['name'].'</a>';
	$data[1] = $project["id_owner"];

	if ($project["start"] == $project["end"]) {
		$data[2] = __('Unlimited');
	} else {
		$completion = format_numeric (calculate_project_progress ($project['id']));
		$data[2] = progress_bar($completion, 90, 20);
	}

	// Last update time
	$sql = sprintf ('SELECT tworkunit.timestamp
		FROM ttask, tworkunit_task, tworkunit
		WHERE ttask.id_project = %d
		AND ttask.id = tworkunit_task.id_task
		AND tworkunit_task.id_workunit = tworkunit.id
		ORDER BY tworkunit.timestamp DESC LIMIT 1',
		$project['id']);
	$timestamp = get_db_sql ($sql);
	if ($timestamp != "")
		$data[3] = "<span style='font-size: 10px'>".human_time_comparation ($timestamp)."</span>";
	else
Exemplo n.º 2
0
$table->size[1] = '50%';
$table->style = array();
$table->data = array();
$table->style[0] = "vertical-align: top;";
$table->style[1] = "vertical-align: top";
// Project info
$project_info = '<table class="search-table-button" style="margin-top: 0px;">';
// Name
$project_info .= '<tr><td class="datos" colspan=3><b>' . __('Name') . ' </b><br>';
$project_info .= $name;
$project_info .= '<td colspan=1>';
//Only show project progress if there is a project created
if ($id_project) {
    $project_info .= '<b>' . __('Current progress') . ' </b><br>';
    $project_info .= '<span style="vertical-align:bottom">';
    $completion = format_numeric(calculate_project_progress($id_project));
    $project_info .= progress_bar($completion, 90, 20, $graph_ttl);
    $project_info .= "</span>";
}
$project_info .= "</td>";
$project_info .= "</tr>";
// start and end date
$project_info .= '<tr><td width="25%"><b>' . __('Start') . ' </b><br>';
$project_info .= $start_date;
$project_info .= '<td width="25%"><b>' . __('End') . ' </b><br>';
$project_info .= $end_date;
$id_owner = get_db_value('id_owner', 'tproject', 'id', $id_project);
$project_info .= '<td width="25%">';
$project_info .= "<b>" . __('Project manager') . " </b><br>";
$project_info .= get_db_value("nombre_real", "tusuario", "id_usuario", $owner);
$project_info .= '<td width="25%"><b>';