+
+////////////////////////////////////////
+// table_id: <table>'s id tag
+// headers: an associative array "label"=>"type"
+// pagesize: the initial page
+// column_init_sort: the column to sort on at load-time
+// max_pages: the max number of pages to display in the paginator
+function plc_table_head ($table_id,$headers,$pagesize,$column_init_sort,$max_pages) {
+ $paginator=$table_id."_paginator";
+ $classname="paginationcallback-".$paginator;
+ $classname.=" max-pages-" . $max_pages;
+ $classname.=" paginate-" . $pagesize;
+ print <<< EOF
+<!-- instantiate paginator callback -->
+<script type"text/javascript">
+function $paginator (opts) { plc_table_paginator (opts,"$table_id"); }
+</script>
+<br/>
+<table id="$table_id" cellpadding="0" cellspacing="0" border="0"
+class="plc_table sortable-onload-$column_init_sort rowstyle-alt colstyle-alt no-arrow $classname">
+<thead>
+<tr>
+EOF;
+
+ foreach ($headers as $label => $type) {
+ if ($type == "string") $type="";
+ if ($type == "int") $type="";
+ if ($type == "float") $type="";
+ $class="sortable";
+ if ( ! empty($type)) $class .= "-" . $type;
+ print '<th class="' . $class . ' plc_table">' . $label . "</th>\n";
+ }
+
+ print <<< EOF
+</tr>
+</thead>
+<tbody>
+EOF;
+}
+
+////////////////////////////////////////
+function plc_table_foot () {
+ print <<< EOF
+</tbody>
+<tfoot>
+</tfoot>
+</table>
+EOF;
+}
+
+////////////////////////////////////////
+function plc_table_notes () {
+ print <<< EOF
+<p class='plc_filter_note'>
+Notes: Enter & or | in the search area to alternate between <bold>AND</bold> and <bold>OR</bold> search modes
+<br/>
+Hold down the shift key to select multiple columns to sort
+</p>
+EOF;
+}
+
+