Apps: Integrate ability to set paging via a Default/Domain/User Setting (domain > paging > numeric).

This commit is contained in:
reliberate
2016-03-28 23:02:11 -06:00
parent 7c5176cf41
commit cd7843b7f3
49 changed files with 61 additions and 51 deletions
+1 -1
View File
@@ -44,7 +44,7 @@ else {
require_once "resources/paging.php";
//xml cdr include
$rows_per_page = 100;
$rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50;
require_once "xml_cdr_inc.php";
//javascript function: send_cmd
+1 -1
View File
@@ -39,7 +39,7 @@ else {
$text = $language->get();
//additional includes
$rows_per_page = 0;
$rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50;
require_once "xml_cdr_inc.php";
//get the format
+6 -3
View File
@@ -292,12 +292,15 @@ else {
if ($num_rows > $_SESSION['cdr']['limit']['numeric']) {
$num_rows = $_SESSION['cdr']['limit']['numeric'];
}
if ($rows_per_page > $_SESSION['cdr']['limit']['numeric']) {
$rows_per_page = $_SESSION['cdr']['limit']['numeric'];
if ($_SESSION['domain']['paging']['numeric'] != '' && $rows_per_page > $_SESSION['domain']['paging']['numeric']) {
$rows_per_page = $_SESSION['domain']['paging']['numeric'];
}
else {
$rows_per_page = 50;
}
//prepare to page the results
//$rows_per_page = 150; //set on the page that includes this page
//$rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50; //set on the page that includes this page
$page = $_GET['page'];
if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; }
list($paging_controls_mini, $rows_per_page, $var_3) = paging($num_rows, $param, $rows_per_page, true); //top