Archive for October, 2007

How to get tags cloud from the database?

_sqls package:
function getTagsCloud( $oModel ){
$sSql = “SELECT
COUNT(tag_id) as quantity, tag_id, tag_name
FROM fa_tags
WHERE tag_key=”.EVENT_KEY.” GROUP BY tag_name ORDER BY tag_name LIMIT 0,30 “;
parent::execute_query($sSql, __LINE__, __FILE__);
}
_models package: 
function getTagsCloud(){
$this->oDb->getTagsCloud( $this );
return $this->oDb;
}
_views package:
function showTagsCloud( $oModel ){
$mRes = $oModel->getTagsCloud();
$aTags = array();
$aTagIds = array();
while ( $aRows = $mRes->fetch_row() ){
$aTags[strtolower($aRows[tag_name])] = $aRows[quantity];
$aTagIds[$aRows[quantity]] = $aRows[tag_id];
}
// change these font sizes if you will
$iMaxSize [...]


Giao diện mới của công ty (bản demo)

Em mới thiết kế lại giao diện của trang chủ mong mọi người xem xét và cho ý kiến.

Rate this: 2.5