force sync from /var/www/html/panel: 2025-09-08T20:36:30Z

This commit is contained in:
auto-sync 2025-09-08 16:36:30 -04:00
commit 4f717c9ee8
18119 changed files with 2566034 additions and 0 deletions

View file

@ -0,0 +1,59 @@
<?php
if (file_exists("config.php")) {
include 'config.php';
} else {
die("config.php must exist within the installation root folder!");
}
include_once 'db_functions.php';
// Deletes passed in user account from database
// Unless the actual delete command fails, success should be 1... we don't care if the account doesn't exist.
$success = 1;
$errorCount = 0;
if (isset($errors)) {
unset($errors);
}
if (isset($_GET['username'])) {
$userToDelete = $_GET['username'];
}
if (!isset($userToDelete)) {
$errorCount++;
$errors[] = "No username was passed to the form.";
} else {
$SQL = "SELECT ftpusername FROM ftpaccounts WHERE ftpusername = '$userToDelete'";
$Result = execSQL($SQL, $connection);
if ($Result !== FALSE && countSQLResult($Result) == 1) {
$row = getSQLRowArray($Result);
$unameDeleted = $row[0];
}else{
$errorCount++;
$errors[] = "The specified user $userToDelete does not exist within the databse. No actions were taken!";
}
if (isset($unameDeleted)) {
$SQL = "DELETE FROM ftpaccounts WHERE ftpusername = '$userToDelete'";
$Result = execSQL($SQL, $connection);
if ($Result !== FALSE) {
$success = 1;
} else {
$errorCount++;
$errors[] = getSQLError($connection);
$success = 0;
}
}
}
// Log errors
if ($errorCount > 0) {
addToLog($errors);
}
// Return value:
echo $success;
?>