remove active option

This commit is contained in:
mischa 2022-09-02 21:23:34 +00:00
parent 05eea069af
commit 6504b8e509
4 changed files with 0 additions and 135 deletions

View File

@ -1,43 +0,0 @@
<?php
//
// OpenSMTPD Admin
// by Mischa Peters <mischa at high5 dot nl>
// Copyright (c) 2022 High5!
// License Info: LICENSE.TXT
//
// File: edit-active.php
//
// Template File: message.tpl
//
// Template Variables:
//
// tMessage
//
// Form POST \ GET Variables:
//
// fUsername
//
require("../variables.inc.php");
require("../config.inc.php");
require("../functions.inc.php");
include("../languages/" . check_language() . ".lang");
if ($_SERVER['REQUEST_METHOD'] == "GET") {
if (isset($_GET['username'])) $fUsername = escape_string($_GET['username']);
$result = db_query("UPDATE admin SET active=1-active WHERE username='$fUsername'");
if ($result['rows'] != 1) {
$error = 1;
$tMessage = $PALANG['pAdminEdit_admin_result_error'];
}
if ($error != 1) {
header("Location: list-admin.php");
exit;
}
}
include("../templates/header.tpl");
include("../templates/admin_menu.tpl");
include("../templates/message.tpl");
include("../templates/footer.tpl");
?>

View File

@ -1,43 +0,0 @@
<?php
//
// OpenSMTPD Admin
// by Mischa Peters <mischa at high5 dot nl>
// Copyright (c) 2022 High5!
// License Info: LICENSE.TXT
//
// File: edit-active.php
//
// Template File: message.tpl
//
// Template Variables:
//
// tMessage
//
// Form POST \ GET Variables:
//
// fDomain
//
require("../variables.inc.php");
require("../config.inc.php");
require("../functions.inc.php");
include("../languages/" . check_language() . ".lang");
if ($_SERVER['REQUEST_METHOD'] == "GET") {
if (isset($_GET['domain'])) $fDomain = escape_string($_GET['domain']);
$result = db_query("UPDATE domain SET active=1-active WHERE domain='$fDomain'");
if ($result['rows'] != 1) {
$error = 1;
$tMessage = $PALANG['pAdminEdit_domain_result_error'];
}
if ($error != 1) {
header("Location: list-domain.php");
exit;
}
}
include("../templates/header.tpl");
include("../templates/admin_menu.tpl");
include("../templates/message.tpl");
include("../templates/footer.tpl");
?>

View File

@ -1,47 +0,0 @@
<?php
//
// OpenSMTPD Admin
// by Mischa Peters <mischa at high5 dot nl>
// Copyright (c) 2022 High5!
// License Info: LICENSE.TXT
//
// File: edit-active.php
//
// Template File: message.tpl
//
// Template Variables:
//
// tMessage
//
// Form POST \ GET Variables:
//
// fUsername
// fDomain
//
require("../variables.inc.php");
require("../config.inc.php");
require("../functions.inc.php");
include("../languages/" . check_language() . ".lang");
if ($_SERVER['REQUEST_METHOD'] == "GET") {
if (isset($_GET['username'])) $fUsername = escape_string($_GET['username']);
if (isset($_GET['domain'])) $fDomain = escape_string($_GET['domain']);
$result = db_query("UPDATE mailbox SET active=1-active WHERE username='$fUsername' AND domain='$fDomain'");
if ($result['rows'] != 1) {
$error = 1;
$tMessage = $PALANG['pEdit_mailbox_result_error'];
} else {
db_log($CONF['admin_email'], $fDomain, "edit active", $fUsername);
}
if ($error != 1) {
header("Location: list-virtual.php?domain=$fDomain");
exit;
}
}
include("../templates/header.tpl");
include("../templates/admin_menu.tpl");
include("../templates/message.tpl");
include("../templates/footer.tpl");
?>

View File

@ -6,7 +6,6 @@ if (count($list_admins) > 0) {
echo " <td>" . $PALANG['pAdminList_admin_username'] . "</td>\n";
echo " <td>" . $PALANG['pAdminList_admin_count'] . "</td>\n";
echo " <td>" . $PALANG['pAdminList_admin_modified'] . "</td>\n";
echo " <td>" . $PALANG['pAdminList_admin_active'] . "</td>\n";
echo " <td colspan=\"2\">&nbsp;</td>\n";
echo " </tr>\n";
@ -17,7 +16,6 @@ if (count($list_admins) > 0) {
echo " <td>" . $row['domain_count'] . "</td>";
echo " <td>" . $row['modified'] . "</td>";
$active = ($row['active'] == 1) ? $PALANG['YES'] : $PALANG['NO'];
echo " <td><a href=\"edit-active-admin.php?username=" . $row['username'] . "\">" . $active . "</a></td>";
echo " <td><a href=\"edit-admin.php?username=" . $row['username'] . "\">" . $PALANG['edit'] . "</a></td>";
echo " <td><a href=\"delete.php?table=admin&where=username&delete=" . $row['username'] . "\" onclick=\"return confirm ('" . $PALANG['confirm'] . $PALANG['pAdminList_admin_username'] . ": " . $row['username'] . "')\">" . $PALANG['del'] . "</a></td>";
echo " </tr>\n";