44 lines
965 B
PHP
44 lines
965 B
PHP
<?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");
|
|
?>
|