} } $msg = _pfc("User %s deleted.", $username); header('Location: ' . $_SERVER['PHP_SELF'] . '?msg=' . rawurlencode($msg)); exit; } } # Modification or Creation of a user if (!empty($_POST['username'])) { $username = $_POST['username']; $password = $_POST['password']; $create = 0; if (!$ht->isUser($username)) { #Add User if (!empty($password)) { $ht->addUser($username, $password); $create = 1; } } else { #Modify User if (!empty($password)) { $ht->setPasswd($username, $password); } } $groups = $ht->getGroups(); for ($j = 0; $j < count($groups); $j++) { $group = $_POST['group']; if ($group == $groups[$j]) { $ht->addUserInGroup($username, $groups[$j]); } else { $ht->delUserFromGroup($username, $groups[$j]);
} $sql = "SELECT * FROM {$trans_table} WHERE {$affiliation} AND `td_recur_processed` = 0 and status='A' AND `td_recur_next_date`>=CURDATE()"; $result = mysql_query($sql, $cnn_cs) or dieLog(mysql_errno() . ": " . mysql_error() . "<br>Cannot execute query"); $num = mysql_num_rows($result); //if($num<1) die("UNF"); $accessDir = "/home/etel/public_html/access/" . $siteInfo['cs_reference_ID'] . "/"; $ht = new htaccess(); // Setting up path of password file // Setting up path of password file @mkdir($accessDir); chdir($accessDir); $ht->setFPasswd($accessDir . "htpasswd"); //$ht->setFHtaccess($accessDir.".htaccess"); // Setting authenification type // If you don't set, the default type will be "Basic" $ht->setAuthType("Basic"); // Setting authenification area name // If you don't set, the default name will be "Internal Area" $ht->setAuthName("Members Area"); while ($accountInfo = mysql_fetch_assoc($result)) { // Adding user $ht->addUser($accountInfo['td_username'], $accountInfo['td_password'], ""); $tohash .= $accountInfo['td_username'] . ":" . $accountInfo['td_password']; } $hash = md5($tohash); if ($hash == $siteInfo['cs_user_checksum']) { die("CUR"); } $result = mysql_query("UPDATE `cs_company_sites` set `cs_user_checksum`= '{$hash}' WHERE `cs_gatewayId` = " . $_SESSION["gw_id"] . " AND `cs_reference_id` = '{$mt_reference_id}'", $cnn_cs) or dieLog(mysql_errno() . ": " . mysql_error() . "<br>Cannot execute query"); //$ht->addLogin(); die("NEW");