Removed Records per page as a setting and added it as session variable define at 10 by default when logged in DB Structure Updated

This commit is contained in:
johnny@pittpc.com 2021-02-10 13:40:28 -05:00
parent 45fea53441
commit 66f9e2b10f
45 changed files with 133 additions and 132 deletions

View File

@ -3,11 +3,11 @@
//Paging
if(isset($_GET['p'])){
$p = intval($_GET['p']);
$record_from = (($p)-1)*$config_records_per_page;
$record_to = $config_records_per_page;
$record_from = (($p)-1)*$_SESSION['records_per_page'];
$record_to = $_SESSION['records_per_page'];
}else{
$record_from = 0;
$record_to = $config_records_per_page;
$record_to = $_SESSION['records_per_page'];
$p = 1;
}

View File

@ -3,11 +3,11 @@
//Paging
if(isset($_GET['p'])){
$p = intval($_GET['p']);
$record_from = (($p)-1)*$config_records_per_page;
$record_to = $config_records_per_page;
$record_from = (($p)-1)*$_SESSION['records_per_page'];
$record_to = $_SESSION['records_per_page'];
}else{
$record_from = 0;
$record_to = $config_records_per_page;
$record_to = $_SESSION['records_per_page'];
$p = 1;
}

View File

@ -3,11 +3,11 @@
//Paging
if(isset($_GET['p'])){
$p = intval($_GET['p']);
$record_from = (($p)-1)*$config_records_per_page;
$record_to = $config_records_per_page;
$record_from = (($p)-1)*$_SESSION['records_per_page'];
$record_to = $_SESSION['records_per_page'];
}else{
$record_from = 0;
$record_to = $config_records_per_page;
$record_to = $_SESSION['records_per_page'];
$p = 1;
}

View File

@ -3,11 +3,11 @@
//Paging
if(isset($_GET['p'])){
$p = intval($_GET['p']);
$record_from = (($p)-1)*$config_records_per_page;
$record_to = $config_records_per_page;
$record_from = (($p)-1)*$_SESSION['records_per_page'];
$record_to = $_SESSION['records_per_page'];
}else{
$record_from = 0;
$record_to = $config_records_per_page;
$record_to = $_SESSION['records_per_page'];
$p = 1;
}

View File

@ -3,11 +3,11 @@
//Paging
if(isset($_GET['p'])){
$p = intval($_GET['p']);
$record_from = (($p)-1)*$config_records_per_page;
$record_to = $config_records_per_page;
$record_from = (($p)-1)*$_SESSION['records_per_page'];
$record_to = $_SESSION['records_per_page'];
}else{
$record_from = 0;
$record_to = $config_records_per_page;
$record_to = $_SESSION['records_per_page'];
$p = 1;
}

View File

@ -3,11 +3,11 @@
//Paging
if(isset($_GET['p'])){
$p = intval($_GET['p']);
$record_from = (($p)-1)*$config_records_per_page;
$record_to = $config_records_per_page;
$record_from = (($p)-1)*$_SESSION['records_per_page'];
$record_to = $_SESSION['records_per_page'];
}else{
$record_from = 0;
$record_to = $config_records_per_page;
$record_to = $_SESSION['records_per_page'];
$p = 1;
}

View File

@ -3,11 +3,11 @@
//Paging
if(isset($_GET['p'])){
$p = intval($_GET['p']);
$record_from = (($p)-1)*$config_records_per_page;
$record_to = $config_records_per_page;
$record_from = (($p)-1)*$_SESSION['records_per_page'];
$record_to = $_SESSION['records_per_page'];
}else{
$record_from = 0;
$record_to = $config_records_per_page;
$record_to = $_SESSION['records_per_page'];
$p = 1;
}

View File

@ -3,11 +3,11 @@
//Paging
if(isset($_GET['p'])){
$p = intval($_GET['p']);
$record_from = (($p)-1)*$config_records_per_page;
$record_to = $config_records_per_page;
$record_from = (($p)-1)*$_SESSION['records_per_page'];
$record_to = $_SESSION['records_per_page'];
}else{
$record_from = 0;
$record_to = $config_records_per_page;
$record_to = $_SESSION['records_per_page'];
$p = 1;
}

View File

