<main class="container bg-light shadow-sm rounded  my-2">
    <div class="row">
        <!-- Start Main Container -->
        <div class="col-12 col-lg-8">
            <div class="audioHeader bg-white">
                    <div class="ah_top">
                        <div class="ah_col_left">
                            <div class="audio_author_avatar">
                                <img src="/favicon.png" alt="mp3 ringtones">
                            </div>   
                            <div class="ah_tby">
                                <div class="ah_title">
                         <?php echo ''.substr_replace(  $file['name']  , "...", 18).' '; ?>
                                </div>
                                <div class="ah_by" style="font-size: 12px;">Uploaded by 
                                <?php if ($file['user_name']) echo '<a id="user_link" href="' . APP_URL . '/user/' . $file['user_name'] . $endRoute . '">@' . $file['user_fullname'] . '</a>';
                                else echo '@Admin'; ?>
                                </div>
                            </div>
                        </div>
                        <div class="ah_col">
                     
       <? if ($downLink) {
    echo '<button type="button" onclick="openlink(this);" value="' . $file['id'] . '" class="ah_download"><i class="fa fa-cloud-download" aria-hidden="true"></i> Download</button>';
 }?> 
 </div>
</div>
 <div class="embed-responsive embed-responsive-1by1 audioRadius letaudioplay viewaudio" id="audio_<?php echo $file['id']; ?>"" data-id="<?php echo $file['id']; ?>"" data-file="/<?php echo $media_source; ?>">
                        <div class="embed-responsive-item audio_gb" style="background:linear-gradient(to left bottom, #cc06d99e, rgb(113 55 255));">
                            <div class="audio_itemplay">
                                <span class="material-icons playtrigericon">play_arrow</span>
                            </div>
<div class="audio_item_views"><i class="fa fa-cloud-download" aria-hidden="true"></i> <?php echo $file['download']; ?>+</div>                   
   <div class="audio_item_current_time">
                    <i class="fa fa-clock-o" aria-hidden="true"></i>            <!--current time-->
                            </div>
                           
                        </div>
                          <div class="over-centered text-white"><span class="fav"><span class="favo fa fa-heart<?php echo (is_favourite($file['id'], @$AuthUser['id'])) ? ' active' : ''; ?>" onclick="addFav(this.id);" id="file_<?php echo $file['id']; ?>"></span></span></div>
       </div> 
  </div>                          
          <div id="details">
                <?php echo getAds($AdsPath . '/preview_before'); ?>
                <div class="row bg-album   shadow-sm">
                    <div class="col-12"> 
                    <br/> 
<? require'ads.php'; ?>
<div class="ah_tags">
<?php echo '<a href="' . APP_URL . '/' . $catRoute . '/' . $file['category_slug'] . $endRoute  . '"><button type="button" class="btn btn-sm btn-default"><i class="fa fa-music"></i> ' . $cNameYear . ' </button></a>'; ?>
<a href="#"><button type="button" class="btn btn-sm btn-default"><i class="fa fa-cloud-download" aria-hidden="true"></i> <?php echo $file['download']; ?> Descărcări </button></a>
<a href="#"><button type="button" class="btn btn-sm btn-default"><i class="fa fa-clock-o" aria-hidden="true"></i> <?php echo $file['duration']; ?> Secunde </button></a>  
  <a href="#"><button type="button" class="btn btn-sm btn-default"><i class="fa fa-calendar" aria-hidden="true"></i> <?php echo $releasedate; ?></button> </a>
 <? echo '<a href="#"><button type="button" id="share" onclick="share();" class="btn btn-sm btn-default"><i class="fa fa-share" aria-hidden="true"></i> Share</button></a>';?>
