if ($timestamp_l != "" && $timestamp_h != "") $sql= "SELECT * FROM tworkunit, tworkunit_task WHERE tworkunit.id_user = '******' AND timestamp >= '$timestamp_l' AND timestamp <= '$timestamp_h' AND tworkunit_task.id_task = $id_task AND tworkunit_task.id_workunit = tworkunit.id ORDER BY timestamp DESC"; else $sql= "SELECT * FROM tworkunit, tworkunit_task WHERE tworkunit.id_user = '******' AND tworkunit_task.id_task = $id_task AND tworkunit_task.id_workunit = tworkunit.id ORDER BY timestamp DESC"; } } $sql = safe_output ($sql); $alldata = get_db_all_rows_sql ($sql); foreach ($alldata as $row){ if ($row["id"] != -1) show_workunit_user ($row['id'], 1, true, true, $id_user, $timestamp_h, $timestamp_l); else show_workunit_user ($row['id'], 0, true, true, $id_user, $timestamp_h, $timestamp_l); } echo '<div id="show_multiple_edit">'; echo '<h2>'.__('Massive operations over selected items').'</h2>'; $table = new StdClass; $table->class = 'search-table-button'; $table->width = '100%'; $table->data = array (); $table->colspan = array (); // Profile or role if (dame_admin ($config['id_user'])) { $table->data[0][0] = combo_roles (false, 'id_profile', __('Role'), true, true, '', true);
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) { foreach ($workunits as $workunit) { show_workunit_user ($workunit['id']); } } echo '<div id="show_multiple_edit">'; echo '<h4>'.__('Massive operations over selected items').'</h4>'; $table = new StdClass; $table->class = 'search-table-button'; $table->width = '100%'; $table->data = array (); $table->colspan = array (); // Profile or role if (dame_admin ($config['id_user'])) { $table->data[0][0] = combo_roles (false, 'id_profile', __('Role'), true, true, '', true);
if ($report_image) { echo " " . $report_image; } echo "<div id='button-bar-title'>"; echo "<ul>"; echo '<li>'; echo '<a href="index.php?sec=users&sec2=operation/user_report/report_annual&id_user='******'&year=' . $year . '">' . print_image("images/go-previous.png", true, array("title" => __("Back to incident"))) . "</a>"; echo '</li>'; echo "</ul>"; echo "</div>"; echo "</h1>"; if (empty($wus)) { echo '<h4>' . __('No data to show') . '</h4>'; } else { foreach ($wus as $workunit) { show_workunit_user($workunit['id'], 0, false); } //workunits_print_table_massive_edition(); echo '</div>'; } ?> <script type="text/javascript"> $(document).ready (function () { $(".lock_workunit").click (function () { var img = this; id = this.id.split ("-").pop (); values = Array (); values.push ({name: "page", value: "operation/users/user_spare_workunit"}); values.push ({name: "operation", value: "lock"});
} } else { if ($timestamp_l != "" && $timestamp_h != "") { $sql = "SELECT * FROM tworkunit, tworkunit_task WHERE tworkunit.id_user = '******' AND timestamp >= '{$timestamp_l}' AND timestamp <= '{$timestamp_h}' AND tworkunit_task.id_task = {$id_task} AND tworkunit_task.id_workunit = tworkunit.id ORDER BY timestamp DESC"; } else { $sql = "SELECT * FROM tworkunit, tworkunit_task WHERE tworkunit.id_user = '******' AND tworkunit_task.id_task = {$id_task} AND tworkunit_task.id_workunit = tworkunit.id ORDER BY timestamp DESC"; } } } $sql = safe_output($sql); $alldata = get_db_all_rows_sql($sql); foreach ($alldata as $row) { if ($row["id"] != -1) { show_workunit_user($row['id'], 1); } else { show_workunit_user($row['id']); } } echo '<div id="show_multiple_edit">'; echo '<br><h2>' . __('Massive operations over selected items') . '</h2>'; $table = new StdClass(); $table->class = 'search-table-button'; $table->width = '99%'; $table->data = array(); $table->colspan = array(); // Profile or role if (dame_admin($config['id_user'])) { $table->data[0][0] = combo_roles(false, 'id_profile', __('Role'), true, true, '', true); } else { $table->data[0][0] = combo_user_task_profile($id_task, 'id_profile', $id_profile, false, true, true); }