Exemplo n.º 1
0
Arquivo: pop.php Projeto: philum/cms
function connectors($doc, $media, $id)
{
    $large = $_SESSION['prma']['content'];
    $largb = round($large * 0.5);
    $xt = strtolower(strrchr($doc, "."));
    $xfp = strrpos($doc, ':');
    $xf = substr($doc, $xfp);
    $pdoc = substr($doc, 0, $xfp);
    if (rstr(70)) {
        $xf = retape_conn($xf, $id);
    }
    //list($d,$p)=good_param($pdoc);
    switch ($xf) {
        case ':no':
            return;
            break;
        case ':br':
            return "\n";
            break;
        case ':u':
            return '<u>' . $pdoc . '</u>';
            break;
        case ':i':
            return '<i>' . $pdoc . '</i>';
            break;
        case ':b':
            return '<b>' . $pdoc . '</b>';
            break;
        case ':h':
            return '<h3>' . $pdoc . '</h3>';
            break;
        case ':h1':
            return '<h1>' . $pdoc . '</h1>';
            break;
        case ':h2':
            return '<h2>' . $pdoc . '</h2>';
            break;
        case ':h4':
            return '<h4>' . $pdoc . '</h4>';
            break;
        case ':e':
            return '<sup>' . $pdoc . '</sup>';
            break;
        case ':l':
            return '<small>' . $pdoc . '</small>';
            break;
        case ':k':
            return '<strike>' . $pdoc . '</strike>';
            break;
        case ':q':
            return '<blockquote>' . $pdoc . '</blockquote>';
            break;
        case ':t':
            return btn("txtit", $pdoc);
            break;
        case ':c':
            return btn("txtclr", $pdoc);
            break;
        case ':s':
            return btn("stabilo", $pdoc);
            break;
        case ':r':
            return pub_clr($pdoc . '§ff0000');
            break;
        case ':code':
            return bal('code', $pdoc);
            break;
        case ':list':
            return make_li($pdoc, 'ul');
            break;
        case ':css':
            return pub_css($pdoc);
            break;
        case ':font':
            return pub_font($pdoc);
            break;
        case ':size':
            return pub_size($pdoc);
            break;
        case ':color':
            return pub_clr($pdoc);
            break;
        case ':html':
            return pub_html($pdoc);
            break;
        case ':pub':
            return pubart($pdoc);
            break;
            //pub
        //pub
        case ':w':
            return lkc('', goodroot($pdoc), $pdoc);
            break;
        case ':read':
            return str_replace('<br />', '', read_msg($pdoc, $media));
            break;
            //read
        //read
        case ':photo':
            return photo_thumbs($pdoc, $id);
            break;
            //gallery
        //gallery
        case ':photo1':
            return gallery_flash($pdoc, $id);
            break;
            //flash
        //flash
        case ':photo2':
            return gallery_j($pdoc, $id);
            break;
            //ajax
        //ajax
        case ':slider':
            return slider($pdoc, $id);
            break;
            //flash
        //flash
        case ':sliderJ':
            return sliderj($pdoc, $id);
            break;
            //ajax
        //ajax
        case ':jukebox':
            return jukebox($pdoc, $media, $id);
            break;
            //jukebox
        //jukebox
        case ':radio':
            return radio($pdoc, $media, $id);
            break;
            //radio
        //radio
        case ':import':
            return import_art($pdoc, $media);
            break;
            //import
        //import
        case ':numlist':
            return make_li($pdoc, 'ol');
            break;
        case ':forum':
            return plugin('forum', $pdoc ? $pdoc : $id);
            break;
            //forum
        //forum
        case ':search':
            return rech_internal($pdoc);
            break;
            //search
        //search
        case ':articles':
            return arts_mod($pdoc, $id);
            break;
            //articles
        //articles
        case ':formail':
            return make_form($pdoc, 'mailform' . $id, '_formail___' . ajx($pdoc, '') . '____');
            break;
            //mail
        //mail
        case ':chat':
            return plugin('chat', $pdoc ? $pdoc : $id, 5);
            break;
            //chat
        //chat
        case ':chatxml':
            return plugin('chatxml', $pdoc ? $pdoc : $id);
            break;
        case ':room':
            return call_plug('', 'popup', 'chatxml', $pdoc, pictxt('chat', $pdoc));
            break;
        case ':shop':
            return plugin('shop', 'shop', $pdoc, $id);
            break;
            //shop
        //shop
        case ':prod':
            return plugin('shop', 'prod', $pdoc, $id);
            break;
            //prod
        //prod
        case ':bkg':
            return mk_bkg($pdoc, $id);
            break;
        case ':draw':
            return plugin('draw');
            break;
        case ':icon':
            return icon($pdoc);
            break;
        case ':center':
            return bal("center", $pdoc);
            break;
        case ':right':
            return divc('" align="right', $pdoc);
            break;
        case ':clear':
            if (is_image($pdoc)) {
                $pdoc = place_image($pdoc, $media, $large, $largb);
            }
            return str_replace('float:left;', '', $pdoc) . "\n\n";
            break;
        case ':table':
            return mk_table($pdoc);
            break;
        case ':divtable':
            return mk_dtable($pdoc);
            break;
        case ':nh':
            if ($media == 'nl') {
                return lka('#nb' . $pdoc . '" name="nh' . $pdoc, $pdoc);
            } else {
                return lj('" name="nh' . $pdoc, 'popup_nbp___' . $pdoc . '_' . $id, $pdoc);
            }
            break;
        case ':nb':
            if ($media != 'nl') {
                $go = urlread($id);
            }
            return lka($go . '#nh' . $pdoc . '" name="nb' . $pdoc, $pdoc);
            break;
            //nbp
        //nbp
        case ':pre':
            return bal("pre", entities($pdoc));
            break;
        case ':php':
            return progcode($pdoc);
            break;
        case ':link':
            return special_link($pdoc);
            break;
        case ':console':
            return divc("console", $pdoc);
            break;
        case ':label':
            return imlabel($pdoc, $large);
            break;
        case ':polaroid':
            return imcomment($pdoc, $large, $largb, $media, $id);
            break;
        case ':scan':
            return scan_txt($pdoc);
            break;
            //fopen_txt
        //fopen_txt
        case ':iframe':
            return iframe($pdoc, '');
            break;
        case ':imgtxt':
            return create_img_txt($pdoc);
            break;
        case ':download':
            return download($pdoc);
            break;
        case ':msql':
            return msqread(msq_goodtable_b($pdoc), $id);
            break;
        case ':microsql':
            return msqread(msq_goodtable($pdoc), $id);
            break;
        case ':microread':
            return microread($pdoc);
            break;
        case ':msq_conn':
            return msqconn($pdoc, $id);
            break;
            //case(':msq_html'):return msqconn($pdoc,$id);break;
        //case(':msq_html'):return msqconn($pdoc,$id);break;
        case ':msq_lasts':
            return msqlasts($pdoc);
            break;
        case ':msq_count':
            return msqcount($pdoc);
            break;
        case ':msq_bin':
            return msqbin($pdoc);
            break;
        case ':msq_graph':
            return msqgraph($pdoc, $media);
            break;
        case ':data':
            return msqdata($pdoc, $id);
            break;
        case ':microform':
            return plugin('microform', $pdoc, $id);
            break;
            break;
        case ':module':
            req('mod');
            return build_mod_r($pdoc);
            break;
        case ':modpop':
            return lj('', 'popup_modpop__3_' . ajx($pdoc), picto('get'));
            break;
        case ':ajxget':
            return ajx($pdoc);
            break;
        case ':ajax':
            return ajxlink($pdoc, randid(), 0, 1);
            break;
        case ':rss_input':
            return rssin($pdoc);
            break;
        case ':twitter':
            return plugin_func('twit', 'twit_build', ajx($pdoc));
            break;
        case ':twitter_cached':
            return twitart($pdoc, $id);
            break;
        case ':poptwit':
            return poptwit($pdoc);
            break;
        case ':last-update':
            return lastup($pdoc, $id);
            break;
        case ':pdf':
            return pdfreader($pdoc);
            break;
        case ':swf':
            return popswf($pdoc);
            break;
        case ':flv':
            return popflv($pdoc, $large);
            break;
        case ':jpg':
            return place_image($pdoc, $media, $large, $largb);
            break;
        case ':img':
            $im = vacuum_image($pdoc . '.jpg', $id);
            return place_image($im, $media, $large, $largb);
            break;
            //img
        //img
        case ':mini':
            if (substr($pdoc, 0, 4) == 'http') {
                return vacuum_image($pdoc, $id);
            }
            return make_mini_b($pdoc, $id);
            break;
            //mini
        //mini
        case ':thumb':
            return make_mini_c($pdoc);
            break;
            //thumb
        //thumb
        case ':video':
            return video_auto($pdoc, $large, $id, $media);
            break;
        case ':popvideo':
            return popvideo($pdoc);
            break;
        case ':poptxt':
            return call_j($pdoc, 'poptxt');
            break;
        case ':popmsqt':
            return call_j($pdoc, 'popmsqt');
            break;
        case ':popmsql':
            return call_j($pdoc, 'popmsql');
            break;
        case ':popread':
            return call_j($pdoc, 'popread');
            break;
        case ':pop':
            return call_pop($pdoc);
            break;
        case ':jopen':
            return jopen($pdoc, 0);
            break;
            //jopen
        //jopen
        case ':jconn':
            return jopen($pdoc, 1);
            break;
            //jconn
        //jconn
        case ':popurl':
            return popurl($pdoc);
            break;
        case ':popart':
            return pop_art($pdoc);
            break;
        case ':rss_art':
            return rss_art($pdoc, 0, 0);
            break;
        case ':rss_read':
            return rss_art($pdoc, 1, 0);
            break;
        case ':webpage':
            return lj('txtbox', 'popup_webpage___' . ajx($pdoc), preplink($pdoc));
            break;
        case ':weburl':
            return weblink($pdoc, 1);
            break;
        case ':web':
            return weblink($pdoc);
            break;
        case ':idart':
            return id_of_suj($pdoc);
            break;
        case ':petition':
            return plugin('petition', $id, 10);
            break;
        case ':book':
            return plugin('book', $pdoc, $id);
            break;
        case ':popbook':
            return plugin('book', $pdoc, 'x');
            break;
        case ':track':
            return tracks_read($pdoc);
            break;
            //case(':eco'):return txarea('',parse($pdoc),44,8); break;
        //case(':eco'):return txarea('',parse($pdoc),44,8); break;
        case ':svg':
            return svg($pdoc);
            break;
        case ':svgcode':
            list($p, $o) = split_one('§', $pdoc, 1);
            return plugin_func('svg', 'svg_j', $p, $o);
            break;
        case ':plug':
            list($p, $o, $conn) = decompact_conn($pdoc);
            return plugin($conn, $p, $o);
            break;
        case ':pluf':
            list($fnc, $plg) = explode('§', $pdoc);
            return plugin_func($plg, $fnc, '');
            break;
        case ':plup':
            list($p, $o, $conn) = decompact_conn($pdoc);
            list($plg, $bt) = split_one("§", $conn, 1);
            return lj('', 'popup_plupin___' . $plg . '_' . ajx($p) . '_' . ajx($o), $bt ? $bt : $plg);
            break;
        case ':openapp':
            list($p, $o, $d) = decompact_conn($pdoc);
            return openapp($d, $p, $o);
            break;
        case ':popapp':
            list($p, $o, $d) = decompact_conn($pdoc);
            return lj('', 'popup_openapp___' . $d, $d);
            break;
        case ':apps':
            return read_apps_link($pdoc);
        case ':bubble':
            return bubble_menus($pdoc, 'inline');
        case ':header':
            Head::add('code', delbr($pdoc, "\n"));
            return;
            break;
        case ':basic':
            list($func, $var) = good_param($pdoc);
            return cbasic($func, $var);
            break;
        case ':bazx':
            return plugin('bazx', $pdoc);
            break;
        case ':version':
            return $_SESSION['philum'];
            break;
        case ':ver':
            $phi = $_SESSION['philum'];
            return substr($phi, 0, 2) . '.' . substr($phi, 2, 2);
            break;
        case ':picto':
            @(list($p, $o) = explode('§', $pdoc));
            return picto($p, $o);
            break;
        case ':on':
            return '[' . $pdoc . ']';
            break;
    }
    if ($doc == '--') {
        return hr();
    }
    //hr
    if (is_image($doc) && strpos($doc, '§') === false && strpos($doc, '<') === false) {
        //images
        if (substr($d, 0, 4) == 'http' && !$_GET['callj']) {
            $doc = vacuum_image($doc, $id);
        }
        return place_image($doc, $media, $large, $largb);
    }
    if (strpos($doc, "¬") !== false) {
        return mk_dtable($doc);
    }
    //tables
    if ($xt == ".mp3") {
        return audio(goodroot($doc), $id);
    }
    //mp3
    if ($xt == ".mp4") {
        return video_html(goodroot($doc));
    }
    //mp4
    if ($xt == ".pdf") {
        return pdfdoc($doc, $media, $large);
    }
    //pdf
    if ($xt == ".svg") {
        list($p, $w, $h) = subparams($doc);
        return image($p, $w, $h);
    }
    //svf
    if ($xt == ".flv") {
        return jwplayer($doc, $large);
    }
    //flv
    if ($xt == ".swf") {
        return flash_prep($doc, '');
    }
    //swf
    if ($xt == ".txt") {
        $doc = goodroot($doc);
        return lkt('', $doc, strrchr($doc, "/"));
    }
    if ($xt == ".gz") {
        return download($doc);
    }
    //tar
    if ($xt && $xt != ".") {
        //video
        if (strpos('.ogg.mp4.m4a.mov.mpg.wmv.h264.aac', $xt) !== false) {
            if ($media != 3) {
                return lj('txtx', 'popup_popvideo___' . ajx($doc), pictxt('video', strrchr_b($doc, "/")));
            }
            if ($xt == '.mp4' or $xt == '.m4a' or $xt == '.mov') {
                return jwplayer($doc, round($large * (3 / 4)));
            }
        }
    }
    if (substr($pdoc, 0, 1) == '@') {
        return poptwit(substr($pdoc, 1));
    }
    //liens
    if ((strpos($doc, '§') !== false or strpos($doc, 'http') !== false or strpos($doc, '@') !== false) && strpos($doc, '<a href') === false) {
        $lk = prepdlink($doc);
        if (is_image($lk[0])) {
            //link2image§text
            if (substr($lk[0], 0, 4) == 'http') {
                $lk[0] = vacuum_image($lk[0], $id);
            }
            if (substr($lk[1], 0, 4) == 'http') {
                $lk[1] = lkt('', $lk[1], preplink($lk[1]));
            }
            if (is_image($lk[1])) {
                return popim(goodroot($lk[0]), image(goodroot($lk[1])), $id);
            }
            //mini
            //return place_image($lk[0],$media,$large,$largb,$lk[1],'');
            return popim(goodroot($lk[0], 1), $lk[1]);
        } elseif (is_image($lk[1])) {
            //link§image
            if (substr($lk[1], 0, 4) == 'http') {
                $lk[1] = vacuum_image($lk[1], $id);
            }
            if (strpos($lk[0], '.pdf') !== false) {
                return pdfdoc($doc, $media, $large);
            }
            if (is_numeric($lk[0])) {
                $lk[0] = urlread($lk[0]);
            }
            return lkc('', $lk[0], place_image($lk[1], $media, $large, $largb, '', ''));
        } elseif (substr($lk[0], 0, 4) == 'http') {
            return lka($lk[0], $lk[1]);
        } elseif (strpos($lk[0], '<img') !== false) {
            return $lk[0] . divc('blocktext', $lk[1]);
        } elseif (strpos($lk[1], '<img') !== false) {
            return $lk[0] . ' ' . $lk[1];
        } elseif (substr($lk[0], 0, 1) == '/') {
            return lka($lk[0], $lk[1]);
        } elseif (strpos($lk[0], '/') !== false) {
            return lkc('', goodroot($lk[0]), $lk[1]);
        } elseif (strpos($lk[0], '.pdf') !== false) {
            return pdfdoc($doc, $media, $large);
        } elseif (substr($lk[0], 0, 1) == '#') {
            list($lien, $name) = explode('-', $lk[0]);
            return lka($lien . '" name="' . $name, $lk[1]);
        } elseif (strpos($lk[0], '@') !== false && strpos($lk[0], ".") !== false) {
            return lka('mailto:' . $lk[0], $lk[1] ? $lk[1] : $lk[0]);
        } elseif (substr($doc, 0, 1) == '@' && ($tw = substr($doc, 1))) {
            return call_plug('', 'popup', 'twitter', ajx($tw), $doc);
        } elseif (is_numeric($lk[0])) {
            return jread('', $lk[0], $lk[1]);
        }
    }
    //cols
    if (substr($xf, 0, 2) == ":/") {
        $nb = substr($xf, 2);
        if (is_numeric($nb)) {
            $nw = $large / $nb - 5;
            if ($media < 3) {
                return $pdoc;
            } else {
                return divs('float:left; width:' . $nw . 'px; padding-right:5px;', $pdoc);
            }
        }
    }
    if (substr($xf, 2) == "cols" && $media > 2) {
        $nb = substr($xf, 1, 2);
        if ($media < 3) {
            return $pdoc;
        } else {
            return paocols($pdoc, $nb, 0);
        }
    }
    //codeline_join
    $xxf = substr($xf, 1);
    $clvr = sesmk('clvars');
    if ($clvr[$xxf]) {
        $rb = decompact_conn($doc);
        return codeline($rb[0], $rb[1], $rb[2]);
    }
    //user_conn
    $is = strpos($xf, ':') !== false ? 1 : 0;
    if ($xxf && $is && $xxf != 'stop' && $xxf != 'attr' && $xxf != 'rect' && $xxf != 'defs') {
        $func = msql_read('', ses('qb') . '_connectors', $xxf);
        if (!$func) {
            $func = msql_read('', 'public_connectors', $xxf);
        }
        if ($func && !is_array($func)) {
            return cbasic($func, $pdoc);
        }
        //plugin
        if (isplug($xxf)) {
            list($p, $o) = explode('§', $pdoc);
            $ret = plugin($xxf, $p, $o);
        }
        if ($ret) {
            return delbr($ret, "\n");
        }
    }
    return '[' . $doc . ']';
}
Exemplo n.º 2
0
Arquivo: mod.php Projeto: philum/cms
function build_mods($r)
{
    //p($r);
    $ptit_css = 'txtcadr';
    $pbdy_css = 'panel';
    $smcss = 'small';
    //mod,param,title,condition,command,option,(bloc),hide,template,nobr,div,ajxbtn
    list($m, $p, $t, $c, $d, $o, $ch, $hd, $tp, $nbr, $dv, $jbt) = $r;
    $t = stripslashes($t);
    switch ($m) {
        //main
        case 'LOAD':
            if ($_SESSION['read']) {
                $ret = art_read($tp);
            } else {
                $ret = api_arts($_SESSION['frm'], $o, $tp);
            }
            break;
        case 'Page_titles':
            $ret = page_titles($o);
            break;
        case 'All':
            $api = api_arts_rq($p, $o);
            $api['t'] = $t ? $t : nms(100);
            break;
        case 'category':
            if ($p == 1 && $_SESSION['frm'] == 'Home') {
                $p = 'All';
            }
            $ret = api_arts($p, $o, $tp);
            break;
        case 'Board':
            $ret = collect_board($p);
            break;
        case 'plan':
            $ret = arts_plan($m, $p);
            break;
        case 'Hubs':
            $ret = arts_plan($m, $p);
            break;
        case 'gallery':
            $ret = arts_plan($m, $p);
            break;
        case 'tracks':
            $ret = trkarts($p, $t);
            break;
            //api_tracks($t)
        //api_tracks($t)
        case 'MenusJ':
            $ret = ajxlink($p, 'mjx', $o, $d);
            break;
            //case('Wall'): $ret=wall_arts($t,$p); break;
        //case('Wall'): $ret=wall_arts($t,$p); break;
        case 'api':
            $ret = plugin('apicom', str_replace(';', ',', $p), $o);
            break;
        case 'api_mod':
            $api = api_defaults_rq(explode_k(str_replace(';', ',', $p), ',', ':'));
            break;
            //:,
        //:,
        case 'api_arts':
            $api = api_mod_arts($p, $t, $tp);
            if ($d == 'panel') {
                $api['cmd'] = $d;
            }
            $api['cols'] = $o;
            break;
            //&=
        //&=
        case 'articles':
            $load = api_mod_arts_row($p);
            $obj = 1;
            break;
            //&=
            //case('articles'): $api=api_mod_rq($p.'&t=x'); break;//&=
        //&=
        //case('articles'): $api=api_mod_rq($p.'&t=x'); break;//&=
        case 'tab_mods':
            $ret = tab_mods($p);
            break;
        case 'last':
            $ret = art_read_b('last', $n, 3, '');
            break;
        case 'player':
            $ret = flash_prep('', $p);
            break;
        case 'friend_art':
            $ret = friend_art($o);
            break;
        case 'friend_rub':
            $ret = friend_rub($o);
            break;
        case 'related_arts':
            $load = related_art();
            break;
        case 'related_by':
            $load = related_art_by();
            break;
        case 'prev_next':
            $ret = prevnext_art($d, $p, $o);
            break;
        case 'cat_arts':
            $p = $p != 1 ? $p : $_SESSION['frm'];
            $t = $t != $m ? $t : $p;
            $load = tri_rqt($p, 1, $_SESSION['dayx']);
            break;
        case 'priority_arts':
            $load = tri_rqt($p, 11);
            $t = $t != $m ? $t : $p;
            break;
        case 'recents':
            $load = recents_arts($p, $o);
            $obj = 1;
            break;
        case 'read':
            $ret = divc($o, read_msg($p, 3));
            break;
        case 'popart':
            $ret = pop_art($p);
            break;
        case 'pub_art':
            $ret = pub_art_b($p, $o);
            break;
        case 'pub_arts':
            $load = array_flip(explode(' ', $p));
            break;
        case 'pub_img':
            $ret = pub_img($p);
            break;
        case 'taxo_arts':
            $load = taxo_arts($p);
            if ($t > 1) {
                $t = suj_of_id($t);
            }
            break;
        case 'taxo_nav':
            $ret = plugin('taxonav', $p, $o);
            break;
        case 'read_art':
            $ret = read_art($p, $t);
            $t = '';
            break;
        case 'short_arts':
            $load = short_arts($p);
            if ($o <= 3) {
                $prw = $o;
            }
            break;
        case 'most_read':
            $ret = most_read_mod($p, $t, $d, $o, $m, $tp);
            $t = '';
            break;
        case 'same_title':
            $load = same_title();
            break;
        case 'deja_vu':
            if ($_SESSION['mem']) {
                $load = $_SESSION['mem'];
            }
            break;
            //com
        //com
        case 'rss_input':
            if ($p) {
                $ret = rssin(ajx($p, 1));
            }
            break;
        case 'disk':
            require_once 'ajxf.php';
            $_SESSION['dlmod'] = $p;
            if ($p && $p != '/') {
                $pb = '/' . $p;
            }
            $ret = divd('dsnavds', ds_nav('dl', 'users/' . ses('qb') . $pb));
            break;
        case 'finder':
            $ra = array('|', '-');
            $p = str_replace($ra, '/', $p);
            $o = str_replace($ra, '/', $o);
            req('finder');
            $ret = finder($p, $o, $d);
            break;
        case 'channel':
            $ret = plugin('channel', $p, $t, $d, $o);
            $t = '';
            break;
        case 'hour':
            setlocale(LC_TIME, "fr_FR");
            //%A%d%B%G%T
            if ($p) {
                $dat = strftime($p ? $p : '%y%m%d:%H%M', $_SESSION['dayx']);
            } else {
                $dat = mkday('', 1);
            }
            if (!$d) {
                $ret = btn($o, $dat);
            } else {
                $ret = divc($o, $dat);
            }
            break;
        case 'cart':
            $ret = lkc("txtcadr", "/?plug=cart", $p != 1 ? $p : "Cart");
            $ret = divd('cart', m_pubart($_SESSION['cart'], 'scroll', 7));
            break;
        case 'video':
            $ret = video_auto($p, '', '', 3);
            break;
        case 'video_playlist':
            $load = videoplaylist($p);
            $obj = 1;
            $prw = 'vd';
            break;
        case 'video_viewer':
            $ret = videoboard($p, $c, $o);
            break;
            //txt
        //txt
        case 'text':
            $ret = stripslashes(urldecode($p));
            if ($o) {
                $ret = divc($o, $ret);
            }
            break;
        case 'connector':
            if (substr($p, 0, 1) != "[" && substr($p, -1, 1) != "]") {
                $p = '[' . $p . ']';
            }
            $ret = nl2br(format_txt_r($p, '', ''));
            if ($o == 'article') {
                $ret = balc('article', 'justy', format_txt($p, '', ''));
            }
            break;
        case 'codeline':
            if ($p) {
                $ret = correct_txt($p, "", 'codeline');
            }
            break;
        case 'clear':
            $ret = divc("clear", "");
            break;
        case 'hr':
            $ret = '<hr' . atc($p) . ' />';
            break;
        case 'br':
            $ret = br();
            break;
            //menus
            //case('ajax'): $ret=lj('',$p,$t); break;
        //menus
        //case('ajax'): $ret=lj('',$p,$t); break;
        case 'conn':
            $ret = connectors($p, $o, '');
            break;
        case 'link':
            if ($d == 'noli') {
                $ret = special_link($p, $o);
            } else {
                if (strpos($p, '§')) {
                    list($p, $t) = split_one('§', $p, 0);
                }
                $lin[] = mod_link_r($p, $t);
            }
            break;
        case 'user_menu':
            $ret = user_menu($p);
            break;
            //mod_link
        //mod_link
        case 'app_link':
            $ret = read_apps_link($p, $d, $o);
            break;
        case 'app_menu':
            $r = build_apps($p, $d);
            $ra = m_apps($r, 'menu', '');
            if ($o == 'icons') {
                $ret = desktop_build_ico($ra, 'icones');
            } else {
                $ret = app_list($ra, '', $o);
            }
            $ret .= divc('clear', '');
            break;
        case 'app_popup':
            Head::add('jscode', sj(read_apps(explode(',', $p))));
            break;
        case 'categories':
            $line = $_SESSION['line'];
            if ($line) {
                ksort($line);
                $d = $d ? $d : 'lines';
                if ($d == 'cols' && !$o) {
                    $o = 4;
                }
                if ($o == 'home') {
                    $lin[] = array($_GET['module'], 'module', 'Home', 'Home');
                }
                foreach ($line as $k => $va) {
                    if ($o == 'nb') {
                        $ka = $k . ' (' . $va . ')';
                    } else {
                        $ka = $k;
                    }
                    $lin[] = array($_SESSION['frm'], 'cat', $k, $ka);
                }
            }
            break;
        case 'overcats':
            req('bubs');
            return mkbub(bub_root('overcat', 'zero'), 'inline', '1');
            break;
        case 'MenuBub':
            req('bubs');
            return mkbub(bub_root('menubub', 'zero'), 'inline', '1');
            break;
        case 'timetravel':
            return timetravel($p, $o);
            break;
        case 'submenus':
            return bubble_menus($p, $o);
            break;
        case 'taxonomy':
            $ret = taxonomy($p, $o);
            break;
        case 'rub_taxo':
            $ret = rub_taxo($p, $t);
            $t = '';
            break;
        case 'folders':
            $load = supertriad_ask();
            $prw = $o;
            $obj = 63;
            break;
        case 'desk':
            $ret = deskmod($p);
            break;
        case 'desktop_arts':
            $ret = title($t) . desktop_arts($p, $o, 'arts');
            break;
        case 'desktop_varts':
            $ret = title($t) . desktop_arts($p, $o, 'varts');
            break;
        case 'desktop_files':
            $ret = title($t) . desktop_arts($p, $o, 'files');
            break;
        case 'hierarchics':
            $in = m_suj_hierarchic('active', '');
            $ret = balc("ul", $pbdy_css, $in);
            break;
            //cacheable
        //cacheable
        case 'hubs':
            $mn = $_SESSION['mn'];
            if (count($mn) >= 2) {
                $t = $p != 1 ? $p : $t;
                if ($t) {
                    $t = lkc('', htac('module') . 'hubs', $t);
                }
                $in = m_nodes_b($mn, $o);
                $ret = balc("ul", $pbdy_css, $in);
            }
            break;
        case 'tags':
            if ($t) {
                $t = lkc('', '/plugin/tags/' . $p . '/1', $t);
            }
            $lin = tag_mod($p, $o, $d);
            break;
        case 'tags_cloud':
            $p = $p ? $p : 'tag';
            $ret = btn($ptit_css, lkc('', "/plug/tags", $p));
            $line = tags_list($p, ses('nbj'));
            $in = tags_cloud($line, 10, 22, ' ', $p);
            $ret .= divc($pbdy_css, $in);
            break;
        case 'tag_arts':
            list($p, $o) = split_one(':', $p);
            $load = tag_arts($p, $o);
            break;
        case 'last_tags':
            $lin = last_tags($p, $o, $d);
            break;
        case 'classtag_arts':
            $load = classtag_arts($p);
            break;
            //class find id//$o=$p;
        //class find id//$o=$p;
        case 'see_also-tags':
            $r = see_also_tags($p ? $p : 'tag');
            if ($r) {
                $ret = see_also($r, $p, $d, $o, $tp);
            }
            break;
        case 'see_also-rub':
            $t = $p != 1 ? $p : $_SESSION['frm'];
            if ($_GET['read']) {
                $load = see_also_rub($p);
            }
            break;
        case 'see_also-source':
            list($load, $t) = see_also_source($o);
            break;
        case 'siteclics':
            $ret = siteclics($p);
            break;
        case 'rub_tags':
            $ret = rub_tags($p);
            break;
        case 'sources':
            if ($t) {
                $t = lkc('', '/module/source', $t);
            }
            $lin = art_sources($p);
            break;
        case 'msql_links':
            if ($o == 'rss') {
                $l = '/?plug=rssin&rssurl=';
            } elseif ($o == 'mail') {
                $l = 'mailto:';
            } else {
                $l = '';
            }
            $ret = msql_links($p, $o, $l, $d, $t);
            $t = '';
            break;
        case 'rss':
            $ret .= balc('ul', 'panel', divd('rssj', rssj($p ? $p : 'rssurl', $o)));
            break;
        case 'rssin':
            $ret .= rssj_m($p, $o);
            break;
        case 'chat':
            if ($t) {
                $t = ljb('', 'SaveD', 'cht' . $p . '_chat_' . $p, $t);
            }
            $p = $p != 1 ? $p : 'pub';
            $in = plugin('chat', $p, $o ? $o : 10);
            if ($in) {
                $ret = divc($pbdy_css, $in);
            }
            break;
        case 'stats':
            $ret = plugin('stats', '', '');
            break;
        case 'archives':
            if ($p == 1) {
                $p = $m;
            }
            if ($p) {
                $ret = btn($ptit_css, $p);
            }
            $in = divd("archives", m_archives(""));
            $ret .= balc('ul', $pbdy_css, $in);
            break;
        case 'agenda':
            $load = sql('ib,msg', 'qdd', 'kv', 'val="agenda"');
            $tim = time();
            if ($load) {
                foreach ($load as $k => $v) {
                    if (strtotime($v) < $tim) {
                        unset($load[$k]);
                    }
                }
            }
            break;
        case 'folders_varts':
            $load = mod_varts($p);
            break;
        case 'panel_arts':
            $ret = plugin_func('panart', 'panart_build', $p);
            break;
        case 'calendar':
            $in = calendar(ses('daya'));
            if ($p == 1) {
                $p = $m;
            }
            if ($p) {
                $ret = btn($ptit_css, $p);
            }
            $ret .= divc($pbdy_css, $in);
            break;
        case 'newsletter':
            if ($o) {
                $ret = call_plug($ptit_css, 'popup', 'mailist', $p, $p) . ' ';
            } else {
                $ret = plugin('mailist', '', $p);
            }
            break;
        case 'bridge':
            $_GET['urlsrc'] = $p = 'http://' . $p . '/' . ajx($t, 1);
            $rea = vacuum($p, '');
            $po['suj'] = $rea[0];
            $po['msg'] = format_txt($rea[1], 3, $id);
            $po['source'] = picto('link') . ' ' . pub_link($p);
            $ret = template($po, '');
            break;
        case 'columns':
            $ret = mod_columns($p, $o);
            break;
            //users
        //users
        case 'login':
            $ret = login_btn($p, $o);
            break;
        case 'login_popup':
            $ret = login_btn_p($p, $o);
            break;
        case 'log-out':
            if (ses('USE')) {
                $ret .= lkc($smcss, '/logout', picto('logout')) . ' ';
            }
            break;
        case 'search_form':
            $ret = search_btn($p, $o, '', $d);
            break;
        case 'search':
            $load = plugin_func('search', 'rech', $p, $o);
            break;
        case 'social':
            $ret = plugin('social', $p, $o);
            break;
            //banner
        //banner
        case 'Banner':
            $ret = make_ban($p, $t, $o);
            break;
        case 'ban_art':
            if ($p != 1) {
                $ret .= lka(subdom(ses('qb')), read_msg($p, ''));
            }
            break;
            //footer
        //footer
        case 'credits':
            $ret = lj('bevel', 'popup_about', picto('phi2'));
            break;
        case 'admin':
            $ret = lkc($smcss, '/admin/log/open', $t ? $t : picto('admin')) . ' ';
            $t = '';
            break;
        case 'chrono':
            $ret = btn('txtsmall2', round(mtime() - $_SESSION['stime'], 2) . 's') . ' ';
            break;
        case 'contact':
            $ret = contact($p, $o ? $o : $smcss) . ' ';
            break;
            //plugs
        //plugs
        case 'taxonav':
            return plugin('taxonav', $p, $t);
            $t = '';
            break;
        case 'iframe':
            $ret = plugin('ifram', '', '');
            break;
        case 'suggest':
            $ret = pluginside(nms(126), 'suggest', $p, $o);
            break;
        case 'create_art':
            $ret = f_inp('', '');
            break;
        case 'twitter':
            if ($p) {
                $ret = plugin('twitter', $p, $o);
            }
            break;
        case 'profil':
            $ret = plugin_func('profil', $p, $o);
            break;
            //special
        //special
        case 'BLOCK':
            $ret = build_modules($p, '');
            break;
        case 'module':
            $ret = build_mod_r($p);
            break;
        case 'command':
            $ret = com_mod($p);
            break;
        case 'plug':
            list($pp, $po) = split('-', $o);
            $ret = plugin($p, $pp, $po);
            break;
        case 'pluf':
            list($pp, $po) = split('-', $p);
            list($op, $oo) = split('-', $o);
            $ret = plugin_func($pp, $po, $op, $oo);
            break;
        case 'plup':
            return lj('', 'popup_plupin___' . $p . '_' . $o . '_', $t ? $t : $p);
            break;
        case 'close':
            $ret = '';
        default:
            if ($p && $m) {
                $reb = connectors($p . ($o ? '§' . $o : '') . ':' . $m, "", "");
            }
            if ($reb && $reb != '[' . $p . ':' . $m . ']') {
                $ret = $reb;
            } else {
                $reb = plugin($m, $p, $o);
                if ($reb) {
                    $ret = build_titl('', $t ? $t : $m, '') . $reb;
                }
            }
            break;
    }
    //menus
    if ($lin) {
        $ret = mod_lin($lin, $t, $d, $o);
    }
    //arts
    if ($load) {
        $ret = mod_load($load, $ret, $t, $d, $o, $obj, $prw, $tp, $id);
    }
    //api
    if ($api) {
        $ret = api_load($api);
    }
    //umods
    if (!$ret && !$lin && !$load && $p && $m) {
        //user_mods
        $func = msql_read('', $_SESSION['qb'] . '_modules', $m);
        if ($func && !is_array($func)) {
            $ret = cbasic($func, $p);
        }
    }
    if (!$nbr) {
        $br = br();
    }
    if ($ret) {
        if ($dv) {
            return divc('mod', $ret) . $br;
        } else {
            return $ret . $br;
        }
    }
}