Ejemplo n.º 1
0
$pv = new View($typeid);
if (!isset($aid)) {
    exit('Wrong Id');
}
$aid = RemoveXSS($aid);
//防止跨站攻击
updateVisit($aid, $typeid);
//更新访问次数
$row = getArticleInfo($aid);
if (empty($row['id'])) {
    head404();
}
if (!empty($row['redirecturl'])) {
    head301($row['redirecturl']);
}
$prenext = GetPreNext($aid);
//获取上一条,下一条
foreach ($prenext as $k => $v) {
    $pv->Fields[$k] = $v;
}
if (is_array($row)) {
    $row['litpic'] = !empty($row['litpic']) ? $row['litpic'] : getDefaultImage();
    $row['taglook'] = GetTagsLink($row['tagword']);
    $row['description'] = !empty($row['description']) ? "<meta name=\"description\" content=\"" . $row['description'] . "\"/>" : "";
    $row['keyword'] = !empty($row['keyword']) ? "<meta name=\"keywords\" content=\"" . $row['keyword'] . "\"/>" : "";
    $row['subname'] = $row['title'];
    $row['commentnum'] = Helper_Archive::getCommentNum($row['id'], 4);
    $row['commenthomeid'] = $row['id'];
    $row['id'] = strlen($row['id']) == 1 ? "0" . $row['id'] : $row['id'];
    $row['pkname'] = get_par_value($row['kindlist'], $typeid);
    $row['yesjian'] = is_null($row['yesjian']) ? 0 : $row['yesjian'];
Ejemplo n.º 2
0
$pv = new View($typeid);
if (!isset($aid, $webid)) {
    exit('Wrong Id');
}
$aid = RemoveXSS($aid);
//防止跨站攻击
$carid = $aid;
updateVisit($aid, $typeid);
//更新访问量
$row = getCarInfo($aid);
if (empty($row['id'])) {
    head404();
}
$row['price'] = getCarNewRealPrice($aid, $row['webid']);
//当月报价;
$prenext = GetPreNext($aid, $getmonth);
//获取上一条,下一条
foreach ($prenext as $k => $v) {
    $pv->Fields[$k] = $v;
}
//声明各个模型
$_startModule = new CommonModule('sline_startplace');
$_suitModule = new CommonModule('sline_car_suit');
//支付方式
$paytypeArr = explode(',', $GLOBALS['cfg_pay_type']);
if (in_array(1, $paytypeArr)) {
    $GLOBALS['condition']['_haszhifubao'] = 1;
}
if (in_array(2, $paytypeArr)) {
    $GLOBALS['condition']['_haskuaiqian'] = 1;
}