$categories=\DB::getAll("SELECT * FROM `pages_category` ORDER BY `title`");
for($i=0;$i<count($categories);$i++)$categories[$i]['count']=\DB::getAll("SELECT COUNT(*) FROM `pages` WHERE `category`=? AND `status`=1",$categories[$i]['id'])[0]['COUNT(*)'];
$popular_pages=\DB::getAll("SELECT * FROM `pages` WHERE `status`=1 ORDER BY `see` DESC LIMIT 15");
for($i=0;$i<count($popular_pages);$i++)$popular_pages[$i]['img']=\DB::getValue("SELECT `filename` FROM `pages_img` WHERE `pages_id`=? LIMIT 1",$popular_pages[$i]['id']);