Menu

[r9]: / teams / deleteclientusers.php  Maximize  Restore  History

Download this file

104 lines (84 with data), 3.4 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
<?php
#Application name: PhpCollab
#Status page: 1
#Path by root: ../teams/deleteclientusers.php
$checkSession = "true";
include_once('../includes/library.php');
$tmpquery = "WHERE pro.id = '$project'";
$projectDetail = new request();
$projectDetail->openProjects($tmpquery);
$comptProjectDetail = count($projectDetail->pro_id);
if ($comptProjectDetail == "0") {
headerFunction("../projects/listprojects.php?msg=blank&".session_name()."=".session_id());
exit;
}
if ($action == "delete") {
$id = str_replace("**",",",$id);
$pieces = explode(",",$id);
if ($htaccessAuth == "true") {
include("../includes/htpasswd.class.php");
$Htpasswd = new Htpasswd;
$Htpasswd->initialize("../files/".$projectDetail->pro_id[0]."/.htpasswd");
$tmpquery = "WHERE mem.id IN($id)";
$listMembers = new request();
$listMembers->openMembers($tmpquery);
$comptListMembers = count($listMembers->mem_id);
for ($i=0;$i<$comptListMembers;$i++) {
$Htpasswd->deleteUser($listMembers->mem_login[$i]);
}
}
//if mantis bug tracker enabled
if ($enableMantis == "true") {
// include mantis library
include( "../mantis/core_API.php" );
}
$compt = count($pieces);
for ($i=0;$i<$compt;$i++) {
$tmpquery1 = "DELETE FROM ".$tableCollab["teams"]." WHERE member = '$pieces[$i]'";
connectSql("$tmpquery1");
//if mantis bug tracker enabled
if ($enableMantis == "true") {
// Unassign user from this project in mantis
$f_project_id = $project;
$f_user_id = $pieces[$i];
include("../mantis/user_proj_delete.php");
}
}
if ($notifications == "true") {
$organization = "";
include("../teams/noti_removeprojectteam.php");
}
headerFunction("../projects/viewprojectsite.php?id=$project&msg=removeClientToSite&".session_name()."=".session_id());
exit;
}
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));
$blockPage->itemBreadcrumbs($blockPage->buildLink("../projects/viewprojectsite.php?id=".$projectDetail->pro_id[0],$strings["project_site"],in));
$blockPage->itemBreadcrumbs($strings["remove_team_client"]);
$blockPage->closeBreadcrumbs();
if ($msg != "") {
include('../includes/messages.php');
$blockPage->messagebox($msgLabel);
}
$block1 = new block();
$block1->form = "crM";
$block1->openForm("../teams/deleteclientusers.php?project=$project&action=delete&id=$id&".session_name()."=".session_id());
$block1->heading($strings["remove_team_client"]);
$block1->openContent();
$block1->contentTitle($strings["remove_team_info"]);
$id = str_replace("**",",",$id);
$tmpquery = "WHERE mem.id IN($id) ORDER BY mem.name";
$listMembers = new request();
$listMembers->openMembers($tmpquery);
$comptListMembers = count($listMembers->mem_id);
for ($i=0;$i<$comptListMembers;$i++) {
$block1->contentRow("#".$listMembers->mem_id[$i],$listMembers->mem_login[$i]." (".$listMembers->mem_name[$i].")");
}
$block1->contentRow("","<input type=\"SUBMIT\" value=\"".$strings["delete"]."\">&#160;<input type=\"BUTTON\" value=\"".$strings["remove"]."\" onClick=\"history.back();\">");
$block1->closeContent();
$block1->closeForm();
include('../themes/'.THEME.'/footer.php');
?>
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.