当前位置: 首页>>代码示例>>PHP>>正文


PHP request::openTasks方法代码示例

本文整理汇总了PHP中request::openTasks方法的典型用法代码示例。如果您正苦于以下问题:PHP request::openTasks方法的具体用法?PHP request::openTasks怎么用?PHP request::openTasks使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在request的用法示例。


在下文中一共展示了request::openTasks方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: taskNotification

 function taskNotification($pAssigneeID, $pTaskID, $pTypeOfChange)
 {
     if ($num == '') {
         $num = $id;
     }
     $tmpquery = "WHERE tas.id IN({$pTaskID})";
     $taskNoti = new request();
     $taskNoti->openTasks($tmpquery);
     $tmpquery = "WHERE pro.id = '{$project}'";
     $projectNoti = new request();
     $projectNoti->openProjects($tmpquery);
     $tmpquery = "WHERE noti.member IN ({$pAssigneeID})";
     $listNotifications = new request();
     $listNotifications->openNotifications($tmpquery);
     $comptListNotifications = count($listNotifications->not_id);
     if ($listNotifications->not_taskassignment[0] == "0") {
         $this->getUserinfo($idSession, "from");
         $this->partSubject = $strings["noti_taskassignment1"];
         $this->partMessage = $strings["noti_taskassignment2"];
         if ($projectNoti->pro_org_id[0] == "1") {
             $projectNoti->pro_org_name[0] = $strings["none"];
         }
         $complValue = $taskNoti->tas_completion[0] > 0 ? $taskNoti->tas_completion[0] . "0 %" : $taskNoti->tas_completion[0] . " %";
         $idStatus = $taskNoti->tas_status[0];
         $idPriority = $taskNoti->tas_priority[0];
         $body = $this->partMessage . "\n\n" . $strings["task"] . " : " . $taskNoti->tas_name[0] . "\n" . $strings["start_date"] . " : " . $taskNoti->tas_start_date[0] . "\n" . $strings["due_date"] . " : " . $taskNoti->tas_due_date[0] . "\n" . $strings["completion"] . " : " . $complValue . "\n" . $strings["priority"] . " : {$priority[$idPriority]}\n" . $strings["status"] . " : {$status[$idStatus]}\n" . $strings["description"] . " : " . $taskNoti->tas_description[0] . "\n\n" . $strings["project"] . " : " . $projectNoti->pro_name[0] . " (" . $projectNoti->pro_id[0] . ")\n" . $strings["organization"] . " : " . $projectNoti->pro_org_name[0] . "\n\n" . $strings["noti_moreinfo"] . "\n";
         if ($taskNoti->tas_mem_organization[0] == "1") {
             $body .= "{$root}/general/login.php?url=tasks/viewtask.php%3Fid={$num}";
         } else {
             if ($taskNoti->tas_mem_organization[0] != "1" && $projectNoti->pro_published[0] == "0" && $taskNoti->tas_published[0] == "0") {
                 $body .= "{$root}/general/login.php?url=projects_site/home.php%3Fproject=" . $projectNoti->pro_id[0];
             }
         }
         $body .= "\n\n" . $this->footer;
         $subject = $this->partSubject . " " . $taskNoti->tas_name[0];
         $this->Subject = $subject;
         if ($taskNoti->tas_priority[0] == "4" || $taskNoti->tas_priority[0] == "5") {
             $this->Priority = "1";
         } else {
             $this->Priority = "3";
         }
         $this->Body = $body;
         $this->AddAddress($listNotifications->not_mem_email_work[0], $listNotifications->not_mem_name[0]);
         $this->Send();
         $this->ClearAddresses();
     }
 }
开发者ID:TICanalyste,项目名称:netOffice--remix-,代码行数:47,代码来源:notification.class.php

