| 30 | include_once($phphtmllib."/widgets/data_list/includes.inc"); | include_once($phphtmllib."/widgets/data_list/includes.inc"); | 
| 31 | include_once($phphtmllib."/widgets/data_list/CSVFILEDataListSource.inc"); | include_once($phphtmllib."/widgets/data_list/CSVFILEDataListSource.inc"); | 
| 32 |  |  | 
| 33 |  |  | 
| 34 | /** | /** | 
| 35 | * This class shows how to use the data coming | * This class shows how to use the data coming | 
| 36 | * from a CSV Formatted file | * from a CSV Formatted file | 
| 47 | $this->add_header_item("First Name", "200", "FName", SORTABLE, SEARCHABLE); | $this->add_header_item("First Name", "200", "FName", SORTABLE, SEARCHABLE); | 
| 48 | $this->add_header_item("Last Name", "200", "LName", SORTABLE, SEARCHABLE); | $this->add_header_item("Last Name", "200", "LName", SORTABLE, SEARCHABLE); | 
| 49 | $this->add_header_item("Email", "200", "Email", SORTABLE, SEARCHABLE, "center"); | $this->add_header_item("Email", "200", "Email", SORTABLE, SEARCHABLE, "center"); | 
| 50 |  |  | 
| 51 |  | //turn on the 'collapsable' search block. | 
| 52 |  | //The word 'Search' in the output will be clickable, | 
| 53 |  | //and hide/show the search box. | 
| 54 |  | $this->_collapsable_search = TRUE; | 
| 55 |  |  | 
| 56 |  | //lets add an action column of checkboxes, | 
| 57 |  | //and allow us to save the checked items between pages. | 
| 58 |  | $this->add_action_column('checkbox', 'FIRST', 'Email'); | 
| 59 |  |  | 
| 60 |  | //we have to be in POST mode, or we could run out | 
| 61 |  | //of space in the http request with the saved | 
| 62 |  | //checkbox items | 
| 63 |  | $this->set_form_method('POST'); | 
| 64 |  |  | 
| 65 |  | //set the flag to save the checked items | 
| 66 |  | //between pages. | 
| 67 |  | $this->save_checked_items(TRUE); | 
| 68 | } | } | 
| 69 |  |  | 
| 70 |  | function actionbar_cell() { | 
| 71 |  | //don't actually do anything. | 
| 72 |  | //just show how to add a button | 
| 73 |  | return $this->action_button('Test',''); | 
| 74 |  | } | 
| 75 | } | } | 
| 76 |  |  | 
| 77 |  |  | 
| 89 |  |  | 
| 90 | //build the csv file data list object. | //build the csv file data list object. | 
| 91 | $csvlist = new csvfilelist("CSV File list", 600, "LName"); | $csvlist = new csvfilelist("CSV File list", 600, "LName"); | 
|  | $csvlist->set_align("right"); |  | 
| 92 |  |  | 
| 93 | $page->add( html_span("font10", "View the source ", | $page->add( html_span("font10", "View the source ", | 
| 94 | html_a("test.csv", "test.csv file.")), | html_a("test.csv", "test.csv file.")), |