<?php include_once 'header.php';?>

<?php if (JAK_SHOW_IPS) { ?>
  <div class="row">
    <div class="col-md-12">
      <div class="card">
        <div class="card-header card-header-icon card-header-rose">
          <div class="card-icon">
            <i class="material-icons">location_on</i>
          </div>
          <h4 class="card-title "><?php echo $jkl["g177"];?> (<span class="currentlyonline">0</span>)</h4>
        </div>
        <div class="card-body">
          <div id="map_canvas"></div>
        </div>
      </div>
    </div>
  </div>
<?php } ?>

<div class="row">
  <div class="col-md-12">
    <div class="card">
      <div class="card-header card-header-icon card-header-primary">
        <div class="card-icon">
          <i class="material-icons">list</i>
        </div>
        <h4 class="card-title "><?php echo $jkl["g177"];?> (<span class="currentlyonline">0</span>)</h4>
      </div>
      <div class="card-body">
        <div id="userOnline"></div>
      </div>
    </div>
  </div>
</div>

<?php if (isset($UONLINE_ALL) && is_array($UONLINE_ALL)) { ?>

  <div class="card">
    <div class="card-header card-header-icon card-header-info">
      <div class="card-icon">
        <i class="material-icons">history</i>
      </div>
      <h4 class="card-title "><?php echo $jkl["g105"].' ('.$totalAll.')';?></h4>
    </div>
    <div class="card-body">
      <div class="table-responsive">
        <table class="table table-striped w-100 d-block d-md-table">
          <tr>
            <th><?php if (JAK_SUPERADMINACCESS) { ?><a class="btn btn-danger btn-round btn-fab btn-confirm" href="<?php echo JAK_rewrite::jakParseurl('uonline', 'truncate');?>" data-title="<?php echo addslashes($jkl["g48"]);?>" data-text="<?php echo addslashes($jkl["e41"]);?>" data-type="warning" data-okbtn="<?php echo addslashes($jkl["g279"]);?>" data-cbtn="<?php echo addslashes($jkl["g280"]);?>"><i class="fa fa-trash"></i></a><?php } ?></th>
            <th><?php echo $jkl["g224"];?></th>
            <th><?php echo $jkl["g169"];?></th>
            <th><?php echo $jkl["g171"];?></th>
            <th><?php echo $jkl["g172"];?></th>
            <th><?php echo $jkl["g11"];?></th>
            <th><?php echo $jkl["g173"];?></th>
            <th><?php echo $jkl["g174"];?></th>
          </tr>
        </thead>
        <?php foreach($UONLINE_ALL as $v) { ?>
          <tr>
            <td><?php echo $v["id"];?></td>
            <td><img src="<?php echo BASE_URL;?>img/blank.png" class="flag-big flag-<?php echo $v['countrycode'];?>" title="<?php echo $v['country'];?>" alt="<?php echo $v['country'];?>"></td>
            <td><strong><?php echo $jkl["g169"].':</strong> '.$v["referrer"];?></strong><br><?php echo $jkl["g170"].':</strong> '.$v["firstreferrer"];?></td>
            <td><?php echo $v["agent"];?></td>
            <td><?php echo $v["hits"];?></td>
            <td><?php echo $v["ip"];?></a></td>
            <td><?php echo JAK_base::jakTimesince($v['time'], JAK_DATEFORMAT, JAK_TIMEFORMAT);?></td>
            <td><?php echo JAK_base::jakTimesince($v['lasttime'], JAK_DATEFORMAT, JAK_TIMEFORMAT);?></td>
          </tr>
        <?php } ?>
      </table>
    </div>
    <?php if ($JAK_PAGINATE) { ?>
      <div class="pagination">
        <?php echo $JAK_PAGINATE;?>
      </div>
    <?php } ?>
  </div>
</div>

<?php } include_once 'footer.php';?>
