コード例 #1
0
ファイル: libtree2.php プロジェクト: ericvanboven/IMathAS
function setshow($id)
{
    global $parents, $base, $expand;
    array_unshift($expand, $id);
    if (isset($base)) {
        if (isset($parents[$id]) && $parents[$id] != $base) {
            setshow($parents[$id]);
        }
    } else {
        if (isset($parents[$id]) && $parents[$id] != 0) {
            setshow($parents[$id]);
        }
    }
}
コード例 #2
0
ファイル: libtree.php プロジェクト: ericvanboven/IMathAS
function setshow($id)
{
    global $parents, $base;
    echo "document.getElementById({$id}).className = \"show\";";
    echo "document.getElementById('b{$id}').innerHTML = \"-\";";
    if (isset($base)) {
        if (isset($parents[$id]) && $parents[$id] != $base) {
            setshow($parents[$id]);
        }
    } else {
        if (isset($parents[$id]) && $parents[$id] != 0) {
            setshow($parents[$id]);
        }
    }
}