<!--div class="w3-center">
                  <div class="w3-section">
                      <button class="w3-button w3-light-grey" onclick="plusDivs(-1)">❮ Prev</button>
                      <button class="w3-button w3-light-grey" onclick="plusDivs(1)">Next ❯</button>
                  </div>
              </div-->


<div class="fileinput-preview thumbnail" data-trigger="fileinput" style="max-width:100%;" > 
    {assign var="i" value="1"}
    {foreach $allsonar as $sonar}

    <img id="slideImg{$i}" class="mySlides" style="width:100%"    {if $sonar.imagename} src="{$hosturl}/../upload/sonar/{$sonar.imagename}"{/if}/>

         {assign var="i" value=$i+1}
         {/foreach}
</div>

<div class="w3-center" style="    background-color: #f1f1f1!important;">
    <div class="w3-section">
        {assign var="i" value="1"}
        {foreach $allsonar as $sonar}
        <button class="w3-button demo" onclick="currentDiv({$i})">{$i}</button> 
        {assign var="i" value=$i+1}
        {/foreach}
    </div>
</div>