@ -3,11 +3,11 @@
//Paging
if(isset($_GET['p'])){
$p = intval($_GET['p']);
$record_from = (($p)-1)*$config_records_per_page;
$record_to = $config_records_per_page;
$record_from = (($p)-1)*$_SESSION['records_per_page'];
$record_to = $_SESSION['records_per_page'];
}else{
$record_from = 0;
$record_to = $config_records_per_page;
$record_to = $_SESSION['records_per_page'];
$p = 1;
}

View File

@ -3,11 +3,11 @@
//Paging
if(isset($_GET['p'])){
$p = intval($_GET['p']);
$record_from = (($p)-1)*$config_records_per_page;
$record_to = $config_records_per_page;
$record_from = (($p)-1)*$_SESSION['records_per_page'];
$record_to = $_SESSION['records_per_page'];
}else{
$record_from = 0;
$record_to = $config_records_per_page;
$record_to = $_SESSION['records_per_page'];
$p = 1;
}

View File

@ -3,11 +3,11 @@
//Paging
if(isset($_GET['p'])){
$p = intval($_GET['p']);
$record_from = (($p)-1)*$config_records_per_page;
$record_to = $config_records_per_page;
$record_from = (($p)-1)*$_SESSION['records_per_page'];
$record_to = $_SESSION['records_per_page'];
}else{
$record_from = 0;
$record_to = $config_records_per_page;
$record_to = $_SESSION['records_per_page'];
$p = 1;
}

View File

@ -3,11 +3,11 @@
//Paging
if(isset($_GET['p'])){
$p = intval($_GET['p']);
$record_from = (($p)-1)*$config_records_per_page;
$record_to = $config_records_per_page;
$record_from = (($p)-1)*$_SESSION['records_per_page'];
$record_to = $_SESSION['records_per_page'];
}else{
$record_from = 0;
$record_to = $config_records_per_page;
$record_to = $_SESSION['records_per_page'];
$p = 1;
}

View File

@ -3,11 +3,11 @@
//Paging
if(isset($_GET['p'])){
$p = intval($_GET['p']);
$record_from = (($p)-1)*$config_records_per_page;
$record_to = $config_records_per_page;
$record_from = (($p)-1)*$_SESSION['records_per_page'];
$record_to = $_SESSION['records_per_page'];
}else{
$record_from = 0;
$record_to = $config_records_per_page;
$record_to = $_SESSION['records_per_page'];
$p = 1;
}

View File

@ -3,11 +3,11 @@
//Paging
if(isset($_GET['p'])){
$p = intval($_GET['p']);
$record_from = (($p)-1)*$config_records_per_page;
$record_to = $config_records_per_page;
$record_from = (($p)-1)*$_SESSION['records_per_page'];
$record_to = $_SESSION['records_per_page'];
}else{
$record_from = 0;
$record_to = $config_records_per_page;
$record_to = $_SESSION['records_per_page'];
$p = 1;
}

View File

@ -3,11 +3,11 @@
//Paging
if(isset($_GET['p'])){
$p = intval($_GET['p']);
$record_from = (($p)-1)*$config_records_per_page;
$record_to = $config_records_per_page;
$record_from = (($p)-1)*$_SESSION['records_per_page'];
$record_to = $_SESSION['records_per_page'];
}else{
$record_from = 0;
$record_to = $config_records_per_page;
$record_to = $_SESSION['records_per_page'];
$p = 1;
}

View File

@ -3,11 +3,11 @@
//Paging
if(isset($_GET['p'])){
$p = intval($_GET['p']);
$record_from = (($p)-1)*$config_records_per_page;
$record_to = $config_records_per_page;
$record_from = (($p)-1)*$_SESSION['records_per_page'];
$record_to = $_SESSION['records_per_page'];
}else{
$record_from = 0;
$record_to = $config_records_per_page;
$record_to = $_SESSION['records_per_page'];
$p = 1;
}

View File

@ -3,11 +3,11 @@
//Paging
if(isset($_GET['p'])){
$p = intval($_GET['p']);
$record_from = (($p)-1)*$config_records_per_page;
$record_to = $config_records_per_page;
$record_from = (($p)-1)*$_SESSION['records_per_page'];
$record_to = $_SESSION['records_per_page'];
}else{
$record_from = 0;
$record_to = $config_records_per_page;
$record_to = $_SESSION['records_per_page'];
$p = 1;
}

