function bub_apps($r, $d, $dir, $cond) { //$r,,dir,cond if ($dir == 'zero') { $dir = ''; $dd = 'd'; } $dr = explode('/', $dir); $nd = $dir ? count($dr) : 0; if ($r) { foreach ($r as $k => $v) { $rc = array_flip(explode(' ', ' ' . $v[5])); if ($rc[$cond ? $cond : 'menu'] or !$v[5]) { $t = $v[0]; $rv = explode('/', $v[6]); $nv = $v[6] ? count($rv) : 0; $ico = $v[7] ? picto($v[7], 'min-width:20px;') . ' ' : ''; $rvb = $rv[$nv - 1]; if ($dir == $v[6]) { $is = true; } else { $is = match_vdir($dr, $nd, $rv); } if ($is && $nv >= $nd + 1 && !$v[8] && auth($v[9])) { $root = $v[6]; //dirs if ($nv >= $nd + 1) { $rvb = $rv[$nd]; $rot = ''; for ($i = 0; $i <= $nd; $i++) { $rot[] = $rv[$nd - $i]; } $rot = array_reverse($rot); if ($rot) { $root = implode('/', $rot); } } $pc = picto('kright', '20px') . ' ' . $rvb; if ($dd) { $pc = $rvb; } $rb[$rvb] = popbub($v[4] ? $v[4] : $d, ajx($root), $pc, $dd, 1); } if ($is && $nv > $nd) { $is = false; } if ($is && !$v[8] && (!$v[9] or auth($v[9]))) { //noj if ($v[1] == 'link') { $rb[$t] = ljbub($ico . $t, $v[3], '', '', '', ''); } elseif ($v[1] == 'linkt') { $rb[$t] = ljbub($ico . $t, $v[3], '', '', '', '1'); } elseif ($v[1] == 'js') { $rb[$t] = ljbub($ico . $t, '', atj($v[2], $v[3])); } elseif ($v[1] == 'bub') { $rb[$t] = popbub($v[2], $v[3], $ico . $t, 'c', 1); } elseif ($v[1] == 'module') { req('mod'); $rb[$t] = build_mod_r($v[2]); } else { $j = read_apps($v); $rb[$t] = ljbub($ico . $t, '', sj($j)); } } } } } if ($rb) { $ret = implode('', $rb); } //if($d=='arts')//$ret=desktop_build_ico($rb,'icones'); //$ret=scroll($rb,$ret,19); return $ret; }
function bub_apps($r, $d, $dir, $cond) { //$r,,dir,cond//p($r); echo 'oo'; $dr = explode('/', $dir); $nd = $dir ? count($dr) : 0; if ($r) { foreach ($r as $k => $v) { $rc = array_flip(explode(' ', ' ' . $v[5])); if ($rc[$cond ? $cond : 'menu'] or !$v[5]) { $rv = explode('/', $v[6]); $nv = $v[6] ? count($rv) : 0; $t = $v[0]; $ico = $v[7] ? picto($v[7]) . ' ' : ''; $rvb = $rv[$nv - 1]; if ($dir == $v[6]) { $is = true; } else { $is = match_vdir($dr, $nd, $rv); } if ($is && $nv == $nd + 1 && !$v[8] && auth($v[9])) { //dirs $rb[$rvb] = popbub($v[4] ? $v[4] : $d, $v[6], picto('kright') . ' ' . $rvb, $dd, 1); } if ($is && $nv > $nd) { $is = false; } if ($is && !$v[8] && (!$v[9] or auth($v[9]))) { //noj if ($v[1] == 'link') { $rb[$t] = ljbub($ico . $t, $v[3], '', '', '', ''); } elseif ($v[1] == 'linkt') { $rb[$t] = ljbub($ico . $t, $v[3], '', '', '', '1'); } elseif ($v[1] == 'js') { $rb[$t] = ljbub($ico . $t, '', atj($v[2], $v[3])); } elseif ($v[1] == 'bub') { $rb[$t] = popbub($v[2], $v[3], $ico . $t, 'c', 1); } else { $j = read_apps($v); $rb[$t] = ljbub($ico . $t, '', sj($j)); } } } } } if ($rb) { $ret = implode('', $rb); } //if($d=='arts')//$ret=desktop_build_ico($rb,'icones'); $ret = scroll($rb, $ret, 19); return $ret; }