You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
57 lines
1.3 KiB
PHP
57 lines
1.3 KiB
PHP
<?php
|
|
//
|
|
// 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 = $_GET['username'];
|
|
if (isset ($_GET['domain'])) $fDomain = $_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");
|
|
}
|
|
|
|
if ($_SERVER['REQUEST_METHOD'] == "POST")
|
|
{
|
|
include ("../templates/header.tpl");
|
|
include ("../templates/admin_menu.tpl");
|
|
include ("../templates/message.tpl");
|
|
include ("../templates/footer.tpl");
|
|
}
|
|
?>
|