示例#1
0
     $pieces = explode(",", $id);
     for ($j = 0; $j < count($pieces); $j++) {
         // remove the users from every repository
         $listTeams->tea_id = "";
         $listTeams->tea_project = "";
         $listTeams->tea_member = "";
         $listTeams->tea_published = "";
         $listTeams->tea_authorized = "";
         $listTeams->tea_mem_login = "";
         $listTeams->tea_pro_id = "";
         $tmpquery = "WHERE tea.member = '{$pieces[$j]}'";
         $listTeams = new request();
         $listTeams->openTeams($tmpquery);
         $comptListTeams = count($listTeams->tea_id);
         for ($i = 0; $i < $comptListTeams; $i++) {
             cvs_delete_user($listTeams->tea_mem_login[$i], $listTeams->tea_pro_id[$i]);
         }
     }
 }
 connectSql("{$tmpquery1}");
 connectSql("{$tmpquery2}");
 connectSql("{$tmpquery3}");
 connectSql("{$tmpquery4}");
 connectSql("{$tmpquery5}");
 connectSql("{$tmpquery6}");
 connectSql("{$tmpquery7}");
 // if mantis bug tracker enabled
 if ($enableMantis == "true") {
     // Call mantis function to remove user
     require_once "../mantis/user_delete.php";
 }
示例#2
0
        } else {
            connectSql("{$tmpquery1}");
            $msg = "delete";
            // if mantis bug tracker enabled
            if ($enableMantis == "true") {
                // Unassign single user from this project in mantis
                $f_project_id = $project;
                $f_user_id = $id;
                require_once "../mantis/user_proj_delete.php";
            }
            // if CVS repository enabled
            if ($enable_cvs == "true") {
                $user_query = "WHERE mem.id = '{$id}'";
                $cvsMember = new request();
                $cvsMember->openMembers($user_query);
                cvs_delete_user($cvsMember->mem_login[0], $project);
            }
        }
    }
    // $tmpquery3 = "UPDATE ".$tableCollab["tasks"]." SET assigned_to='0' WHERE assigned_to IN($id) AND assigned_to != '$projectDetail->pro_owner[0]'";
    // connectSql("$tmpquery3");
    if ($notifications == "true") {
        $organization = "1";
        require_once "../teams/noti_removeprojectteam.php";
    }
    header("Location: ../projects/viewproject.php?id={$project}&msg={$msg}");
    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);