/[cvs]/nfo/php/libs/com.newsblob.phphtmllib/examples/widget7.php
ViewVC logotype

Diff of /nfo/php/libs/com.newsblob.phphtmllib/examples/widget7.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by jonen, Sat Sep 20 00:20:55 2003 UTC revision 1.4 by jonen, Thu May 6 16:27:17 2004 UTC
# Line 30  include_once("db_defines.inc"); Line 30  include_once("db_defines.inc");
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
# Line 46  class csvfilelist extends DefaultGUIData Line 47  class csvfilelist extends DefaultGUIData
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    
# Line 64  $page->add_head_css( new DefaultGUIDataL Line 89  $page->add_head_css( new DefaultGUIDataL
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.")),

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed