<?php
include_once("../config/templateConfig.inc.php");
include_once("../config/databaseConfig.inc.php");
$templateMain = new SmartTemplate('main.html');
/*
取记录
*/
$sqlrs="select ID,Atitle,Aclass,Aeditor,Atime from Article where Aclass = 1 order by ID DESC";
$rs = $db->SelectLimit($sqlrs,5,0);
$rs = $rs->GetRows();
$templateMain->assign('article',$rs);$sqlrs="select ID,name,price,info,time from Cpu order by ID DESC";
$rs = $db->SelectLimit($sqlrs,5,0);
$rs = $rs->GetRows();
$templateMain->assign('Cpu',$rs);$sqlrs="select ID,name,price,info,time from Mainboard order by ID DESC";
$rs = $db->SelectLimit($sqlrs,5,0);
$rs = $rs->GetRows();
$templateMain->assign('Mainboard',$rs);$sqlrs="select ID,name,price,info,time from Memory order by ID DESC";
$rs = $db->SelectLimit($sqlrs,5,0);
$rs = $rs->GetRows();
$templateMain->assign('Memory',$rs);$sqlrs="select ID,name,price,info,time from Disk order by ID DESC";
$rs = $db->SelectLimit($sqlrs,5,0);
$rs = $rs->GetRows();
$templateMain->assign('Disk',$rs);$sqlrs="select ID,name,price,info,time from Monitor order by ID DESC";
$rs = $db->SelectLimit($sqlrs,5,0);
$rs = $rs->GetRows();
$templateMain->assign('Monitor',$rs);$sqlrs="select ID,name,price,info,time from CDROM order by ID DESC";
$rs = $db->SelectLimit($sqlrs,5,0);
$rs = $rs->GetRows();
$templateMain->assign('CDROM',$rs);$sqlrs="select ID,name,price,info,time from Displaycard order by ID DESC";
$rs = $db->SelectLimit($sqlrs,5,0);
$rs = $rs->GetRows();
$templateMain->assign('Displaycard',$rs);$templateMain->output();
?>