Mark Crane 2012-07-11 02:23:05 +00:00
parent 404e855602
commit 65f183b714
5 changed files with 32 additions and 25 deletions

View File

@ -42,6 +42,7 @@ else {
require_once "includes/paging.php";
//xml cdr include
$rows_per_page = 100;
require_once "xml_cdr_inc.php";
//page title and description

View File

@ -35,6 +35,7 @@ else {
}
//additional includes
$rows_per_page = 0;
require_once "xml_cdr_inc.php";
//set the http headers

View File

@ -157,3 +157,4 @@
//echo finished
echo "completed\n";
}
?>

View File

@ -162,7 +162,9 @@ else {
//set the default
$num_rows = '0';
//get the number of rows in the v_xml_cdr
//page results if rows_per_page is greater than zero
if ($rows_per_page > 0) {
//get the number of rows in the v_xml_cdr
$sql = "select count(*) as num_rows from v_xml_cdr ";
$sql .= $sql_where;
$prep_statement = $db->prepare(check_sql($sql));
@ -178,18 +180,21 @@ else {
}
unset($prep_statement, $result);
//prepare to page the results
$rows_per_page = 150;
//prepare to page the results
//$rows_per_page = 150; //set on the page that includes this page
$page = $_GET['page'];
if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; }
list($paging_controls, $rows_per_page, $var_3) = paging($num_rows, $param, $rows_per_page);
$offset = $rows_per_page * $page;
}
//get the results from the db
$sql = "select * from v_xml_cdr ";
$sql .= $sql_where;
if (strlen($order_by)> 0) { $sql .= "order by $order_by $order "; }
if ($rows_per_page > 0) {
$sql .= " limit $rows_per_page offset $offset ";
}
$prep_statement = $db->prepare(check_sql($sql));
$prep_statement->execute();
$result = $prep_statement->fetchAll(PDO::FETCH_ASSOC);

View File

@ -59,7 +59,6 @@ else {
require_once "includes/header.php";
echo "<div align='center'>";
echo "<table width='100%' border='0' cellpadding='0' cellspacing='2'>\n";
echo "<tr class='border'>\n";
echo " <td align=\"left\">\n";
echo " <br>";