View File

@ -3,11 +3,11 @@
//Paging
if(isset($_GET['p'])){
$p = intval($_GET['p']);
$record_from = (($p)-1)*$config_records_per_page;
$record_to = $config_records_per_page;
$record_from = (($p)-1)*$_SESSION['records_per_page'];
$record_to = $_SESSION['records_per_page'];
}else{
$record_from = 0;
$record_to = $config_records_per_page;
$record_to = $_SESSION['records_per_page'];
$p = 1;
}

View File

@ -3,11 +3,11 @@
//Paging
if(isset($_GET['p'])){
$p = intval($_GET['p']);
$record_from = (($p)-1)*$config_records_per_page;
$record_to = $config_records_per_page;
$record_from = (($p)-1)*$_SESSION['records_per_page'];
$record_to = $_SESSION['records_per_page'];
}else{
$record_from = 0;
$record_to = $config_records_per_page;
$record_to = $_SESSION['records_per_page'];
$p = 1;
}

View File

@ -3,11 +3,11 @@
//Paging
if(isset($_GET['p'])){
$p = intval($_GET['p']);
$record_from = (($p)-1)*$config_records_per_page;
$record_to = $config_records_per_page;
$record_from = (($p)-1)*$_SESSION['records_per_page'];
$record_to = $_SESSION['records_per_page'];
}else{
$record_from = 0;
$record_to = $config_records_per_page;
$record_to = $_SESSION['records_per_page'];
$p = 1;
}

View File

