Ejemplo n.º 1
0
function pane_art($id)
{
    $im = best_img(sql('img', 'qda', 'v', 'id=' . $id));
    $suj = suj_of_id($id);
    //spe
    return divs('background:url(/img/' . $im . ') center; background-size:cover; height:180px;', divs('position:relative; background:rgba(0,0,0,0.4); color:rgba(255,255,255,0.8); font-shadow:1px 1px 2px rgba(0,0,0,0.8); font-size:22px; top:50%;', $suj));
}
Ejemplo n.º 2
0
function pet_mail($id, $day, $mail, $name)
{
    $title = suj_of_id($id);
    $msg = stripslashes(pet_hlp('confirm_mail'));
    $url = 'http://' . $_SERVER['HTTP_HOST'] . '/?read=' . $id . '&confirm=' . $day;
    $msg = str_replace(array('_NAME', '_TITLE', '_URL'), array($name, $title, $url), $msg);
    return mail($mail, $title, $msg, 'From: ' . $url . "\n", "");
}
Ejemplo n.º 3
0
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);
}
Ejemplo n.º 4
0
function plug_deploy($deploy)
{
    $qb = $_SESSION['qb'];
    $USE = $_SESSION['USE'];
    $raed = suj_of_id($deploy);
    $nl = $_GET['nl'] ? $_GET['nl'] : "nl";
    if ($deploy && $USE) {
        //prep
        list($qauth, $subj) = sql('name,suj', 'qda', 'r', 'id="' . $deploy . '"');
        $msg = sql('msg', 'qdm', 'v', 'id="' . $deploy . '"');
        if ($USE == $qauth or auth(5)) {
            $http = host();
            if (!$_POST['dpl']) {
                reqp('mail');
                $qmail = mail_list_tosend();
                $ret .= form("/?read={$deploy}&deploy={$deploy}&nl=nlb", txarea('dpl" maxlength="1000', $qmail, 40, 10) . br() . checkbox("dpf", "ok", "html", 1) . checkbox("multiple", "ok", "each_one", 1) . input2('submit', "send", nms(50), 'popbt'));
            } else {
                $htacc = urlread($deploy);
                $_SESSION['nl'] = $nl;
                //deploy
                if ($_POST['dpf'] == "ok") {
                    $mail_format = "html";
                    $txt = format_txt($msg, $nl, $deploy);
                    $txt = html_entity_decode($txt);
                    $txt = str_replace('href="/', 'href="' . $http . '/', $txt);
                    $msg = lkc("", $http . $htacc, bal("h2", $subj));
                    $msg .= divc("panel justy", $txt);
                } else {
                    $mail_format = "txt";
                    $msg = clean_internaltag($msg);
                    $msg = html_entity_decode($msg);
                }
                $_SESSION['nl'] = "";
                //send
                $sender = sql('mail', 'qdu', 'v', 'name="' . $USE . '"');
                $lstm = str_replace("\n", ",", $_POST['dpl']);
                $lstm = str_replace("\r", ",", $lstm);
                $listmail = explode(",", trim($lstm));
                if ($_POST['multiple'] == "ok" && is_array($listmail)) {
                    $sentto = send_mail_r($listmail, $mail_format, $qb . ' :: ' . $raed, $msg, $sender, $htacc);
                } else {
                    $sentto = $_POST['dpl'];
                    $vm = str_replace(array(",", ";", "\n", " "), ",", $sentto);
                    send_mail($mail_format, $vm, $qb . ' :: ' . $raed, $msg, $sender, $htacc);
                }
                $ret .= lkc("popbt", '/?read=' . $deploy, 'article ' . $deploy . ' sent to: ' . $sentto);
            }
        } else {
            $ret .= btn("popdel", "forbidden");
        }
    }
    //if($_POST['dpl'])return $ret;
    return $ret;
}
Ejemplo n.º 5
0
Archivo: spe.php Proyecto: philum/cms
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;
        }
    }
}
Ejemplo n.º 6
0
Archivo: bubs.php Proyecto: philum/cms
function bub_seek_art($d)
{
    req('mod');
    list($cat, $tag) = explode('-', $d);
    $r = tag_arts($tag, $cat, 7);
    unset($r[ses('read')]);
    if ($r) {
        foreach ($r as $k => $v) {
            $ret[] = array(suj_of_id($k), 'art', '', $k, $d, '', $d, 'article');
        }
    }
    return $ret;
}
Ejemplo n.º 7
0
Archivo: twit.php Proyecto: philum/cms
function twit_share($p, $o, $res = '')
{
    $rid = 'plg' . randid();
    list($p, $o) = ajxp($res, $p, $o);
    req('spe');
    require_once 'plug/tiers/Twitter.php';
    $t = new Twitter();
    $suj = suj_of_id($p);
    $author = sql_inner('tag', 'qdt', 'qdta', 'idtag', 'v', 'where cat="auteurs" and idart="' . $p . '"');
    if ($author) {
        $suj .= ', ' . ucfirst(nms(88)) . ' ' . $author;
    }
    $url = host() . urlread($p);
    $j = atj('strcount', 'twpost');
    $s = atb('onclick', $j) . atb('onkeypress', $j) . atc('console');
    $ret = balise('textarea', atd('twpost') . atb('cols', 50) . atb('rows', 5) . $s, $suj . ' ' . $url) . br();
    $ret .= lj('popbt', $rid . '_plug___twit_twit*post___twpost', picto('get')) . ' ';
    $ret .= span(atd('strcount') . atc('txtsmall'), '');
    return divd($rid, $ret);
}
Ejemplo n.º 8
0
Archivo: ajax.php Proyecto: philum/cms
     $ret = art_read_b($id, '', $va, $opt);
     break;
 case "load":
     req('art,pop,spe,tri');
     $ret = play_arts('', '', '', $id);
     break;
 case "popart":
     req('pop,spe,art,tri,mod,boot');
     //$_SESSION['read']=$id;
     $_SESSION['cur_div'] = 'content';
     deductions_from_read($id, '');
     $p = 2;
     if (auth(6)) {
         ses('popm', lj('', 'popup_tit___' . $id, picto('tag')) . ' ' . lj('', 'popup_artedit___' . $id, picto('edit')));
     }
     $t = suj_of_id($id);
     $s = prma('content') + 20;
     $nl = 'nlpop';
     $ret = art_read_b($id, '', 3, '');
     break;
 case "popartmod":
     req('mod,spe,art,pop,tri,boot');
     deductions_from_read($id, '');
     $ret = build_art_mod('');
     $t = nms(39);
     $s = 440;
     break;
 case "divcontent":
     req('pop,spe,art,tri,mod,boot');
     $_GET[$id] = $va;
     $ret = build_content();
