Start - End : %s - %s Priority : %s Estimated length (days) : %d Estimated cost : %s Current progress : %d %% Participants : %s Description ------------------------------------------------------------------------------------------------------ %s ------------------------------------------------------------------------------------------------------ ", $task["name"], $project_manager, $task["start"], $task["end"], get_priority_name($task["priority"]), $task_days, $task_cost, $task["completion"], $participants, $task["description"]); $section_title = __("Task report details"); $section_subtitle = $project_name . " >> " .$task["name"]; $t_menu = print_task_tabs(); print_title_with_menu ($section_title, $section_subtitle, "task_emailreport", 'projects', $t_menu, 'email'); echo "<form method=post action=''>"; echo "<table width=100% class=search-table-button>"; echo "<tr><td>"; print_input_text ('title', $title, '', 80, 175, false, __('Subject')); echo "<tr><td>"; print_textarea ('description', 15, 50, $description, '', false, __('Message text')); echo "<tr><td>"; echo '</table>'; $button = ''; echo '<div style="width:100%;">'; $table = new StdClass; $table->width = '100%'; $table->class = "button-form";
// Main project table if ($create_mode == 0){ // Print title and menu. $section_title = __('Project management'); $section_subtitle = get_db_value ("name", "tproject", "id", $id_project); $p_menu = false; $print_help = false; if (!$clean_output) { $print_help = "project_detail"; $p_menu = print_project_tabs('overview'); } print_title_with_menu ($section_title, $section_subtitle, $print_help, 'projects', $p_menu, 'overview'); } else { echo '<h2>'.__('Projects').'</h2>'; echo '<h4>'.__('Create project').'</h4>'; // Right/Left Tables $table = new stdClass; $table->width = '100%'; $table->class = "search-table-button"; $table->style[0] = 'width: 20%'; $table->style[1] = 'width: 20%'; $table->style[2] = 'width: 20%'; $table->style[3] = 'width: 20%'; $table->data = array (); $table->cellspacing = 4;
// Get our main stuff $id_project = get_parameter ("id_project", -1); $id_task = get_parameter ("id_task", -1); // ACL $task_permission = get_project_access ($config["id_user"], $id_project, $id_task, false, true); if (!$task_permission["manage"]) { audit_db($config["id_user"], $config["REMOTE_ADDR"], "ACL Violation", "Trying to access to task move without permission"); no_permission(); } $section_title = __('Move task to other project'); $name_task = get_db_value ("name", "ttask", "id", $id_task); $section_subtitle = __('Task'). ": " . $name_task; $t_menu = print_task_tabs(); print_title_with_menu ($section_title, $section_subtitle, "task_move", 'projects', $t_menu, 'move'); //TASK MOVE Operation echo "<div class='divform'>"; echo "<form name='project_move' method='POST' action='index.php?sec=projects&sec2=operation/projects/task&operation=move&id_project=$id_project&id_task=$id_task'>"; echo '<table width="20%" class="search-table" >'; // Project combo echo '<tr><td class="datos"><b>'.__('Destination project').'</b>'; combo_projects_user ($config["id_user"], 'target_project'); echo '<tr></td><td class="datos">'; echo '<input type="submit" class="sub create" name="accion" value="'.__('Move').'" border="0">'; echo "</td></tr></table></form>"; echo "</div>";
echo __('Description'); if ($task_access["write"]) { echo "<th>"; echo __('Delete'); } } // Whole project if ($id_task == -1) { $sql = "SELECT tattachment.id_attachment, tattachment.size, tattachment.description, tattachment.filename, tattachment.id_usuario, ttask.name, ttask.id as task_id FROM tattachment, ttask WHERE ttask.id_project = $id_project AND ttask.id = tattachment.id_task"; $section_title = __('Attached files'); $section_subtitle = __('Project')." - ".$project_name; $p_menu = print_project_tabs(); print_title_with_menu ($section_title, $section_subtitle, false, 'projects', $p_menu, 'files'); echo "<table cellpadding=4 cellspacing=4 border='0' width=95% class='listing'>"; echo "<tr><th>"; echo __('Task'); echo "<th>"; echo __('Filename'); echo "<th>"; echo __('Timestamp'); echo "<th>"; echo __('User'); echo "<th>"; echo __('Size'); echo "<th>"; echo __('Description'); echo "<th>";
$id = (int) get_parameter ('id_project'); $project = get_db_row ('tproject', 'id', $id); $project_access = get_project_access ($config['id_user'], $project['id']); // ACL - To see the project, you should have read access if ($project === false || ! $project_access['read']) { // Doesn't have access to this page audit_db ($config['id_user'], $config["REMOTE_ADDR"], "ACL Violation", "Trying to access project ".$id); no_permission(); } // Print title and menu. $section_title = __('Project tracking'); $section_subtitle = __("Project:")." ".$project['name']; $p_menu = print_project_tabs(); print_title_with_menu ($section_title, $section_subtitle, "project_tracking", 'projects', $p_menu, 'tracking'); $trackings = get_db_all_rows_field_filter ('tproject_track', 'id_project', $id); if ($trackings !== false) { $table = new stdClass; $table->width = "100%"; $table->class = 'listing'; $table->data = array (); $table->head = array (); $table->head[1] = __('Description'); $table->head[2] = __('User'); $table->head[3] = __('Date'); foreach ($trackings as $tracking) {
} else { $sql = sprintf ('SELECT tworkunit.id FROM tworkunit, tworkunit_task, ttask WHERE tworkunit_task.id_task = ttask.id AND ttask.id_project = %d '. $sql_filter .' AND id_user = "******"id_user"].'" AND tworkunit_task.id_workunit = tworkunit.id ORDER BY tworkunit.timestamp DESC', $id_project); } if (!$pure) { $section_title = __('Workunit resume'); $section_subtitle = $project_name.' - ' . __('All tasks'); $p_menu = print_project_tabs('workunits'); print_title_with_menu ($section_title, $section_subtitle, "task_workunit", 'projects', $p_menu, 'workunits'); } else { echo '<h2>'.__('Workunit resume') . "</h2>"; echo '<h4>' . $project_name.' - ' . __('All tasks'); echo integria_help ("task_workunit", true); echo '<ul class="ui-tabs-nav"><li class="ui-tabs">'; echo "<a href='index.php?sec=projects&sec2=operation/projects/task_workunit&id_project=$id_project&pure=0' title='".__("Back to view")."'><img src='images/go-previous.png'></a>"; echo '</li>'; echo '</ul>'; echo '</h4>'; } } $workunits = get_db_all_rows_sql ($sql); if ($workunits) {
echo ui_print_success_message (__('Successfully created'), '', true, 'h3', true); } else { echo ui_print_error_message (__('There was a problem creating adding the cost'), '', true, 'h3', true); } $operation = "list"; } // Show form to create a new cost if ($operation == "list"){ $section_title = __('Cost unit listing'); $section_subtitle = __('Task') .": ".$task_name; $t_menu = print_task_tabs(); print_title_with_menu ($section_title, $section_subtitle, false, 'projects', $t_menu, 'costs'); echo "<h4>".__("Total cost for this task")."</h4>"; echo "<div id='' class='divform'>"; echo "<form method='POST' action='index.php?sec=projects&sec2=operation/projects/task_cost&id_task=$id_task&id_project=$id_project' enctype='multipart/form-data' >"; //~ $action = "index.php?sec=projects&sec2=operation/projects/task_cost&id_task=$id_task&id_project=$id_project"; $table = new StdClass(); $table->id = 'cost_form'; $table->width = '100%'; $table->class = 'search-table'; if(!isset($bill_id)){ $bill_id = ''; } $table->data[0][0] = "<b>" . __('Bill ID') . "</b>";
} else { no_permission (); } } // MAIN LIST OF TASKS $search_text = (string) get_parameter ('search_text', ''); if (!$pure) { // Print title and menu. $section_title = __('Task management'); $section_subtitle = $project['name']; $p_menu = print_project_tabs('task_list'); print_title_with_menu ($section_title, $section_subtitle, "task", 'projects', $p_menu, 'task_list'); } else { echo '<h2>'.__('Task management').'</h2>'; echo '<h4>'.$project['name']; echo "<div id='button-bar-title'>"; echo "<ul>"; echo '<li class="ui-tabs">'; echo "<a href='index.php?sec=projects&sec2=operation/projects/task&id_project=$id_project'>".print_image ("images/flecha_volver.png", true, array("title" => __("Back to task list")))."</a>"; echo '</li>'; echo "</ul>"; echo "</div>"; echo '</h4>'; }
echo "</div>"; } echo '</form>'; } // ------------------------- // Milestone view // ------------------------- if ($operation == ""){ $section_title = __('Milestones'); $section_subtitle = __('Management'); $p_menu = print_project_tabs(); print_title_with_menu ($section_title, $section_subtitle, "milestones", 'projects', $p_menu, 'milestones'); echo "<div class='divresult' >"; echo "<table class='listing' width=100%>"; echo "<th>".__('Milestone'); echo "<th>".__('Description'); echo "<th>".__('Timestamp'); if ($project_access['write']) { echo "<th>".__("OP"); } $color=1; if(!isset($tdcolor)){ $tdcolor =""; } $sql1="SELECT * FROM tmilestone WHERE id_project = $id_project"; if ($result=mysql_query($sql1))
// --------------------- echo $result_output; // MAIN PROJECT PEOPLE LIST if ($id_task == -1){ $section_title = __('Project people management'); $section_subtitle = get_db_value('name', 'tproject','id',$id_project); $p_menu = print_project_tabs(); print_title_with_menu ($section_title, $section_subtitle, "people_manager", 'projects', $p_menu, 'people'); } else { $section_title = __('Task human resources management'); $section_subtitle = get_db_value('name', 'ttask','id',$id_task); $t_menu = print_task_tabs(); print_title_with_menu ($section_title, $section_subtitle, "people_manager", 'projects', $t_menu, 'people'); } // Role / task assigment // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Only project owner or Project ADMIN could modify echo "<div class='divform'>"; if ($id_task != -1){ // Task people manager editor // =============================== $table = new StdClass; $table->width = '100%'; $table->class = 'search-table'; $table->id = "project_people"; $table->size = array ();
$clean_output = get_parameter ("clean_output", 0); $project_access = get_project_access ($config['id_user'], $id_project); // ACL - To see the project, you should have read access if ($id_project != -1 && !$project_access['read']) { audit_db($id_user, $config["REMOTE_ADDR"], "ACL Violation","Trying to access to the gant graph of the project $project_name"); no_permission(); } if (!$clean_output) { // Print title and menu. $section_title = __('Gantt graph'); $section_subtitle = __("Project:") . " " .$project_name; $p_menu = print_project_tabs('gantt'); print_title_with_menu ($section_title, $section_subtitle, 'gantt', 'projects', $p_menu, 'gantt'); } else { echo "<h2>".__('Gantt graph'). "</h2><h4>" . __("Project:") . " " .$project_name; echo"</h4>"; } $scales = array ("month" => __("Month"), "week" => __("Week"), "day" => __("Day")); $op_actual = array(0 => __("No"), 1 => __("Yes")); echo '<div id="msg_box"></div>'; echo "<form id='gantt_form' method='post'>"; echo "<table class='gantt_buttons'>"; echo "<tr>"; echo "<td>"; echo __("Show real planning").": ";
echo ui_print_error_message (__('The task could not be created'), '', true, 'h3', true); } } } echo ui_print_success_message (__('Project created successfully'), '', true, 'h3', true); } } $project_name = get_db_value ("name", "tproject", "id", $id_project); // Print title and menu. $section_title = __('Project management'); $section_subtitle =__("Task planning")." » $project_name"; $p_menu = print_project_tabs(); print_title_with_menu ($section_title, $section_subtitle, "task_planning", 'projects', $p_menu, 'task_plan'); //Calculate task summary stats! //Draw task status statistics by hand! $sql = sprintf("SELECT id, completion FROM ttask WHERE id_project = %d", $id_project); $res = process_sql($sql); if (empty($res)) { $res = array(); } $verified = 0; $completed = 0; $in_process = 0; $pending = 0;
$end_date = get_parameter('end_date', strftime("%F",strtotime("now"))); // ACL $project_access = get_project_access ($id_user, $id_project); if (! $project_access["read"]) { // Doesn't have access to this page audit_db ($id_user, $config["REMOTE_ADDR"], "ACL Violation", "Trying to access to project graph page"); no_permission (); } // Print title and menu. $section_title = __('Project management'); $section_subtitle =__('Time graph'); $p_menu = print_project_tabs(); print_title_with_menu ($section_title, $section_subtitle, "projects_timegraph", 'projects', $p_menu, 'time'); if ($id_project) { echo "<div class='divform'>"; echo "<form id='form-time_graph' action='index.php?sec=projects&sec2=operation/projects/project_timegraph&id_project=" . $id_project . "' method='post'>"; echo '<table class="search-table">'; echo '<tr><td><b>'.__('User ').' </b>'; $params = array(); $params['input_value'] = $id_user_filter; $params['input_id'] = 'text-user'; $params['input_name'] = 'user'; $params['return'] = false; $params['return_help'] = false; user_print_autocomplete_input($params);
$task_name = get_db_value ('name', 'ttask', 'id', $id_task); else $task_name = ''; if (!$gantt_editor) { $section_title = __('Task management'); if ($operation == "create") { // Print project menu on creation time. $section_subtitle = __("Create task"); $p_menu = print_project_tabs(); print_title_with_menu ($section_title, $section_subtitle, "create_task", 'projects', $p_menu, 'task_new'); } else { $section_subtitle = $task_name; $t_menu = print_task_tabs('', $id_task); print_title_with_menu ($section_title, $section_subtitle, "create_task", 'projects', $t_menu, 'detail'); } } else { echo "<div id='button-bar-title' style='margin-top: 5px; margin-bottom: 9px;'>"; echo "<ul>"; echo "<li>"; echo "<a onclick='toggle_editor_gantt($id_project, $id_task, \"stats\")'>". print_image ("images/chart_bar_dark.png", true, array("title" => __("Statistics"))) . "</a>"; echo "</li>"; echo "</ul>"; echo "</div>"; } echo '<form id="form-new_project" method="post" action="index.php?sec=projects&sec2=operation/projects/task_detail">';