<?
require_once("../../libs/header.php");
require_once("../../libs/stdatabasetree.php");
$tree=new databasetree($mysql, DB_PREFIX."folders");
$FOLDER_LIST=$tree->get_array("Root Folder", "... ");
$form=array(
"method"=>"POST",
"action"=>"",
"message"=>"",
"errorcount"=>0,
"fields"=>array(
"folder_name"=>array("type"=>"text",
"description"=>$lang['folder_name'],
"error"=>$lang['enter_folder_name']
),
"folder_desc"=>array("type"=>"text",
"description"=>$lang['description'],
"error"=>$lang['enter_description_of_folders'],
),
"admin_only"=>array("type"=>"select",
"description"=>$lang['admin_upload_only'],
"error"=>$lang['set_value'],
"extra"=>array("N"=>"No", "Y"=>"Yes")
),
"parent"=>array("type"=>"select",
"description"=>$lang['parent_folder'],
"error"=>$lang['select_parent_folder'],,
"extra"=>$FOLDER_LIST
)
),
"submit"=>$lang['go']
);
print_r('<pre>');
//print_r($FOLDER_LIST);
//print_r($tree);
$parent = 33;
$SQL="SELECT id FROM `".DB_PREFIX."folders` WHERE `parent`='".$parent."'";
if(!$mysql->query($SQL)) { exit($mysql->error); }
$flist=array();
while(!$mysql->EOF) {
$flist[]=$mysql->field('id');
$mysql->movenext();
}
print_r($flist);
print_r('</pre>');
?>