<?
###############################################################################
# Copyright (C) 2000 Derek Leung
#
# 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.
#
# You may modify your copy or copies of this Program or any portion of it,
# but you must cause the modified files to carry prominent notices stating
# that you changed the files and the date of any change. And you are required
# to keep a copy of this License along with this Program.
#
# You are not required to accept this License, since you have not signed it.
# However, nothing else grants you permission to modify or distribute this
# Program or its derivative works. These actions are prohibited by law if
# you do not accept this License. Therefore, by modifying or distributing
# this Program (or any work based on this Program), you indicate your
# acceptance of this License to do so, and all its terms and conditions
# for copying, distributing or modifying this Program or works based on it.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# See the GNU General Public License for more details.
# http://www.opensource.org/licenses/gpl-license.html
###############################################################################
// function to show an editorial.
require ("mainfile.php");
global $config;
$topics=getTopics();
if (!in_array($myTopic,$topics)) {
$myTopic = $config[def_theme];
}
ps_header("");
$result = mysql_query("select aName, content, timeStamp,uid from ps_article where aid=$aid");
list($aName,$content, $timeStamp,$uid) = mysql_fetch_row($result);
if ($result) {
mysql_free_result($result);
}
$result2 = mysql_query("select uname,status from ps_users where uid=$uid");
list($uname,$status) = mysql_fetch_row($result2);
if ($result2) {
mysql_free_result($result2);
}
$time = formatTimeStamp($timeStamp);
themeindex ($uname,$time, $aName, $myTopic, $content, "", "", "");
ps_footer("");
?>