Example #1
0
File: art.php Project: philum/cms
function art_read_b($id, $n, $prw, $tp)
{
    //local_call/search/mod_load/popart
    if ($prw > 2) {
        $_GET['read'] = $id;
        $tp = $tp ? $tp : 'read';
    }
    if ($id == 'last') {
        $id = last_art_rqt();
    } elseif (!is_numeric($id)) {
        $id = id_of_suj($id);
    }
    $r = art_datas($id);
    if (rstr(5) or $prw > 2 or $_GET['search']) {
        $msg = rse('msg', $_SESSION['qdm'] . ' WHERE id=' . $id);
    }
    //1.2.3.nl
    if ($prw == 'vd') {
        $msg = search_conn_video($id, $msg);
    }
    $ret = art_read_mecanics($id, $r, $msg, $n, $prw, $tp);
    if ($prw > 2) {
        $ret .= ib_arts($id, $prw);
    }
    //affiliates
    return $ret;
}
Example #2
0
File: api.php Project: philum/cms
function api_build_arts($r, $prw, $tp)
{
    if ($prw > 1 or $prw == 'rch') {
        $msg = sql('msg', 'qdm', 'v', 'id="' . $r['id'] . '"');
    }
    //msg
    $r['img1'] = first_img($r['img']);
    return art_read_mecanics($r['id'], $r, $msg, '', $prw, $tp);
}