Register globals
This commit is contained in:
parent
43ce9c4138
commit
279fa9bd1e
|
@ -5,6 +5,18 @@ if (!$admin->enabled) {
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$fields = array (
|
||||||
|
"name" => array ("post", "string", ""),
|
||||||
|
"description" => array ("post", "string", ""),
|
||||||
|
"target" => array ("post", "string", ""),
|
||||||
|
"entry" => array ("post", "string", ""),
|
||||||
|
"compatibility" => array ("post", "string", ""),
|
||||||
|
"enable" => array ("post", "string", ""),
|
||||||
|
"only_dns" => array ("post", "string", ""),
|
||||||
|
"need_dns" => array ("post", "string", ""),
|
||||||
|
"advanced" => array ("post", "string", ""),
|
||||||
|
);
|
||||||
|
getFields($fields);
|
||||||
|
|
||||||
if ( ! $dom->domains_type_update($name, $description, $target, $entry, $compatibility, $enable, $only_dns, $need_dns, $advanced) ) {
|
if ( ! $dom->domains_type_update($name, $description, $target, $entry, $compatibility, $enable, $only_dns, $need_dns, $advanced) ) {
|
||||||
die($err->errstr());
|
die($err->errstr());
|
||||||
|
|
|
@ -34,7 +34,7 @@ if (!isset($_SERVER['PHP_AUTH_USER'])) {
|
||||||
header('WWW-Authenticate: Basic realm="Domain List Authentication"');
|
header('WWW-Authenticate: Basic realm="Domain List Authentication"');
|
||||||
header('HTTP/1.0 401 Unauthorized');
|
header('HTTP/1.0 401 Unauthorized');
|
||||||
exit;
|
exit;
|
||||||
} else {
|
} else {
|
||||||
if ($dom->check_slave_account($_SERVER['PHP_AUTH_USER'],$_SERVER['PHP_AUTH_PW'])) {
|
if ($dom->check_slave_account($_SERVER['PHP_AUTH_USER'],$_SERVER['PHP_AUTH_PW'])) {
|
||||||
$dom->echo_domain_list();
|
$dom->echo_domain_list();
|
||||||
} else {
|
} else {
|
||||||
|
@ -42,6 +42,6 @@ if (!isset($_SERVER['PHP_AUTH_USER'])) {
|
||||||
header('HTTP/1.0 401 Unauthorized');
|
header('HTTP/1.0 401 Unauthorized');
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
|
@ -30,6 +30,12 @@
|
||||||
require_once("../class/config.php");
|
require_once("../class/config.php");
|
||||||
|
|
||||||
include_once("head.php");
|
include_once("head.php");
|
||||||
|
$fields = array (
|
||||||
|
"id" => array ("post", "string", ""),
|
||||||
|
"restfile" => array ("post", "string", ""),
|
||||||
|
);
|
||||||
|
getFields($fields);
|
||||||
|
|
||||||
|
|
||||||
if (!$r=$mysql->get_mysql_details($id)) {
|
if (!$r=$mysql->get_mysql_details($id)) {
|
||||||
$error=$err->errstr();
|
$error=$err->errstr();
|
||||||
|
|
|
@ -185,7 +185,6 @@ class m_dom {
|
||||||
|
|
||||||
function domains_type_update($name, $description, $target, $entry, $compatibility, $enable, $only_dns, $need_dns,$advanced) {
|
function domains_type_update($name, $description, $target, $entry, $compatibility, $enable, $only_dns, $need_dns,$advanced) {
|
||||||
global $err,$cuid,$db;
|
global $err,$cuid,$db;
|
||||||
$id=intval($id);
|
|
||||||
// The name MUST contain only letter and digits, it's an identifier after all ...
|
// The name MUST contain only letter and digits, it's an identifier after all ...
|
||||||
if (!preg_match("#^[a-z0-9]+$#",$name)) {
|
if (!preg_match("#^[a-z0-9]+$#",$name)) {
|
||||||
$err->raise("dom", 26);
|
$err->raise("dom", 26);
|
||||||
|
|
Loading…
Reference in New Issue