示例#1
0
    if ($goods['receiver_id'] == '') {
        $goods['receiver_id'] = 0;
    }
    $goods['user_id'] = $user_id;
}
$pageSize = 8;
$sql = "select * from tuhao_comm where pro_id={$pro_id} and parent_id=0 order by reg_time desc";
$numRows = getResultNum($sql);
$totalPage = ceil($numRows / $pageSize);
$sql2 = "select * from tuhao_pro where username='******' and is_send=1 and status =0";
$sentNum = getResultNum($sql2);
$sql3 = "select * from tuhao_comm where receiver_id={$id} and status = 0";
$mesNum = getResultNum($sql3);
$arr = array('hot' => $goods['hot'] + 1);
update('tuhao_pro', $arr, "id={$pro_id}");
$data = goodsComm($pro_id, $pageSize, '');
//print_r($goods);
$smarty->assign('username', $username);
$smarty->assign('study', $study);
$smarty->assign('clothes', $clothes);
$smarty->assign('digital', $digital);
$smarty->assign('transportation', $transportation);
$smarty->assign('entertainment', $entertainment);
$smarty->assign('others', $others);
$smarty->assign('activity', $activity);
$smarty->assign('loginFlag', $loginFlag);
$smarty->assign('max', $totalPage);
$smarty->assign('goods', $goods);
$smarty->assign('data', $data);
$smarty->assign('sentNum', $sentNum);
$smarty->assign('mesNum', $mesNum);
示例#2
0
<?php

/**
 * Created by PhpStorm.
 * User: administrator
 * Date: 2015/8/10
 * Time: 21:35
 */
require_once '../include.php';
$id = isset($_GET['pro_id']) ? $_GET['pro_id'] : '';
$pageSize = 8;
echo goodsComm($id, $pageSize, 'json');