if ($_SESSION['profilSession'] == 1 or $_SESSION['profilSession'] == 5 or $_SESSION['idSession'] == $listTaskTimes->tim_owner[$i]) { $block2->openRow($listTaskTimes->tim_id[$i]); $block2->checkboxRow($listTaskTimes->tim_id[$i], 'true'); $block2->cellRow($listTaskTimes->tim_mem_name[$i]); $block2->cellRow($listTaskTimes->tim_date[$i]); $block2->cellRow($listTaskTimes->tim_hours[$i]); $block2->cellRow($listTaskTimes->tim_created[$i]); $block2->cellRow($listTaskTimes->tim_modified[$i]); // truncate large comments to keep the display clean $comments = $listTaskTimes->tim_comments[$i]; $lenComm = 40; if (strLen($comments) > $lenComm) { $comments = substr($listTaskTimes->tim_comments[$i], 0, $lenComm) . ' ...'; } $block2->cellRow($comments); $block2->closeRow(); } } $block2->closeResults(); $block2->bornesFooter("1", $blockPage->bornesNumber, "", "id={$id}"); } else { $block2->noresults(); } $block2->closeFormResults(); $block2->block_close(); $block2->closeForm(); $block2->openPaletteScript(); $block2->paletteScript(0, "remove", "../tasks/deletetasktime.php?task={$id}", "false,true,true", $strings["delete"]); $block2->paletteScript(1, "edit", "../tasks/edittasktime.php?task={$id}", "false,true,false", $strings["edit"]); $block2->closePaletteScript($comptListTaskTimes, $listTaskTimes->tim_id); require_once "../themes/" . THEME . "/footer.php";
$block1->openRow(); $block1->checkboxRow($listTeam->tea_mem_id[$i]); $block1->cellRow($blockPage->buildLink("../users/viewuser.php?id=" . $listTeam->tea_mem_id[$i], $listTeam->tea_mem_name[$i], in)); $block1->cellRow($listTeam->tea_mem_title[$i]); $block1->cellRow($blockPage->buildLink($listTeam->tea_mem_email_work[$i], $listTeam->tea_mem_login[$i], mail)); $block1->cellRow($listTeam->tea_mem_phone_work[$i]); if ($listTeam->tea_log_connected[$i] > $dateunix - 5 * 60) { $block1->cellRow($strings["yes"] . " " . $z); } else { $block1->cellRow($strings["no"]); } if ($sitePublish == "true") { $block1->cellRow($statusPublish[$idPublish]); } $block1->closeRow(); } $block1->closeResults(); $block1->closeFormResults(); $block1->openPaletteScript(); if ($idSession == $projectDetail->pro_owner[0] || $profilSession == "5") { $block1->paletteScript(0, "add", "../teams/adduser.php?project=" . $projectDetail->pro_id[0] . "", "true,true,true", $strings["add"]); $block1->paletteScript(1, "remove", "../teams/deleteusers.php?project=" . $projectDetail->pro_id[0] . "", "false,true,true", $strings["delete"]); if ($sitePublish == "true") { $block1->paletteScript(2, "add_projectsite", "../projects/viewproject.php?addToSiteTeam=true&project=" . $projectDetail->pro_id[0] . "&action=publish", "false,true,true", $strings["add_project_site"]); $block1->paletteScript(3, "remove_projectsite", "../projects/viewproject.php?removeToSiteTeam=true&project=" . $projectDetail->pro_id[0] . "&action=publish", "false,true,true", $strings["remove_project_site"]); } } $block1->paletteScript(4, "info", "../users/viewuser.php?", "false,true,false", $strings["view"]); $block1->paletteScript(5, "email", "../users/emailusers.php?", "false,true,true", $strings["email"]); $block1->closePaletteScript($comptListTeam, $listTeam->tea_mem_id); include '../themes/' . THEME . '/footer.php';
function prj_displayMyProjectTasks(&$blockPage) { global $_TABLES, $_CONF, $_USER, $_COOKIE, $subTaskImg, $progress, $priority, $strings, $labels, $_PRJCONF; $limitbase = $_COOKIE['alltasksmin']; if ($limitbase == '') { $limitbase = 0; } $useThisTIDforAjax = 0; $filterCSV = COM_applyFilter($_COOKIE['filterTasks']); if ($blockPage == NULL or $blockPage == '') { $blockPage = new block(); } $block2 = new block(); if ($msg != "") { require_once "includes/messages.php"; $blockPage->messagebox($msgLabel); } if (!isset($_USER['uid']) or $_USER['uid'] == "") { $uid = 1; } else { $uid = $_USER['uid']; } //my tasks $blockPage->bornesNumber = "2"; $block2 = new block(); $block2->form = "taP"; $block2->openForm($_CONF['site_url'] . "/nexproject/index.php?" . "#" . $block2->form . "Anchor"); $headingTitle = $strings['my_tasks']; $headingStatusArea = '<span id="ajaxstatus_tasks" class="pluginInfo" style="display:none"> </span>'; $block2->headingToggle($headingTitle, $headingStatusArea); $block2->borne = $blockPage->returnBorne("2"); $block2->rowsLimit = $_PRJCONF['task_block_rows']; $lim = $limitbase * $block2->rowsLimit; echo '<!--startMyTasks-->'; echo '<div id="divMyTasks">'; $sql = "SELECT {$_TABLES['prj_tasks']}.tid FROM {$_TABLES['prj_tasks']}, {$_TABLES['prj_task_users']}, {$_TABLES['users']} "; $sql .= "WHERE {$_TABLES['prj_task_users']}.uid={$uid} AND {$_TABLES['prj_task_users']}.tid={$_TABLES['prj_tasks']}.tid "; $sql .= "AND {$_TABLES['prj_task_users']}.uid={$_TABLES['users']}.uid AND {$_TABLES['prj_task_users']}.uid={$uid} "; $sql .= "AND {$_TABLES['prj_task_users']}.role='o' AND {$_TABLES['prj_tasks']}.status_id in (0,3) "; $result = DB_query($sql); $block2->recordsTotal = DB_numrows($result); $lim = $limitbase * $block2->rowsLimit; $sql = "SELECT {$_TABLES['prj_tasks']}.tid,{$_TABLES['prj_tasks']}.progress_id, {$_TABLES['prj_projects']}.name, "; $sql .= "{$_TABLES['prj_tasks']}.priority_id, {$_TABLES['prj_tasks']}.name, {$_TABLES['prj_tasks']}.estimated_end_date, "; $sql .= "{$_TABLES['prj_tasks']}.start_date, {$_TABLES['prj_tasks']}.pid FROM {$_TABLES['prj_tasks']}, "; $sql .= "{$_TABLES['prj_task_users']}, {$_TABLES['users']}, {$_TABLES['prj_projects']} "; $sql .= "WHERE {$_TABLES['prj_task_users']}.uid={$uid} AND {$_TABLES['prj_task_users']}.tid={$_TABLES['prj_tasks']}.tid "; $sql .= "AND {$_TABLES['prj_task_users']}.uid={$_TABLES['users']}.uid AND {$_TABLES['prj_task_users']}.role='o' "; $sql .= "AND {$_TABLES['prj_task_users']}.uid={$uid} AND {$_TABLES['prj_tasks']}.pid={$_TABLES['prj_projects']}.pid "; $sql .= "AND {$_TABLES['prj_tasks']}.status_id in (0,3) "; if ($filterCSV != '') { $sql .= "AND {$_TABLES['prj_tasks']}.pid in ({$filterCSV})"; } $sql .= " ORDER BY {$_TABLES['prj_tasks']}.estimated_end_date "; $sql .= " LIMIT {$lim}, {$block2->rowsLimit} "; $result = DB_query($sql, true); $comptListTasks = DB_numrows($result); if ($result == FALSE) { //remove the filterCSV as there might be a cookie issue with it... $sql = "SELECT {$_TABLES['prj_tasks']}.tid,{$_TABLES['prj_tasks']}.progress_id, {$_TABLES['prj_projects']}.name, "; $sql .= "{$_TABLES['prj_tasks']}.priority_id, {$_TABLES['prj_tasks']}.name, {$_TABLES['prj_tasks']}.estimated_end_date, "; $sql .= "{$_TABLES['prj_tasks']}.start_date, {$_TABLES['prj_tasks']}.pid FROM {$_TABLES['prj_tasks']}, "; $sql .= "{$_TABLES['prj_task_users']}, {$_TABLES['users']}, {$_TABLES['prj_projects']} "; $sql .= "WHERE {$_TABLES['prj_task_users']}.uid={$uid} AND {$_TABLES['prj_task_users']}.tid={$_TABLES['prj_tasks']}.tid "; $sql .= "AND {$_TABLES['prj_task_users']}.uid={$_TABLES['users']}.uid AND {$_TABLES['prj_task_users']}.role='o' "; $sql .= "AND {$_TABLES['prj_task_users']}.uid={$uid} AND {$_TABLES['prj_tasks']}.pid={$_TABLES['prj_projects']}.pid "; $sql .= "AND {$_TABLES['prj_tasks']}.status_id in (0,3) "; $sql .= " ORDER BY {$_TABLES['prj_tasks']}.estimated_end_date "; $sql .= " LIMIT {$lim}, {$block2->rowsLimit} "; $result = DB_query($sql); $comptListTasks = DB_numrows($result); } if ($comptListTasks != "0") { $block2->openResults(false); $block2->labels($labels = array(0 => $strings["task"], 1 => $strings["priority"], 2 => $strings["project"], 3 => $strings["start_date"], 4 => $strings["estimated_end_date"]), "true"); for ($i = 0; $i < DB_numrows($result); $i++) { list($tid, $idProgress, $projectname, $idPriority, $taskname, $estenddate, $startdate, $pid) = DB_fetchArray($result); $full_projectname = $projectname; $full_taskname = $taskname; if (strlen($taskname) > 25) { $taskname = substr($taskname, 0, 25) . "...."; } if (strlen($projectname) > 20) { $projectname = substr($projectname, 0, 20) . "...."; } $block2->openRow(); //$block2->checkboxRow($pid); $block2->cellProgress($progress[$idProgress]); $block2->cellRow($blockPage->buildLink("{$_CONF['site_url']}/nexproject/viewproject.php?mode=view&id={$tid}", $taskname, "mytaskcontext", $full_taskname, '', $tid)); $block2->cellRow($priority[$idPriority]); $block2->cellRow($blockPage->buildLink("{$_CONF['site_url']}/nexproject/viewproject.php?pid={$pid}", $projectname, "context", $full_projectname, $pid)); $block2->cellRow(strftime("%Y/%m/%d", $startdate)); $block2->cellRow(strftime("%Y/%m/%d", $estenddate)); $block2->closeRow(); } $block2->closeResults(); $pages = intval($block2->recordsTotal / $block2->rowsLimit); if (fmod($block2->recordsTotal, $block2->rowsLimit) > 0) { $pages += 1; } if ($pages > 1) { for ($pagecntr = 0; $pagecntr < $pages; $pagecntr++) { echo '<span style="text-decoration:underline;cursor: hand" onclick=\'setCookie("alltasksmin","'; echo $pagecntr; echo '","","");prj_getMyTasks("myprj_refresh", "' . $useThisTIDforAjax . '" )\'>'; if ($limitbase == $pagecntr) { echo '<span style="color:red">'; echo $pagecntr + 1; echo '</span>'; } else { echo $pagecntr + 1; } echo '</span> '; } echo ' <span style="text-decoration:underline;cursor: hand" TITLE="Return to page 1" onclick=\'setCookie("alltasksmin","","","");prj_getMyTasks("myprj_refresh", "' . $useThisTIDforAjax . '" )\'>'; echo '<<</span>'; } } else { $block2->noresults(); } echo '</div>'; echo '<!--endMyTasks-->'; echo '<input type=hidden name=pid value=' . $pid . '>'; $block2->closeToggle(); $block2->closeFormResults(); }
} // Update file Block if ($fileDetail->mat_owner[0] == $_SESSION['idSession']) { $block4 = new block(); $block4->form = "filedetails"; echo "<a name=\"filedetailsAnchor\"></a>"; echo "<form accept-charset=\"UNKNOWN\" method=\"POST\" action=\"../meetings/viewfile.php?action=update&id=" . $fileDetail->mat_id[0] . "#filedetailsAnchor\" name=\"filedetailsForm\" enctype=\"multipart/form-data\"><input type=\"hidden\" name=\"MAX_FILE_SIZE\" value=\"100000000\"><input type=\"hidden\" name=\"maxCustom\" value=\"" . $projectDetail->pro_upload_max[0] . "\">"; if ($error4 != "") { $block4->headingError($strings["errors"]); $block4->contentError($error4); } $block4->headingForm($strings["ifc_update_file"]); $block4->openContent(); $block4->contentTitle($strings["details"]); echo "\r\n\t<tr class=\"odd\"><td valign=\"top\" class=\"leftvalue\"></td><td class=\"odd\">" . $strings["version_increm"] . "<br>\r\n\t<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n\t<tr><td align=\"right\">0.01</td><td width=\"30\" align=\"right\"><input name=\"change_file_version\" type=\"radio\" value=\"0.01\"></td></tr>\r\n\t<tr><td align=\"right\">0.1</td><td width=\"30\" align=\"right\"><input name=\"change_file_version\" type=\"radio\" value=\"0.1\" checked></td></tr>\r\n\t<tr><td align=\"right\">1.0</td><td width=\"30\" align=\"right\"><input name=\"change_file_version\" type=\"radio\" value=\"1.0\"></td></tr>\r\n\t</table>\r\n\t</td></tr>"; echo "<tr class=\"odd\"><td valign=\"top\" class=\"leftvalue\">" . $strings["status"] . " :</td><td><select name=\"statusField\">"; $comptSta = count($statusFile); for ($i = 0; $i < $comptSta; $i++) { if ($i == "2") { echo "<option value=\"{$i}\" selected>{$statusFile[$i]}</option>"; } else { echo "<option value=\"{$i}\">{$statusFile[$i]}</option>"; } } echo "</select></td></tr>"; echo "<tr class=\"odd\"><td valign=\"top\" class=\"leftvalue\">* " . $strings["upload"] . " :</td><td><input size=\"44\" style=\"width: 400px\" name=\"upload\" type=\"FILE\"></td></tr>\r\n\t<tr class=\"odd\"><td valign=\"top\" class=\"leftvalue\">" . $strings["comments"] . " :</td><td><textarea rows=\"3\" style=\"width: 400px; height: 50px;\" name=\"c\" cols=\"43\">{$c}</textarea></td></tr>\r\n\t<tr class=\"odd\"><td valign=\"top\" class=\"leftvalue\"> </td><td><input type=\"SUBMIT\" value=\"" . $strings["ifc_update_file"] . "\"></td></tr>"; $block4->closeContent(); $block4->headingForm_close(); $block4->closeFormResults(); } require_once "../themes/" . THEME . "/footer.php";
$block6->openRow($listNotes->note_id[$i]); $block6->checkboxRow($listNotes->note_id[$i]); $block6->cellRow(buildLink("../notes/viewnote.php?id=" . $listNotes->note_id[$i], $listNotes->note_subject[$i], LINK_INSIDE)); if ($comptTopic != "0") { $block6->cellRow($topicNote[$listNotes->note_topic[$i]]); } $block6->cellRow($listNotes->note_date[$i]); $block6->cellRow(buildLink($listNotes->note_mem_email_work[$i], $listNotes->note_mem_login[$i], LINK_MAIL)); if ($sitePublish == "true") { $block6->cellRow($statusPublish[$idPublish]); } $block6->closeRow(); } $block6->closeResults(); $block6->bornesFooter("6", $blockPage->bornesNumber, "", "searchfor={$searchfor}&heading={$heading}"); $block6->closeToggle(); $block3->headingForm_close(); $block6->closeFormResults(); /*$block6->openPaletteScript(); $block6->paletteScript(0,"export","../projects/exportproject.php?languageSession=" . $_SESSION['languageSession'] . "&type=project","false,true,false",$strings["export"]); $block6->closePaletteScript($comptListNotes,$listNotes->note_id);*/ } $block7 = new block(); $block7->form = "search"; $block7->openForm("../search/createsearch.php?action=search"); $block7->openContent(); $block7->contentTitle($strings["enter_keywords"]); echo "<tr class=\"odd\"><td valign=\"top\" class=\"leftvalue\">* " . $strings["search_for"] . " :</td><td><input value=\"{$searchfor}\" type=\"text\" name=searchfor style=\"width: 200px;\" size=\"30\" maxlength=\"64\">\n<select name=\"heading\">\n\t\t<option selected value=\"ALL\" {$selectedAll}>" . $strings["all_content"] . "</option>\n\t\t<option value=\"notes\" {$selectedNotes}>" . $strings["notes"] . "</option>\n\t\t<option value=\"organizations\" {$selectedOrganizations}>" . $strings["organizations"] . "</option>\n\t\t<option value=\"projects\" {$selectedProjects}>" . $strings["projects"] . "</option>\n\t\t<option value=\"tasks\" {$selectedTasks}>" . $strings["tasks"] . "</option>\n\t\t<option value=\"discussions\" {$selectedDiscussions}>" . $strings["discussions"] . "</option>\n\t\t<option value=\"members\" {$selectedMembers}>" . $strings["users"] . "</option>\n</select>\n</td></tr>\n<tr class=\"odd\"><td valign=\"top\" class=\"leftvalue\"> </td><td><input type=\"submit\" name=\"Save\" value=\"" . $strings["search"] . "\"></td></tr>"; $block7->closeContent(); $block7->closeForm(); require_once "../themes/" . THEME . "/footer.php";
$comptListAssign = count($listAssign->ass_id); $block3->openResults($checkbox = "false"); $block3->labels($labels = array(0 => $strings["comment"], 1 => $strings["assigned_by"], 2 => $strings["to"], 3 => $strings["assigned_on"]), "false"); for ($i = 0; $i < $comptListAssign; $i++) { $block3->openRow(); $block3->checkboxRow($listAssign->ass_id[$i], $checkbox = "false"); if ($listAssign->ass_comments[$i] != "") { $block3->cellRow($listAssign->ass_comments[$i]); } else { if ($listAssign->ass_assigned_to[$i] == "0") { $block3->cellRow($strings["task_unassigned"]); } else { $block3->cellRow($strings["task_assigned"] . " " . $listAssign->ass_mem2_name[$i] . " (" . $listAssign->ass_mem2_login[$i] . ")"); } } $block3->cellRow(buildLink($listAssign->ass_mem1_email_work[$i], $listAssign->ass_mem1_login[$i], LINK_MAIL)); if ($listAssign->ass_assigned_to[$i] == "0") { $block3->cellRow($strings["unassigned"]); } else { $block3->cellRow(buildLink($listAssign->ass_mem2_email_work[$i], $listAssign->ass_mem2_login[$i], LINK_MAIL)); } $block3->cellRow(createDate($listAssign->ass_assigned[$i], $_SESSION['timezoneSession'])); $block3->closeRow(); } $block3->closeResults(); $block3->closeToggle(); $block3->closeFormResults(); $block3->headingForm_close(); $block3->closeForm(); //was missing ???? require_once "../themes/" . THEME . "/footer.php";
$block5->openRow(); $block5->checkboxRow($listForum->topic[$i]); $block5->cellRow($blockPage->buildLink($_CONF['site_url'] . "/forum/viewtopic.php?forum=" . $A[fid] . "&showtopic=" . $listForum->topic[$i], $listForum->subject[$i], "in", 'Click to View Discussion')); $block5->cellRow($listForum->author[$i]); $block5->cellRow(strftime("%Y/%m/%d %H:%M", $listForum->date[$i])); $block5->cellRow($listForum->replies[$i]); $block5->closeRow(); } $block5->closeResults(); $block5->bornesFooter("5", $blockPage->bornesNumber, "", "pid={$pid}"); } else { $block5->noresults(); } echo '<input type="hidden" name="pid" value="' . $pid . '">'; $block5->closeToggle(); $block5->closeFormResults(); if ($membertoken != 0) { $block5->openPaletteScript(); $block5->paletteScript(0, "export", $_CONF['site_url'] . "/forum/createtopic.php?method=postreply&forum=" . $A[fid], "false,true,false", $strings["reply"]); $block5->paletteScript(1, "add", $_CONF['site_url'] . "/forum/createtopic.php?method=newtopic&forum=" . $A[fid], "true,true,false", $strings["add"]); $block5->closePaletteScript($comptListTasks, $listForum->topic); } } if ($temptoken['teammember'] == '1') { $p = new Template($_CONF['path_layout'] . 'nexproject/javascript'); $p->set_file('contextmenu', 'taskblock_contextmenu.thtml'); $p->set_var('site_url', $_CONF['site_url']); $p->set_var('action_url', $_CONF['site_url'] . '/nexproject/viewproject.php'); $p->set_var('imgset', $_CONF['layout_url'] . '/nexproject/images'); $p->parse('output', 'contextmenu'); echo $p->finish($p->get_var('output'));
$comptUncompleteTasks = $comptUncompleteTasks + 1; } } } $block7->openRow(); $block7->checkboxRow($listPhases->pha_id[$i]); $block7->cellRow($listPhases->pha_order_num[$i]); $block7->cellRow($blockPage->buildLink("../phases/viewphase.php?id=" . $listPhases->pha_id[$i], $listPhases->pha_name[$i], in)); $block7->cellRow($comptlistTasksRow); $block7->cellRow($comptUncompleteTasks); $block7->cellRow($phaseStatus[$listPhases->pha_status[$i]]); $block7->cellRow($listPhases->pha_date_start[$i]); $block7->cellRow($listPhases->pha_date_end[$i]); $block7->closeRow(); } $block7->closeResults(); } else { $block7->noresults(); } $block7->closeToggle(); $block7->closeFormResults(); $block7->openPaletteScript(); $block7->paletteScript(0, "info", "../phases/viewphase.php?", "false,true,true", $strings["view"]); if ($teamMember == "true" || $profilSession == "5") { if ($idSession == $projectDetail->pro_owner[0] || $profilSession == "0" || $profilSession == "5") { $block7->paletteScript(1, "edit", "../phases/editphase.php?", "false,true,true", $strings["edit"]); } } $block7->closePaletteScript($comptListPhases, $listPhases->pha_id); } include '../themes/' . THEME . '/footer.php';
$permissionsBlock->headingToggle("Team Permissions"); $permissionsBlock->openPaletteIcon(); $permissionsBlock->paletteIcon(0, "edit", $strings["edit"]); $permissionsBlock->closePaletteIcon(); $permissionsBlock->openPaletteScript(); $permissionsBlock->paletteScript(0, "edit", $_CONF['site_url'] . "/nexproject/prjperms.php?mode=add&pid=" . $pid, "true,false,false", $strings["edit"]); $permissionsBlock->closePaletteScript(0, 0); $p = new Template($_CONF['path_layout'] . 'nexproject/'); $p->set_file(array('perms' => 'projectPermissionRights.thtml', 'permrec' => 'projectPermRecord.thtml')); $p->set_var('layout_url', $_CONF['layout_url']); $p->set_var($pluginLangLabels); prj_displayPerms($p, $pid, 0, true, $_COOKIE['permsOrderBy'] . $_COOKIE['prj_ascdesc']); $p->parse('output', 'perms'); echo $p->finish($p->get_var('output')); $permissionsBlock->closeToggle(); $permissionsBlock->closeFormResults(); echo '<p />'; } } else { if ($id > 0) { $result = DB_query("SELECT * FROM {$_TABLES['prj_projects']} WHERE pid={$id}"); $A = DB_fetchArray($result); } echo prj_breadcrumbs(0, $id, $strings["edit_project"]); $block = new block(); $msg = 'permissiondenied'; require_once "includes/messages.php"; $block->messagebox($msgLabel); //$block->heading($strings["edit_project"]); $block->openContent(); $block->contentRow("", "<input type=\"button\" name=\"goback\" value=\"" . $strings["back"] . "\" onClick=\"history.back();\">");