Kod
<?php
$AFManager = array(
"headerOn" => TRUE,
"roots" => array(
array(
"type" => "FS", //FS (FileSystem) or FTP (FTP connection)
"name" => "files",
"directory" => "../files",
"urltodir" => "../files",
"permissions" => array(
"read" => TRUE,
"write" => array(
"all_is_indentical" => array(
"answer" => FALSE,
// "setAllTo" => TRUE //if answer is true remove "//" and all variables will be set to variable setAllTo
),
"delete" => TRUE,
"upload" => TRUE,
"create" => TRUE,
"edit" => TRUE,
"editCreated" => TRUE
),
"public" => TRUE
)
)
)
);
function readRoots() {
foreach($AFManager["roots"] as $k => $v) {
echo "OK";
switch($v["type"]){
case "FS":
echo "FS";
readRootsFS($v);
break;
case "FTP":
echo "FTP";
readRootsFTP($v);
break;
default:
echo "DEFAULT";
die("<error><status>errConf</status></error>");
break;
}
}
}
?>
$AFManager = array(
"headerOn" => TRUE,
"roots" => array(
array(
"type" => "FS", //FS (FileSystem) or FTP (FTP connection)
"name" => "files",
"directory" => "../files",
"urltodir" => "../files",
"permissions" => array(
"read" => TRUE,
"write" => array(
"all_is_indentical" => array(
"answer" => FALSE,
// "setAllTo" => TRUE //if answer is true remove "//" and all variables will be set to variable setAllTo
),
"delete" => TRUE,
"upload" => TRUE,
"create" => TRUE,
"edit" => TRUE,
"editCreated" => TRUE
),
"public" => TRUE
)
)
)
);
function readRoots() {
foreach($AFManager["roots"] as $k => $v) {
echo "OK";
switch($v["type"]){
case "FS":
echo "FS";
readRootsFS($v);
break;
case "FTP":
echo "FTP";
readRootsFTP($v);
break;
default:
echo "DEFAULT";
die("<error><status>errConf</status></error>");
break;
}
}
}
?>