예제 #1
0
Please remember donating is one way to show your support, copy and paste in your internet browser the following link to make your donation
https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=tavoarcila%40gmail%2ecom&item_name=phpMyDataGrid%202007&no_shipping=0&no_note=1&tax=0&currency_code=USD&lc=US&bn=PP%2dDonationsBF&charset=UTF%2d8

For more info, samples, tips, screenshots, help, contact, forum, please visit phpMyDataGrid site  
http://www.gurusistemas.com/indexdatagrid.php

For contact author: tavoarcila at gmail dot com or info at gurusistemas dot com
*/
include "phpmydatagrid.class.php";
$objGrid = new datagrid();
$objGrid->closeTags(true);
$objGrid->friendlyHTML();
$objGrid->methodForm("get");
$objGrid->conectadb("127.0.0.1", "phpclasses", "test", "guru");
$objGrid->salt("Myc0defor5tr0ng3r-Pro3EctiOn");
$objGrid->language("en");
$objGrid->buttons(true, false, true, false);
$objGrid->form('employee', true);
$objGrid->searchby("name,lastname");
$objGrid->tabla("employees");
$objGrid->keyfield("id");
$objGrid->datarows(20);
$objGrid->orderby("name", "ASC");
$objGrid->FormatColumn("id", "ID Employee", 5, 5, 1, "50", "center", "integer");
$objGrid->FormatColumn("name", "Name", 30, 30, 0, "150", "left");
$objGrid->FormatColumn("lastname", "Last name", 30, 30, 0, "150", "left");
$objGrid->FormatColumn("age", "Age", 5, 5, 0, "50", "right");
$objGrid->FormatColumn("afiliation", "Afiliation Date", 10, 10, 0, "100", "center", "date:dmy:/");
$objGrid->FormatColumn("status", "Status", 5, 5, 0, "60", "left", "select:1_Single:2_Married:3_Divorced");
$objGrid->FormatColumn("active", "Active", 2, 2, 0, "50", "center", "check:No:Yes");
$objGrid->FormatColumn("salary", "Salary", 10, 10, 0, "90", "right", "money:€");