Hiya. Can anyone help me figure out how to use theme_pager with theme_table? I am a novice with PHP, but I have a petition site (http:copycrime.org - and EFF project) that's using webform module and this code to print results with theme_table, and I need to add paging to the results. I'm not sure how best to proceed.
<?php
include_once(drupal_get_path('module', 'webform')."/webform.inc");
$nid=2;
function _webform_results_table($nid) {
// Load Components
_webform_load_components();
$header = array();
$rows = array();
$cell = array();
// Get all the component cid and names for the node
$query = 'SELECT cid, name, type, extra FROM {webform_component} WHERE nid = %d and cid in (1175823068, 1175997870) ORDER BY weight, name';
$res = db_query($query, $nid);
while($component = db_fetch_array($res)) {
$components[] = $component;
}
// Get all the submissions for the node
$submissions = _webform_fetch_submissions($nid);
// Generate a row for each submission
foreach ($submissions as $sid => $submission) {
$componentHeaders = array();
// Generate a cell for each component
foreach($components as $component) {
$component['extra'] = unserialize($component['extra']);
$tableFunction = "_webform_table_data_".$component['type'];
if (function_exists($tableFunction)) {