{{if member.member_id}}
{{$restrictions = json_decode(\IPS\Member::loggedIn()->group['idm_restrictions'], TRUE);}}
{{if $restrictions['daily_dl'] > 0}}
{{$downloads = \IPS\Db::i()->select( 'COUNT(*)', 'downloads_downloads', array( array( 'dmid=? AND dtime>?', \IPS\Member::loggedIn()->member_id, \IPS\DateTime::create()->sub( new \DateInterval( 'P1D' ) )->getTimestamp() ) ) )->first();}}
Осталось {expression="$restrictions['daily_dl'] - $downloads"} скачиваний
{{endif}}
{{endif}}