Location: PHPKode > projects > Sound PHP Engine > s-p-e-0.3.0/s-p-e-0.3.0/view.php
<?php
// ===================================================== 
// 
// s-p-e - Content management system. 
// Copyright (C) 2004, 2005, 2010, 2011 Vladimir B. Tsarkov
// 
// This file is part of s-p-e. 
// 
// s-p-e 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 3 of the License, or 
// (at your option) any later version. 
// 
// s-p-e 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. 
// 
// You should have received a copy of the GNU General Public License 
// along with s-p-e. If not, see <http://www.gnu.org/licenses/>.
//
// ------
//
//  You can contact me via e-mail: lipetsk-gnu-lug at bk period ru
//
//  view.php
//
//  Abstract: Full news & articles output.
//  
//  Revision History:
// 
//	1  2004-03-27 - 2005-07-02  vbt
//	2  2005-07-22  vbt
//	3  2005-08-03  vbt
//	4  2005-09-24  vbt
//	5  2010-06-11  vbt
//	6  2011-01-22  vbt
//
// =====================================================

if(isset($id) && isset($rid))
{
	connect($cfg["host"], $cfg["user"], $cfg["password"], $cfg["database"], $connector);
	$result = mysql_query("select theme, intro, text, date, timer 
		from ".($cfg["prefix"].$pointer)." 
		where num='$rid'", $connector) 
		or die("error #102");
	if(mysql_num_rows($result) == 0)
	{
		echo "error #101";
	} 
	else 
	{
		while($row = mysql_fetch_array($result, MYSQL_NUM))
		{
			echo "<font class='s-normal' id='w-bold'>".$row[0]."</font>";
			echo "<p>
			<font class='s-normal' id='w-normal'>
			".(_("Published"))."&nbsp;:&nbsp;".$row[3].";&nbsp;".$row[4]."
			</font></p>";
			echo "<p><font class='s-normal' id='w-normal'>".$row[1]."</font></p>";
			echo "<p><font class='s-normal' id='w-normal'>".$row[2]."</font></p>";
			line();
			echo "<p>
			<font class='s-normal' id='w-normal'>
			<a href='print.php?id=$id&rid=$rid&lng=$shortlng' title='".(_("Print version"))."'>
			".(_("Print version"))."
			</a>
			</font>
			</p>";
		}
	}
	mysql_free_result($result);
	mysql_close($connector);
} 
else 
{
	echo "error #101";
}
?>
Return current item: Sound PHP Engine