本文整理汇总了PHP中fs::_tree_walk_next方法的典型用法代码示例。如果您正苦于以下问题:PHP fs::_tree_walk_next方法的具体用法?PHP fs::_tree_walk_next怎么用?PHP fs::_tree_walk_next使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类fs
的用法示例。
在下文中一共展示了fs::_tree_walk_next方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: camila_export_action_select
function camila_export_action_select()
{
global $_CAMILA;
$mySelect = new CHAW_select('camila_export_action');
require_once 'fs.class.php';
$fs = new fs($_CAMILA['adm_user_group']);
$mySelect->add_option(camila_get_translation('camila.export.download'), 'download');
if (!CAMILA_FM_EXTFS_ENABLED) {
if (!CAMILA_FM_EXPORT_SAVETO_DISABLED) {
$mySelect->add_option(camila_get_translation('camila.export.saveto') . ' ' . camila_get_translation('camila.documents'), '/', $_REQUEST['camila_export_last_action'] == '/' ? HAW_SELECTED : HAW_NOTSELECTED);
$arr = $fs->scandir(CAMILA_FM_ROOTDIR, true, false);
sort($arr);
foreach ($arr as $value) {
$item = substr($value, strlen(CAMILA_FM_ROOTDIR) + 1);
if ($item != camila_get_translation('camila.documents.recyclebin')) {
if ('/' . $item == $_REQUEST['camila_export_last_action']) {
$mySelect->add_option(camila_get_translation('camila.export.saveto') . ' ' . camila_get_translation('camila.documents') . '/' . $item, '/' . $item, HAW_SELECTED);
} else {
$mySelect->add_option(camila_get_translation('camila.export.saveto') . ' ' . camila_get_translation('camila.documents') . '/' . $item, '/' . $item);
}
}
}
}
} else {
$node = $fs->_tree_get_group_root_node($_CAMILA['adm_user_group']);
$attributes = array('name');
$wlk = $fs->_tree_walk_preorder($node);
while ($curr = $fs->_tree_walk_next($wlk)) {
$level = $fs->_tree_walk_level($wlk);
$spaces = str_repeat('--', $level - 1);
$att = reset($attributes);
while ($att) {
if ($level == 0) {
$mySelect->add_option(camila_get_translation('camila.export.saveto') . ' ' . camila_get_translation('camila.documents'), $wlk['row']['id']);
} elseif ($wlk['row']['file'] == '') {
$mySelect->add_option(camila_get_translation('camila.export.saveto') . ' ' . camila_get_translation('camila.documents') . '/' . $spaces . $wlk['row'][$att], $wlk['row']['id']);
}
$att = next($attributes);
}
}
}
return $mySelect;
}