예제 #1
0
파일: index.php 프로젝트: show123456/taiyou
$sql = $infocommonModel->select($filter, 'count(id) as count_num,info_type');
$infocommonarray = $infocommonModel->fetchAll($sql);
foreach ($infocommonarray as $key => $value) {
    $infocount[$value['info_type']] = $value['count_num'];
}
//图片统计
$infopicModel = new Model_InfoPic();
$filter = array();
$filter['where'] = "customer_id = '{$customer_id}'";
$infocount['pic'] = $infopicModel->count($filter);
//音乐统计
$infomusicModel = new Model_InfoMusic();
$filter = array();
$filter['where'] = "customer_id = '{$customer_id}'";
$infocount['music'] = $infomusicModel->count($filter);
//视频统计
$infovideoModel = new Model_InfoVideo();
$filter = array();
$filter['where'] = "customer_id = '{$customer_id}'";
$infocount['video'] = $infovideoModel->count($filter);
$chart_data1['label'] = rtrim($days_str, ',');
$chart_data1['value'] = rtrim($days_value_str, ',');
$chart_data1b['value'] = rtrim($days_valueb_str, ',');
$chart_data1c['value'] = rtrim($days_valuec_str, ',');
$smarty->assign("count", $count);
$smarty->assign("chart_data1", $chart_data1);
$smarty->assign("chart_data1b", $chart_data1b);
$smarty->assign("chart_data1c", $chart_data1c);
$smarty->assign("topmessage", $topmessage);
$smarty->assign("infocount", $infocount);
$smarty->setTpl('data/templates/index.html')->display();