@ -10,11 +10,11 @@ if($session_permission_level == 2){
//Paging
if(isset($_GET['p'])){
$p = intval($_GET['p']);
$record_from = (($p)-1)*$config_records_per_page;
$record_to = $config_records_per_page;
$record_from = (($p)-1)*$_SESSION['records_per_page'];
$record_to = $_SESSION['records_per_page'];
}else{
$record_from = 0;
$record_to = $config_records_per_page;
$record_to = $_SESSION['records_per_page'];
$p = 1;
}

View File

@ -3,11 +3,11 @@
//Paging
if(isset($_GET['p'])){
$p = intval($_GET['p']);
$record_from = (($p)-1)*$config_records_per_page;
$record_to = $config_records_per_page;
$record_from = (($p)-1)*$_SESSION['records_per_page'];
$record_to = $_SESSION['records_per_page'];
}else{
$record_from = 0;
$record_to = $config_records_per_page;
$record_to = $_SESSION['records_per_page'];
$p = 1;
}

3
db.sql
View File

@ -729,7 +729,6 @@ CREATE TABLE `settings` (
`config_default_expense_payment_method` varchar(200) DEFAULT NULL,
`config_default_calendar` int(11) DEFAULT NULL,
`config_default_net_terms` int(11) DEFAULT NULL,
`config_records_per_page` int(10) NOT NULL,
`config_invoice_prefix` varchar(200) DEFAULT NULL,
`config_invoice_next_number` int(11) DEFAULT NULL,
`config_invoice_footer` text DEFAULT NULL,
@ -970,4 +969,4 @@ CREATE TABLE `vendors` (
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2021-02-08 20:00:18
-- Dump completed on 2021-02-10 13:39:33

View File

@ -3,11 +3,11 @@
//Paging
if(isset($_GET['p'])){
$p = intval($_GET['p']);
$record_from = (($p)-1)*$config_records_per_page;
$record_to = $config_records_per_page;
$record_from = (($p)-1)*$_SESSION['records_per_page'];
$record_to = $_SESSION['records_per_page'];
}else{
$record_from = 0;
$record_to = $config_records_per_page;
$record_to = $_SESSION['records_per_page'];
$p = 1;
}

View File

@ -26,7 +26,6 @@ $config_default_payment_method = $row['config_default_payment_method'];
$config_default_expense_payment_method = $row['config_default_expense_payment_method'];
$config_default_calendar = $row['config_default_calendar'];
$config_default_net_terms = $row['config_default_net_terms'];
$config_records_per_page = $row['config_records_per_page'];
//Invoice/Quote
$config_invoice_prefix = $row['config_invoice_prefix'];

View File

@ -76,4 +76,9 @@ scratch. This page gets rid of all links and provides the needed markup only.
}
//Set Records Per Page
if(empty($_SESSION['records_per_page'])){
$_SESSION['records_per_page'] = 10;
}
?>

View File

@ -54,11 +54,11 @@
//Paging
if(isset($_GET['p'])){
$p = intval($_GET['p']);
$record_from = (($p)-1)*$config_records_per_page;
$record_to = $config_records_per_page;
$record_from = (($p)-1)*$_SESSION['records_per_page'];
$record_to = $_SESSION['records_per_page'];
}else{
$record_from = 0;
$record_to = $config_records_per_page;
$record_to = $_SESSION['records_per_page'];
$p = 1;
}

View File

@ -3,11 +3,11 @@
//Paging
if(isset($_GET['p'])){
$p = intval($_GET['p']);
$record_from = (($p)-1)*$config_records_per_page;
$record_to = $config_records_per_page;
$record_from = (($p)-1)*$_SESSION['records_per_page'];
$record_to = $_SESSION['records_per_page'];
}else{
$record_from = 0;
$record_to = $config_records_per_page;
$record_to = $_SESSION['records_per_page'];
$p = 1;
}

View File

@ -1,7 +1,7 @@
<?php
$total_found_rows = $num_rows[0];
$total_pages = ceil($total_found_rows / $config_records_per_page);
$total_pages = ceil($total_found_rows / $_SESSION['records_per_page']);
if ($total_found_rows > 10) {
$i=0;
@ -14,12 +14,12 @@ if ($total_found_rows > 10) {
<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>
<option <?php if($_SESSION['records_per_page'] == 5){ echo "selected"; } ?> >5</option>
<option <?php if($_SESSION['records_per_page'] == 10){ echo "selected"; } ?> >10</option>
<option <?php if($_SESSION['records_per_page'] == 20){ echo "selected"; } ?> >20</option>
<option <?php if($_SESSION['records_per_page'] == 50){ echo "selected"; } ?> >50</option>
<option <?php if($_SESSION['records_per_page'] == 100){ echo "selected"; } ?> >100</option>
<option <?php if($_SESSION['records_per_page'] == 500){ echo "selected"; } ?> >500</option>
</select>
</form>
</div>

View File

@ -3,11 +3,11 @@
//Paging
if(isset($_GET['p'])){
$p = intval($_GET['p']);
$record_from = (($p)-1)*$config_records_per_page;
$record_to = $config_records_per_page;
$record_from = (($p)-1)*$_SESSION['records_per_page'];
$record_to = $_SESSION['records_per_page'];
}else{
$record_from = 0;
$record_to = $config_records_per_page;
$record_to = $_SESSION['records_per_page'];
$p = 1;
}

View File

@ -18,9 +18,7 @@ use PHPMailer\PHPMailer\Exception;
if(isset($_POST['change_records_per_page'])){
$records_per_page = intval($_POST['change_records_per_page']);
mysqli_query($mysqli,"UPDATE settings SET config_records_per_page = $records_per_page WHERE company_id = $session_company_id");
$_SESSION['records_per_page'] = intval($_POST['change_records_per_page']);
header("Location: " . $_SERVER["HTTP_REFERER"]);
@ -255,7 +253,7 @@ if(isset($_POST['add_company'])){
}
mysqli_query($mysqli,"INSERT INTO settings SET company_id = $company_id, config_invoice_prefix = 'INV-', config_invoice_next_number = 1, config_recurring_prefix = 'REC-', config_recurring_next_number = 1, config_invoice_overdue_reminders = '1,3,7', config_quote_prefix = 'QUO-', config_quote_next_number = 1, config_api_key = '$config_api_key', config_recurring_auto_send_invoice = 1, config_default_net_terms = 7, config_records_per_page = 10, config_send_invoice_reminders = 0, config_enable_cron = 0, config_ticket_next_number = 1, config_base_url = '$config_base_url'");
mysqli_query($mysqli,"INSERT INTO settings SET company_id = $company_id, config_invoice_prefix = 'INV-', config_invoice_next_number = 1, config_recurring_prefix = 'REC-', config_recurring_next_number = 1, config_invoice_overdue_reminders = '1,3,7', config_quote_prefix = 'QUO-', config_quote_next_number = 1, config_api_key = '$config_api_key', config_recurring_auto_send_invoice = 1, config_default_net_terms = 7, config_send_invoice_reminders = 0, config_enable_cron = 0, config_ticket_next_number = 1, config_base_url = '$config_base_url'");
//logging
mysqli_query($mysqli,"INSERT INTO logs SET log_type = 'Company', log_action = 'Create', log_description = '$name', log_created_at = NOW()");

View File

@ -3,11 +3,11 @@
//Paging
if(isset($_GET['p'])){
$p = intval($_GET['p']);
$record_from = (($p)-1)*$config_records_per_page;
$record_to = $config_records_per_page;
$record_from = (($p)-1)*$_SESSION['records_per_page'];
$record_to = $_SESSION['records_per_page'];
}else{
$record_from = 0;
$record_to = $config_records_per_page;
$record_to = $_SESSION['records_per_page'];
$p = 1;
}

View File

@ -3,11 +3,11 @@
//Paging
if(isset($_GET['p'])){
$p = intval($_GET['p']);
$record_from = (($p)-1)*$config_records_per_page;
$record_to = $config_records_per_page;
$record_from = (($p)-1)*$_SESSION['records_per_page'];
$record_to = $_SESSION['records_per_page'];
}else{
$record_from = 0;
$record_to = $config_records_per_page;
$record_to = $_SESSION['records_per_page'];
$p = 1;
}

View File

@ -3,11 +3,11 @@
//Paging
if(isset($_GET['p'])){
$p = intval($_GET['p']);
$record_from = (($p)-1)*$config_records_per_page;
$record_to = $config_records_per_page;
$record_from = (($p)-1)*$_SESSION['records_per_page'];
$record_to = $_SESSION['records_per_page'];
}else{
$record_from = 0;
$record_to = $config_records_per_page;
$record_to = $_SESSION['records_per_page'];
$p = 1;
}

View File

@ -3,11 +3,11 @@
//Paging
if(isset($_GET['p'])){
$p = intval($_GET['p']);
$record_from = (($p)-1)*$config_records_per_page;
$record_to = $config_records_per_page;
$record_from = (($p)-1)*$_SESSION['records_per_page'];
$record_to = $_SESSION['records_per_page'];
}else{
$record_from = 0;
$record_to = $config_records_per_page;
$record_to = $_SESSION['records_per_page'];
$p = 1;
}

View File

@ -209,7 +209,7 @@ if(isset($_POST['add_company_settings'])){
//Create Permissions
mysqli_query($mysqli,"INSERT INTO permissions SET permission_level = 5, permission_default_company = $company_id, permission_companies = $company_id, user_id = $user_id");
mysqli_query($mysqli,"INSERT INTO settings SET company_id = $company_id, config_invoice_prefix = 'INV-', config_invoice_next_number = 1, config_recurring_prefix = 'REC-', config_recurring_next_number = 1, config_invoice_overdue_reminders = '1,3,7', config_quote_prefix = 'QUO-', config_quote_next_number = 1, config_api_key = '$config_api_key', config_recurring_auto_send_invoice = 1, config_default_net_terms = 7, config_records_per_page = 10, config_send_invoice_reminders = 0, config_enable_cron = 0, config_ticket_next_number = 1, config_base_url = '$config_base_url'");
mysqli_query($mysqli,"INSERT INTO settings SET company_id = $company_id, config_invoice_prefix = 'INV-', config_invoice_next_number = 1, config_recurring_prefix = 'REC-', config_recurring_next_number = 1, config_invoice_overdue_reminders = '1,3,7', config_quote_prefix = 'QUO-', config_quote_next_number = 1, config_api_key = '$config_api_key', config_recurring_auto_send_invoice = 1, config_default_net_terms = 7, config_send_invoice_reminders = 0, config_enable_cron = 0, config_ticket_next_number = 1, config_base_url = '$config_base_url'");
//Create Some Data

View File

@ -7,11 +7,11 @@ $url_query_strings_sb = http_build_query(array_merge($_GET,array('sb' => $sb, 'o
//Paging
if(isset($_GET['p'])){
$p = intval($_GET['p']);
$record_from = (($p)-1)*$config_records_per_page;
$record_to = $config_records_per_page;
$record_from = (($p)-1)*$_SESSION['records_per_page'];
$record_to = $_SESSION['records_per_page'];
}else{
$record_from = 0;
$record_to = $config_records_per_page;
$record_to = $_SESSION['records_per_page'];
$p = 1;
}

View File

@ -7,11 +7,11 @@ $url_query_strings_sb = http_build_query(array_merge($_GET,array('sb' => $sb, 'o
//Paging
if(isset($_GET['p'])){
$p = intval($_GET['p']);
$record_from = (($p)-1)*$config_records_per_page;
$record_to = $config_records_per_page;
$record_from = (($p)-1)*$_SESSION['records_per_page'];
$record_to = $_SESSION['records_per_page'];
}else{
$record_from = 0;
$record_to = $config_records_per_page;
$record_to = $_SESSION['records_per_page'];
$p = 1;
}

View File

@ -7,11 +7,11 @@ $url_query_strings_sb = http_build_query(array_merge($_GET,array('sb' => $sb, 'o
//Paging
if(isset($_GET['p'])){
$p = intval($_GET['p']);
$record_from = (($p)-1)*$config_records_per_page;
$record_to = $config_records_per_page;
$record_from = (($p)-1)*$_SESSION['records_per_page'];
$record_to = $_SESSION['records_per_page'];
}else{
$record_from = 0;
$record_to = $config_records_per_page;
$record_to = $_SESSION['records_per_page'];
$p = 1;
}

View File

@ -3,11 +3,11 @@
//Paging
if(isset($_GET['p'])){
$p = intval($_GET['p']);
$record_from = (($p)-1)*$config_records_per_page;
$record_to = $config_records_per_page;
$record_from = (($p)-1)*$_SESSION['records_per_page'];
$record_to = $_SESSION['records_per_page'];
}else{
$record_from = 0;
$record_to = $config_records_per_page;
$record_to = $_SESSION['records_per_page'];
$p = 1;
}

View File

@ -3,11 +3,11 @@
//Paging
if(isset($_GET['p'])){
$p = intval($_GET['p']);
$record_from = (($p)-1)*$config_records_per_page;
$record_to = $config_records_per_page;
$record_from = (($p)-1)*$_SESSION['records_per_page'];
$record_to = $_SESSION['records_per_page'];
}else{
$record_from = 0;
$record_to = $config_records_per_page;
$record_to = $_SESSION['records_per_page'];
$p = 1;
}

View File

@ -3,11 +3,11 @@
//Paging
if(isset($_GET['p'])){
$p = intval($_GET['p']);
$record_from = (($p)-1)*$config_records_per_page;
$record_to = $config_records_per_page;
$record_from = (($p)-1)*$_SESSION['records_per_page'];
$record_to = $_SESSION['records_per_page'];
}else{
$record_from = 0;
$record_to = $config_records_per_page;
$record_to = $_SESSION['records_per_page'];
$p = 1;
}

View File

@ -7,11 +7,11 @@
//Paging
if(isset($_GET['p'])){
$p = intval($_GET['p']);
$record_from = (($p)-1)*$config_records_per_page;
$record_to = $config_records_per_page;
$record_from = (($p)-1)*$_SESSION['records_per_page'];
$record_to = $_SESSION['records_per_page'];
}else{
$record_from = 0;
$record_to = $config_records_per_page;
$record_to = $_SESSION['records_per_page'];
$p = 1;
}

View File

@ -3,11 +3,11 @@
//Paging
if(isset($_GET['p'])){
$p = intval($_GET['p']);
$record_from = (($p)-1)*$config_records_per_page;
$record_to = $config_records_per_page;
$record_from = (($p)-1)*$_SESSION['records_per_page'];
$record_to = $_SESSION['records_per_page'];
}else{
$record_from = 0;
$record_to = $config_records_per_page;
$record_to = $_SESSION['records_per_page'];
$p = 1;
}

View File

@ -3,11 +3,11 @@
//Paging
if(isset($_GET['p'])){
$p = intval($_GET['p']);
$record_from = (($p)-1)*$config_records_per_page;
$record_to = $config_records_per_page;
$record_from = (($p)-1)*$_SESSION['records_per_page'];
$record_to = $_SESSION['records_per_page'];
}else{
$record_from = 0;
$record_to = $config_records_per_page;
$record_to = $_SESSION['records_per_page'];
$p = 1;
}