Posted on: 03/31/05 01:40am
By: ByteEnable
if( $index == 'n' ) { // START NEW CODE $result = DB_query("SELECT `sid` FROM `gl_stories` WHERE `tid` = '" . $A['tid'] . "' AND `sid` < '" . $A['sid'] . "' ORDER BY `sid` DESC LIMIT 1"); $PrevStory = DB_fetchArray($result); $result = DB_query("SELECT `sid` FROM `gl_stories` WHERE `tid` = '" . $A['tid'] . "' AND `sid` > '" . $A['sid'] . "' ORDER BY `sid` LIMIT 1"); $NextStory = DB_fetchArray($result); $StoryNavTopic = ucfirst($A['tid']); if ( $PrevStory[0] == '' ) { $article->set_var('PrevStory','<td class="StoryNav"></td>'); } else { $article->set_var('PrevStory','<td class="StoryNav"><BR><A title="Read previous article in “'. $StoryNavTopic . '”" class="PageNav" href="/article.php/'. $PrevStory[0] . '">«Prev</a></td>'); } if ( $NextStory[0] == '' ) { $article->set_var('NextStory','<td class="StoryNav"></td>'); } else { $article->set_var('NextStory','<td class="StoryNav"><BR><A title="Read next article in “' . $StoryNavTopic . '”" class="PageNav" href="/article.php/'. $NextStory[0] . '">Next»</a></td>'); } //END NEW CODE $article->set_var( 'story_title', stripslashes( $A['title'] ));
</tr> {story_bodyhtml} {PrevStory}{NextStory} </table>
Posted on: 04/01/05 01:54pm
By: Dirk
Posted on: 04/01/05 01:59pm
By: ByteEnable
Posted on: 04/01/05 02:05pm
By: Dirk
$sql .= "ORDER BY featured DESC, date DESC";
Posted on: 04/01/05 07:14pm
By: ByteEnable
Posted on: 05/13/05 10:19pm
By: ByteEnable
$result = DB_query("SELECT `sid` FROM `gl_stories` WHERE `tid` = '" . $A['tid'] . "' AND `date` < '" . $A['date'] . "' ORDER BY `date` DESC LIMIT 1"); $PrevStory = DB_fetchArray($result); $FutureDate = date( "Y-m-d H:i:s", time() ); $result = DB_query("SELECT `sid` FROM `gl_stories` WHERE `tid` = '" . $A['tid'] . "' AND `date` > '" . $A['date'] . "' AND `date` < '" . $FutureDate . "'ORDER BY `date` LIMIT 1"); $NextStory = DB_fetchArray($result);