<?php

$dbuser="root";
$dbpassword="sgpmk777";
$dbhost="localhost";
$dbname="crm";

$itemsPerPage=20;

include_once("report.php");

mysql_connect($dbhost,$dbuser,$dbpassword);
mysql_select_db($dbname);




$rep= new Report("SELECT * FROM `ecminvoiceoutitems` t1, `ecminvoiceouts` t2
 WHERE t1.ecminvoiceout_id = t2.id",$itemsPerPage);

$rep->addDisplayField('total','brutto',150);
$rep->addSpecialDisplayField('total',"Value","<a href='javascript:alert(\"You selected {total} from {name}\")' >{total}</a>",100);
$rep->enableNavigationalNumbers(10);

$rep->setSortASCPicture("sortup.png");
$rep->setSortDESCPicture("sortdown.png");

$rep->setTableClassName("data");
$rep->setNavigationTableClassName("nav");

$rep->setNavigationLinkClass("navlink");
$rep->setSortLinkClassName("sortlink");

$rep->enableAjax($dbhost,$dbuser,$dbpassword,$dbname);

?>

<html>
<head>
<?php 
$rep->drawAjaxHeadHtml();
?>
<title>example</title>

</head>

<body>

<?php 
$rep->draw();
$rep->getNavigationBar();

?>
</body>
</html>