function channel($p, $t, $d = '') { $ra = explode(' ', $p); foreach ($ra as $ka => $va) { list($kab, $vab) = split(':', $va); $sc[$vab] = $kab; } if ($sc['site']) { require_once 'plug/microxml.php'; $site = 'http://' . $sc['site']; $t = lka($site, $sc['site'] . '/' . $sc['hub']); $load = clkt($sc['site'] . '/msql/users/' . $sc['hub'] . '_cache'); } else { $load = msql_read('users', $sc['hub'] . '_cache', '', 1); } if ($load) { if ($sc['cat']) { $load = channel_tri($load, $sc['cat'], 1); } if ($sc['parent']) { $load = channel_tri($load, $sc['art'], 10); } if ($sc['art']) { $load = channel_tri($load, $sc['art'], ''); } if ($sc['tag']) { $load = channel_tri($load, $sc['tag'], 5); } if ($sc['last']) { $load = splice($load, $sc['last']); } $t = build_titl($load, !$t ? $sc['hub'] : $t, 1, $sc['hub']); if ($d == 'articles') { if ($site) { $ret .= output_pages_from_cache($site, $load); } else { $ret .= output_pages($load, 2, ''); } } elseif ($load) { foreach ($load as $k => $v) { $re[] = llk('', $site . '/' . $k, html_entity_decode($v[2])); } $ret = implode('', $re); $ret = balc('ul', 'panel pubart', $ret); } } return $t . $ret; }
function plug_search($d, $n, $opt = '', $res = '') { list($b, $o, $t, $ph) = split('-', $opt); chrono(); $rech = good_rech($d); $_GET['search'] = $rech; list($cat, $tag) = ajxr($res); $rech = str_replace(array("’", '«', '»', " "), array("'", '"', '"', ' '), trim($rech)); if (!$n) { $n = $_SESSION['nbj']; } $_GET['dig'] = $n; $_GET['cat'] = $cat; $_GET['tag'] = $tag; $_GET['bool'] = $b; $_GET['titles'] = $t; //$_GET['pho']=$ph; $vrf = normalize($rech . $n . $b . $o . $t . $ph . $res); if ($rech == 'last') { $id = lastid('qda'); $load[$id] = 1; } elseif (isset($_SESSION['recache'][$vrf])) { $load = $_SESSION['recache'][$vrf]; $cac = $vrf; } elseif ($d && is_numeric($d) && $d < lastid('qda')) { $load[$d] = 1; } elseif (strpos($rech, ';') && strpos($rech, ':')) { list($rch, $cat, $tag, $utg) = rech_script($rech); } elseif (strpos($rech, '=')) { $load = make_list_arts($rech); } else { $load = rech($rech, $n); } if ($load && !is_array($load)) { $load = ''; } if (!$load && ($cat or $tag or $utg)) { $load = rech_catag($cat, $tag, $utg, $n); } $_SESSION['load'] = $load; $_SESSION['recache'][$vrf] = $load; $ret = rech_titles($rech, $n, $opt, $cac, $cat, $tag, $tag2); $_SESSION['page'] = 1; $_SESSION['popm'] = chrono('search'); if ($load[0]) { unset($load[0]); } if ($load[1]) { unset($load[1]); } if ($load) { $ret .= scroll($load, divd($vrf, output_pages($load, '', '')), 2, '', 400); } return $ret; }
function ib_arts($id, $prw) { //child if ($_GET['order']) { $ordr = 'DESC'; $ret = lkc('txtbox', '/?read=' . $id . '#pages', nms(41)); } else { $ordr = 'ASC'; if (rstr(43)) { $ret = lkc('txtbox', '/?read=' . $id . '&order=1#pages', nms(40)); } } if (rstr(43)) { $ret = hr() . btn('txtcadr', nms(39)) . ' ' . $ret . br() . br(); } if (!auth(1)) { $cnd = 'and re>="1" and substring(frm,1,1)!="_"'; } $load = sql('id', 'qda', 'k', 'ib="' . $id . '" ' . $cnd . ' ORDER BY id ' . $ordr); //$rt=define_modc_b('content'); if ($load) { return $ret . output_pages($load, 'flow', ''); } }
function build_content() { $gmd = $_GET['module']; if ($gmd && $gmd != 'Home') { $content = build_mod_r($gmd); } elseif ($_SESSION['load'] or $_GET['search']) { $content .= page_titles(0) . output_pages($_SESSION['load'], '', ''); } else { $content = build_modules('content', ''); } return $content; }
function mod_load($load, $ret, $t, $d, $o, $obj, $prw, $tp, $id) { if (!$prw) { $prw = 'prw'; } if ($t) { $t = build_titl($load, $t, $obj); } $mx = prmb(6); if ($d == 'read') { foreach ($load as $id => $prw) { $ret .= divc('justy', read_msg($id, 3)) . br(); } } elseif ($d == 'articles') { $ret = output_pages($load, $prw, $tp); } elseif ($d == 'viewer') { $ret = art_viewer($load); } elseif ($d == 'multi') { $_POST['flow'] = 1; foreach ($load as $id => $md) { $i++; if ($i < $mx) { $ret .= art_read_b($id, $_SESSION['nl'], $md, $tp); } else { $ret .= div(atd($id) . atc($md), ''); } } } elseif ($d == 'api') { $ret = api_mod_call($load); } elseif ($d == 'icons') { $ret = desktop_build_ico($load, 'icones') . divc('clear', ''); } elseif ($d == 'panel') { foreach ($load as $k => $v) { $ret .= pane_art($k, $o); } } elseif ($load) { $ret = m_pubart($load, $d, $o, $tp); } if ($o == 'scroll') { $ret = scroll_b($load, $ret, 10); } elseif ($o == 'scrold') { $ret = scroll($load, $ret, 10); } elseif ($o == 'cols') { $ret = columns($ret, 200, '', ''); } if ($ret) { return $t . $ret; } }
function output_load($r) { $rid = randid(); return divd('load' . $rid, page_titles(0, $rid) . output_pages($r, '', '')); }