|
Revision 1283, 1.6 kB
(checked in by scitech, 4 months ago)
|
Cleaning gui/admin/domain_status_change.php
|
| Line | |
|---|
| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 |
require '../include/ispcp-lib.php'; |
|---|
| 21 |
check_login(__FILE__); |
|---|
| 22 |
|
|---|
| 23 |
if (!isset($_GET['domain_id'])) { |
|---|
| 24 |
header( "Location: manage_users.php" ); |
|---|
| 25 |
die(); |
|---|
| 26 |
} |
|---|
| 27 |
|
|---|
| 28 |
if (!is_numeric($_GET['domain_id'])) { |
|---|
| 29 |
header( "Location: manage_users.php" ); |
|---|
| 30 |
die(); |
|---|
| 31 |
} |
|---|
| 32 |
|
|---|
| 33 |
$domain_id = $_GET['domain_id']; |
|---|
| 34 |
|
|---|
| 35 |
$query = <<<SQL_QUERY |
|---|
| 36 |
SELECT |
|---|
| 37 |
`domain_name`, |
|---|
| 38 |
`domain_status` |
|---|
| 39 |
FROM |
|---|
| 40 |
`domain` |
|---|
| 41 |
WHERE |
|---|
| 42 |
`domain_id` = ? |
|---|
| 43 |
SQL_QUERY; |
|---|
| 44 |
|
|---|
| 45 |
$rs = exec_query($sql, $query, array($domain_id)); |
|---|
| 46 |
|
|---|
| 47 |
$location = 'admin'; |
|---|
| 48 |
|
|---|
| 49 |
if ($rs -> fields['domain_status'] == Config::get('ITEM_OK_STATUS')) { |
|---|
| 50 |
$action = "disable"; |
|---|
| 51 |
change_domain_status(&$sql, $domain_id, $rs -> fields['domain_name'], $action, $location); |
|---|
| 52 |
} else if ($rs -> fields['domain_status'] == Config::get('ITEM_DISABLED_STATUS')) { |
|---|
| 53 |
$action = "enable"; |
|---|
| 54 |
change_domain_status(&$sql, $domain_id, $rs -> fields['domain_name'], $action, $location); |
|---|
| 55 |
} else { |
|---|
| 56 |
header( "Location: manage_users.php" ); |
|---|
| 57 |
die(); |
|---|
| 58 |
} |
|---|
| 59 |
?> |
|---|