$em = convertData($em); $wp = convertData($wp); $hp = convertData($hp); $mp = convertData($mp); $fax = convertData($fax); $tmpquery = "UPDATE " . $tableCollab["members"] . " SET login='******',name='{$fn}',title='{$tit}',email_work='{$em}',phone_work='{$wp}',phone_home='{$hp}',mobile='{$mp}',fax='{$fax}',comments='{$c}',profil='{$perm}' WHERE id = '{$id}'"; connectSql("{$tmpquery}"); if ($htaccessAuth == "true") { if ($un != $unOld) { $tmpquery = "WHERE tea.member = '{$id}'"; $listProjects = new request(); $listProjects->openTeams($tmpquery); $comptListProjects = count($listProjects->tea_id); if ($comptListProjects != "0") { for ($i = 0; $i < $comptListProjects; $i++) { $Htpasswd->initialize("../files/" . $listProjects->tea_pro_id[$i] . "/.htpasswd"); $Htpasswd->renameUser($unOld, $un); } } } } // test if new password set if ($pw != "") { // test if 2 passwords match if ($pw != $pwa || $pwa == "") { $error = $strings["new_password_error"]; } else { $pw = get_password($pw); if ($htaccessAuth == "true") { if ($un == $unOld) { $tmpquery = "WHERE tea.member = '{$id}'";
} if ($htaccessAuth == 'true') { $content = <<<STAMP AuthName "{$setTitle}" AuthType Basic Require valid-user AuthUserFile {$fullPath}/files/{$num}/.htpasswd STAMP; $fp = @fopen('../files/' . $num . '/.htaccess', 'wb+'); $fw = fwrite($fp, $content); $fp = @fopen('../files/' . $num . '/.htpasswd', 'wb+'); $tmpquery = "WHERE mem.id = '{$pown}'"; $detailMember = new request(); $detailMember->openMembers($tmpquery); $Htpasswd = new Htpasswd(); $Htpasswd->initialize('../files/' . $num . '/.htpasswd'); $Htpasswd->addUser($detailMember->mem_login[0], $detailMember->mem_password[0]); } // if mantis bug tracker enabled if ($enableMantis == 'true') { // call mantis function to copy project require_once '../mantis/proj_add.php'; } // create phase structure if enable phase was selected as true if ($thisPhase != '0') { $comptThisPhase = count($phaseArraySets[$thisPhase]); for ($i = 0; $i < $comptThisPhase; $i++) { $tmpquery = 'INSERT INTO ' . $tableCollab['phases'] . "(project_id,order_num,status,name) VALUES('{$num}','{$i}','0','" . $phaseArraySets[$thisPhase][$i] . "')"; connectSql($tmpquery); } }
require_once "../includes/library.php"; $tmpquery = "WHERE pro.id = '{$project}'"; $projectDetail = new request(); $projectDetail->openProjects($tmpquery); $comptProjectDetail = count($projectDetail->pro_id); if ($comptProjectDetail == "0") { header("Location: ../projects/listprojects.php?msg=blank"); exit; } if ($action == "delete") { $id = str_replace("**", ",", $id); $pieces = explode(",", $id); if ($htaccessAuth == "true") { require_once "../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 require_once "../mantis/core_API.php"; } $compt = count($pieces); for ($i = 0; $i < $compt; $i++) {
} if ($htaccessAuth == "true") { $content = <<<STAMP AuthName "{$setTitle}" AuthType Basic Require valid-user AuthUserFile {$fullPath}/files/{$num}/.htpasswd STAMP; $fp = @fopen("../files/{$num}/.htaccess", 'wb+'); $fw = fwrite($fp, $content); $fp = @fopen("../files/{$num}/.htpasswd", 'wb+'); $tmpquery = "WHERE mem.id = '{$pown}'"; $detailMember = new request(); $detailMember->openMembers($tmpquery); $Htpasswd = new Htpasswd(); $Htpasswd->initialize("../files/" . $num . "/.htpasswd"); $Htpasswd->addUser($detailMember->mem_login[0], $detailMember->mem_password[0]); } //if mantis bug tracker enabled if ($enableMantis == "true") { // call mantis function to copy project include "../mantis/proj_add.php"; } //create phase structure if enable phase was selected as true if ($thisPhase != "0") { $comptThisPhase = count($phaseArraySets[$thisPhase]); for ($i = 0; $i < $comptThisPhase; $i++) { $tmpquery = "INSERT INTO " . $tableCollab["phases"] . "(project_id,order_num,status,name) VALUES('{$num}','{$i}','0','" . $phaseArraySets[$thisPhase][$i] . "')"; connectSql("{$tmpquery}"); } }