function page_show_all_contributions in Contribute 6
1 string reference to 'page_show_all_contributions'
File
- ./
contribute.module, line 229 - Lets users contribute to projects
Code
function page_show_all_contributions() {
$contributions = get_all_contributions();
$output = '<table class="contribution-list">';
$output .= '<tr class=contribution-list-header>';
$output .= '<th>User</th><th>Uid</th><th>Title</th><th>Nid</th><th>Amount</th><th>Time</th></tr>';
$zebra = 'odd';
while ($contribution = db_fetch_array($contributions)) {
$user = user_load(array(
'uid' => $contribution['uid'],
));
$node = node_load($contribution['nid']);
$output .= '<tr class="' . $zebra . '">';
$output .= '<td class="user">' . check_plain($user->name) . '</td>';
$output .= '<td class="uid" align="center">' . check_plain($contribution['uid']) . '</td>';
$output .= '<td class="title">' . check_plain($node->title) . '</td>';
$output .= '<td class="nid" align="center">' . check_plain($contribution['nid']) . '</td>';
$output .= '<td class="amount">$' . check_plain($contribution['amount']) . '</td>';
$output .= '<td class="time">' . date('M d Y h:i:s', check_plain($contribution['created'])) . '</td></tr>';
$zebra = $zebra == 'odd' ? 'even' : 'odd';
}
$output .= "</table>";
return $output;
}