Files
crm.e5.pl/blue/AjaxExampleNoNavigation.php

132 lines
2.6 KiB
PHP
Raw Normal View History

2024-04-27 09:23:34 +02:00
<?php
$dbuser="root";
$dbpassword="sgpmk777";
$dbhost="localhost";
$dbname="crm";
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");
$rep->addDisplayField('total','Name',150);
$rep->addSpecialDisplayField('total',"Value","<a href='javascript:alert(\"You selected {total} from {name}\")' >{total}</a>",100);
$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>
<style type="text/css">
table.data {
border-width: 4px 4px 4px 4px;
border-spacing: 2px;
border-style: dotted dotted dotted dotted;
border-color: gray gray gray gray;
border-collapse: separate;
background-color: white;
}
table.data th {
border-width: 1px 1px 1px 1px;
padding: 1px 1px 1px 1px;
border-style: groove groove groove groove;
border-color: blue blue blue blue;
background-color: rgb(250, 240, 230);
-moz-border-radius: 0px 0px 0px 0px;
}
table.data td {
border-width: 1px 1px 1px 1px;
padding: 1px 1px 1px 1px;
border-style: groove groove groove groove;
border-color: blue blue blue blue;
background-color: rgb(250, 240, 230);
-moz-border-radius: 0px 0px 0px 0px;
}
table.nav {
border-width: 4px 4px 4px 4px;
border-style: dashed dashed dashed dashed;
border-color: gray gray gray gray;
border-collapse: separate;
background-color: white;
}
table.nav th {
border-width: 0px 0px 0px 0px;
border-style: none none none none;
border-color: blue blue blue blue;
background-color: rgb(255, 250, 250);
-moz-border-radius: 0px 0px 0px 0px;
}
table.nav td {
border-width: 1px 1px 1px 1px;
padding: 1px 1px 1px 1px;
border-style: none none none none;
border-color: blue blue blue blue;
background-color: rgb(255, 250, 250);
-moz-border-radius: 0px 0px 0px 0px;
text-align: center;
}
a.navlink:link{
color:#00ffff;
}
a.navlink:visited{
color:#00FF20;
}
a.navlink:hover{
color:#c69c6d;
}
a.sortlink:link{
color:#ffff00;
}
a.sortlink:visited{
color:#e20005;
}
a.sortlink:hover{
color:#c6dc69;
}
a.sortlink img {border: none;}
</style>
</head>
<body>
<?php
$rep->draw();
?>
</body>
</html>