<?php
// File: $Id: wl-linkeditorial.php,v 1.3 2001/12/04 00:50:30 gregorrothfuss Exp $ $Name: $
// ----------------------------------------------------------------------
// POST-NUKE Content Management System
// Copyright (C) 2001 by the Post-Nuke Development Team.
// http://www.postnuke.com/
// ----------------------------------------------------------------------
// Based on:
// PHP-NUKE Web Portal System - http://phpnuke.org/
// Thatware - http://thatware.org/
// ----------------------------------------------------------------------
// LICENSE
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License (GPL)
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// 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. See the
// GNU General Public License for more details.
//
// To read the license please visit http://www.gnu.org/copyleft/gpl.html
// ----------------------------------------------------------------------
// Original Author of file: Francisco Burzi
// Purpose of file:
// ----------------------------------------------------------------------
// 11-30-2001:ahumphr - created file as part of modularistation
/**
* @usedby index
*/
function viewlinkeditorial($lid, $ttitle) {
global $admin, $pntable, $dbconn;
include("header.php");
if (!(authorised(0, 'Web links::', '::', ACCESS_READ))) {
echo _WEBLINKSNOAUTH;
include 'footer.php';
return;
}
include(WHERE_IS_PERSO."config.php");
menu(1);
$column = &$pntable['links_editorials_column'];
$result=$dbconn->Execute("SELECT $column[adminid], $column[editorialtimestamp], $column[editorialtext], $column[editorialtitle] FROM $pntable[links_editorials] WHERE $column[linkid]=$lid");
$recordexist = $result->PO_RecordCount();
$transfertitle = ereg_replace ("_", " ", $ttitle);
$displaytitle = $transfertitle;
echo "<br>";
OpenTable();
echo "<center><font class=\"pn-normal\"><b>"._LINKPROFILE.": $displaytitle</b></font><br>";
linkinfomenu($lid, $ttitle);
if ($recordexist != 0) {
// FTO Check EOF and databse error
if (!$result) {
PN_DBMsgError($dbconn, __FILE__, __LINE__, "An error ocurred");
die();
}
while(!$result->EOF) {
list($adminid, $editorialtimestamp, $editorialtext, $editorialtitle)=$result->fields;
$result->MoveNext();
$editorialtitle = stripslashes($editorialtitle); $editorialtext = stripslashes($editorialtext);
echo "<br><br>";
OpenTable2();
echo "<center><font class=\"pn-normal\"><b>$editorialtitle</b></font></center>"
."<center><font class=\"pn-sub\">"._EDITORIALBY." $adminid - $editorialtimestamp</font></center><br><br>"
."$editorialtext";
CloseTable2();
}
} else {
echo "<br><br><center><font class=\"pn-normal\"><b>"._NOEDITORIAL."</b></font></center>";
}
echo "<br><br><center>";
linkfooter($lid,$ttitle);
echo "</center>";
CloseTable();
include("footer.php");
}
?>