NewsMarqueeGetList(); if(isset($rows)) $smarty->assign("NewsMarqueeRows", $rows); /*----------------------------------------------- 查詢最上面的廣告數據 -----------------------------------------------*/ $rows=$seemly->WebAdGetList(); if(isset($rows)){ $smarty->assign("WebAdRows", $rows); $WebadNum=sizeof($rows); $WebadFirstImage=$rows[0]['banner_image']; }else{ $WebadNum=0; $WebadFirstImage="";//noadimage.jpg } $smarty->assign('WebadNum', $WebadNum); $smarty->assign('WebadFirstImage', $WebadFirstImage); /*----------------------------------------------- 查詢首頁的關於生態 -----------------------------------------------*/ $rows=$seemly->PhotoIndexGetList(); if(isset($rows)) $smarty->assign("PhotoIndexRows", $rows); /*----------------------------------------------- 查詢首頁的最新消息 -----------------------------------------------*/ $rows=$seemly->NewsIndexGetList(1); if(isset($rows)) $smarty->assign("NewNewsRows", $rows); /*----------------------------------------------- 查詢首頁的新聞報道 -----------------------------------------------*/ $rows=$seemly->NewsIndexGetList(2); if(isset($rows)) $smarty->assign("NewsRows", $rows); /*----------------------------------------------- 查詢首頁的線上影音 -----------------------------------------------*/ $Model=$seemly->MediaIndex(); $index_media_image=$Model['media_image']; $index_media_category=trim($Model['media_type']); $index_media_url=trim($Model['media_url']); $smarty->assign("index_media_type", substr($index_media_image, -3)); $smarty->assign("index_media_image", $index_media_image); $smarty->assign("index_media_category", $index_media_category); $smarty->assign("index_media_url", $index_media_url); /*----------------------------------------------- 查詢首頁的新聞報道 -----------------------------------------------*/ $rows=$seemly->ClasseIndexGetList(); if(isset($rows)) $smarty->assign("ClasseRows", $rows); /*----------------------------------------------- 處理網頁的title,description,keywords -----------------------------------------------*/ $page_name="首頁"; $smarty->assign('page_name', $page_name); $page_title=get_pagetitle("$page_name",$WebConfig['corp_head']); $smarty->assign('page_title', $page_title); $page_description=get_pagedescription($WebConfig['corp_description']); $smarty->assign('page_description', $page_description); $page_keywords=get_pagekeywords($page_name,$WebConfig['corp_keywords']); $smarty->assign('page_keywords', $page_keywords); /*----------------------------------------------- smarty cache && create htmlfile -----------------------------------------------*/ $htmlfile="./html/index.html"; $content=$smarty->fetch("index.html"); if($WebConfig['corp_html'] && makehtmlfile($htmlfile,$content)){ header("location:$htmlfile"); }else{ echo($content); } //display view //$smarty->display("index.html"); ?>