<?php
  /*
    通用头部文件
  */
   $catQuery="select * from cat order by catId";//选择分类表按分类id升序排列
   $catResult=mysql_query($catQuery,$conn);//查询数据
   while ($catRow1=mysql_fetch_array($catResult)) {//循环查询数据
   	$catRow[]=array('catId'=>$catRow1['catId'],'catName'=>$catRow1['catName']);
   }
   $smarty->assign('catRow',$catRow);//赋值给模板引擎
   $smarty->display('header.html');//显示模板
?>
