예제 #1
0
파일: read.php 프로젝트: philum/cms
function plug_read($p)
{
    if (!$p) {
        return;
    }
    req('art,pop,tri,spe');
    sesone('nl', 'nl');
    $ret = art_read_b($p, '', '3', '');
    sesone('nl', '');
    return $ret;
}
예제 #2
0
파일: ajax.php 프로젝트: philum/cms
     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();
     break;
 case "getcontent":
     req('pop,spe,art,tri,mod');
예제 #3
0
파일: pop.php 프로젝트: philum/cms
function pubart($d)
{
    list($v, $p) = split_one("§", $d, 1);
    switch ($p) {
        case 1:
            return art_read_b($v, '', 1, '');
            break;
        case 2:
            return art_read_b($v, '', 2, '');
            break;
        case 3:
            return art_read_b($v, '', 3, '');
            break;
        case 4:
            if (strpos($v, ',')) {
                return m_pubart(array_flip(explode(',', $v)), '', '');
            } else {
                pub_art($v);
            }
            break;
        default:
            return jread('', $v, suj_of_id($v));
            break;
    }
}
예제 #4
0
파일: spe.php 프로젝트: philum/cms
function output_pages_spe($otp, $media, $spe)
{
    $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){}
                if ($spe == 'track') {
                    $ret .= art_read_b($id, '', 1, '') . output_trk(read_idy($id, 'ASC'));
                } else {
                    $ret .= art_read_b($id, $nb, $media, '');
                }
            }
        }
    }
    //$n_pages=nb_page($i,$npg,$page);
    return $n_pages . $ret . $n_pages;
}
예제 #5
0
파일: mod.php 프로젝트: philum/cms
function art_viewer($r)
{
    $rid = randid('artv');
    $id = key($r);
    $ret = art_read_b($id, '', 2, '');
    if (count($r) > 1) {
        foreach ($r as $k => $v) {
            $i++;
            $m .= lj('', $rid . '_artone___' . $k . '_2', $i);
        }
    }
    return divc('nb_pages', $m) . divd($rid, $ret);
}
예제 #6
0
파일: api.php 프로젝트: philum/cms
function api_build($r, $ra)
{
    $n = count($r);
    $pr = $ra['preview'];
    $tp = $ra['template'];
    $cmd = $ra['cmd'];
    if ($rch = $ra['search']) {
        $pr = 'rch';
        $_GET['search'] = $rch;
        $_GET['look'] = $rch;
    }
    if ($cmd == 'panel') {
        foreach ($r as $k => $v) {
            $re[] = pane_art($k, $o);
        }
    } elseif ($cmd == 'track') {
        foreach ($r as $k => $v) {
            //cmd tracks
            $re[] = art_read_b($k, '', 1, '') . output_trk(read_idy($k, 'asc'));
        }
    } else {
        foreach ($r as $k => $v) {
            $prw = $pr == 'auto' ? $v['re'] > 2 ? 2 : 1 : $pr;
            $re[] = api_build_arts($v, $prw, $tp);
        }
    }
    if ($ra['cols']) {
        return columns($re, $ra['cols']);
    }
    return implode('', $re);
}