Exemplo n.º 1
0
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>phpMyDatagrid - Sample file</title>

<?php 
include "phpmydatagrid.class.php";
$objGrid = new datagrid();
$objGrid->friendlyHTML();
$objGrid->pathtoimages("./images/");
$objGrid->closeTags(true);
$objGrid->form('employee', true);
$objGrid->methodForm("post");
$objGrid->total("salary,workeddays");
$objGrid->searchby("id,name,lastname,afiliation");
$objGrid->linkparam("sess=" . $_REQUEST["sess"] . "&username="******"username"]);
$objGrid->decimalDigits(2);
$objGrid->decimalPoint(",");
$objGrid->conectadb("127.0.0.1", "phpclasses", "test", "guru");
$objGrid->tabla("employees");
$objGrid->TituloGrid("phpMyDataGrid Sample page");
$objGrid->FooterGrid("<div style='float:left'>&copy; 2007 Gurusistemas.com</div>");
/* Define the number of rows to show per page */
$objGrid->datarows(5);
/* Define the desired pagination style */
$objGrid->paginationmode('links');
/* Define the initial ordering field and its direction */
$objGrid->orderby("age", "DESC");
/* Define that ordering arrows will not be available to users */
$objGrid->noorderarrows();
$objGrid->FormatColumn("id", "ID Employee", 5, 5, 1, "50", "center", "integer");