<?php

session_start();

if($_SESSION['dbName']==""){
header("location:../index.php");
}

include("config.inc.php");
include("Forms_DataGrid_Reports.php");

$connection = mysql_connect($config['dbServer'],$config['dbUser'],$config['dbPass']) or die("Could not connect to DB");
mysql_select_db($_SESSION['dbName'],$connection) or die("Could not find DB");


$message='';
$mode 		= $_GET['mode'];
$perpage 	= $_GET['perpage'];

if ($mode == 'RefreshPage'){
	
	echo "[BRK]";
	getInvoiceGrid ($invFromdate, $invTodate, $orderby, $startrange, $perpage, $connection);
	echo "[BRK]";
	exit;
}

?>