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

<div class="row">
  <div class="col-md-12">
    <ul class="nav nav-pills nav-pills-warning">
  <li class="nav-item">
    <a class="nav-link" href="<?php echo JAK_rewrite::jakParseurl('users');?>"><?php echo $jkl["hd5"];?></a>
  </li>
  <?php if (jak_get_access("client", $jakuser->getVar("permissions"), JAK_MAIN_OP)){?>
  <li class="nav-item">
    <a class="nav-link active" href="<?php echo JAK_rewrite::jakParseurl('users', 'clients');?>"><?php echo $jkl["hd6"];?></a>
  </li>
  <?php } ?>
</ul>
  </div>
</div>
<hr>

<?php if ($addclient && jak_get_access("client", $jakuser->getVar("permissions"), JAK_MAIN_OP)) { ?>
<p><a class="btn btn-primary" href="<?php echo JAK_rewrite::jakParseurl('users', 'clients', 'new');?>"><?php echo $jkl["hd112"];?></a></p>
<?php } ?>

<?php if (!$addclient && jak_get_access("client", $jakuser->getVar("permissions"), JAK_MAIN_OP)) { ?>
<div class="alert alert-danger"><?php echo sprintf($jkl['i14'], $totalAll, $totalclients, $jkl['stat_s5']);?></div>
<?php } ?>

<?php if (isset($totalAll) && $totalAll != 0) { ?>

<div class="row">
  <div class="col-md-12">

    <form method="post" class="jak_form" action="<?php echo $_SERVER['REQUEST_URI'];?>">

    <div class="card">
        <div class="card-header card-header-icon card-header-rose">
          <div class="card-icon">
            <i class="material-icons">people</i>
          </div>
          <h4 class="card-title "><?php echo $jkl["hd6"];?></h4>
        </div>
        <div class="card-body">

<?php if (jak_get_access("client", $jakuser->getVar("permissions"), JAK_MAIN_OP)) { ?>
<p class="pull-right">
<button class="btn btn-default btn-sm btn-confirm" data-action="lock" data-title="<?php echo addslashes($jkl["hd25"]);?>" data-text="<?php echo addslashes($jkl["hd26"]);?>" data-type="warning" data-okbtn="<?php echo addslashes($jkl["g279"]);?>" data-cbtn="<?php echo addslashes($jkl["g280"]);?>"><i class="material-icons">check</i> / <i class="material-icons">clear</i></button> <button class="btn btn-danger btn-sm btn-confirm" data-action="delete" data-title="<?php echo addslashes($jkl["g48"]);?>" data-text="<?php echo addslashes($jkl["e30"]);?>" data-type="warning" data-okbtn="<?php echo addslashes($jkl["g279"]);?>" data-cbtn="<?php echo addslashes($jkl["g280"]);?>"><i class="fa fa-trash"></i></button>
</p>
<div class="clearfix"></div>
<?php } ?>

<table id="dynamic-data" class="table table-striped" cellspacing="0" width="100%">
<thead>
<tr>
<th>#</th>
<th><input type="checkbox" id="jak_delete_all"></th>
<th><?php echo $jkl["u"];?></th>
<th><?php echo $jkl["u1"];?></th>
<th><?php echo $jkl["hd74"];?></th>
<th><?php echo $jkl["hd143"];?></th>
<th><?php echo $jkl["g101"];?></th>
<th><?php echo $jkl["g174"];?></th>
</tr>
</thead>
</table>

</div>
</div>
<input type="hidden" name="action" id="action">
</form>

</div>
</div>

<?php } else { ?>

<div class="alert alert-rose">
<?php echo $jkl['i3'];?>
</div>

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