示例2: headerFunction

        if ($task != "0") {
            headerFunction("../tasks/viewtask.php?id={$task}&msg=deleteFile&" . session_name() . "=" . session_id());
            exit;
        } else {
            headerFunction("../projects/viewproject.php?id={$project}&msg=deleteFile&" . session_name() . "=" . session_id());
            exit;
        }
    }
}
$tmpquery = "WHERE pro.id = '{$project}'";
$projectDetail = new request();
$projectDetail->openProjects($tmpquery);
if ($task != "0") {
    $tmpquery = "WHERE tas.id = '{$task}'";
    $taskDetail = new request();
    $taskDetail->openTasks($tmpquery);
}
include '../themes/' . THEME . '/header.php';
$blockPage = new block();
$blockPage->openBreadcrumbs();
$blockPage->itemBreadcrumbs($blockPage->buildLink("../projects/listprojects.php?", $strings["projects"], in));
$blockPage->itemBreadcrumbs($blockPage->buildLink("../projects/viewproject.php?id=" . $projectDetail->pro_id[0], $projectDetail->pro_name[0], in));
if ($task != "0") {
    $blockPage->itemBreadcrumbs($blockPage->buildLink("../tasks/listtasks.php?project=" . $projectDetail->pro_id[0], $strings["tasks"], in));
    $blockPage->itemBreadcrumbs($blockPage->buildLink("../tasks/viewtask.php?id=" . $taskDetail->tas_id[0], $taskDetail->tas_name[0], in));
}
$blockPage->itemBreadcrumbs($strings["unlink_files"]);
$blockPage->closeBreadcrumbs();
if ($msg != "") {
    include '../includes/messages.php';
    $blockPage->messagebox($msgLabel);
开发者ID:ColBT,项目名称:php_tut,代码行数:31,代码来源:deletefiles.php

示例3: block

    $block9->paletteScript(7, 'edit', '../tasks/edittask.php?project=' . $projectDetail->pro_id[0], 'false,true,true', $strings['edit']);
}
$block9->closePaletteScript($comptListMilestones, $listMilestones->tas_id);
$block10 = new block();
//--- block header ----
$block10->form = 'wbTuuC';
$block10->openForm("../phases/listphases.php?id={$id}#" . $block10->form . "Anchor");
$block10->sorting('tasks_closed', $sortingUser->sor_tasks_closed[0], 'tas.due_date ASC', $sortingFields = array('tas.priority', 'tas.name', 'tas.status', 'tas.completion', 'tas.due_date', 'tas.parent_phase', 'mem.login', 'tas.published'));
$block10->borne = $blockPage->returnBorne('1');
$block10->rowsLimit = '20';
//--- get data from sql ---------
$tmpquery = "WHERE tas.project = '{$id}' AND tas.status NOT IN(0,2,3) AND tas.milestone = '1' ORDER BY {$block10->sortingValue}";
$block10->recordsTotal = compt($initrequest['tasks'] . ' ' . $tmpquery);
//--- list ---------
$listTasks = new request();
$listTasks->openTasks($tmpquery, $block10->borne, $block10->rowsLimit);
$comptListTasks = count($listTasks->tas_id);
$block10->headingToggle($strings['tasks_closed'] . ' <span class=addition>(' . $comptListTasks . ')</span>');
$block10->openPaletteIcon();
if ($teamMember == 'true' || $_SESSION['profilSession'] == '5') {
    $block10->paletteIcon(0, 'add', $strings['add']);
    $block10->paletteIcon(1, 'remove', $strings['delete']);
    $block10->paletteIcon(2, 'copy', $strings['copy']);
    // $block10->paletteIcon(3,'export',$strings['export']);
    if ($sitePublish == 'true') {
        $block10->paletteIcon(4, 'add_projectsite', $strings['add_project_site']);
        $block10->paletteIcon(5, 'remove_projectsite', $strings['remove_project_site']);
    }
}
$block10->paletteIcon(6, 'info', $strings['view']);
if ($teamMember == 'true' || $_SESSION['profilSession'] == '5') {
开发者ID:jgatica,项目名称:Netoffice,代码行数:31,代码来源:listphases.php

示例4: IN

<?php

$tmpquery = "WHERE tas.id IN({$id})";
$taskNoti = new request();
$taskNoti->openTasks($tmpquery);
$tmpquery = "WHERE pro.id = '{$project}'";
$projectNoti = new request();
$projectNoti->openProjects($tmpquery);
$tmpquery = "WHERE noti.member IN({$at})";
$listNotifications = new request();
$listNotifications->openNotifications($tmpquery);
$comptListNotifications = count($listNotifications->not_id);
if ($listNotifications->not_statustaskchange[0] == "0") {
    $mail = new notification();
    $mail->getUserinfo($idSession, "from");
    $mail->partSubject = $strings["noti_prioritytaskchange1"];
    $mail->partMessage = $strings["noti_prioritytaskchange2"];
    if ($projectNoti->pro_org_id[0] == "1") {
        $projectNoti->pro_org_name[0] = $strings["none"];
    }
    $complValue = $taskNoti->tas_completion[0] > 0 ? $taskNoti->tas_completion[0] . "0 %" : $taskNoti->tas_completion[0] . " %";
    $idStatus = $taskNoti->tas_status[0];
    $idPriority = $taskNoti->tas_priority[0];
    $body = $mail->partMessage . "\n\n" . $strings["task"] . " : " . $taskNoti->tas_name[0] . "\n" . $strings["start_date"] . " : " . $taskNoti->tas_start_date[0] . "\n" . $strings["due_date"] . " : " . $taskNoti->tas_due_date[0] . "\n" . $strings["completion"] . " : " . $complValue . "\n" . $strings["priority"] . " : {$priority[$idPriority]}\n" . $strings["status"] . " : {$status[$idStatus]}\n" . $strings["description"] . " : " . $taskNoti->tas_description[0] . "\n\n" . $strings["project"] . " : " . $projectNoti->pro_name[0] . " (" . $projectNoti->pro_id[0] . ")\n" . $strings["organization"] . " : " . $projectNoti->pro_org_name[0] . "\n\n" . $strings["noti_moreinfo"] . "\n";
    if ($taskNoti->tas_mem_organization[0] == "1") {
        $body .= "{$root}/general/login.php?url=tasks/viewtask.php%3Fid={$id}";
    } else {
        if ($taskNoti->tas_mem_organization[0] != "1" && $projectNoti->pro_published[0] == "0" && $taskNoti->tas_published[0] == "0") {
            $body .= "{$root}/general/login.php?url=projects_site/home.php%3Fproject=" . $projectNoti->pro_id[0];
        }
    }
开发者ID:ColBT,项目名称:php_tut,代码行数:31,代码来源:noti_prioritytaskchange.php

示例5: request

 * Copyright (c) 2003 by the NetOffice developers
 * 
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 */
$projectSite = "true";
$checkSession = true;
require_once "../includes/library.php";
$bouton[2] = "over";
$titlePage = $strings["team_tasks"];
require_once "include_header.php";
$tmpquery = "WHERE tas.project = '" . $_SESSION['projectSession'] . "' AND tas.assigned_to != '0' AND tas.published = '0' AND tas.milestone <> '0' AND mem.organization = '1' ORDER BY tas.name";
$listTasks = new request();
$listTasks->openTasks($tmpquery);
$comptListTasks = count($listTasks->tas_id);
$block1 = new block();
$block1->headingForm($strings["team_tasks"]);
if ($comptListTasks != "0") {
    if ($activeJpgraph == "true") {
        // show the expanded or compact Gantt Chart
        if ($_GET['base'] == 1) {
            echo "<a href='showallteamtasks.php'>expand</a><br>";
        } else {
            echo "<a href='showallteamtasks.php?base=1'>compact</a><br>";
        }
        echo "<img src=\"graphtasks.php?project=" . $projectDetail->pro_id[0] . '&amp;base=' . $_GET['base'] . "\" alt=\"\"><br>\r\n<span class=\"listEvenBold\">Powered by <a href=\"http://www.aditus.nu/jpgraph/\" target=\"_blank\">JpGraph</a></span><br><br>";
    }
    echo "<table cellspacing=\"0\" width=\"90%\" border=\"0\" cellpadding=\"3\" cols=\"4\" class=\"listing\">\r\n<tr><th class=\"active\">" . $strings["name"] . "</th><th>" . $strings["description"] . "</th><th>" . $strings["status"] . "</th><th>" . $strings["due"] . "</th></tr>";
    for ($i = 0; $i < $comptListTasks; $i++) {
开发者ID:jgatica,项目名称:Netoffice,代码行数:31,代码来源:showallteamtasks.php

示例6: request

    $selected = "";
    if ($project_id == $projets->pro_id[$i]) {
        $selected = " selected";
    }
    echo "<option value='" . $projets->pro_id[$i] . "'" . $selected . ">" . $projets->pro_name[$i] . "{$clientUser}</option>";
}
echo "</select><input type='SUBMIT' value='update'>" . "</td></tr>";
//*** Tache ***
if ($project_id == 0 || $project_id == "") {
    $project_id = 0;
}
$tmpquery = " WHERE tas.project = " . $project_id;
$tmpquery .= $task_query_type;
$tmpquery .= " ORDER BY tas.name";
$tasks = new request();
$tasks->openTasks($tmpquery);
$comptTasks = count($tasks->tas_id);
echo "\n\t<tr class='odd'>\n\t  <td valign='top' class='leftvalue'>" . $strings['tasks'] . " :</td>\n\t  <td><select name='task_id'>";
// get Clients listing
for ($i = 0; $i < $comptTasks; $i++) {
    $selected = "";
    if ($task_id == $tasks->tas_id[$i]) {
        $selected = " selected";
    }
    echo "<option value='" . $tasks->tas_id[$i] . "'" . $selected . ">" . $tasks->tas_name[$i] . "</option>";
}
//*** Travailleur ***
$tmpquery = " WHERE mem.profil != 3 AND mem.profil!= 0";
$tmpquery .= " ORDER BY mem.name";
$projmem = new request();
$projmem->openMembers($tmpquery);
开发者ID:TICanalyste,项目名称:netOffice--remix-,代码行数:31,代码来源:encode.php

示例7: array

//--- block header ----
$block3->form = 'saTlC';
$block3->openForm("../tasks/listtasks.php?project={$project}#" . $block3->form . "Anchor");
if (isset($flag_phases) && $flag_phases == true) {
    $block3->sorting("tasks_closed", $sortingUser->sor_tasks_closed[0], "tas.due_date ASC", $sortingFields = array("tas.priority", "tas.name", "tas.status", "tas.completion", "tas.due_date", 'tas.parent_phase', "mem.login", "tas.published"));
} else {
    $block3->sorting("tasks_closed", $sortingUser->sor_tasks_closed[0], "tas.due_date ASC", $sortingFields = array("tas.priority", "tas.name", "tas.status", "tas.completion", "tas.due_date", "mem.login", "tas.published"));
}
$block3->borne = $blockPage->returnBorne('1');
$block3->rowsLimit = '20';
//--- get data from sql ---------
$tmpquery = "WHERE tas.project = '{$project}' AND tas.status NOT IN(0,2,3,5) AND tas.milestone = '1' ORDER BY {$block3->sortingValue}";
$block3->recordsTotal = compt($initrequest['tasks'] . ' ' . $tmpquery);
//--- list ---------
$listClosedTasks = new request();
$listClosedTasks->openTasks($tmpquery, $block3->borne, $block3->rowsLimit);
$comptListTasks = count($listClosedTasks->tas_id);
$block3->headingToggle($strings['tasks_closed'] . ' <span class=addition>(' . $comptListTasks . ')</span>');
$block3->openPaletteIcon();
if ($teamMember == 'true' || $_SESSION['profilSession'] == '5') {
    $block3->paletteIcon(0, 'add', $strings['add']);
    $block3->paletteIcon(1, 'remove', $strings['delete']);
    $block3->paletteIcon(2, 'copy', $strings['copy']);
    // $block3->paletteIcon(3,'export',$strings['export']);
    if ($sitePublish == 'true') {
        $block3->paletteIcon(4, 'add_projectsite', $strings['add_project_site']);
        $block3->paletteIcon(5, 'remove_projectsite', $strings['remove_project_site']);
    }
}
$block3->paletteIcon(6, 'info', $strings['view']);
if ($teamMember == 'true' || $_SESSION['profilSession'] == '5') {
开发者ID:TICanalyste,项目名称:netOffice--remix-,代码行数:31,代码来源:listtasks.php

示例8: request

 $listPhases = new request();
 $listPhases->openPhases($queryPhase);
 $comptListPhases = count($listPhases->pha_id);
 $blockProject->openResults($checkbox = "false");
 // $blockProject->labels($labels = array(0=>$strings["phase"],1=>$strings["status"],2=>$strings["total_tasks"],3=>$strings["uncomplete_tasks"],4=>$strings["date_start"],5=>$strings["date_end"],6=>$strings['completion']),"true");
 $blockProject->labels($labels = array(0 => $strings["phase"], 1 => $strings["status"], 2 => $strings["total_tasks"], 3 => $strings["uncomplete_tasks"], 4 => $strings["date_start"], 5 => $strings["date_end"]), "true");
 if ($comptListProjects != "0") {
     for ($i = 0; $i < $comptListPhases; $i++) {
         $phaseNum = $listPhases->pha_order_num[$i];
         $phaseName = $listPhases->pha_name[$i];
         $phaseStart = $listPhases->pha_date_start[$i];
         $phaseEnd = $listPhases->pha_date_end[$i];
         $tmpquery = "WHERE tas.project = '{$projectId}' ";
         $tmpquery .= "AND tas.parent_phase = '{$phaseNum}'";
         $countPhaseTasks = new request();
         $countPhaseTasks->openTasks($tmpquery);
         $comptlistTasks = count($countPhaseTasks->tas_id);
         $comptlistTasksRow = "0";
         $comptUncompleteTasks = "0";
         $phaseCompleted = 0;
         for ($k = 0; $k < $comptlistTasks; $k++) {
             if ($phaseNum == $countPhaseTasks->tas_parent_phase[$k]) {
                 $comptlistTasksRow = $comptlistTasksRow + 1;
                 if ($countPhaseTasks->tas_status[$k] == "2" || $countPhaseTasks->tas_status[$k] == "3" || $countPhaseTasks->tas_status[$k] == "4") {
                     $comptUncompleteTasks = $comptUncompleteTasks + 1;
                 }
             }
             if ($countPhaseTasks->tas_start_date[$k] != "--" and $countPhaseTasks->tas_start_date[$k] != "") {
                 if ($phaseStart == "--" or $phaseStart == "") {
                     $phaseStart = $countPhaseTasks->tas_start_date[$k];
                 }
开发者ID:jgatica,项目名称:Netoffice,代码行数:31,代码来源:phasestatus.php

示例9: IN

    echo "<option value='" . ALL_WORKERS . "' selected>-- " . $strings["all_workers"] . " --</option>";
    for ($i = 0; $i < $comptProjmem; $i++) {
        $selected = "";
        if (($worker_id == $projmem->mem_id[$i] || $worker_id == 0 && $_SESSION['idSession'] == $projmem->mem_id[$i]) && $worker_id != ALL_WORKERS) {
            $selected = " selected";
        }
        echo "<option value='" . $projmem->mem_id[$i] . "'" . $selected . ">" . $projmem->mem_name[$i] . "{$clientUser}</option>";
    }
    echo "</select>";
    //"&nbsp;&nbsp;&nbsp;" .
    //buildLink("../_addon/timesheets_report.php?dateCalend=$dateCalend&worker_id=".ALL_WORKERS, $strings["all_workers"], LINK_INSIDE);
    //*** Off Type ***
    $tmpquery = " WHERE tas.id IN (" . implode(",", $aOffDayTypes) . ")";
    $tmpquery .= " ORDER BY tas.name ASC";
    $taskTypes = new request();
    $taskTypes->openTasks($tmpquery);
    $comptTaskTypes = count($taskTypes->tas_id);
    echo "&nbsp;&nbsp;<select name='offType' onChange=\"this.form.submit();\">";
    echo "<option value='" . ALL_OFF_TYPES . "' selected>-- " . $strings["all_off_types"] . " --</option>";
    for ($i = 0; $i < $comptTaskTypes; $i++) {
        $selected = "";
        if ($offType == $taskTypes->tas_id[$i] && $offType != ALL_OFF_TYPES) {
            $selected = " selected";
        }
        echo "<option value='" . $taskTypes->tas_id[$i] . "'" . $selected . ">" . $taskTypes->tas_name[$i] . "</option>";
    }
    echo "</select>";
    //"&nbsp;&nbsp;&nbsp;" .
    //buildLink("../_addon/timesheets_report.php?dateCalend=$dateCalend&worker_id=".ALL_WORKERS, $strings["all_workers"], LINK_INSIDE);
}
echo "</form>";
开发者ID:TICanalyste,项目名称:netOffice--remix-,代码行数:31,代码来源:absence_report.php

示例10: convertData

    $c = convertData($c);
    if ($st == 0) {
        $ed = "--";
    }
    if ($st == 1) {
        $ed = "--";
    }
    if ($st == 2 && $ed == "--") {
        $ed = date('Y-m-d');
    }
    $tmpquery = "UPDATE " . $tableCollab["phases"] . " SET status='{$st}', date_start='{$sd}', date_end='{$ed}', comments='{$c}' WHERE id = '{$id}'";
    connectSql("{$tmpquery}");
    if ($st != 1) {
        $tmpquery = "WHERE tas.parent_phase = '{$id}' AND tas.status = '3'";
        $changeTasks = new request();
        $changeTasks->openTasks($tmpquery);
        $comptchangeTasks = count($changeTasks->tas_id);
        for ($i = 0; $i < $comptchangeTasks; $i++) {
            $taskID = $changeTasks->tas_id[$i];
            $tmpquery = "UPDATE " . $tableCollab["tasks"] . " SET status='4' WHERE id = '{$taskID}'";
            connectSql("{$tmpquery}");
        }
    }
    header("Location: ../phases/viewphase.php?id={$id}");
    exit;
}
//--- header ---
$breadcrumbs[] = buildLink("../projects/listprojects.php?", $strings["projects"], LINK_INSIDE);
$breadcrumbs[] = buildLink("../projects/viewproject.php?id=" . $projectDetail->pro_id[0], $projectDetail->pro_name[0], LINK_INSIDE);
$breadcrumbs[] = $phaseDetail->pha_name[0];
require_once "../themes/" . THEME . "/header.php";
开发者ID:jgatica,项目名称:Netoffice,代码行数:31,代码来源:editphase.php

示例11: getInitalOff

 function getInitalOff($worker_id, $off_id = TASKTYPE_LEGAL_OFF)
 {
     global $default_days_off, $default_days_off_other, $dayHours, $strings, $year, $aOffDayTypes;
     global $remaining_off_hours, $off_hours_message;
     if ($worker_id) {
         $task_owner = $worker_id;
     } else {
         $task_owner = $_SESSION["idSession"];
     }
     if ($off_id == ALL_OFF_TYPES) {
         $off_id_list = "(";
         for ($local_off_type = 0; $local_off_type <= count($aOffDayTypes); $local_off_type++) {
             $off_id_list .= "(tas.name LIKE '%- " . $aOffDayTypes[$local_off_type] . " -%')";
             if ($local_off_type < count($aOffDayTypes)) {
                 $off_id_list .= " OR ";
             }
         }
         $off_id_list .= ")";
     } else {
         $off_id_list = "tas.name LIKE '%- " . $off_id . " -%'";
     }
     $query = "WHERE (tas.name LIKE '%- {$task_owner} -%' AND {$off_id_list} AND tas.name LIKE '%- {$year} -%' AND pro.id = " . DAYSOFF_PROJECT . ")";
     // 		echo $query."<br/>";
     $off_hours = new request();
     $off_hours->openTasks($query, "", 1);
     $comptOffHours = count($off_hours->tas_id);
     if ($comptOffHours > 0) {
         //Add all off day types
         $off_type_index = 0;
         $remaining_off_hours = 0;
         while ($off_type_index < count($off_hours->tas_estimated_time)) {
             $remaining_off_hours += $off_hours->tas_estimated_time[$off_type_index];
             $off_type_index++;
         }
         $off_hours_message = $strings["specific"];
     } else {
         if ($off_id == TASKTYPE_LEGAL_OFF) {
             $remaining_off_hours = $default_days_off * $dayHours;
         } else {
             if ($off_id == ALL_OFF_TYPES) {
                 $remaining_off_hours = ($default_days_off + $default_days_off_other) * $dayHours;
             } else {
                 $remaining_off_hours = $default_days_off_other * $dayHours;
             }
         }
         $off_hours_message = $strings["default"];
     }
 }
开发者ID:TICanalyste,项目名称:netOffice--remix-,代码行数:48,代码来源:addon_hours_summary.php

示例12: projectComputeCompletion

function projectComputeCompletion($projectDetail, $tableProject)
{
    $prj_name = $projectDetail->pro_name[0];
    preg_match("/\\[([0-9 ]*\\/[0-9 ]*)\\]/", $prj_name, $findit);
    if ($findit[1] != "") {
        $prj_id = $projectDetail->pro_id[0];
        $taskDetails = new request();
        $tmpquery = "WHERE tas.project = '{$prj_id}'";
        $taskDetails->openTasks($tmpquery);
        $tasksNumb = count($taskDetails->tas_id);
        $tasksCompleted = 0;
        foreach ($taskDetails->tas_status as $stat) {
            if ($stat == 1) {
                $tasksCompleted++;
            }
        }
        $prj_name = preg_replace("/\\[[0-9 ]*\\/[0-9 ]*\\]/", "[ {$tasksCompleted} / {$tasksNumb} ]", $prj_name);
        $tmpquery5 = "UPDATE " . $tableProject . " SET name='{$prj_name}' WHERE id = '{$prj_id}'";
        $ad = connectSql($tmpquery5);
    }
    return $prj_name;
}
开发者ID:soitun,项目名称:phpcollab,代码行数:22,代码来源:library.php


注:本文中的request::openTasks方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。