Ejemplo n.º 9
0
Archivo: tri.php Proyecto: philum/cms
function correctors($doc, $cr)
{
    $xfp = strrpos($doc, ":");
    $xf = substr($doc, $xfp);
    $pdoc = substr($doc, 0, $xfp);
    if ($cr == 'stripconn') {
        //strrchr_b($pdoc,'§')
        if (strpos($doc, '§') != false) {
            return $pdoc;
        }
    }
    if ($cr == 'striplink') {
        list($lin, $txt) = split_one("§", $doc, '');
        if (is_numeric($lin)) {
            $lin = host() . urlread($lin);
        }
        if (strpos($doc, '§') != false or substr($lin, 0, 4) == 'http' or is_numeric($lin)) {
            return $txt ? $txt . ' (' . $lin . ') ' : $lin;
        }
        if ($xf == ':pub') {
            return suj_of_id($pdoc) . ' (' . host() . urlread($pdoc) . ') ';
        }
    }
    if ($xf == $cr) {
        if ($xf == ":table") {
            if ($_POST['clean_tab']) {
                return del_n($pdoc);
            } else {
                $pdoc = str_replace(array("¬", "|"), array("\n", "\t"), $pdoc);
                if (strpos($pdoc, ' ') !== false && strpos($pdoc, '.jpg') === false && trim($pdoc)) {
                    return '[' . $pdoc . ':q]';
                } else {
                    return $pdoc;
                }
            }
        } elseif ($xf == ':chat') {
            return;
        } else {
            return $pdoc;
        }
    } else {
        return '[' . $doc . ']';
    }
}
Ejemplo n.º 10
0
Archivo: favs.php Proyecto: philum/cms
function fav_art($id, $rtg = '')
{
    $im = minimg(sql('img', 'qda', 'v', 'id=' . $id), 'h');
    $day = sql('day', 'qda', 'v', 'id=' . $id);
    $dat = mkday($day) . ' ';
    if ($rtg) {
        $tag = fav_tag_maker($rtg) . ' ';
    }
    //$del=plugin('like',$id,1).' ';
    $suj = bal('h4', suj_of_id($id) . ' ');
    if ($id) {
        return divc('txtcadr', $im . $dat . $tag . $del . lj('', 'popup_popart__3_' . $id . '_3', $suj));
    }
}
Ejemplo n.º 11
0
Archivo: meta.php Proyecto: philum/cms
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);
}
Ejemplo n.º 12
0
Archivo: mod.php Proyecto: philum/cms
function rub_taxo($p, $t)
{
    $id = ses('read');
    if ($p == 1) {
        $p = $_SESSION['frm'];
    } elseif ($p == 'art') {
        $p = ib_of_id($id);
    }
    if ($p) {
        $taxcat = supertriad_dig($p);
    }
    //permanent//$_SESSION['superline'][$p];//cache
    if ($p > 1) {
        $t = lka(urlread($p), suj_of_id($p)) . br();
        $hie = collect_hierarchie_c(0, '');
        $taxcat = find_in_subarray($hie, $p);
    }
    $t = build_titl($taxcat, $t, 1);
    if (is_array($taxcat)) {
        return $t . divc('taxonomy', make_menus_r($taxcat));
    }
}
Ejemplo n.º 13
0
function plug_taxonav($p, $o)
{
    req('mod,spe');
    $r = collect_hierarchie_d("reverse", $o);
    if (is_numeric($p)) {
        $r = $r[$p];
    }
    if ($r) {
        $ret = build_titl($r, $p > 0 ? suj_of_id($p) : $p, 1);
        $ret .= balc("ul", "taxonomy", make_menus_rb($r, '', 1, $o));
        $ret .= lkc('', '/module/taxonav/' . ajx($p) . '/' . yesno($o), offon($o) . ' ' . nms(129));
    } else {
        $ret = nms(11) . ' ' . nms(16);
    }
    return $ret;
}
Ejemplo n.º 14
0
function save_track($msg, $id, $name, $mail)
{
    $pdt = time();
    $iq = hostname();
    //ses('iq');
    if (is_numeric($id) or substr($id, 0, 4) == 'wall') {
        $local = true;
    }
    if (!$msg) {
        return;
    }
    // btn('popdel','bruuu! '.helps('empty_msg'));
    req('sav');
    $qb = $_SESSION['qb'];
    $base = $_SESSION['qdi'];
    $_GET['idy'] = 'ok';
    $_GET['insert'] = 'ok';
    $_POST['name'] = $nm;
    $_POST['msg'] = $msg;
    if (!rstr(2) or auth(4)) {
        $op = 1;
    } else {
        $op = 0;
    }
    $here = host() . '/?read=' . $id;
    $msg = str_replace(":chat", "", $msg);
    $msg = repair_latin($msg);
    $msg = embed_links($msg);
    //$amsg=mysql_real_escape_string(stripslashes($msg));
    $values = array($ib, $name, $mail, $pdt, $qb, $id, $suj, $msg, $op, $ip);
    //,'','',''
    $nread = insert('qdi', mysqlra($values));
    $suj = $local ? suj_of_id($id) : nms(84);
    $nmsg = lka($here . '#trk' . $nread, $local ? helps('trackmail') : nms(84)) . br() . br();
    $nmsg .= nms(68) . ': ' . $name . ', ' . mkday($pdt) . br() . br() . format_txt($msg, '', '');
    $admail = $_SESSION['qbin']['adminmail'];
    //to_admin
    if ($name != $_SESSION['USE']) {
        send_mail_html($admail, $suj, $nmsg, $mail, urlread($id));
    }
    if ($local) {
        $rmails = sql('mail', 'qdi', 'k', 'frm="' . $id . '" AND re>="1"');
    }
    //deploy
    $kem = sql('name', 'qda', 'v', 'id="' . $id . '"');
    //send_to_author
    if ($kem != $name) {
        $kmail = sql('mail', 'qdu', 'v', 'name="' . $kem . '"');
        if ($admail != $kmail) {
            $rmails[$kmail] = 1;
        }
    }
    //send_track_to_user
    if ($rmails && $op == 1) {
        send_mail_r(array_keys_b($rmails), 'html', $suj, $nmsg, $mail, $id);
    }
    if (!$local) {
        return popup(nms(34), divc('', helps('formail')), '');
    }
    return tracks_read($nread, '', '');
}
Ejemplo n.º 15
0
Archivo: ajxf.php Proyecto: philum/cms
function newartparent()
{
    $r = array_keys_r($_SESSION['rqt'], 10);
    foreach ($r as $k => $v) {
        if ($v != '/') {
            $rb[$v] += 1;
        }
    }
    arsort($rb);
    foreach ($rb as $k => $v) {
        $ret[$k] = '(' . $v . ') ' . suj_of_id($k);
    }
    return $ret;
}
Ejemplo n.º 16
0
Archivo: pop.php Proyecto: philum/cms
function pop_art($d)
{
    list($id, $t) = split_one('§', $d);
    if (substr($d, 0, 4) == 'http') {
        $j = 'popup_rssart__3_' . ajx($id) . '_1';
    } else {
        $j = 'popup_popart__3_' . $id . '_3';
    }
    $t = $t ? $t : suj_of_id($id);
    return lj('', $j, pictxt('articles', $t ? $t : preplink($d)));
}
Ejemplo n.º 17
0
Archivo: meta.php Proyecto: philum/cms
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);
}
Ejemplo n.º 18
0
Archivo: book.php Proyecto: philum/cms
function plug_book($iq, $id)
{
    bk_rq();
    Head::add('csscode', book_css());
    Head::add('jscode', book_js());
    $_SESSION['book'] = $iq;
    if (!is_numeric($iq)) {
        list($r, $rb) = book_builder($iq);
    } else {
        $r = sql('ib', 'qdd', 'k', 'msg="' . $iq . '" and val="fav"');
    }
    if (!$r) {
        return;
    } else {
        $_SESSION['bookr'] = $r;
    }
    $d = implode(' ', $r);
    $here = 'book';
    $id = $id ? $id : $_SESSION['read'];
    $rid = randid();
    //if(!$id)
    $rb['opt'] = lj('', 'popup_plup___book_book*ifr_' . $iq, pictxt('get', 'iframe'));
    foreach ($r as $k => $v) {
        $i++;
        if ($oi) {
            $io = $i . '. ';
        }
        $lk = 'book' . $rid . '_plug__2_book_book*read_' . $k . '_' . $rid;
        $lgh = art_length(sql('host', 'qda', 'v', 'id="' . $k . '"'));
        $msg .= lj('', $lk, picto('kright') . ' ' . $io . suj_of_id($k) . btn('small', ' (' . $lgh . ')')) . br();
    }
    $rb['msg'] = scroll_c($msg, $rid);
    $ret = divd('book' . $rid, template($rb, 'book'));
    $_SESSION['cur_div'] = 'content';
    return $ret;
}
Ejemplo n.º 19
0
Archivo: art.php Proyecto: philum/cms
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;
}
Ejemplo n.º 20
0
Archivo: stats.php Proyecto: philum/cms
function stat_list($c, $n)
{
    req('spe');
    $j = 'popup_plup___stats_stat*list_';
    //echo $c.'-'.$n;
    if ($c == 'nbv' or $c == 'nbu') {
        $ret = 'days: ' . $n . br();
    }
    if ($c == 'nbf') {
        $ret = 'user: '******'nbp') {
        $ret = 'article: ' . $n . br();
    }
    $sql = stat_list_sql($c, $n);
    $r = sql_b($sql, '', 0);
    //p($r);
    if ($c == 'nbv' or $c == 'nbu' or $c == 'nbf') {
        if ($r) {
            foreach ($r as $k => $v) {
                $id = substr(str_extract('&', $v[0]), 5);
                if (is_numeric($id)) {
                    $suj = suj_of_id($id);
                    //else $suj=$id;
                    $flw = lj('', 'popup_popart___' . $id, picto(articles));
                    $ret .= $v[1] . ' ' . lj('txtx', $j . 'nbp_' . $id, $suj) . ' ' . $flw . br();
                }
            }
        }
    } elseif ($c == 'nbp') {
        foreach ($r as $k => $v) {
            $ret .= $v[0] . ' ' . $v[3] . ' ' . lj('txtx', $j . 'nbf_' . $v[1], $v[2]) . ' ' . br();
        }
    }
    return $ret;
}
Ejemplo n.º 21
0
Archivo: spe.php Proyecto: philum/cms
function page_titles($o = '', $rid = '')
{
    $load = ses('load');
    //$o=parent
    $days = getorpost('dig', ses('nbj'));
    $daybb = calc_date($days);
    $rech = good_rech();
    $nms = ses('nms');
    $frm = ses('frm');
    $read = ses('read');
    list($utg, $utv) = detect_uget();
    if ($rech) {
        $ico = btn("txtcadr", pictxt('search', $rech));
        if (get('targ')) {
            return;
        }
        if (is_array($load)) {
            $p['nbarts'] = nbof(count($load), 1) . ' (' . nbof(array_sum($load), 16) . ') / ' . nbof($days, 3);
        }
        $p['opt'] = lj('', 'popup_search___' . $rech, picto('popup'));
        if ($pg = $_SESSION['page'] > 1) {
            $p['opt'] = btn('txtsmall', 'page ' . $pg);
        }
        $p['suj'] = $rech;
        $p['url'] = 'search/' . $rech . '/' . $days;
    } elseif (get('rub_tag')) {
        $rub_t = get('rub_tag');
    } elseif (get('rssurl')) {
        $p['suj'] = $nms[15];
    } elseif ($par = get('parent')) {
        $read = 1;
        $p['suj'] = suj_of_id($par);
        $p['url'] = urlread($par);
    } elseif ($utg) {
        $p['suj'] = $utv;
        $_SESSION['frm'] = '';
        $p['date'] = dig_it($days, $utg, $rid) . ' ';
        $p['url'] = htac($utg) . $utv;
    } elseif ($tag = get('source')) {
        $p['suj'] = $tag;
        $_SESSION['frm'] = '';
        $p['date'] = dig_it($days, 'source', $rid) . ' ';
        $p['url'] = 'source/' . $tag . '/' . $days;
    } elseif ($tag = get('tag')) {
        $p['suj'] = $tag;
        $p['url'] = 'tag/' . $tag . '/' . $days;
        $p['date'] = dig_it($days, 'tag', $rid) . ' ' . lkc('txtx', htac('tag') . $tag, picto('url')) . ' ';
        $p['date'] .= lj('txtx', 'popup_search__3_' . ajx($tag) . '_' . $days, picto('search'));
    } elseif (get('module') == 'All') {
        $p['suj'] = get('module');
        $p['url'] = htac('module') . get('module');
    } elseif ($frm) {
        $p['suj'] = $frm;
        $p['url'] = htac('section') . $frm;
    }
    if (!$read) {
        //nav//nbarts
        if ($utv or $tag or $rub_t or get('source')) {
            if ($load) {
                $nbarts = count($load);
                if (!$rub_t) {
                    $_SESSION['frm'] = '';
                }
            }
        } elseif ($frm != "Home" && get('module') != "All" && $frm) {
            if (get('dig') or $_SESSION['lang']) {
                list($slct, $in, $wh, $ord, $gr) = play_req(' and re>0');
                $nbarts = sql('count(id)', 'qda', 'v', $wh);
            } else {
                $nbarts = $_SESSION['line'][$frm];
            }
        } elseif (ses('line')) {
            foreach ($_SESSION['line'] as $k => $v) {
                $nbarts += $v;
            }
        }
    }
    if ($frm && $frm != 'Home' && $frm != 'All' && !$read && !$p['date']) {
        $p['date'] = dig_it($days, 'section', $rid) . ' ';
    }
    // && !$rech
    if (!$read && !$p['nbarts']) {
        $p['nbarts'] = nbof($nbarts, 1) . (rstr(3) ? ' / ' . nbof($days, 3) : '');
    }
    if ($page = ses('page') && $page > 1) {
        $p['nbarts'] .= ' (page ' . $page . ') ';
    }
    if (!$load && $o) {
        $p['parent'] = find_navigation(ses('read'));
    }
    //rstr(78)
    if ($_GET['rub_tag']) {
        $p['tag'] = rub_tags('');
        $p['opt'] = lkc('txtx', htac('tag') . $rub_t, '&#9658;' . $rub_t);
    }
    if ($p['suj'] == 'All') {
        $p['suj'] = ses('nbj') . ' ' . nms(4);
    }
    if ($p['suj'] == 'Home') {
        $p['suj'] = nms(69);
    }
    //if($_GET['module'])$p['suj']=nms(100)
    return divd('titles', template($p, 'titles'));
}