Example #1
0
File: lib.php Project: philum/cms
function explode_dirc($rep, $j, $func)
{
    //cod2base,codeview,playlist
    static $i;
    $i++;
    if (is_array($rep)) {
        foreach ($rep as $k => $v) {
            $io++;
            if (!is_array($v)) {
                $ret .= call_user_func_array($func, array($j, $k, $v, $i . '_' . $io));
            } else {
                $ret .= explode_dirc($v, $j . '/' . $k, $func);
                $i--;
            }
        }
        return $ret;
    }
}
Example #2
0
File: dev.php Project: philum/cms
function functions_list($view, $f)
{
    $_SESSION['rec'] = array();
    if ($view) {
        $_GET['view'] = $view;
    }
    if ($f) {
        $_GET['func'] = $f;
    }
    $dr = str_extract('/', $view, 1, 0);
    if (!$view) {
        $dr = 'plug';
    }
    if (substr($dr, -1) == '/') {
        $dr = substr($dr, 0, -1);
    }
    $rep = scrut_dirb($dr);
    if ($rep) {
        ksort($rep);
    }
    $ret = explode_dirc($rep, $dr, 'treat_funcs');
    //if($_SESSION['rec'])asort($_SESSION['rec']);
    return array($rep, $ret);
}