function pane_base($url, $suj, $frm, $day, $img, $msg, $alx) { static $id; $id++; //$msg=ereg_replace('width='."^[_a-zA-Z0-9.]+$","",$msg);//([[:digit:]]*) $ara = array("<![CDATA[", "]]>"); $suj = str_replace($ara, " ", $suj); $url = str_replace($ara, " ", $url); $msg = str_replace($ara, " ", $msg); if ($img != "") { $gmi = '<img src="' . $img . '" class="imgl" border="0" height="72">'; } $id_art = recognize_article($url, clean_title($suj), $alx); //already_exists if ($id_art) { $opt .= popart($id_art); } elseif ($_SESSION["USE"] == $_SESSION["qb"] or $_SESSION["auth"] > 3) { $purl = ajx($url, ''); $opt .= ljb('txtx', 'SaveJ', 'popup_addArt___' . $purl . '_1', "save") . ' '; //$opt.=ljb('txtbox','SaveIf',$purl,'save').' '; $opt .= btd('btc' . $id, lj('txtx', 'btc' . $id . '_batch__xd_' . $purl . '_p', '+')) . ' '; $opt .= ljb('txtx', 'Close', 'art' . $id, 'x'); } $panout = array('sty' => 'tab', 'id' => $id, 'suj' => $suj, 'date' => $day, 'tag' => " ", 'opt' => $opt, 'thumb' => $gmi, 'msg' => $msg, 'url' => $url); $ret = template_build(template_rss(), $panout); return divd('article', $ret); }
function ummoay_build($p, $o) { req('art,tri,pop,spe'); reqp('msqarts'); $tmp = ummoay_template(); $r = req_arts_y($p); $rtg = list_tags(); if ($r) { foreach ($r as $k => $v) { list($id, $day, $msg, $cat, $tag, $lk) = $v; $day = clean_day_tw($day); $msg = format_txt($msg, '', ''); $lnk = lka(urlread($id)); $pop = lj('', 'popup_trckpop___' . $id, picto('forum', 16)); $rb[$day] = array('suj' => $cat, 'day' => mkday($day, 'Y/m/d'), 'msg' => $msg, 'url' => $lk, 'open' => popart($id, 'articles') . ' ' . $pop, 'tag' => $rc = $rtg[$id]); } } krsort($rb); foreach ($rb as $k => $v) { $rd[nms(100)] .= template_build($tmp, $v); $rc = $v['tag']; if ($rc) { foreach ($rc as $kb => $vb) { $rd[$kb] .= template_build($tmp, $v); } } } return make_tabs($rd); }
function environ_art($id) { //return icoart($ib,'','icones'); $lj = lj('', 'popup_plup___environ_environ*build_' . $id, picto('get')); $lk = lk(urlread($id), atc(''), picto('url')); $lp = popart($id, '', suj_of_id($id)); //$ln=pane_art($id); return divc('', $lp . ' ' . $lk . ' ' . $lj); }
function book_read($id, $rid) { bk_rq(); curwidth_set($_SESSION['prma']['content'] - 60); //[120:setwidth] $p['back'] .= book_prevnxt($id, $rid); $p['id'] = $id; $r = pecho_arts($id); $p['date'] = mkday($r[0], 1); $p['title'] = $r[2]; $p['opt'] = $r[1]; $p['tag'] = $r[5]; $p['length'] = art_length($r[8]); //$p['length'].=' '.lka(urlread($id),picto('articles')); $p['length'] .= ' ' . popart($id); $msg = sql('msg', 'qdm', 'v', 'id=' . $id); $msg = format_txt($msg, 'nlb', $id); $p['player'] = book_pages($id, $rid); $p['msg'] = scroll_c($msg, $rid); $ret .= template($p, 'book'); $_SESSION['cur_div'] = 'content'; //setwidth in template return $ret; }
function rssin($k, $v) { $lk = prepdlink($v); $f = $lk[0]; $f = https($f); if (substr($f, 0, 4) != 'http' && $f) { $f = 'http://' . $f; } $r = rssin_load($f); $nb = count($r); $ret = hidden('', 'addop', 1); $t = rssin_t($k, $v, $f); foreach ($r as $k => $v) { list($va, $lnk, $dat, $id) = $v; $btc = ''; $lnj = ajx($lnk); $i++; if (!$id) { $btc = ljc('', 'popup', 'ajxf_batch*preview_' . $lnj, picto('view')); $fb = nohttp($lnk); if (auth(4)) { $mem = @$_SESSION['vacuum'][$fb] ? 'ok' : picto('add'); $btc .= lj('" id="ars' . $i, 'ars' . $i . '_batch___' . $lnj . '_p', $mem); $btc .= saveiec($lnj, @$_SESSION['vaccat'][$fb], 'rss' . randid(), '', '', '', '', $va); $btc .= lj('', 'popup_search__3_' . ajx($va) . '_', picto('search')); } } else { $btc .= popart($id) . ' '; } $btc .= lkt('', $lnk, picto('url')); $btc .= btn('txtsmall', $dat); if ($va) { $ret .= balc('li', '', $btc . ' ' . $va); } } //$id?'hide': $ret = scroll_b($nb, $ret, 16, 320); return $t . balc("ul", "panel pubart", $ret); }
function find_navigation($id) { $ib = ib_of_id($id); if (is_numeric($ib) && $ib != $id && $ib) { //$nav=pane_art($ib,''); $nav = bal('h4', lka(urlread($ib), pictxt('topo', suj_of_id($ib))) . ' ' . popart($ib)); if ($ib != ses('read')) { return find_navigation($ib) . $nav; } } }
function prepare_tits($id, $r, $rear, $nbtrk, $nl, $prw) { $ib = trim($r['ib']); $nl = $nl ? $nl : $_SESSION['nl']; $rst = $_SESSION['rstr']; $USE = $_SESSION['USE']; $read = $_SESSION['read']; $page = $_SESSION['page']; if ($nl == 'nlpop') { $nl = ''; $nlp = 1; } $out['jurl'] = 'content_ajxlnk2__2_art_' . $id; $out['purl'] = 'popup_popart__3_' . $id . '_3'; $out['day'] = $r['day']; $out['artedit'] = ' '; $nlb = substr($nl, 0, 2); if ($nlb == "nl") { $http = host(); } $out['url'] = $http . good_url($id, $r['suj']); //urlread($id); if (!$rst[19]) { $out['img1'] = first_img($r['img']); } //img1 if (!$rst[68] && $r['img'] && strpos($r['img'], '/')) { //gallery $out['btim'] = lj('', 'popup_callp___spe-ajxf_art*gallery_' . $id . '_gallery', picto('img')); } if ($_SESSION['prma']['art_mod']) { if ($read == $id && $prw > 2 && !$nl && !$nlp && rstr(60)) { $out['float'] = build_art_mod(1); } // $out['float']=mkbub(popbub('seek','',picto('list'),'c'),'inline','position:relative; display:inline-block;','');//seek $out['open'] .= lj('', 'popup_popartmod__3_' . $id, picto('virtual')) . ' '; } if (!$rst[31]) { $out['back'] = art_back($id, $ib, $r['frm']); } //back if (!$rst[6] && $r['name'] != ses('qb')) { //author $out['author'] = lka(htac('author') . $r['name'], $r['name']); } if (!$rst[23] && $r['re'] > 1) { $out['priority'] = picto('s' . ($r['re'] - 1), 16); } if (!$rst[24]) { $day = mkday($r['day'], 1); //date if (!$rst[54]) { $out['date'] = lka(target_date($r['day']), $day); } else { $out['date'] = $day; } } if (!$rst[26]) { $out['pid'] = $id; } //id if (!$rst[29]) { $out['tag'] = tag_maker($id); } //tags if ($nl != 'nl') { $out['edit'] = admin_edit($r['name'], $id, $r['re'], $prw); } //edit if (rstr(27) && trim($r['mail'])) { $out['source'] = pub_link($r['mail']); } //source if ($_GET['search'] && $nl) { $out['search'] = nbof($nl, 19); } //rech if ($rear > 1 && rstr(43)) { $out['nbarts'] = lj('', 'popup_getcontent___parent_' . $id, nbof($rear, 1)); } //nb_arts if (is_array($nbtrk)) { $nbtk = count($nbtrk); //tracks if ($read) { $out['tracks'] = lka(urlread($id) . '#trackback', picto('forum') . $nbtk); } else { $out['tracks'] = lj('', 'popup_trckpop___' . $id, picto('forum') . $nbtk); } } if ($ib > 0 && $read != $id && $read != $ib) { $sujb = suj_of_id($ib); //parent if ($sujb) { $out['parent'] = lka(urlread($ib), pictxt('copy', $sujb)); } } if (!$rst[58] && $nlb != "nl") { $out['open'] .= lj('', 'popup_editbrut___' . $id, picto('conn')) . ' '; } if (!$rst[37] && $nlb != "nl") { $out['open'] .= popart($id) . ' '; } //popen if (!$rst[28] && $nlb != "nl") { //open if ($prw <= 2 && $rst[41] != "0") { $out['open'] .= opnart($id, $prw, '') . ' '; } elseif ($prw == 3 && $rear > 1) { $out['open'] .= opnart($id, 2, '1') . ' '; } } if (!$rst[25] && $r['host'] > 1000) { //lenght $out['lenght'] = picto('time', 16) . ' ' . art_lenght($r['host']); } if (!$rst[40]) { //rss $out['rss'] = lkt("", '/plug/rss1.php?read=' . $id . '&preview=full', picto('rss', 16)); } if (!$rst[71] && $nlb != "nl") { $out['social'] = lj('', 'popup_artstats___' . $id . '_' . $r['day'], picto('users', 16)); } //if($ath=@$r['opts']['authlevel'])$out['social'].=asciinb($ath); if ($nlb != "nl") { $root = host() . urlread($id); //social//&via=philum_info $rsoc = array(44 => 'http://www.facebook.com/sharer.php?u=' . $root, 45 => 'http://twitter.com/intent/tweet?original_referer=' . $root . '&url=' . $root . '&text=' . utf8_encode($r['suj']) . '&title=' . utf8_encode($r['suj']), 46 => 'http://wd.sharethis.com/api/sharer.php?destination=stumbleupon&url=' . $root); if (auth(6) && !$rst[45]) { $out['social'] .= lj('', 'popup_plup___twit_twit*share_' . $id, callico('tw')); } if (!$rst[45]) { $out['social'] .= lkt('', $rsoc[45], callico('tw')); } if (!$rst[44]) { $out['social'] .= lkt('', $rsoc[44], callico('fb')); } if (!$rst[46]) { $out['social'] .= lkt('', $rsoc[46], icon('stumble')); } if (!$rst[52]) { $out['social'] .= favs_edt($id) . ' '; } // if(!$rst[86])$out['social'].=lj($css,'popup_track___'.$id,picto('forum')).' '; if (!$rst[47]) { $out['social'] .= lj('', 'popup_vmail___' . $id, callico('mail')) . ' '; } if (!$rst[12]) { $out['social'] .= lkt('', '/plug/read/' . $id, picto('print')) . ' '; } if (!$rst[49]) { $out['words'] = lj('', 'popup_words___' . $id, picto('search')); } } if ($_SESSION['plgs'] && $nlb != "nl") { $out['social'] = $_SESSION['plgs']; } $out['artlang'] = lang_art($id, $r['opts']); $out['lang'] = lang_rel_arts($id, $r['opts']); if (!$rst[50] or $USE) { $out['opt'] = btn('txtsmall2', picto('view', 16) . ' ' . $r['lu']) . ' '; } //nbof $out['sty'] = ''; return $out; }
function list_artag($idtag, $cat) { $rb = sql('idart', 'qdta', 'rv', 'idtag="' . $idtag . '"'); //existing if ($rb) { foreach ($rb as $idart) { $ret .= lj('popbt', 'popup_callp___meta-spe_editag_' . $idart . '_' . $cat, pictxt('tag', $idart)) . ' ' . popart($idart, '', suj_of_id($idart)) . br(); } } return divc('small', $ret); }
function list_artag($idtag, $cat) { $rb = arts_by_tag($idtag); //existing if ($rb) { foreach ($rb as $idart) { $ret .= lj('popbt', 'popup_callp___meta-spe_edit*tags_' . $idart . '_' . $cat, pictxt('tag', $idart)) . ' ' . popart($idart, '', suj_of_id($idart)) . br(); } } return divc('small', $ret); }
function friend_rub($o) { $id = id_of_suj($_SESSION['frm']); $ok = sql('id', 'qda', 'v', 'id=' . $id . ' and re>"0"'); $ret = sql('msg', 'qdm', 'v', 'id=' . $id); if (auth(4)) { $bt = popart($id); } if ($ok) { return $bt . divc($o, format_txt($ret, '', '')); } }
function find_navigation($id) { $ib = ib_of_id($id); if (is_numeric($ib) && $ib != $id) { list($idb, $suj) = ser("id,suj", $_SESSION['qda'] . ' WHERE id="' . $ib . '"'); if ($suj) { $nav = bal('h4', lka(urlread($idb), pictxt('paste', $suj)) . ' ' . popart($idb)); } if ($idb != ses('read')) { return find_navigation($idb) . $nav; } } }