Example #1
0
$arc = new cls_archive();
if (empty($auth)) {
    follow_dynamic($aid, 'down', $temparr);
    //统计全部统一到函数之中进行
} else {
    $midarr = explode("\t", authcode($auth, 'DECODE'));
    if ($midarr[0] == $memberid && $midarr[1] == $aid && $midarr[2] == $temparr['tname'] && $midarr[3] == $temparr['tmode'] && $midarr[4] == $temparr['fid']) {
        $arc->arcid($aid);
        $arc->detail_data();
        if (!$arc->aid) {
            message('choosearchive');
        }
        if (!$arc->archive['checked']) {
            message('poinarcnoche');
        }
        if (empty($temparr['tmode'])) {
            if ($temp = @unserialize($arc->archive[$temparr['tname']])) {
                $temp = @$temp[$temparr['fid']];
            }
        } else {
            $temp = @explode('#', $arc->archive[$temparr['tname']]);
        }
        $url = view_atmurl(@$temp['remote']);
        unset($temp);
        empty($url) && message('noattach');
        down_url($url);
        mexit();
    } else {
        message('attachdownerr');
    }
}
Example #2
0
function follow_notpl($mode, $url, $player)
{
    global $players, $player_width, $player_height;
    if ($mode == 'down') {
        down_url($url);
    } else {
        $item = array('url' => $url);
        load_cache('players');
        $plid = empty($player) ? 0 : $player;
        if (!$plid) {
            $ext = strtolower(mextension($url));
            foreach ($players as $k => $player) {
                if ($player['available'] && $player['ptype'] == $mode && in_array($ext, array_filter(explode(',', $player['exts'])))) {
                    $plid = $k;
                    break;
                }
            }
        }
        !$plid && message(lang('noplayer'));
        $player = read_cache('player', $plid);
        $item['width'] = empty($player_width) ? '100%' : $player_width;
        $item['height'] = empty($player_height) ? '100%' : $player_height;
        $_content = sqlstr_replace($player['template'], $item);
        mexit($_content);
    }
}