English version  | Version française

Notice: Undefined index: HTTP_REFERER in /home/_or/olivier/pub/www.samalyse.com/prepend.php on line 202

<< Retour

<?php
require_once 'PEAR.php';
PEAR::setErrorHandling(PEAR_ERROR_PRINT);

define('DB_DATAOBJECT_NO_OVERLOAD',true); 
require_once 
'DB/DataObject.php';

require_once 
'Structures/DataGrid.php';    
require_once 
"HTML/Table.php";

include 
"dsn.php";
$options = &PEAR::getStaticProperty('DB_DataObject','options');
$options['database'] =  $DSN;
$options['proxy'] = 'full';

class 
DataObject_Fruits extends DB_DataObject 
{
    var 
$__table 'fruits';
    var 
$id;
    var 
$name;
    var 
$stock;
    var 
$price;
}

$dataobject = new DataObject_Fruits();
$datagrid =& new Structures_DataGrid(20);
$datagrid->bind($dataobject$options);
$datagrid->generateColumns(array(
    
'name'  => 'Nom de produit'
    
'stock' => 'Quantité en stock'
    
'price' => 'Prix (&euro;)'
));

?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<link rel="stylesheet" href="datagrid_fancy.css" type="text/css"/>
</head>
<body>

<?php
$table 
= new HTML_Table();

$datagrid->fill($table);

$table->updateAttributes(array("class" => "fruits"));
$table->altRowAttributes(0, array(), array ("class" => "odd"), true);

echo 
"<p class=\"paging\">Pages : ";
$datagrid->render("Pager");
echo 
"</p>";

echo 
$table->toHTML();
?>

</body>
</html>

Notice: Undefined index: HTTP_REFERER in /home/_or/olivier/pub/www.samalyse.com/prepend.php on line 208

<< Retour

Icon
Faites-nous part de votre projet
Progress bar