Пример #1
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;
}
Пример #2
0
Файл: mod.php Проект: philum/cms
function output_pages_from_cache($http, $otp)
{
    $npg = $_SESSION['prmb'][6];
    $page = $_SESSION["page"];
    $min = ($page - 1) * $npg;
    $max = $page * $npg;
    if (is_array($otp)) {
        foreach ($otp as $id => $nb) {
            if (is_numeric($id)) {
                $i++;
                if ($i >= $min && $i < $max) {
                    $mg = $http . '/imgc/' . first_img($nb[3]);
                    if (is_link($mg)) {
                        $ret .= btn('imgl', image($mg, '', 50));
                    }
                    $ret .= bal("h2", lka($http . '/' . $id, $nb[2]));
                    $ret .= btn('txtx', $nb[1]) . ' ';
                    if (rstr(27)) {
                        $ret .= btn("txtsmall", mkday($nb[0], 1)) . ' ' . pub_link($nb[9]) . ' ';
                    }
                    if (rstr(25)) {
                        $ret .= btn("txtsmall", art_lenght($nb[8]));
                    }
                    $ret .= br() . br();
                }
            }
        }
    }
    $n_pages = nb_page($i, $npg, $page);
    return $n_pages . $ret . $n_pages;
}
Пример #3
0
            }
        }
    }
}
//$rtr.=tracks_read($id,$page,$share,"nl",$nb);
$_SESSION['rstr'][13] = rstr13;
$xml = '<' . '?xml version="1.0" encoding="iso-8859-1" ?' . '>' . "\n";
//
//$xml.=bald('channel',$xml_out);
$xml .= '<rss version="2.0">' . "\n";
$xml .= $xml_out;
$xml .= "</rss>";
//$xml.="</xml>";
if ($_GET["save_xml"]) {
    write_file($fxml, $xml);
    echo lkc("txtyl", $fxml, "xml");
}
if ($_GET["save_list"]) {
    write_file($flist, 'list=' . $rtd);
}
//$ret=output($rqt,$page,$share,$media);
echo divc("titres", $_SESSION["qb"]) . ' ';
echo art_lenght($duree) . br() . br();
echo $rtb . br() . hr() . br();
echo $rtc . br() . hr() . br();
echo $rtr;
if ($_GET["plug"] == "") {
    //eye_b($read);
    //echo footer($startime);
}
echo '</div></center></body></html>';
Пример #4
0
function admin_articles($r)
{
    $ye = btn('" style="color:green;', picto('true')) . ' ';
    $no = btn('" style="color:#bd0000;', picto('false')) . ' ';
    foreach ($_GET as $ka => $va) {
        $goto .= $ka . '=' . $va . '&';
    }
    $goto .= 'publish=';
    foreach ($r as $id => $va) {
        $cid = '&art=' . $id . '#' . $id;
        foreach ($va as $k => $v) {
            switch ($k) {
                case "id":
                    $v = '<a name="' . $v . '"></a>' . lkt("", '/?read=' . $id, $v);
                    break;
                case "day":
                    $v = mkday($v, 1);
                    break;
                case "suj":
                    $v = lj('', 'popup_editbrut___' . $id, $v);
                    break;
                case "img":
                    $v = "";
                    break;
                case "re":
                    if ($v) {
                        $v = lkc("", '/?' . $goto . 'off' . $cid, $ye);
                    } else {
                        $v = lkc("", '/?' . $goto . 'on' . $cid, $no);
                    }
                    break;
                case "host":
                    $v = art_lenght($v);
                    break;
            }
            $ret[$id][$k] = $v;
        }
    }
    return $ret;
}