Added selectable num of records on each listing page, fixed up Pagination Records UI, added new stripe library, further worked on stripe integration, fixed mispelling in client details

This commit is contained in:
johnny@pittpc.com
2021-02-10 11:21:38 -05:00
parent c748388b9a
commit 530d46a812
352 changed files with 16193 additions and 7090 deletions

View File

@@ -8,65 +8,85 @@ if ($total_found_rows > 10) {
?>
<ul class="pagination justify-content-end">
<hr>
<?php
if($total_pages <= 100){
$pages_split = 10;
}
if(($total_pages <= 1000) AND ($total_pages > 100)){
$pages_split = 100;
}
if(($total_pages <= 10000) AND ($total_pages > 1000)){
$pages_split = 1000;
}
if($p > 1){
$prev_class = "";
}else{
$prev_class = "disabled";
}
if($p <> $total_pages) {
$next_class = "";
}else{
$next_class = "disabled";
}
$url_query_strings = http_build_query(array_merge($_GET,array('p' => $i)));
$prev_page = $p - 1;
$next_page = $p + 1;
if($p > 1){
echo "<li class='page-item $prev_class'><a class='page-link' href='?$url_query_strings&p=$prev_page'>Prev</a></li>";
}
while($i < $total_pages){
$i++;
if(($i == 1) OR (($p <= 3) AND ($i <= 6)) OR (($i > $total_pages - 6) AND ($p > $total_pages - 3 )) OR (is_int($i / $pages_split)) OR (($p > 3) AND ($i >= $p - 2) AND ($i <= $p + 3)) OR ($i == $total_pages)){
if($p == $i ) {
$page_class = "active";
}else{
$page_class = "";
}
echo "<li class='page-item $page_class'><a class='page-link' href='?$url_query_strings&p=$i'>$i</a></li>";
<div class="row">
<div class="col mb-3">
<form action="post.php" method="post">
<select onchange="this.form.submit()" class="input-form select2" name="change_records_per_page">
<option <?php if($config_records_per_page == 5){ echo "selected"; } ?> >5</option>
<option <?php if($config_records_per_page == 10){ echo "selected"; } ?> >10</option>
<option <?php if($config_records_per_page == 20){ echo "selected"; } ?> >20</option>
<option <?php if($config_records_per_page == 50){ echo "selected"; } ?> >50</option>
<option <?php if($config_records_per_page == 100){ echo "selected"; } ?> >100</option>
<option <?php if($config_records_per_page == 500){ echo "selected"; } ?> >500</option>
</select>
</form>
</div>
<div class="col mb-3">
<p class="text-center mt-2"><?php echo $total_found_rows; ?></p>
</div>
<div class="col mb-3">
<ul class="pagination justify-content-end">
<?php
if($total_pages <= 100){
$pages_split = 10;
}
if(($total_pages <= 1000) AND ($total_pages > 100)){
$pages_split = 100;
}
if(($total_pages <= 10000) AND ($total_pages > 1000)){
$pages_split = 1000;
}
if($p > 1){
$prev_class = "";
}else{
$prev_class = "disabled";
}
if($p <> $total_pages) {
$next_class = "";
}else{
$next_class = "disabled";
}
$url_query_strings = http_build_query(array_merge($_GET,array('p' => $i)));
$prev_page = $p - 1;
$next_page = $p + 1;
if($p > 1){
echo "<li class='page-item $prev_class'><a class='page-link' href='?$url_query_strings&p=$prev_page'>Prev</a></li>";
}
while($i < $total_pages){
$i++;
if(($i == 1) OR (($p <= 3) AND ($i <= 6)) OR (($i > $total_pages - 6) AND ($p > $total_pages - 3 )) OR (is_int($i / $pages_split)) OR (($p > 3) AND ($i >= $p - 2) AND ($i <= $p + 3)) OR ($i == $total_pages)){
if($p == $i ) {
$page_class = "active";
}else{
$page_class = "";
}
echo "<li class='page-item $page_class'><a class='page-link' href='?$url_query_strings&p=$i'>$i</a></li>";
}
}
}
if($p <> $total_pages){
echo "<li class='page_item $next_class'><a class='page-link' href='?$url_query_strings&p=$next_page'>Next</a></li>";
}
if($p <> $total_pages){
echo "<li class='page_item $next_class'><a class='page-link' href='?$url_query_strings&p=$next_page'>Next</a></li>";
}
?>
?>
</ul>
</ul>
</div>
</div>
<?php
}
if($total_found_rows == 0){
echo "<center><h3 class='text-secondary'>No Records Here</h3></center>";
}else{
echo "<div class='justify-content-start'><br><strong>Records:</strong> $total_found_rows</div>";
echo "<center><h3 class='text-secondary'><i class='fa fa-fw fa-2x fa-meh-rolling-eyes'></i><br>Records? What..</h3></center>";
}
?>