Пример #1
0
    $listTasks = new request();
    $listTasks->openTasks($tmpquery);
    $comptListTasks = count($listTasks->tas_id);
    for ($i = 0; $i < $comptListTasks; $i++) {
        if ($fileManagement == "true") {
            delDir("../files/" . $listTasks->tas_project[$i] . "/" . $listTasks->tas_id[$i]);
        }
    }
    connectSql("{$tmpquery1}");
    connectSql("{$tmpquery2}");
    connectSql("{$tmpquery3}");
    //recompute number of completed tasks of the project
    $tmpquery = "WHERE pro.id = '" . $listTasks->tas_project[0] . "'";
    $projectDetail = new request();
    $projectDetail->openProjects($tmpquery);
    projectComputeCompletion($listTasks->tas_project[$i], $tableCollab["projects"]);
    if ($project != "") {
        headerFunction("../projects/viewproject.php?id={$project}&msg=delete&" . session_name() . "=" . session_id());
        exit;
    } else {
        headerFunction("../general/home.php?msg=delete&" . session_name() . "=" . session_id());
        exit;
    }
}
$tmpquery = "WHERE pro.id = '{$project}'";
$projectDetail = new request();
$projectDetail->openProjects($tmpquery);
include '../themes/' . THEME . '/header.php';
$blockPage = new block();
$blockPage->openBreadcrumbs();
if ($project != "") {
Пример #2
0
     }
     $tmpquery = "WHERE project = '{$project}'";
     $detailInvoice = new request();
     $detailInvoice->openInvoices($tmpquery);
     if ($detailInvoice->inv_status[0] == "0") {
         //$tmpquery3 = "INSERT INTO ".$tableCollab["invoices_items"]." SET title='$task_name',description='$d',invoice='".$detailInvoice->inv_id[0]."',created='$dateheure',active='$invoicing',completed='$completeItem',mod_type='1',mod_value='$num',worked_hours='$worked_hours'";
         $tmpquery3 = "INSERT INTO " . $tableCollab["invoices_items"] . " (title,description,invoice,created,active,completed,mod_type,mod_value,worked_hours) VALUES ('{$task_name}','{$d}','" . fixInt($detailInvoice->inv_id[0]) . "','{$dateheure}','{$invoicing}','{$completeItem}','1','{$num}','{$worked_hours}')";
         connectSql($tmpquery3);
     }
 }
 if ($st == "1") {
     $tmpquery6 = "UPDATE " . $tableCollab["tasks"] . " SET complete_date='{$date}' WHERE id = '{$num}'";
     connectSql($tmpquery6);
 }
 //recompute number of completed tasks of the project
 $projectDetail->pro_name[0] = projectComputeCompletion($projectDetail, $tableCollab["projects"]);
 //if assigned_to not blank, set assigned date
 if ($at != "0") {
     $tmpquery6 = "UPDATE " . $tableCollab["tasks"] . " SET assigned='{$dateheure}' WHERE id = '{$num}'";
     connectSql($tmpquery6);
 }
 $tmpquery2 = "INSERT INTO " . $tableCollab["assignments"] . "(task,owner,assigned_to,assigned) VALUES('{$num}','{$idSession}','{$at}','{$dateheure}')";
 connectSql($tmpquery2);
 //if assigned_to not blank, add to team members (only if doesn't already exist)
 //add assigned_to in team members (only if doesn't already exist)
 if ($at != "0") {
     $tmpquery = "WHERE tea.project = '{$project}' AND tea.member = '{$at}'";
     $testinTeam = new request();
     $testinTeam->openTeams($tmpquery);
     $comptTestinTeam = count($testinTeam->tea_id);
     if ($comptTestinTeam == "0") {