-// search_area : boolean
-// pagesize: the initial pagination size
-// pagesize_def: the page size when one clicks the pagesize reset button
-// max_pages: the max number of pages to display in the paginator
-function plc_table_start ($table_id, $headers, $column_sort,
- $search_area=true,$max_pages="10",$pagesize="25",$pagesize_def="999") {
- if ($search_area) {
- plc_table_search_area($table_id,$pagesize,$pagesize_def);
+// options : an associative array to override options
+// - search_area : boolean (default true)
+// - pagesize_area : boolean (default true)
+// - notes_area : boolean (default true)
+// - search_width : size in chars of the search text dialog
+// - notes : an array of additional notes
+// - pagesize: the initial pagination size
+// - pagesize_def: the page size when one clicks the pagesize reset button
+// - max_pages: the max number of pages to display in the paginator
+
+class PlcTable {
+ // mandatory
+ var $table_id;
+ var $headers;
+ var $column_sort;
+ // options
+ var $search_area; // boolean (default true)
+ var $pagesize_area; // boolean (default true)
+ var $notes_area; // boolean (default true)
+ var $search_width; // size in chars of the search text dialog
+ var $pagesize; // the initial pagination size
+ var $pagesize_def; // the page size when one clicks the pagesize reset button
+ var $max_pages; // the max number of pages to display in the paginator
+ var $notes; // an array of additional notes
+ var $has_tfoot;
+
+ function PlcTable ($table_id,$headers,$column_sort,$options=NULL) {
+ $this->table_id = $table_id;
+ $this->headers = $headers;
+ $this->column_sort = $column_sort;
+
+ $this->has_tfoot=false;
+
+ $this->search_area = true;
+ $this->pagesize_area = true;
+ $this->notes_area = true;
+ $this->search_width = 40;
+ $this->pagesize = 25;
+ $this->pagesize_def = 999;
+ $this->max_pages = 10;
+ $this->notes = array();
+
+ $this->set_options ($options);