public function listWorksClosed() { global $DE_GLOBALS_WORK_CLOSED; if (!$this->formedsql) { $this->formSqlSelector(); } $sqltoExecute = "select * from WORKS where work_status = '{$DE_GLOBALS_WORK_CLOSED}' {$this->sql_closedTasks} {$this->sqlselector}"; //echo "<BR><BR>$sqltoExecute<BR><BR>"; $query = mysql_query($sqltoExecute) or die("Invalid query: " . mysql_error()); $wcCount = @mysql_num_rows($query); if ($wcCount == 0) { echo "<center><div onclick='ManageTasksJsFunction.allClosedThisYear();' class='linkTextButton' style='margin-top:10px;'>Show all tasks closed this year</div></center>"; echo "<center><div onclick=\"ManageTasksJsFunction.allClosedThisYear('all');\" class='linkTextButton' style='margin-top:10px;'>Show all closed tasks </div></center>"; return; } ?> <div class='listclosedtasks'><span onclick="var ckval = String(jQuery('.WorksClosedTable').is(':hidden')); My_JsLibrary.cookies.setCookie( 'WCLT' , ckval ); $('.WorksClosedTable').toggle();"><?php echo "Closed Tasks {$this->closedTasksPeriod} ({$wcCount})"; ?> </span></div> <table align=center cellpadding=0 cellspacing=0 class="WorksClosedTable"> <TR><TD class="firstRow" width="110" align='right' style='cursor:pointer;' onclick="My_JsLibrary.updatePageWithGetVar('sortby', 'workID');"> <span style='margin-right:20px;'>Task ID<?php if ($this->orderbyfield == 'workID') { echo ' ↓'; } ?> </span> </TD> <TD class="firstRow" width="125" style='cursor:pointer;' onclick="My_JsLibrary.updatePageWithGetVar('sortby', 'work_userAssigned');"> Assigned To<?php if ($this->orderbyfield == 'work_userAssigned') { echo ' ↓'; } ?> </TD> <?php if (!$this->PersonalTasks) { ?> <TD class="firstRow" width="145" style='cursor:pointer;' onclick="My_JsLibrary.updatePageWithGetVar('sortby', 'work_projectName');"> Project Name<?php if ($this->orderbyfield == 'work_projectName') { echo ' ↓'; } ?> </TD> <?php } ?> <TD class="firstRow" style='cursor:pointer;' onclick="My_JsLibrary.updatePageWithGetVar('sortby', 'work_priority');"> Task Description<?php if ($this->orderbyfield == 'work_priority') { echo ' ↓'; } ?> </TD> <TD class="firstRow" style='cursor:pointer;' onclick="My_JsLibrary.updatePageWithGetVar('sortby', 'work_closedDate');" width="125">Closed On<?php if ($this->orderbyfield == 'work_closedDate') { echo ' ↓'; } ?> </TD> <TD class="firstRow" style='cursor:pointer;' onclick="My_JsLibrary.updatePageWithGetVar('sortby', 'work_deadLine');" width="110"> Deadline<?php if ($this->orderbyfield == 'work_deadLine') { echo ' ↓'; } ?> </TD> </TR> <?php $tdclass = "oddrow"; $tmp_manageWorks = new manageWorks(); while ($row = @mysql_fetch_array($query)) { extract($row); $tdclass = $tdclass == "oddrow" ? 'evenrow' : 'oddrow'; // `workID`, `work_userAssigned`, `work_addedBy`, `work_dateAdded`, `work_deadLine`, `work_startDate`, `work_completeDate`, // `work_briefDesc`, `work_Notes`, `work_status`, `work_priority`, `work_projectName`, `work_isPrivate`, if ($work_priority == 'H') { $work_briefDesc = HIGHPRIORITYAPPENDSTRING . $work_briefDesc; } elseif ($work_priority == 'L') { $work_briefDesc = LOWPRIORITYAPPENDSTRING . $work_briefDesc; } $work_briefDesc = $work_briefDesc ? $work_briefDesc : 'No Description'; ?> <TR><TD align='center' class='<?php echo $tdclass; ?> '> <span style='float:right; margin-right:10px;'><?php echo $workID; ?> </span> <?php if ($tmp_manageWorks->taskHasAttachments($workID)) { echo "<img src='/images/attach1.gif' width=15 height=15 border=0 class='image_attachment' taskid='" . $workID . "'>"; } ?> <span style='float:right; margin-right:5px;'> <img src='/images/letter.png' border=0 class='emailTaskBescImg' title='e-mail task description' taskid='<?php echo $workID; ?> '> </span> </TD> <TD class='<?php echo $tdclass; ?> AssignedUser' style='cursor:default;' assignedto='<?php echo $work_userAssigned; ?> ' assignedby='<?php echo $work_addedBy; ?> '> <?php if ($work_addedBy == $_SESSION["uname"] && $work_userAssigned == $_SESSION["uname"]) { echo "<i>Self</i>"; } else { $str_work_userAssigned = $work_userAssigned; $str_work_addedBy = $work_addedBy; if ($work_addedBy == $_SESSION["uname"]) { $str_work_addedBy = YOUSTRING; } if ($work_userAssigned == $_SESSION["uname"]) { $str_work_userAssigned = YOUSTRING; } echo "{$str_work_userAssigned}←{$str_work_addedBy}"; } ?> </TD> <?php if (!$this->PersonalTasks) { echo "<TD class='{$tdclass}'>{$work_projectName}</TD>"; } ?> <TD class='<?php echo $tdclass; ?> OMOhilitLink' onclick="ManageTasksJsFunction.detailsWork('<?php echo $workID; ?> ');" TITLE="<?php echo $work_Notes; ?> "> <?php if ($tmp_manageWorks->taskHasNewComments($workID)) { echo "<img src='/images/newcommentsblue.png' width=15 height=15 border=0 class='image_newcomments'>"; } ?> <?php if ($work_RTID) { echo "<img src='/images/rt.png' border=0 width='31' height='15'>"; } echo getNwordsOfLengthFromString(stripslashes($work_briefDesc), 90); ?> </TD> <TD class='<?php echo $tdclass; ?> '> <NOBR> <?php echo caldateTS_to_humanWithOutTS($work_closedDate); ?> </NOBR> </TD> <TD class='<?php echo $tdclass; ?> '> <NOBR> <?php echo caldate_to_human($work_deadLine, true); ?> </NOBR> </TD> </TR> <?php } echo "</table>"; if ($this->closedTasksPeriod != 'in this Year') { echo "<center><div onclick='ManageTasksJsFunction.allClosedThisYear();' class='linkTextButton' style='margin-top:10px;'>Show all tasks closed this year</div></center>"; echo "<center><div onclick=\"ManageTasksJsFunction.allClosedThisYear('all');\" class='linkTextButton' style='margin-top:10px;'>Show all closed tasks </div></center>"; } }
while ($row = @mysql_fetch_array($query)) { extract($row); // fileID, workid , uploadname, uploadedOn, filesize ?> <tr> <td align=left> <?php echo "<A href='getattachment.php?attachId={$fileID}'>{$uploadname}</A>"; ?> </td> <td align=right><?php echo formatBytesToHumanReadable($filesize); ?> </td> <td><span style='margin-left: 25px;'><?php echo caldateTS_to_humanWithOutTS($uploadedOn); ?> </span></td> <td align=center><A href='#' onclick="ManageTasksJsFunction.detailsWork('<?php echo $workid; ?> ')"><?php echo $workid; ?> </A></td> </tr> <?php } ?> </table> </div>