Exemplo n.º 1
0
        $result['time'] = date('Y-m-d', $result['dateline']);
        $noticelist[] = $result;
    }
    $seo_title = $lang['noticelistpage'] . ' - ' . $seo_title;
    $theurl = "store.php?id={$shop['itemid']}&action=notice";
} else {
    //公告詳情
    $notice = $_BCACHE->getiteminfo('notice', $_GET['xid'], $_GET['id']);
    $notice['message'] = bbcode2html($notice['message']);
    if (!$notice) {
        showmessage('not_found_msg', 'index.php');
    }
    $allowreply = $shop['allowreply'] && $notice['allowreply'] ? 1 : 0;
    $notice['time'] = date('Y-m-d', $notice['dateline']);
    //更新統計數
    $isupdate = freshcookie($action, $notice['itemid']);
    if ($isupdate || !$_G['setting']['updateview']) {
        updateviewnum($action, $notice['itemid']);
    }
    if (!empty($notice['jumpurl'])) {
        $notice['jumpurl'] = str_replace('&', '&', $notice['jumpurl']);
        header("Location:{$notice['jumpurl']}");
        exit;
    }
    //評論
    $listcount = $notice['replynum'];
    $_G['setting']['viewspace_pernum'] = intval($_G['setting']['viewspace_pernum']);
    $type = 'notice';
    $seo_title = $notice['subject'] . ' - ' . $seo_title;
    $seo_description = str_replace(array(' ', "\r", "\n", '\'', '"'), '', cutstr(trim(strip_tags($notice['message'])), 200));
}
Exemplo n.º 2
0
    $theurl = "store.php?id={$shop['itemid']}&action=consume";
    $seo_description = strip_tags($consume['message']);
} else {
    $consume = $_BCACHE->getiteminfo('consume', $_GET['xid'], $_GET['id']);
    $consume['message'] = bbcode2html($consume['message']);
    if (!$consume) {
        showmessage('not_found_msg', 'index.php');
    }
    $allowreply = $shop['allowreply'] && $consume['allowreply'] ? 1 : 0;
    if ($_GET['do'] == 'print') {
        DB::query('UPDATE ' . tname('consumeitems') . ' SET downnum=downnum+1 WHERE itemid=\'' . $_GET['xid'] . '\'');
        echo '<body onload="window.print()"><img src="' . $consume['subjectimage'] . '"></body>';
        exit;
    }
    //更新統計數
    $isupdate = freshcookie($action, $consume['itemid']);
    if ($isupdate || !$_G['setting']['updateview']) {
        updateviewnum($action, $consume['itemid']);
    }
    $consume['time'] = date('Y-m-d H:i', $consume['dateline']);
    $consume['starttime'] = date('Y-m-d', $consume['validity_start']);
    $consume['endtime'] = date('Y-m-d', $consume['validity_end']);
    //評論
    $listcount = $consume['replynum'];
    $_G['setting']['viewspace_pernum'] = intval($_G['setting']['viewspace_pernum']);
    $type = 'consume';
    if ($_G['setting']['urltype'] == 3) {
        $consumeurl = B_URL . "/store-{$shop['itemid']}-consume-{$consume['itemid']}.html";
    } else {
        $consumeurl = B_URL . "/store.php?id={$shop['itemid']}&action=consume&xid={$consume['itemid']}";
    }
Exemplo n.º 3
0
}
$maketime = empty($codearr[1]) ? 0 : intval($codearr[1]);
if (empty($maketime)) {
    exit;
}
$updatetime = empty($codearr[2]) ? 0 : intval($codearr[2]);
if (empty($updatetime)) {
    exit;
}
$uid = empty($codearr[3]) ? 0 : intval($codearr[3]);
$itemid = empty($codearr[4]) ? 0 : intval($codearr[4]);
$action = empty($codearr[5]) ? '' : trim($codearr[5]);
$lastmodified = empty($_GET['lastmodified']) ? '0' : $_GET['lastmodified'];
//数据统计
if (!empty($itemid) && $action == 'viewnews') {
    $isupdate = freshcookie($itemid);
    if ($isupdate) {
        $logfile = './log/viewcount.log';
        if (@($fp = fopen($logfile, 'a+'))) {
            fwrite($fp, $itemid . "\n");
            fclose($fp);
            @chmod($logfile, 0777);
        }
    }
}
//获取参数正确
$timestamp = time();
$needupdate = false;
if ($timestamp - $maketime > $updatetime) {
    $needupdate = true;
}
Exemplo n.º 4
0
        $result['time'] = date('Y-m-d', $result['dateline']);
        $result['thumb'] = str_replace('static/image/nophoto.gif', 'static/image/noimg.gif', $result['thumb']);
        $result['message'] = trim(strip_tags($result['message']));
        $result['intro'] = cutstr($result['intro'], 130, true);
        $goodlist[] = $result;
    }
    $seo_title = $lang['goodlist'] . ' - ' . $seo_title;
    $theurl = "store.php?id={$shop['itemid']}&action=good";
} else {
    //商品詳情
    $good = $_BCACHE->getiteminfo('good', $_GET['xid'], $_GET['id']);
    $good['message'] = bbcode2html($good['message']);
    if (!$good) {
        showmessage('not_found_msg', 'index.php');
    }
    $allowreply = $shop['allowreply'] && $good['allowreply'] ? 1 : 0;
    $good['time'] = date('Y-m-d H:i', $good['dateline']);
    $relatedarr = array();
    $relatedarr = getrelatedinfo('good', $good['itemid'], $shop['itemid']);
    //更新統計數
    $isupdate = freshcookie($action, $good['itemid']);
    if ($isupdate || !$_G['setting']['updateview']) {
        updateviewnum($action, $good['itemid']);
    }
    //評論
    $listcount = $good['replynum'];
    $_G['setting']['viewspace_pernum'] = intval($_G['setting']['viewspace_pernum']);
    $type = 'good';
    $seo_title = $good['subject'] . ' - ' . $seo_title;
    $seo_description = str_replace(array('&nbsp;', "\r", "\n", '\'', '"'), '', cutstr(trim(strip_tags($good['message'])), 200));
}
Exemplo n.º 5
0
        }
        exit;
    }
} else {
    $groupbuyattr = loadClass('attr')->get_groupby_user_attr();
    $allowreply = $shop['allowreply'] && $groupbuy['allowreply'] ? 1 : 0;
    $groupbuy['groupbuytime'] = date('Y-m-d', $groupbuy['validity_end']);
    $groupbuy['groupbuydiscount'] = round($groupbuy['groupbuypriceo'] / $groupbuy['groupbuyprice'], 2) * 10;
    $groupbuy['groupbuysave'] = round($groupbuy['groupbuyprice'] - $groupbuy['groupbuypriceo']);
    $groupbuy['surplusnum'] = !empty($groupbuy['groupbuymaxnum']) ? $groupbuy['groupbuymaxnum'] - $groupbuy['buyingnum'] : $lang['groupbuy_notrestricted'];
    $groupbuy['groupbuypriceo'] = round($groupbuy['groupbuypriceo']);
    $groupbuy['groupbuyprice'] = round($groupbuy['groupbuyprice']);
    $relatedarr = array();
    $relatedarr = getrelatedinfo('groupbuy', $groupbuy['itemid'], $shop['itemid']);
    //更新統計數
    $isupdate = freshcookie($action, $groupbuy['itemid']);
    if ($isupdate || !$_G['setting']['updateview']) {
        updateviewnum($action, $groupbuy['itemid']);
    }
    //評論
    $listcount = $groupbuy['replynum'];
    $_G['setting']['viewspace_pernum'] = intval($_G['setting']['viewspace_pernum']);
    $type = 'groupbuy';
    $my_join_info = loadClass('groupbuy')->get_my_join_info($_G['uid'], $groupbuy['itemid']);
    if ($my_join_info) {
        $already_joined = true;
    } else {
        $already_joined = false;
    }
    $groupbuy_is_on = true;
    if ($groupbuy['validity_end'] < $_G['timestamp'] || $groupbuy['grade'] < 3 || $groupbuy['close'] == 1) {