'; $order = 'ASC'; } else { return NULL; } $output = NULL; foreach($node_types as $type) { $quoted_types[] = "'" . $type . "'"; } $sql = "SELECT nid, title FROM {node} n WHERE nid $sql_op %d AND type IN (" . implode(',', $quoted_types) . ") AND status = 1 ORDER BY nid $order LIMIT 1"; $result = db_query($sql, $current_node->nid, $type); $data = db_fetch_object($result); if (!isset($data->nid) || !$data->nid) { return NULL; } return l($data->title, "node/$data->nid", array('html' => TRUE)); } ?> /* Add this to your style.css file */ .navpn { width: 500px; margin: 0 auto 0 auto; clear: both; display: block; text-align: center; line-height: 1.5em; } #pnprev { display: block; float: left; text-align: right; width: 200px; white-space: normal; word-wrap: break-word; padding: 0; } .navpn #pnmain { float: left; text-align: center; display: inline; padding: 0 1em 0 1em; } #pnnext { display: block; float: left; text-align: left; width: 200px; white-space: normal; word-wrap: break-word; padding: 0; } .pnlaquo { float: left; width: 10px; } .pnraquo { float: right; width: 10px; }