<?php
$homecategories  = $db->orWhere('added_home', 1)->where('status', 1)->orderBy('RAND()')->get(TABLE_CAT, 6, 'name,slug,thumb,is_cat,totalitem,release_year');
$trendsongs = $db->join(TABLE_CAT . ' c', "f.cid=c.id", "INNER")->where('f.deleted_at', NULL, 'IS')->where('f.approved_at', NULL, 'IS NOT')->where('f.status', 1)->where('f.trend', 1)->orderBy('RAND()')->get(TABLE_FILES . ' f', 16, 'f.name,f.id,f.thumb,f.slug,f.duration,f.download,c.folder,f.created_at,f.dname,f.ext');
$newsongs = $db->join(TABLE_CAT . ' c', "f.cid=c.id", "INNER")->where('f.deleted_at', NULL, 'IS')->where('f.approved_at', NULL, 'IS NOT')->where('f.status', 1)->where('f.newtag', 1)->orderBy('f.pos', 'ASC')->orderBy('f.id')->get(TABLE_FILES . ' f', 16, 'f.name,f.id,f.thumb,f.slug,f.duration,f.download,c.folder,f.created_at,f.dname,f.ext');
$mostviewed = $db->join(TABLE_CAT . ' c', "f.cid=c.id", "INNER")->where('f.deleted_at', NULL, 'IS')->where('f.approved_at', NULL, 'IS NOT')->where('f.status', 1)->orderBy('f.download', 'DESC')->orderBy('f.id')->get(TABLE_FILES . ' f', 4, 'f.name,f.thumb,f.id,f.slug,f.duration,f.download,c.folder,f.created_at,f.dname,f.ext');
$newalbums = $db->where('status', 1)->where('newitemtag', 1)->where('is_cat', false)->orderBy('id')->get(TABLE_CAT, 6, 'id,name,slug,thumb,totalitem,is_cat,release_year');
$homeartists = $db->where('added_home', 1)->where('status', 1)->orderBy('RAND()')->get('artist', 6, 'name,slug,thumb');
//END Home
$Route = 'Home';
require_once $Template . '/header.php';
require_once $Template . '/Home.php';
require_once $Template . '/footer.php';
