function build_apps($p, $d) { //newer than special_links if (strpos($p, ',')) { $r = explode(',', $p); } else { $r = explode(' ', $p); } $ra = msql_read_b('system', 'default_apps_' . ($d ? $d : menu), '', 1); if ($ra) { $keys = msq_cat($ra, 0); } foreach ($r as $v) { list($m, $o) = split_one('§', trim($v), 0); $m = str_replace('+', ' ', $m); list($bt, $app, $func, $p, $o, $c, $root, $icon, $hid, $ath) = explode('/', $m); if ($ra[$m]) { $ret[] = $ra[$m]; } elseif ($keys[$m]) { $ret[] = $ra[$keys[$m]]; } elseif ($m && strpos('home all hubs plan taxonomy agenda taxonav', $m) !== false) { $ret[] = array($v, 'url', '', '/module/' . $o, '', 'menu', '', 'link'); } elseif ($m == 'lang') { foreach (explode(' ', prmb(26) . ' all') as $va) { $ret[] = array($v, 'url', '', 'lang/' . $va, '', 'menu', '', 'flag'); } } elseif (is_numeric($m)) { if (!$o) { $o = $_SESSION['rqt'][$m][2]; } $ret[] = array($o, 'art', '', $m, '', 'menu', '', 'articles'); } elseif ($_SESSION['line'][$m]) { $ret[] = array($m, 'url', '', '/cat/' . $m, '', 'menu', '', $o ? $o : 'list'); } elseif ($m == 'module' && $o) { $ret[] = array($o, 'url', '', '/module/' . $o, '', 'menu', '', 'link'); } elseif ($m == 'hub') { $ret[] = array($o, 'url', '', $m ? $m : prep_host($m), '', 'menu', '', 'home'); } elseif ($m == 'mod') { $ret[] = array($o, 'url', '', '/?slct_mods=' . $o, '', 'menu', '', 'home'); } elseif ($m == 'rss') { $ret[] = array($o, 'url', 'blank', '/rss/' . ses('qb'), '', 'menu', '', 'rss'); } elseif ($m == 'plug') { $ret[] = array($o, 'plug', ajx($o), '', '', 'menu', '', 'get'); } elseif ($m == 'categories') { $line = $_SESSION['line']; if ($line) { ksort($line); foreach ($line as $k => $va) { if ($o == 'nb') { $ka = $k . ' (' . $va . ')'; } else { $ka = $k; } $ret[] = array($ka, 'url', '', '/cat/' . $k, '', 'menu', '', 'list'); } } } elseif (substr($m, 0, 1) == '/') { $ret[] = array($o, 'url', '', $m, '', 'menu', '', 'get'); } } return $ret; }
function submod_add($id, $d) { $top = hlpbt('apps_add') . ' '; if ($d) { $ver = '_' . $d; } $j = 'sbm' . '_submds__x_'; $top .= lj('" title="' . nms(104), 'sbm' . '_submds____' . $id . '_deft', picto('update')) . ' '; $top .= msqlink('system', 'default_apps') . ' '; $top .= lj(active($d, ''), 'popup_submds__x__' . $id . '_add', 'defaults') . ' '; $top .= lj(active($d, 'desk'), 'popup_submds__x_home_' . $id . '_add', 'home') . ' '; $top .= lj(active($d, 'desk'), 'popup_submds__x_desk_' . $id . '_add', 'desk') . ' '; $top .= lj(active($d, 'dev'), 'popup_submds__x_dev_' . $id . '_add', 'dev') . ' '; $r = msql_read('system', 'default_apps' . $ver, '', 1); $ra = array_flip(msq_cat($r, 1)); foreach ($ra as $va) { $bt = picto('file', 32) . ' ' . $va; $rb[$va] .= lj('sicon', 'popup_submds__x_' . $va . '_' . $id . '_adc', $bt) . ' '; foreach ($r as $k => $v) { $bt = picto($v[7], 32) . ' ' . $v[0]; if ($v[1] == $va) { $rb[$va] .= lj('sicon', $j . $k . '_' . $id . '_ads_' . $d, $bt) . ' '; } } } return popup(nms(92) . ' Apps', $top . make_tabs($rb) . divc('clear', ''), 320); }
function conn_view($d, $s) { $js = 'cnv_call___admin_conn*view_'; $r = msql_read('system', 'connectors_all', '', 1); $r = msq_tri($r, 0, 'embed'); $cat = msq_cat($r, 2); $ret .= slctmenusj($cat, $js, $d, ' ') . br() . br(); $cat = msq_tri($r, 2, $d); //p($cat); if ($d) { $r = msq_tri($r, 2, $d); if ($s) { $ret .= divc('', nl2br(stripslashes(msql_read('lang', 'connectors_all', $s)))) . br(); $ins = '§' . $s . ':conn'; if ($_SESSION['cur_cl'] == 'template') { $ins = '[value' . $ins . ']'; } $ret .= input(1, 'cnvw', $ins, 'txtx'); $ret .= ljb('txtbox', 'jumpText_insert_b', 'cnvw\',\'txarea', 'insert') . br(); $ret .= btn('txtsmall2', 'use value§option if needed') . br() . br(); } $ret .= slctmenusj($cat, $js . $d . '_', $s, br()) . br(); } return $ret; }