Example #1
0
            echo "</script>";
        }
    } else {
        echo "<script type='text/javascript'>";
        echo "\talert('验证码输入有误!');";
        echo "\twindow.location='index.php';";
        echo "</script>";
    }
}
$newsTypes = NewsTypes::getNewsTypes();
//所有分类
$hotNews = NewsArticles::getHotNews();
//热点要闻
$newsCount = NewsArticles::getNewsCount();
//新闻总数
foreach ($newsTypes as $k => $v) {
    $newsInfo = NewsArticles::getNewsInfoTwo($v["typeId"]);
    $v["news"] = $newsInfo;
    $newsTypes[$k] = $v;
}
$smarty->assign("newsCount", $newsCount);
$smarty->assign("hotNews", $hotNews);
$smarty->assign("newsTypes", $newsTypes);
$smarty->display("index.html");
?>