コード例 #1
0
ファイル: addtasktime.php プロジェクト: jgatica/Netoffice
        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";
コード例 #2
0
ファイル: listusers.php プロジェクト: ColBT/php_tut
    $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';
コード例 #3
0
ファイル: library.php プロジェクト: hostellerie/nexpro
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">&nbsp;</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>&nbsp;';
            }
            echo '&nbsp;&nbsp;<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();
}
コード例 #4
0
                $blockProject->checkboxRow($listTasks->tas_id[$i], $checkbox = "false");
                $blockProject->cellRow(buildLink("../tasks/viewtask.php?id=" . $listTasks->tas_id[$i], $listTasks->tas_name[$i], LINK_INSIDE));
                $blockProject->cellRow('<img src="../themes/' . THEME . '/gfx_priority/' . $idPriority . '.gif" alt="' . $priority[$idPriority] . '">&nbsp;' . $priority[$idPriority], '', true);
                $blockProject->cellRow($status[$idStatus]);
                $blockProject->cellRow($listTasks->tas_due_date[$i]);
                if ($complValue != "100 %") {
                    $blockProject->cellRow($complValue);
                } else {
                    $blockProject->cellRow($listTasks->tas_complete_date[$i]);
                }
                if ($listTasks->tas_assigned_to[$i] == "0") {
                    $blockProject->cellRow($strings["unassigned"]);
                } else {
                    $blockProject->cellRow($listTasks->tas_mem_login[$i]);
                }
                $blockProject->cellRow($statusPublish[$idPublished]);
                $blockProject->closeRow();
            }
        } else {
            // no tasks for project
        }
        $blockProject->closeResults();
        $blockProject->block_close();
        $blockProject->block_close();
    }
    // $blockProject->closeContent();
} else {
    // $block1->noresults();
}
// $block1->closeContent();
require_once "../themes/" . THEME . "/footer.php";
コード例 #5
0
    for ($i = 0; $i < $comptListNotes; $i++) {
        $idPublish = $listNotes->note_published[$i];
        $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}&amp;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\">&nbsp;</td><td><input type=\"submit\" name=\"Save\" value=\"" . $strings["search"] . "\"></td></tr>";
$block7->closeContent();
コード例 #6
0
ファイル: viewtask.php プロジェクト: jgatica/Netoffice
$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";
コード例 #7
0
ファイル: home.php プロジェクト: jgatica/Netoffice
$listReports = new request();
$listReports->openReports($tmpquery);
$comptListReports = count($listReports->rep_id);
$block4->headingToggle($strings["my_reports"] . " <span class=addition>({$comptListReports})</span>");
$block4->openPaletteIcon();
$block4->paletteIcon(0, "add", $strings["new"]);
$block4->paletteIcon(1, "remove", $strings["delete"]);
$block4->paletteIcon(2, "info", $strings["view"]);
$block4->closePaletteIcon();
if ($comptListReports != "0") {
    $block4->openResults();
    $block4->labels($labels = array(0 => $strings["name"], 1 => $strings["created"]), "false");
    for ($i = 0; $i < $comptListReports; $i++) {
        $block4->openRow($listReports->rep_id[$i]);
        $block4->checkboxRow($listReports->rep_id[$i]);
        $block4->cellRow(buildLink("../reports/resultsreport.php?id=" . $listReports->rep_id[$i], $listReports->rep_name[$i], LINK_INSIDE), "31");
        $block4->cellRow(createDate($listReports->rep_created[$i], $_SESSION['timezoneSession']));
        $block4->closeRow();
    }
    $block4->closeResults();
} else {
    $block4->noresults();
}
$block4->closeToggle();
$block4->closeFormResults();
$block4->openPaletteScript();
$block4->paletteScript(0, "add", "../reports/createreport.php", "true,true,true", $strings["new"]);
$block4->paletteScript(1, "remove", "../reports/deletereports.php", "false,true,true", $strings["delete"]);
$block4->paletteScript(2, "info", "../reports/resultsreport.php", "false,true,true", $strings["view"]);
$block4->closePaletteScript($comptListReports, $listReports->rep_id);
require_once "../themes/" . THEME . "/footer.php";
コード例 #8
0
ファイル: viewproject.php プロジェクト: hostellerie/nexpro
     $result = DB_query($sql);
     $comptListTasks = DB_numrows($result);
     if ($comptListTasks != "0") {
         $block5->openResults();
         $block5->labels($labels = array(0 => $strings["Subject"], 1 => $strings["Author"], 2 => $strings["lastUpdated"], 3 => $strings["Replies"]), "true");
         for ($i = 0; $i < $comptListTasks; $i++) {
             list($listForum->topic[$i], $parent, $listForum->subject[$i], $listForum->author[$i], $listForum->date[$i], $listForum->replies[$i]) = DB_fetchArray($result);
             $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') {
コード例 #9
0
ファイル: listphases.php プロジェクト: ColBT/php_tut
                        $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';