<?php
if ($listitems) {
    $cnt = 0;
    $LIST_THUMB = '75x75';
    $thumbsize = explode('x', $LIST_THUMB);
    foreach ($listitems as $item) {
        $cnt++;
        if ($item['thumb']) {
            $thumb = APP_URL . '/' . $item['folder'] . $LIST_THUMB . '/' . $item['thumb'];
        } else {
            $thumb = APP_URL . '/assets/images/music.svg';
        }
         $audioname = pathinfo($item['dname'], PATHINFO_EXTENSION) ? $item['dname'] : $item['dname'] . '.' . $item['ext'];
 echo $media;
         echo ' 
     <div class="col-sm-6 col-lg-6 audio_item pb-3 letaudioplay" id="audio_' . $item['id'] . '" data-id="' . $item['id'] . '" data-file="' . APP_URL . '/' . $item['folder'] . $audioname . '">
        <div class="embed-responsive embed-responsive-1by1 audioRadius">
            <div class="embed-responsive-item audio_gb" style="'.randGradient().'">
                <div class="audio_itemplay">
                    <span class="material-icons playtrigericon">play_arrow</span>
                </div>
                <a href="' . APP_URL . '/tonuri/' . $item['slug'] . $endRoute . '"><div class="audio_item_views"><i class="fa fa-cloud-download" aria-hidden="true"></i> ' . $item['download'] . '+</div></a>
                <div class="audio_item_likes"><i class="fa fa-clock-o" aria-hidden="true"></i> ' . $item['duration'] . '</div>
<br>
                <div class="audio_item_category">
                
                 <a class="text-white" href="' . APP_URL . '/tonuri/' . $item['slug'] . $endRoute . '" class="d-flex list-m"><i class="fa fa-cloud-download" aria-hidden="true"></i> '.substr_replace(  $item['name']  , "", 20).'</a>
                </div>
            </div>
        </div>
    </div> ';
  ?>
 <?
        if($cnt % ADVT_EACH == 0){
            echo getAds($AdsPath . '/between_listitem');
            }
    }
    unset($listitems);
    unset($thumbsize);
}
