function displayTask($list, $task, $level, $display_week_hours, $fromPeriod, $toPeriod, $user_id) { global $AppUI, $df, $durnTypes, $log_userfilter_users, $now, $priority, $system_users; global $z, $zi, $x, $userAlloc; $zi++; $users = $task->task_assigned_users; $task->userPriority = $task->getUserSpecificTaskPriority($user_id); $projects = $task->getProject(); $tmp = '<tr>'; $tmp .= '<td align="center" nowrap="nowrap">'; $tmp .= '<input type="checkbox" name="selected_task[' . $task->task_id . ']" value="' . $task->task_id . '" />'; $tmp .= '</td>'; $tmp .= '<td align="center" nowrap="nowrap">'; if ($task->userPriority) { $tmp .= '<img src="./images/icons/priority'; $tmp .= $task->userPriority < 0 ? '-' . -$task->userPriority : '+' . $task->userPriority; $tmp .= '.gif" width="13" height="16" alt="" />'; } $tmp .= '</td>'; $tmp .= '<td nowrap="nowrap">'; for ($i = 0; $i < $level; $i++) { $tmp .= ' '; } if ($task->task_milestone == true) { $tmp .= '<strong>'; } if ($level >= 1) { $tmp .= dPshowImage(dPfindImage('corner-dots.gif', 'tasks'), 16, 12, 'Subtask') . " "; } $tmp .= '<a href="?m=tasks&a=view&task_id=' . $task->task_id . '">' . $task->task_name . '</a>'; if ($task->task_milestone == true) { $tmp .= '</strong>'; } if ($task->task_priority) { $tmp .= ' (<img src="./images/icons/priority'; $tmp .= $task->task_priority < 0 ? '-' . -$task->task_priority : '+' . $task->task_priority; $tmp .= '.gif" width="13" height="16" alt="" />)'; } $tmp .= '</td>'; $tmp .= '<td align="center">'; $tmp .= '<a href="?m=projects&a=view&project_id=' . $task->task_project . '" style="background-color:#' . @$projects['project_color_identifier'] . '; color:' . bestColor(@$projects['project_color_identifier']) . '">' . $projects['project_short_name'] . '</a>'; $tmp .= '</td>'; $tmp .= '<td align="center" nowrap="nowrap">'; $tmp .= $task->task_duration . ' ' . $AppUI->_($durnTypes[$task->task_duration_type]); $tmp .= '</td>'; $tmp .= '<td align="center" nowrap="nowrap">'; $dt = new CDate($task->task_start_date); $tmp .= $dt->format($df); $tmp .= ' </td>'; $tmp .= '<td align="center" nowrap="nowrap">'; $ed = new CDate($task->task_end_date); $dt = $now->dateDiff($ed); $sgn = $now->compare($ed, $now); $tmp .= $dt * $sgn; $tmp .= '</td>'; if ($display_week_hours) { $tmp .= displayWeeks($list, $task, $level, $fromPeriod, $toPeriod); } $tmp .= '<td>'; $sep = $us = ''; foreach ($users as $row) { if ($row['user_id']) { $us .= $sep . '<a href="?m=admin&a=viewuser&user_id=' . $row[0] . '">' . $row['contact_first_name'] . ' ' . $row['contact_last_name'] . ' (' . $row['perc_assignment'] . '%)</a>'; $sep = ', '; } } $tmp .= $us; $tmp .= '</td>'; // create the list of possible assignees if ($zi == 1) { // selectbox may not have a size smaller than 2, use 5 here as minimum $zz = $z < 5 ? 5 : $z * 1.5; $zz = sizeof($users) >= 7 ? $zz * 2 : $zz; $zm1 = $z - 2; $zm1 = $zm1 <= 0 ? 1 : $zm1; $assUser = $userAlloc[$user_id]['userFC']; // need to handle orphaned tasks different from tasks with existing assignees $zm1 += $user_id == 0 ? 1 : 0; $tmp .= '<td valign="top" align="center" nowrap="nowrap" rowspan="' . $zm1 . '">'; $tmp .= '<select name="add_users" style="width:200px" size="' . ($zz - 1) . '" class="text" multiple="multiple" ondblclick="javascript:chAssignment(' . $user_id . ', 0, false)">'; foreach ($userAlloc as $v => $u) { $tmp .= "\n\t" . '<option value="' . $u['user_id'] . '">' . dPformSafe($u['userFC']) . '</option>'; } $tmp .= '</select>'; /* $tmp .= arraySelect($user_list, 'add_users', 'class="text" style="width: 200px" size="' . ($zz - 1) . '" multiple="multiple"', NULL); */ $tmp .= '</td>'; } $tmp .= "</tr>\n"; return $tmp; }
function displayTask($list, $task, $level, $display_week_hours, $fromPeriod, $toPeriod, $user_id) { global $AppUI, $df, $durnTypes, $log_userfilter_users, $now, $priority, $active_users, $z, $zi, $x, $userAlloc, $projects; //if the user has no permission to the project don't show the tasks if (!key_exists($task->task_project, $projects)) { return; } $zi++; $users = $task->task_assigned_users; $task->userPriority = $task->getUserSpecificTaskPriority($user_id); $project = $task->getProject(); $tmp = '<tr>'; $tmp .= '<td align="center" nowrap="nowrap">'; $tmp .= '<input type="checkbox" name="selected_task[' . $task->task_id . ']" value="' . $task->task_id . '" />'; $tmp .= '</td>'; $tmp .= '<td align="center" nowrap="nowrap">'; if ($task->userPriority < 0) { $tmp .= '<img src="' . w2PfindImage('icons/priority-' . -$task->userPriority . '.gif') . '" width="13" height="16" alt="">'; } elseif ($task->userPriority > 0) { $tmp .= '<img src="' . w2PfindImage('icons/priority+' . $task->userPriority . '.gif') . '" width="13" height="16" alt="">'; } $tmp .= '</td>'; $tmp .= '<td>'; for ($i = 0; $i < $level; $i++) { $tmp .= ' '; } if ($task->task_milestone == true) { $tmp .= '<b>'; } if ($level >= 1) { $tmp .= w2PshowImage('corner-dots.gif', 16, 12, 'Subtask', '', 'tasks') . ' '; } $tmp .= '<a href="?m=tasks&a=view&task_id=' . $task->task_id . '">' . $task->task_name . '</a>'; if ($task->task_milestone == true) { $tmp .= '</b>'; } if ($task->task_priority < 0) { $tmp .= ' (<img src="' . w2PfindImage('icons/priority-' . -$task->task_priority . '.gif') . '" width="13" height="16" alt="" />)'; } elseif ($task->task_priority > 0) { $tmp .= ' (<img src="' . w2PfindImage('icons/priority+' . $task->task_priority . '.gif') . '" width="13" height="16" alt="" />)'; } $tmp .= '</td>'; $tmp .= '<td align="left">'; $tmp .= '<a href="?m=projects&a=view&project_id=' . $task->task_project . '" style="background-color:#' . $project['project_color_identifier'] . '; color:' . bestColor($project['project_color_identifier']) . '">' . $project['project_name'] . '</a>'; $tmp .= '</td>'; $tmp .= '<td align="right" nowrap="nowrap">'; $tmp .= $task->task_duration . ' ' . mb_substr($AppUI->_($durnTypes[$task->task_duration_type]), 0, 1); $tmp .= '</td>'; $tmp .= '<td align="center" nowrap="nowrap">'; $dt = new w2p_Utilities_Date($AppUI->formatTZAwareTime($task->task_start_date, '%Y-%m-%d %T')); $tmp .= $dt->format($df); $tmp .= '   </td>'; $tmp .= '<td align="right" nowrap="nowrap">'; $ed = new w2p_Utilities_Date($AppUI->formatTZAwareTime($task->task_end_date, '%Y-%m-%d %T')); $dt = $now->dateDiff($ed); $sgn = $now->compare($ed, $now); $tmp .= $dt * $sgn; $tmp .= '</td>'; if ($display_week_hours) { $tmp .= displayWeeks($list, $task, $level, $fromPeriod, $toPeriod); } $tmp .= '<td>'; $sep = $us = ''; foreach ($users as $key => $row) { if ($row['user_id']) { $us .= '<a href="?m=admin&a=viewuser&user_id=' . $row[0] . '">' . $sep . $row['contact_first_name'] . ' ' . $row['contact_last_name'] . ' (' . $row['perc_assignment'] . '%)</a>'; $sep = ', '; } } $tmp .= $us; $tmp .= '</td>'; // create the list of possible assignees $size = count($active_users) > 5 ? 5 : 3; $tmp .= '<td valign="top" align="center" nowrap="nowrap">'; $tmp .= '<select name="add_users" style="width:200px" size="' . $size . '" class="text" multiple="multiple" ondblclick="javascript:chAssignment(' . $user_id . ', 0, false)">'; foreach ($active_users as $id => $name) { $tmp .= '<option value="' . $id . '">' . $name . '</option>'; } $tmp .= '</select>'; $tmp .= '</td>'; $tmp .= '</tr>'; return $tmp; }
function displayTask($list, $task, $level, $display_week_hours, $fromPeriod, $toPeriod, $log_all_projects = false) { global $df; $tmp = "\t\t<tr>\n\t\t\t" . '<td nowrap="nowrap"> '; for ($i = 0; $i < $level; $i++) { $tmp .= ' '; } switch ($level) { case 0: $tmp .= '<b>' . $task->task_name . '</b>'; break; case 1: $tmp .= '<i>' . $task->task_name . '</i>'; break; default: $tmp .= $task->task_name; break; } $tmp .= "</td>\n"; if ($log_all_projects) { //Show project name when we are logging all projects $project = $task->getProject(); $tmp .= "\t\t\t" . '<td nowrap="nowrap">' . $project['project_name'] . "</td>\n"; } $dt = new CDate($task->task_start_date); $tmp .= "\t\t\t" . '<td nowrap="nowrap">' . $dt->format($df) . "</td>\n"; $dt = new CDate($task->task_end_date); $tmp .= "\t\t\t" . '<td nowrap="nowrap">' . $dt->format($df) . "</td>\n"; if ($display_week_hours) { $tmp .= displayWeeks($list, $task, $level, $fromPeriod, $toPeriod); } $tmp .= "\t\t</tr>\n"; return $tmp; }
function displayTask($list, $task, $level, $display_week_hours, $fromPeriod, $toPeriod, $user_id, $canEditINA) { global $AppUI, $df, $durnTypes, $log_userfilter_users, $priority, $system_users, $z, $zi, $x, $userAlloc; $zi++; $users = $task->task_assigned_users; $task->userPriority = $task->getUserSpecificTaskPriority($user_id); $projects = $task->getProject(); $tmp = "<tr>"; $tmp .= "<td align=\"center\" nowrap=\"nowrap\">"; $tmp .= "<input type=\"checkbox\" name=\"selected_task[{$task->task_id}]\" value=\"{$task->task_id}\"/>"; $tmp .= "</td>"; /*ina */ $tmp .= "<td>"; for ($i = 0; $i < $level; $i++) { $tmp .= " "; } if ($task->task_milestone == true) { $tmp .= "<B>"; } if ($level >= 1) { $tmp .= dPshowImage(dPfindImage('corner-dots.gif', 'tasks'), 16, 12, 'Subtask') . " "; } $tmp .= "<a href='?m=tasks&a=view&task_id={$task->task_id}'>" . $task->task_name . "</a>"; if ($task->task_milestone == true) { $tmp .= "</B>"; } if ($task->task_priority < 0) { $tmp .= " (<img src=\"./images/icons/priority-" . -$task->task_priority . ".gif\" width=13 height=16>)"; } elseif ($task->task_priority > 0) { $tmp .= " (<img src=\"./images/icons/priority+" . $task->task_priority . ".gif\" width=13 height=16>)"; } $tmp .= "</td>"; $tmp .= "<td align=\"center\">"; $tmp .= "<a href='?m=projects&a=view&project_id={$task->task_project}' style='background-color:#" . @$projects["project_color_identifier"] . "; color:" . bestColor(@$projects['project_color_identifier']) . "'>" . $projects['project_short_name'] . "</a>"; $tmp .= "</td>"; $tmp .= "<td align=\"center\" nowrap=\"nowrap\">"; $tmp .= $task->task_duration . " " . $AppUI->_($durnTypes[$task->task_duration_type]); $tmp .= "</td>"; $tmp .= "<td align=\"center\" nowrap=\"nowrap\">"; $dt = new CDate($task->task_start_date); $tmp .= $dt->format($df); $tmp .= "   </td>"; $tmp .= "<td align=\"center\" nowrap=\"nowrap\">"; $ed = new CDate($task->task_end_date); $now = new CDate(); $dt = $now->dateDiff($ed); $sgn = $now->compare($ed, $now); $tmp .= $dt * $sgn; $tmp .= "</td>"; if ($display_week_hours) { $tmp .= displayWeeks($list, $task, $level, $fromPeriod, $toPeriod); } $tmp .= "<td>"; $sep = $us = ""; foreach ($users as $row) { if ($row["user_id"]) { if ($canEditINA) { $us .= "<a href='?m=admin&a=viewuser&user_id={$row['0']}'>" . $sep . $row['contact_last_name'] . " \n \t(" . $row['perc_assignment'] . "%)</a>"; } else { $us .= $sep . $row['contact_last_name'] . " (" . $row['perc_assignment'] . "%)"; } /*ina*/ $sep = ", "; } } $tmp .= $us; $tmp .= "</td>"; // create the list of possible assignees if ($zi == 1) { // selectbox may not have a size smaller than 2, use 5 here as minimum $zz = $z < 5 ? 5 : $z * 1.5; if (sizeof($users) >= 7) { $zz = $zz * 2; } $zm1 = $z - 2; if ($zm1 == 0) { $zm1 = 1; } $assUser = $userAlloc[$user_id]['userFC']; if ($user_id == 0) { // need to handle orphaned tasks different from tasks with existing assignees $zm1++; } if ($canEditINA) { $tmp .= "<td valign=\"top\" align=\"center\" nowrap=\"nowrap\" rowspan=\"{$zm1}\">"; $tmp .= '<select name="add_users" style="width:200px" size="' . ($zz - 1) . '" class="text" multiple="multiple" ondblclick="javascript:chAssignment(' . $user_id . ', 0, false)">'; foreach ($userAlloc as $v => $u) { $tmp .= "\n\t<option value=\"" . $u['user_id'] . "\">" . dPformSafe($u['userFC']) . "</option>"; } $tmp .= '</select>'; //$tmp.= arraySelect( $user_list, 'add_users', 'class="text" STYLE="width: 200px" size="'.($zz-1).'" multiple="multiple"',NULL ); $tmp .= "</td>"; } } $tmp .= "</tr>\n"; return $tmp; }
function displayTask($list, $task, $level, $display_week_hours, $fromPeriod, $toPeriod, $log_all_projects = false) { $tmp = ""; $tmp .= "<tr class=second><td nowrap=\"nowrap\">   "; for ($i = 0; $i < $level; $i++) { $tmp .= "   "; } if ($level == 0) { $tmp .= "<B>"; } elseif ($level == 1) { $tmp .= "<I>"; } $tmp .= $task->task_name; if ($level == 0) { $tmp .= "</B>"; } elseif ($level == 1) { $tmp .= "</I>"; } $tmp .= "   </td>"; if ($log_all_projects) { //Show project name when we are logging all projects $project = $task->getProject(); $tmp .= "<td nowrap=\"nowrap\">"; if (!isChildTask($task)) { //However only show the name on parent tasks and not the children to make it a bit cleaner $tmp .= $project["project_name"]; } $tmp .= "</td>"; } $tmp .= "<td nowrap=\"nowrap\">"; $dt = new CDate($task->task_start_date); $tmp .= $dt->format("%d-%m-%Y"); $tmp .= "   </td>"; $tmp .= "<td nowrap=\"nowrap\">"; $dt = new CDate($task->task_end_date); $tmp .= $dt->format("%d-%m-%Y"); $tmp .= "</td>"; if ($display_week_hours) { $tmp .= displayWeeks($list, $task, $level, $fromPeriod, $toPeriod); } $tmp .= "</tr>\n"; return $tmp; }
function displayTask($list, $task, $level, $display_week_hours, $fromPeriod, $toPeriod, $log_all_projects = false) { global $AppUI; $tmp = ''; $tmp .= '<tr><td align="left" nowrap="nowrap">   '; for ($i = 0; $i < $level; $i++) { $tmp .= '   '; } if ($level == 0) { $tmp .= '<b>'; } elseif ($level == 1) { $tmp .= '<i>'; } $tmp .= $task->task_name; if ($level == 0) { $tmp .= '</b>'; } elseif ($level == 1) { $tmp .= '</i>'; } $tmp .= '   </td>'; if ($log_all_projects) { //Show project name when we are logging all projects $project = $task->getProject(); $tmp .= '<td nowrap="nowrap">'; if (!isChildTask($task)) { //However only show the name on parent tasks and not the children to make it a bit cleaner $tmp .= $project['project_name']; } $tmp .= '</td>'; } $df = $AppUI->getPref('SHDATEFORMAT'); $tmp .= '<td nowrap="nowrap">'; $dt = new CDate($task->task_start_date); $tmp .= $dt->format($df); $tmp .= '   </td>'; $tmp .= '<td nowrap="nowrap">'; $dt = new CDate($task->task_end_date); $tmp .= $dt->format($df); $tmp .= '</td>'; if ($display_week_hours) { $tmp .= displayWeeks($list, $task, $level, $fromPeriod, $toPeriod); } $tmp .= "</tr>\n"; return $tmp; }
function displayTask($list, $task, $level, $display_week_hours, $fromPeriod, $toPeriod, $user_id) { global $AppUI, $durnTypes, $active_users, $zi, $projects; //if the user has no permission to the project don't show the tasks if (!key_exists($task->task_project, $projects)) { return; } $htmlHelper = new w2p_Output_HTMLHelper($AppUI); $zi++; $users = $task->task_assigned_users; $task->userPriority = $task->getUserSpecificTaskPriority($user_id); $project = $task->getProject(); $tmp = '<tr>'; $tmp .= '<td align="center" nowrap="nowrap">'; $tmp .= '<input type="checkbox" name="selected_task[' . $task->task_id . ']" value="' . $task->task_id . '" />'; $tmp .= '</td>'; $tmp .= $htmlHelper->createCell('user_priority', $task->userPriority); $tmp .= '<td class="_name">'; for ($i = 0; $i < $level; $i++) { $tmp .= ' '; } if ($task->task_milestone == true) { $tmp .= '<b>'; } if ($level >= 1) { $tmp .= '<img src="' . w2PfindImage('corner-dots.gif') . '" width="16" height="12" alt="" style="float: left;">'; } $tmp .= '<a href="?m=tasks&a=view&task_id=' . $task->task_id . '">' . $task->task_name . '</a>'; if ($task->task_milestone == true) { $tmp .= '</b>'; } if ($task->task_priority < 0) { $tmp .= ' (<img src="' . w2PfindImage('icons/priority-' . -$task->task_priority . '.gif') . '" width="13" height="16" alt="" />)'; } elseif ($task->task_priority > 0) { $tmp .= ' (<img src="' . w2PfindImage('icons/priority+' . $task->task_priority . '.gif') . '" width="13" height="16" alt="" />)'; } $tmp .= '</td>'; $tmp .= '<td align="left">'; $tmp .= '<a href="?m=projects&a=view&project_id=' . $task->task_project . '" style="background-color:#' . $project['project_color_identifier'] . '; color:' . bestColor($project['project_color_identifier']) . '">' . $project['project_name'] . '</a>'; $tmp .= '</td>'; $tmp .= $htmlHelper->createCell('task_duration', $task->task_duration . ' ' . mb_substr($AppUI->_($durnTypes[$task->task_duration_type]), 0, 1)); $tmp .= $htmlHelper->createCell('task_start_date', $task->task_start_date); $tmp .= $htmlHelper->createCell('task_end_date', $task->task_end_date); if ($display_week_hours) { $tmp .= displayWeeks($list, $task, $level, $fromPeriod, $toPeriod); } $tmp .= '<td>'; $sep = $us = ''; foreach ($users as $notUsed => $row) { if ($row['user_id']) { $us .= '<a href="?m=users&a=view&user_id=' . $row[0] . '">' . $sep . $row['contact_name'] . ' (' . $row['perc_assignment'] . '%)</a>'; $sep = ', '; } } $tmp .= $us; $tmp .= '</td>'; // create the list of possible assignees $size = count($active_users) > 5 ? 5 : 3; $tmp .= '<td valign="top" align="center" nowrap="nowrap">'; $tmp .= '<select name="add_users" style="width:200px" size="' . $size . '" class="text" multiple="multiple" ondblclick="javascript:chAssignment(' . $user_id . ', 0, false)">'; foreach ($active_users as $id => $name) { $tmp .= '<option value="' . $id . '">' . $name . '</option>'; } $tmp .= '</select>'; $tmp .= '</td>'; $tmp .= '</tr>'; return $tmp; }
function displayTask($list, $task, $level, $display_week_hours, $fromPeriod, $toPeriod, $user_id) { global $AppUI, $df, $durnTypes, $log_userfilter_users, $now, $priority, $system_users, $z, $zi, $x, $userAlloc, $projects; //if the user has no permission to the project don't show the tasks if (!key_exists($task->task_project, $projects)) { return; } $zi++; $users = $task->task_assigned_users; $task->userPriority = $task->getUserSpecificTaskPriority($user_id); $project = $task->getProject(); $tmp = '<tr>'; $tmp .= '<td align="center" nowrap="nowrap">'; $tmp .= '<input type="checkbox" name="selected_task[' . $task->task_id . ']" value="' . $task->task_id . '" />'; $tmp .= '</td>'; $tmp .= '<td align="center" nowrap="nowrap">'; if ($task->userPriority < 0) { $tmp .= '<img src="' . w2PfindImage('icons/priority-' . -$task->userPriority . '.gif') . '" width="13" height="16">'; } elseif ($task->userPriority > 0) { $tmp .= '<img src="' . w2PfindImage('icons/priority+' . $task->userPriority . '.gif') . '" width="13" height="16">'; } $tmp .= '</td>'; $tmp .= '<td>'; for ($i = 0; $i < $level; $i++) { $tmp .= ' '; } if ($task->task_milestone == true) { $tmp .= '<b>'; } if ($level >= 1) { $tmp .= w2PshowImage('corner-dots.gif', 16, 12, 'Subtask', '', 'tasks') . ' '; } $tmp .= '<a href="?m=tasks&a=view&task_id=' . $task->task_id . '">' . $task->task_name . '</a>'; if ($task->task_milestone == true) { $tmp .= '</b>'; } if ($task->task_priority < 0) { $tmp .= ' (<img src="' . w2PfindImage('icons/priority-' . -$task->task_priority . '.gif') . '" width="13" height="16" />)'; } elseif ($task->task_priority > 0) { $tmp .= ' (<img src="' . w2PfindImage('icons/priority+' . $task->task_priority . '.gif') . '" width="13" height="16" />)'; } $tmp .= '</td>'; $tmp .= '<td align="left">'; $tmp .= '<a href="?m=projects&a=view&project_id=' . $task->task_project . '" style="background-color:#' . $project['project_color_identifier'] . '; color:' . bestColor($project['project_color_identifier']) . '">' . $project['project_short_name'] . '</a>'; $tmp .= '</td>'; $tmp .= '<td align="right" nowrap="nowrap">'; $tmp .= $task->task_duration . ' ' . mb_substr($AppUI->_($durnTypes[$task->task_duration_type]), 0, 1); $tmp .= '</td>'; $tmp .= '<td align="center" nowrap="nowrap">'; $dt = new CDate($task->task_start_date); $tmp .= $dt->format($df); $tmp .= '   </td>'; $tmp .= '<td align="right" nowrap="nowrap">'; $ed = new CDate($task->task_end_date); $dt = $now->dateDiff($ed); $sgn = $now->compare($ed, $now); $tmp .= $dt * $sgn; $tmp .= '</td>'; if ($display_week_hours) { $tmp .= displayWeeks($list, $task, $level, $fromPeriod, $toPeriod); } $tmp .= '<td>'; $sep = $us = ''; foreach ($users as $key => $row) { if ($row['user_id']) { $us .= '<a href="?m=admin&a=viewuser&user_id=' . $row[0] . '">' . $sep . $row['contact_first_name'] . ' ' . $row['contact_last_name'] . ' (' . $row['perc_assignment'] . '%)</a>'; $sep = ', '; } } $tmp .= $us; $tmp .= '</td>'; // create the list of possible assignees if ($zi == 1) { // selectbox may not have a size smaller than 2, use 5 here as minimum $zz = $z < 5 ? 5 : $z * 1.5; if (sizeof($users) >= 7) { $zz = $zz * 2; } $zm1 = $z - 2; if ($zm1 == 0) { $zm1 = 1; } $assUser = $userAlloc[$user_id]['userFC']; if ($user_id == 0) { // need to handle orphaned tasks different from tasks with existing assignees $zm1++; } $tmp .= '<td valign="top" align="center" nowrap="nowrap">'; $tmp .= '<select name="add_users" style="width:200px" size="10" class="text" multiple="multiple" ondblclick="javascript:chAssignment(' . $user_id . ', 0, false)">'; foreach ($userAlloc as $v => $u) { $tmp .= '<option value="' . $u['user_id'] . '">' . w2PformSafe($u['userFC']) . '</option>'; } $tmp .= '</select>'; $tmp .= '</td>'; } $tmp .= '</tr>'; return $tmp; }