Location: PHPKode > projects > Sound PHP Engine > s-p-e-0.3.0/s-p-e-0.3.0/include/pageone.php
<?php 
// ===================================================== 
// 
// s-p-e - Content management system. 
// Copyright (C) 2004, 2005, 2006, 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
//
//  pageone.php
//
//  Abstract: First column.
//  
//  Revision History:
// 
//	1  2004-03-27 - 2005-07-02  vbt
//	2  2005-07-12  vbt
//	3  2005-08-29  vbt
//	4  2006-02-24  vbt
//	5  2010-06-24  vbt
//	6  2011-01-22  vbt
//
// =====================================================

echo "<font class='s-normal' id='w-normal'><a href='index.php?lng=$shortlng'>".(_("Main page"))."</a></font>";

echo "<p><font class='s-normal' id='w-bold'>&raquo;&nbsp;&nbsp;".(_("News"))."</font></p>";

connect($cfg["host"], $cfg["user"], $cfg["password"], $cfg["database"], $connector);
$result = mysql_query("select partname, num 
	from ".($cfg["prefix"])."partition 
	where pnid regexp '^[0-9]{10}$'", $connector) 
	or die("error #102-1");
while($row = mysql_fetch_array($result))
{
	if(isset($shortlng) && (strlen($shortlng) == 2))
	{
		echo "<p>
		&#8226;&nbsp;
		<font class='s-normal' id='w-normal'>
		<a href='index.php?id=".$row["num"]."&lng=$shortlng'>".$row["partname"]."</a>
		</font>
		</p>";
	} 
	else 
	{
		echo "<p>
		&#8226;&nbsp;
		<font class='s-normal' id='w-normal'>
		<a href='index.php?id=".$row["num"]."'>".$row["partname"]."</a>
		</font>
		</p>";
	}
}
mysql_free_result($result);

echo "<p><font class='s-normal' id='w-bold'>&raquo;&nbsp;&nbsp;".(_("Articles"))."</font></p>";

$result = mysql_query("select partname, num 
	from ".($cfg["prefix"])."partition 
	where pnid regexp '^[0-9]{11}$'", $connector) 
	or die("error #102-2");
while($row = mysql_fetch_array($result))
{
	if(isset($shortlng) && (strlen($shortlng) == 2))
	{
		echo "<p>
		&#8226;&nbsp;
		<font class='s-normal' id='w-normal'>
		<a href='index.php?id=".$row["num"]."&lng=$shortlng'>".$row["partname"]."</a>
		</font>
		</p>";
	}
	else 
	{
		echo "<p>
		&#8226;&nbsp;
		<font class='s-normal' id='w-normal'>
		<a href='index.php?id=".$row["num"]."'>".$row["partname"]."</a>
		</font>
		</p>";
	}
}
mysql_free_result($result);

mysql_close($connector);
?>
Return current item: Sound PHP Engine