示例#1
0
$aid = empty($aid) ? 0 : max(0, intval($aid));
!$aid && message('choosearchive');
$tname = empty($tname) ? '' : trim($tname);
empty($tname) && message('parammissing');
$temparr = array();
$temparr['tname'] = $tname;
$temparr['tmode'] = empty($tmode) ? 0 : 1;
$temparr['fid'] = empty($fid) ? 0 : max(0, intval($fid));
$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']);
示例#2
0
$mid = empty($mid) ? 0 : max(0, intval($mid));
$cid = empty($cid) ? 0 : max(0, intval($cid));
$page = empty($page) ? 1 : max(1, intval($page));
empty($cid) && message('chooseproduct');
include_once M_ROOT . './include/mparse.fun.php';
if ($cachemscircle && (!$mslistcachenum || $page <= $mslistcachenum)) {
    $cachefile = htmlcac_dir('ms', 'm' . $mid % 100, 1) . cac_namepre($mid, 'product' . $cid) . '_' . $page . '.php';
    if (is_file($cachefile) && filemtime($cachefile) > $timestamp - $cachemscircle * 60) {
        mexit(read_htmlcac($cachefile));
    }
}
if (!($_offer = $db->fetch_one("SELECT * FROM {$tblprefix}offers WHERE cid='{$cid}' AND mid='{$mid}'"))) {
    message('chooseproduct');
}
$arc = new cls_archive();
if (!$arc->arcid($_offer['aid'])) {
    message('choosearchive');
}
if (!$arc->archive['checked'] && !$curuser->isadmin()) {
    message('poinarcnoche');
}
$tplname = ms_arctpl($arc->archive['chid'], 'product');
if (!$tplname) {
    message('definereltem');
}
$arc->detail_data();
$_arc =& $arc->archive;
arc_parse($_arc);
$_mp = array();
$_mp['durlpre'] = $mspaceurl . en_virtual('product.php?mid=' . $mid . '&cid=' . $cid . '&page={$page}', 1);
$_mp['static'] = 0;
示例#3
0
<?php

include_once dirname(__FILE__) . '/include/general.inc.php';
include_once M_ROOT . './include/common.fun.php';
include_once M_ROOT . './include/archive.cls.php';
//分析基本信息
parse_str(un_virtual($_SERVER['QUERY_STRING']));
$page = empty($page) ? 1 : max(1, intval($page));
empty($aid) && message('choosearchive');
$aid = max(0, intval($aid));
$arc = new cls_archive();
if (!$arc->arcid($aid)) {
    message('choosearchive');
}
if (!$arc->archive['checked'] && !$curuser->isadmin()) {
    message('poinarcnoche');
}
$addno = empty($addno) ? 0 : max(0, intval($addno));
if ($addno > $arc->channel['addnum']) {
    $addno = 0;
}
//分析所在子站
switch_cache($arc->archive['sid']);
$sid = $arc->archive['sid'];
if_siteclosed($sid);
//分析权限与扣积分,文章出售
$ispre = 0;
//是否启动前导页
$pretpl = $arc->channel['pretpl'];
if (!arc_allow($arc->archive, 'aread')) {
    //分析权限,如果有备用页,则进入备用页。
示例#4
0
<?php

include_once dirname(dirname(__FILE__)) . '/include/general.inc.php';
include_once M_ROOT . './include/common.fun.php';
include_once M_ROOT . './include/archive.cls.php';
$inajax = empty($inajax) ? 0 : 1;
$aid = empty($aid) ? 0 : max(0, intval($aid));
$isatm = empty($isatm) ? 0 : 1;
!$aid && cumessage('confchoosarchi');
!$memberid && cumessage('nousernosubper');
$commu = read_cache('commu', 8);
empty($commu) && cumessage('choosecommuitem');
if (empty($commu['ucadd'])) {
    !$curuser->pmbypmids('cuadd', $commu['setting']['apmid']) && cumessage('younoitempermis');
    $arc = new cls_archive();
    !$arc->arcid($aid) && cumessage('choosearchive');
    !$arc->archive['checked'] && cumessage('poinarcnoche');
    switch_cache($arc->archive['sid']);
    $sid = $arc->archive['sid'];
    $stritem = $isatm ? 'attachment' : 'archive';
    if (!($crids = $arc->arc_crids($isatm))) {
        cumessage("youalrpurchasestritem", '', $stritem);
    }
    $cridstr = '';
    foreach ($crids['total'] as $k => $v) {
        $cridstr .= ($cridstr ? ',' : '') . abs($v) . $currencys[$k]['unit'] . $currencys[$k]['cname'];
    }
    if (!$curuser->crids_enough($crids['total'])) {
        cumessage('younopurcstriwanenocurr', '', $stritem);
    }
    $curuser->updatecrids($crids['total'], 0, lang("purchasestritem", $stritem));