<select class="span6 disabled" style="padding-left: 0px;" id="val-select2" name="path" style="width: 100%;" data-placeholder="Select page " tabindex="-1" aria-hidden="true" aria-describedby="val-select2-error" aria-invalid="false">
<option value="<?php echo $setting['path']; ?>"><?php echo $setting['path']; ?>(Do not select this)</option>
< ;?php
function traverseDir($dir){
if($dir_handle = @opendir($dir)){
while($filename = readdir($dir_handle )){
if($filename != "." && $filename != ".."){
$subFile = $dir.DIRECTORY_SEPARATOR.$filename; //To convert Source directory and sub-file are connected
if(is_dir($subFile)){ //If the sub-file is a directory
echo '<option value="theme/'.$filename.'" >'.$filename.'</option>';
traverseDir($subFile); //Recursively find the name of the subordinate directory
}
}
}
closedir($dir_handle);
}
}
echo traverseDir(ROOT.'../theme/' );
?>
</select>