예제 #1
0
파일: umvoc.php 프로젝트: philum/cms
function ud_segments($p)
{
    //occurrences
    $r = sql_inner('idart,pos', 'qdvoc', 'qdvoc_b', 'idvoc', '', 'where voc="' . $p . '" group by pos order by idart');
    $ret = divc('txtcadr', $p . ' : ' . nbof(count($r), 19)) . br();
    if ($r) {
        foreach ($r as $k => $v) {
            $va = ud_segment($v[0], $v[1]);
            $va = str_replace($p, btn('stabilo', $p), $va);
            $ret .= divc('tracks', $va) . br();
        }
    }
    return $ret;
}
예제 #2
0
파일: poll.php 프로젝트: philum/cms
function poll_menu($id, $poll = '')
{
    $r = poll_read($id);
    $nc = $r[1] + $r[2];
    if ($nc && $r[1]) {
        $va = round($r[1] / $nc, 2) * 100;
    } else {
        $va = 0;
    }
    if ($nc && $r[2]) {
        $vb = round($r[2] / $nc, 2) * 100;
    } else {
        $vb = 0;
    }
    if (!$poll) {
        $poll = sql('poll', 'qdpl', 'v', 'ib="' . $id . '" and iq="' . ses('iq') . '"');
    }
    $j = 'poll' . $id . '_plug___poll_poll*j_' . $id;
    $ret .= lj($poll == 1 ? 'active' : '', $j . '_1', pictxt('smile', $va . '%')) . ' ';
    $ret .= lj($poll == 2 ? 'active' : '', $j . '_2', pictxt('sad', $vb . '%')) . ' ';
    $ret .= lj('small', 'pll' . $id . '_plug___poll_poll*score_' . $id, nbof($nc, 143));
    return divc('nbp', $ret);
}
예제 #3
0
파일: search.php 프로젝트: philum/cms
function rech_titles($rech, $dig, $opt, $cac, $cat, $tag, $tag2)
{
    list($bol, $ord, $tit, $pho) = split("-", $opt);
    $load = $_SESSION['load'];
    $days = geta('dig', $dig);
    $bol = substr($rech, -1) == '*' ? 1 : get('bool', $bol);
    $_GET['bool'] = $bol;
    //$_GET['pho']=$pho;
    $ret .= btn('search', input(1, 'search', $rech . '" size="32" maxlength="150', '')) . ' ';
    $ret .= ljb('popsav', 'Search2();', '', nms(24)) . ' ';
    $ret .= hlpbt('search') . ' ';
    if ($cac) {
        $ret .= blj('popbt', 'srcac', 'plug___search_rech*reset_' . $cac, picto('del'));
    }
    if ($load) {
        $ret .= btn("popw", nbof(count($load), 1));
    }
    //.', '.nbof(array_sum($load),19).' '
    if (rstr(3)) {
        $ret .= br() . dig_h($days);
    } else {
        $ret .= hidden('', 'srdig', 1000);
    }
    //days
    if (!isset($_SESSION['rstr62'])) {
        sesr('rstr62', rstr(62));
    }
    if (rstr(3)) {
        $ret .= togses('rstr62', pictit('right', nms(134))) . ' ';
    }
    //dig
    $urg = mkurl(array('bool', 'titles', 'cat', 'tag'));
    if ($rech) {
        $ret .= lkc('', htac('search') . $rech . '/' . $dig, picto('link')) . ' ';
    }
    //.$urg
    $ret .= br() . checkact('srord', $ord, nms(18)) . ' ';
    $ret .= checkact('srtit', $tit, nms(72)) . ' ';
    //$ret.=checkact('srpho',get('pho'),'').' ';//nms(123)
    $ret .= checkact('srbol', $bol, nms(70)) . '' . hlpbt('bool') . ' ';
    $ret .= select_j('srcat', 'category', $cat ? $cat : nms(9), 1) . ' ';
    //hidslct_j
    $ret .= select_j('srtag', 'tag', $tag ? $tag : 'tag', '');
    //$ret.=select_j('srtag2','thèmes',$tag3,'thèmes');
    return divc('titles', $ret);
}
예제 #4
0
파일: art.php 프로젝트: 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;
}
예제 #5
0
파일: sav.php 프로젝트: philum/cms
function save_art_batch()
{
    $r = $_SESSION['vacuum'];
    //array_reverse
    if ($r) {
        foreach ($r as $k => $v) {
            $rb[] = saveart_url($k);
            unset($_SESSION['vacuum'][$k]);
            $_SESSION['vacsuj'][$k] = '';
            $_SESSION['vaccat'][$k] = '';
            $_SESSION['dayx'] == time();
        }
    }
    if ($rb) {
        req('pop,spe,art,tri,mod');
        $n = count($rb);
        $ret .= lkc('poph', '/module/recents/all/Batch/articles/' . $n, nbof($n, 1)) . ' ';
        $t = pictxt('view', nms(45) . ' ' . nms(100));
        $ret .= lj('poph', 'popup_modpop___all/Batch/articles/' . $n . ':recents', $t);
    } else {
        $ret = nms(11) . ' ' . nms(16);
    }
    //$ret.=build_mod_r('all/Batch/multi/'.$n.':recents');
    return divs('width:140px;', $ret);
}
예제 #6
0
파일: mod.php 프로젝트: philum/cms
function home_plan($load, $n)
{
    if ($load) {
        ksort($load);
        foreach ($load as $mrf => $ids) {
            $i++;
            $line = $_SESSION['line'][$mrf];
            $mn = $_SESSION['mn'][$mrf];
            if ($n == 2) {
                $re = outputimg($ids);
            } else {
                $re = m_pubart($ids, "scroll", "10000");
            }
            if ($mrf != "user" && $mrf != "_system" && $re && ($line or $mn)) {
                if ($n == 2) {
                    $nib = 25;
                } else {
                    $nib = 7;
                }
                if ($line) {
                    $got = htac('cat') . $mrf;
                } else {
                    $got = subdom($mrf);
                }
                $nbrt = btn("txtsmall2", nbof(count($ids), 1));
                $ret[$i] = lkc('txtcadr', $got, $mrf) . ' ' . $nbrt . br();
                $ret[$i] .= divc("tab", scroll($ids, $re, $nib)) . br();
            }
        }
        if ($ret) {
            if (count($ret) < 2 or $n == 2) {
                $prm = 1;
            } else {
                $prm = 2;
            }
            return columns($ret, $prm, 'board', 'pubart');
        }
    }
}
예제 #7
0
파일: spe.php 프로젝트: 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'));
}
예제 #8
0
파일: api.php 프로젝트: philum/cms
function api_titles($ra)
{
    if (!$ra['nbarts']) {
        $ra['nbarts'] = api_query_nb($ra);
    }
    $t = $ra['link'];
    if (rstr(3) && !$ra['minday'] && !$ra['nodig']) {
        $ra['minday'] = ses('nbj');
    }
    $com = implode_k($ra, ',', ':');
    $ret = hidden('', 'hid' . $ra['rid'], $com);
    if ($nb = $_GET['nboc']) {
        $nboc = ' ' . btn('small', nbof($nb, 19));
    }
    if ($t && $ra[$t]) {
        if ($ra['minday'] > 1) {
            $pg = '/' . $ra['minday'];
        }
        if ($ra['page'] > 1) {
            $pg .= '/page/' . $ra['page'];
        }
        $lk = eradic_acc($t) . '/' . $ra[$t] . $pg;
        $ret .= bal('h3', lka($lk, $ra[$t] . $nboc));
    } elseif ($ra['t']) {
        $ret .= divd('titles', bal('h3', $ra['t'] . $nboc));
    }
    $ret .= lj('popbt', 'popup_apicom_hid' . $ra['rid'], nbof($ra['nbarts'], 1)) . ' ';
    if (rstr(3) && !$ra['nodig']) {
        $ret .= api_dig($ra) . br();
    }
    if (!$ra['nopages']) {
        $ret .= api_pages($ra);
    }
    return bal('header', $ret);
}