th_nav.inc.t

来自「eGroupWare is a multi-user, web-based gr」· T 代码 · 共 45 行

T
45
字号
<?php/**************************************************************************** copyright            : (C) 2001-2003 Advanced Internet Designs Inc.* email                : forum@prohost.org* $Id: th_nav.inc.t,v 1.1.1.1 2003/10/17 21:11:30 ralfbecker Exp $** This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or * (at your option) any later version.***************************************************************************/function get_prev_next_th_id(&$frm, &$prev, &$next){	/* determine previous thread */	if ($frm->th_page == 1 && $frm->th_pos == 1) {		$prev = '';	} else {		if ($frm->th_pos - 1 == 0) {			$page = $frm->th_page - 1;			$pos = $GLOBALS['THREADS_PER_PAGE'];		} else {			$page = $frm->th_page;			$pos = $frm->th_pos - 1;		}		$p = db_saq('SELECT m.id, m.subject FROM {SQL_TABLE_PREFIX}thread_view tv INNER JOIN {SQL_TABLE_PREFIX}thread t ON tv.thread_id=t.id INNER JOIN {SQL_TABLE_PREFIX}msg m ON t.root_msg_id=m.id WHERE tv.forum_id='.$frm->forum_id.' AND tv.page='.$page.' AND tv.pos='.$pos);		$prev = $p ? '{TEMPLATE: prev_thread_link}' : '';	}	/* determine next thread */	if ($frm->th_pos + 1 > $GLOBALS['THREADS_PER_PAGE']) {		$page = $frm->th_page + 1;		$pos = 1;	} else {		$page = $frm->th_page;		$pos = $frm->th_pos + 1;	}	$n = db_saq('SELECT m.id, m.subject FROM {SQL_TABLE_PREFIX}thread_view tv INNER JOIN {SQL_TABLE_PREFIX}thread t ON tv.thread_id=t.id INNER JOIN {SQL_TABLE_PREFIX}msg m ON t.root_msg_id=m.id WHERE tv.forum_id='.$frm->forum_id.' AND tv.page='.$page.' AND tv.pos='.$pos);	$next = $n ? '{TEMPLATE: next_thread_link}' : '';}?>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?