Merge branch 'master' of https://github.com/fusionpbx/fusionpbx
This commit is contained in:
+23
-20
@@ -23,16 +23,20 @@
|
|||||||
Contributor(s):
|
Contributor(s):
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
*/
|
*/
|
||||||
require_once "root.php";
|
|
||||||
require_once "resources/require.php";
|
//includes
|
||||||
require_once "resources/check_auth.php";
|
require_once "root.php";
|
||||||
if (permission_exists('xml_cdr_view')) {
|
require_once "resources/require.php";
|
||||||
//access granted
|
require_once "resources/check_auth.php";
|
||||||
}
|
|
||||||
else {
|
//check permissions
|
||||||
echo "access denied";
|
if (permission_exists('xml_cdr_view')) {
|
||||||
exit;
|
//access granted
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
echo "access denied";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
//additional includes
|
//additional includes
|
||||||
require_once "resources/paging.php";
|
require_once "resources/paging.php";
|
||||||
@@ -80,9 +84,9 @@ else {
|
|||||||
case 'equal': $mos_comparison = "<"; break;
|
case 'equal': $mos_comparison = "<"; break;
|
||||||
case 'notequal': $mos_comparison = "<>"; break;
|
case 'notequal': $mos_comparison = "<>"; break;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$mos_comparison = '';
|
$mos_comparison = '';
|
||||||
}
|
}
|
||||||
//$mos_comparison = check_str($_REQUEST["mos_comparison"]);
|
//$mos_comparison = check_str($_REQUEST["mos_comparison"]);
|
||||||
$mos_score = check_str($_REQUEST["mos_score"]);
|
$mos_score = check_str($_REQUEST["mos_score"]);
|
||||||
}
|
}
|
||||||
@@ -268,9 +272,13 @@ else {
|
|||||||
|
|
||||||
//set a default CDR limit
|
//set a default CDR limit
|
||||||
if (!isset($_SESSION['cdr']['limit']['numeric'])) {
|
if (!isset($_SESSION['cdr']['limit']['numeric'])) {
|
||||||
$_SESSION['cdr']['limit']['numeric'] = 800;
|
$_SESSION['cdr']['limit']['numeric'] = 1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//disable the paging
|
||||||
|
if ($_REQUEST['export_format'] == "csv") { $rows_per_page = 0; }
|
||||||
|
if ($_REQUEST['export_format'] == "pdf") { $rows_per_page = 0; }
|
||||||
|
|
||||||
//page results if rows_per_page is greater than zero
|
//page results if rows_per_page is greater than zero
|
||||||
if ($rows_per_page > 0) {
|
if ($rows_per_page > 0) {
|
||||||
if ($_SESSION['cdr']['count']['boolean'] == "true") {
|
if ($_SESSION['cdr']['count']['boolean'] == "true") {
|
||||||
@@ -306,11 +314,6 @@ else {
|
|||||||
$rows_per_page = 50;
|
$rows_per_page = 50;
|
||||||
}
|
}
|
||||||
|
|
||||||
//disable the paging
|
|
||||||
if ($_REQUEST['export_format'] == "csv") {
|
|
||||||
$rows_per_page = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
//prepare to page the results
|
//prepare to page the results
|
||||||
//$rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50; //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'];
|
$page = $_GET['page'];
|
||||||
@@ -363,7 +366,7 @@ else {
|
|||||||
}
|
}
|
||||||
$sql .= $sql_where;
|
$sql .= $sql_where;
|
||||||
if (strlen($order_by)> 0) { $sql .= " order by ".$order_by." ".$order." "; }
|
if (strlen($order_by)> 0) { $sql .= " order by ".$order_by." ".$order." "; }
|
||||||
if ($_REQUEST['export_format'] != "csv") {
|
if ($_REQUEST['export_format'] != "csv" && $_REQUEST['export_format'] != "pdf") {
|
||||||
if ($rows_per_page == 0) {
|
if ($rows_per_page == 0) {
|
||||||
$sql .= " limit ".$_SESSION['cdr']['limit']['numeric']." offset 0 ";
|
$sql .= " limit ".$_SESSION['cdr']['limit']['numeric']." offset 0 ";
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user