Implemented 2FA TOTP with Google Authenticator

This commit is contained in:
root
2019-06-16 22:33:55 -04:00
parent bc8091ae49
commit e247ad4ee4
13 changed files with 564 additions and 125 deletions

View File

@@ -42,8 +42,6 @@ if(isset($_GET['o'])){
$sql = mysqli_query($mysqli,"SELECT SQL_CALC_FOUND_ROWS * FROM clients WHERE client_name LIKE '%$q%' OR client_email LIKE '%$q%' ORDER BY $sb $o LIMIT $record_from, $record_to");
$num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
$total_found_rows = $num_rows[0];
$total_pages = ceil($total_found_rows / 10);
?>
@@ -51,7 +49,7 @@ $total_pages = ceil($total_found_rows / 10);
<div class="card-header bg-dark text-white">
<h6 class="float-left mt-2"><i class="fa fa-users mr-2"></i>Clients</h6>
<button type="button" class="btn btn-primary float-right" data-toggle="modal" data-target="#addClientModal"><i class="fas fa-fw fa-user-plus"></i> New</button>
<button type="button" class="btn btn-primary btn-sm float-right" data-toggle="modal" data-target="#addClientModal"><i class="fas fa-fw fa-user-plus"></i> New</button>
</div>
<div class="card-body">
@@ -68,12 +66,12 @@ $total_pages = ceil($total_found_rows / 10);
<table class="table table-striped table-borderless table-hover">
<thead class="text-dark">
<tr>
<th><a class="text-secondary" href="?<?php echo $url_query_strings_sb; ?>&sb=client_name&o=<?php echo $disp; ?>">Name <i class="fa fa-sort<?php if($disp=='ASC'){ echo "-up"; }else{ echo "-down"; }?>"></i></a></th>
<th><a href="?<?php echo $url_query_strings_sb; ?>&sb=client_type&o=<?php echo $disp; ?>">Type <i class="fa fa-sort-up"></i></a></th>
<th>Email</th>
<th>Phone</th>
<th class="text-right">Balance</th>
<th class="text-center">Action</th>
<th class="w-50"><a class="text-secondary" href="?<?php echo $url_query_strings_sb; ?>&sb=client_name&o=<?php echo $disp; ?>">Name <i class="fa fa-sort<?php if($disp=='ASC'){ echo "-up"; }else{ echo "-down"; }?>"></i></a></th>
<th class="w-10"><a href="?<?php echo $url_query_strings_sb; ?>&sb=client_type&o=<?php echo $disp; ?>">Type <i class="fa fa-sort-up"></i></a></th>
<th class="w-10">Email</th>
<th class="w-10">Phone</th>
<th class="w-10 text-right">Balance</th>
<th class="w-10 text-center">Action</th>
</tr>
</thead>
<tbody>