</div>
<div class="d-flex m-2 justify-content-between" style="float:right;"> 
                            <?php if ($isLogged || (GOOGLE_APP_ID || FACEBOOK_APP_ID)) : ?>
                              <?php if ($isLogged && $AuthUser['id'] == $file['user_id']) : ?>  
                                <div class="dropdown">
                                    <button class="btn btn-default btn-sm dropdown-toggle" type="button" id="dropdownMenuButton1" data-bs-toggle="dropdown" aria-expanded="false">
                                        Options
                                    </button>
                                    <ul class="dropdown-menu" aria-labelledby="dropdownMenuButton1">
                                        
                                            <li><a class="dropdown-item" href="#" onclick="return editSong();"><i class="fa fa-edit"></i> Edit</a></li>
                                            <li><a class="dropdown-item" href="#" onclick="return deleteSong(<?php echo $file['id']; ?>);"><i class="fa fa-trash"></i> Delete</a></li>
                                         
                                        <li><a class="dropdown-item" href="#" onclick="return ReportSong(<?php echo $isLogged; ?>);"><i class="fa fa-flag"></i> Report</a></li>
                                    </ul>
                                </div>
                                <?php endif; ?>
                            <?php
                            endif;
                              ?>
                        </div>
                    </div>
                </div>
                <?php
                echo getAds($AdsPath . '/preview_between'); ?>
                <?php if ($file['des']) {
                    echo '<div class="card card-body p-2 my-2 rounded fw-light">
        <span class="text-secondary">Description/Story: </span>' . $file['des'] . '
      </div>';
                }
                echo getAds($AdsPath . '/preview_after');
                ?>
            </div>
            <div id="reletedSongs">
                <h3><i class="fa fa-music" aria-hidden="true"></i> Tonuri Recomandate</h3>
                <div class="row row-cols-2 row-cols-sm-4 row-cols-md-4 bg-light g-1 g-sm-2">
                    <?php
                    $files = $ReletedFiles;
                    require __DIR__ . '/_files_list.php';
                    unset($ReletedFiles);
                    ?>
                </div>
            </div>
        </div>
        <!-- End Main Container -->
        <!-- Start Sidebar -->
        <div class="col-12 col-lg-4">
            <aside>
                <div id="youMayAlso">
                    <?php echo getAds($AdsPath . '/sidebar_before'); ?>
                    <h3><i class="fa fa-random" aria-hidden="true"></i> Posibil să-ți placă și...</h3>
                                      <center> 
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-8184875883223078"
     crossorigin="anonymous"></script>
<!-- ads2 -->
<ins class="adsbygoogle"
     style="display:block"
     data-ad-client="ca-pub-8184875883223078"
     data-ad-slot="9128039695"
     data-ad-format="auto"
     data-full-width-responsive="true"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script></center><br/>
               <div class="row row-cols-2 row-cols-sm-1 row-cols-md-1 bg-light g-1 g-sm-2">
                        <?php
                        $listitems = $YouMayFiles;
                        require __DIR__ . '/_list_item.php';
                        unset($YouMayMovies);
                        ?>
                   </div>
                </div>
            </aside>
        </div>
        <!-- End Sidebar -->
    </div>
    <p class="card card-body p-2 my-2 fw-light"><?php echo $autotags; ?></p>
    <!-- Modal -->
    <div class="modal fade" id="modalDialog" tabindex="-1" aria-labelledby="modalDialogLabel" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title" id="modalDialogLabel"><i class="fa fa-share" aria-hidden="true"></i> Share
                    </h5>
                    <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
                </div>
                <div class="modal-body">
                    <div id="sharemovie"></div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
                </div>
            </div>
        </div>
    </div>
    <?php if ($isLogged && $AuthUser['id'] == $file['user_id']) : ?>
        <div class="modal fade" id="modalEditSong" tabindex="-1" aria-labelledby="modalEditSongLabel" aria-hidden="true">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <h5 class="modal-title" id="modalEditSongLabel"><i class="fa fa-edit" aria-hidden="true"></i> #Edit
                        </h5>
                        <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
                    </div>
                    <div class="modal-body">
                        <form id="editFileform">
                            <input type="text" name="file_id" value="<?php echo $file['id']; ?>" style="display: none;">
                            <div class="form-group">
                                <label>Title: </label>
                                <input type="text" name="file_name" value="<?php echo $file['name']; ?>" class="form-control">
                            </div>
                            <div class="form-group">
                                <label>Thumbnail: </label>
                                <input type="file" name="thumb" class="form-control" id="">
                            </div>
                        </form>
                        <div class="modal-footer">
                            <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
                            <button type="button" onclick="submitEditSong();" id="submitFileForm" class="btn btn-primary">Save Changes</button>

                        </div>
                    </div>
                </div>
            </div>
        </div>
    <?php endif;
    if ($isLogged) : ?>
        <div class="modal fade" id="modalReportSong" tabindex="-1" aria-labelledby="modalReportSongLabel" aria-hidden="true">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <h5 class="modal-title" id="modalReportSongLabel"><i class="fa fa-flag" aria-hidden="true"></i> #Report
                        </h5>
                        <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
                    </div>
                    <div class="modal-body">
                        <form id="ReportForm">
                            <input type="text" name="file_id" value="<?php echo $file['id']; ?>" style="display: none;">
                            <div class="form-group">
                                <label>Subject: </label>
                                <input type="text" name="subject" value="" class="form-control">
                            </div>
                            <div class="form-group">
                                <label>Body: </label>
                                <textarea name="body" class="form-control" rows="5"></textarea>
                            </div>
                        </form>
                        <div class="modal-footer">
                            <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
                            <button type="button" onclick="submitReport();" class="btn btn-primary">Submit</button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    <?php endif; ?>
</main>