if ($history[$i]['message_id'] != '') { echo '<td>'; if ($history[$i]['type'] == 1) { echo '<a href="https://www.facebook.com/' . $history[$i]['message_id'] . '" target="_blank">' . $history[$i]['message_id'] . '</a>'; } else { echo '<a href="http://twitter.com/' . $history[$i]['name'] . '/status/' . $history[$i]['message_id'] . '" target="_blank">' . $history[$i]['message_id'] . '</a>'; } echo '</td>'; } else { echo '<td><font color="red">Error: </font>' . $history[$i]['result'] . '</td>'; } echo '<td>' . $history[$i]['created'] . '</td>'; echo '</tr>'; $tmpCreated = $history[$i]['created']; } ?> </tbody> </table> <?php $history = getHistory(array('type' => $type)); echo '<center>' . display_pagination(array('start' => $start, 'nb_display' => $nb_display, 'nbTotal' => count($history))) . '</center>'; ?> </div> </div> </div> <?php include_once 'include/presentation/footer.php';
function display_publication($query, $pageNum = 1) { global $config; global $db; $count_sql = 'SELECT COUNT(id) AS c FROM nz WHERE publication LIKE ' . $db->qstr($query . '%'); $sql = "SELECT * FROM nz WHERE publication LIKE " . $db->qstr($query . '%') . " ORDER BY year"; $q = do_query($query, $count_sql, $sql, $pageNum); display_top($query); display_search_box('publication'); echo '<h2>Showing results for publication "' . $query . '"</h2>'; display_pagination('publication', $q); display_page($q); display_pagination('publication', $q); display_bottom(); }