<?php
  /**
   * Copyright 2011 Zazavi - http://www.zazavi.com
   * Zazavi is free software released under the terms of the GNU General Public License.
   * You should have received a copy of the license.  If not, see <http://www.gnu.org/licenses/>.
   */
  
  if (!defined("_VALID_PHP"))
      die('Direct access to this location is not allowed.');
?>	  
  <?php $total = count($modbot);?>
  <div id="botmodule">
    <div class="wrap">
      <div class="botmodule-outer">
        <?php foreach ($modbot as $brow): ?>
        <div class="botmodule-wrap<?php if($brow['alt_class'] !="") echo ' '.$brow['alt_class'];?>" <?php if($total > 1) echo " style=\"width:".round(100/$total)."%;float:left;\"";?>>
          <div class="botmodule-inner<?php if($brow['alt_class'] !="") echo ' '.$brow['brow'];?>">
            <?php if ($brow['show_title'] == 1) echo "<h3>".$brow['title'.$core->dblang]."</h3>";?>
            <?php if ($brow['body'.$core->dblang]) echo "<div class=\"mod-body\">".cleanOut($brow['body'.$core->dblang])."</div>";?>
            <?php if ($brow['system'] == 1):?>
            <?php $modfile = MODDIR .$brow['modalias']."/main.php";?>
            <?php if(file_exists($modfile)) include_once($modfile);?>
            <?php endif;?>
          </div>
        </div>
        <?php endforeach; ?>
        <?php unset($brow);?>
        <div class="clear"></div>
      </div>
    </div>
  </div>