<?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
//
// starter.php
//
// Abstract:
//
// Revision History:
//
// 1 2004-03-27 - 2005-07-02 vbt
// 2 2005-07-20 vbt
// 3 2005-08-03 vbt
// 4 2006-02-24 vbt
// 5 2010-06-25 vbt
// 6 2011-01-22 vbt
// 7 2011-12-31 vbt
//
// =====================================================
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<HTML>
<HEAD>
<?php
if(isset($attack))
{
echo "<TITLE>".($cfg["xtitle"])."</TITLE>";
}
else
{
if(isset($id) && ctype_digit($id))
{
connect($cfg["host"], $cfg["user"], $cfg["password"], $cfg["database"], $connector);
$result = mysql_query("select partname, pnid
from ".($cfg["prefix"])."partition
where num='$id'", $connector)
or die("error #102-1");
if(mysql_num_rows($result) == true)
{
while($row = mysql_fetch_array($result, MYSQL_NUM))
{
$pointer = $row[1];
if(strlen($row[1]) == 10)
{
$ncol = _("News");
}
if(strlen($row[1]) == 11)
{
$ncol = _("Articles");
}
$sname = $row[0];
}
}
mysql_free_result($result);
if(isset($rid) && isset($pointer))
{
$result = mysql_query("select theme
from ".($cfg["prefix"].$pointer)."
where num='$rid'", $connector)
or die("error #102-2");
while($row = mysql_fetch_array($result, MYSQL_NUM))
{
$headtheme = $row[0];
}
mysql_free_result($result);
}
mysql_close($connector);
}
if(isset($id) && isset($sname) && isset($rid) == false)
{
echo "<TITLE>$sname - ".($cfg["xtitle"])."</TITLE>";
}
if(isset($id) && isset($sname) && isset($rid))
{
echo "<TITLE>$headtheme - $sname - ".($cfg["xtitle"])."</TITLE>";
}
if(isset($id) == false)
{
if($inside == "search.php" && isset($sname) == false && isset($ns_q) == false)
{
echo "<TITLE>".(_("Search"))." - ".($cfg["xtitle"])."</TITLE>";
}
if($inside == "search.php" && isset($sname) == false && isset($ns_q))
{
echo "<TITLE>$ns_q - ".(_("Search"))." - ".($cfg["xtitle"])."</TITLE>";
}
if($inside == "search.html" && isset($sname) == false)
{
echo "<TITLE>".(_("Search"))." - ".($cfg["xtitle"])."</TITLE>";
}
if($inside == "map.php" && isset($sname) == false)
{
echo "<TITLE>".(_("Site map"))." - ".($cfg["xtitle"])."</TITLE>";
}
if($inside == "moutput.php" && isset($sname) == false)
{
echo "<TITLE>".(_("Message board"))." - ".($cfg["xtitle"])."</TITLE>";
}
if($inside == "searchtips.php" && isset($sname) == false)
{
echo "<TITLE>".(_("Search Tips"))." - ".($cfg["xtitle"])."</TITLE>";
}
if(isset($sname) == false && isset($ins) == false)
{
echo "<TITLE>".($cfg["xtitle"])."</TITLE>";
}
}
}
?>
<meta name="keywords" Content="keywords">
<meta name="description" Content="description">
<link rel="stylesheet" href="skin/default/style.css" type="text/css">
</HEAD>
<BODY class="client">
<?php
// Header
echo "<table width='100%' cellpadding='20'>
<tr>
<td width='100%' bgcolor='#2da02f' height='120'>
<div align='right'><font class='header'>".($cfg["xname"])."</font></div>
</td>
</tr>
<tr><td>
| <font class='s-normal' id='w-bold'><a href='index.php?lng=ru'>".($cfg[0]["lang"])."</a></font>
| <font class='s-normal' id='w-bold'><a href='index.php?lng=en'>".($cfg[1]["lang"])."</a></font> |
</td></tr>
</table>";
// End of Header
echo "<table border='0' width='100%'>
<tr valign='top'><td width='25%'>";
// 1st column
echo "<table border='0' height='350' cellpadding='10' width='100%'>
<tr valign='bottom'>
<td height='26'>
<font class='s-normal' id='w-bold'> ".(_("Sections"))."</font>
<div align='center'>";
line();
echo "</div>
</td>
</tr>
<tr valign='top'><td>";
include('include/pageone.php');
echo "</td></tr>
</table>";
// End of 1st column
echo "</td><td width='50%'>";
// 2nd column
echo "<table height='350' cellpadding='10' width='100%'>";
if($cfg["std"] == "all" && isset($id) == false && isset($ncol) == false)
{
$ncol = _("Newest publications");
}
if($cfg["std"] == "news" && isset($id) == false && isset($ncol) == false)
{
$ncol = _("News");
}
if($cfg["std"] == "articles" && isset($id) == false && isset($ncol) == false)
{
$ncol = _("Articles");
}
echo "<tr valign='bottom'><td height='26'>";
if(isset($attack) == false)
{
echo "<font class='s-normal' id='w-bold'>";
if($inside == "search.php")
{
echo " ".(_("Search"))."";
}
else if($inside == "map.php")
{
echo " ".(_("Site map"))."";
}
else if($inside == "moutput.php")
{
echo " ".(_("Message board"))."";
}
else if($inside == "searchtips.php")
{
echo " ".(_("Search Tips"))."";
}
else
{
echo " $ncol";
}
echo "</font>";
line();
}
echo "</td>
</tr>
<tr valign='top'>
<td>";
if(isset($attack))
{
echo "error #101";
}
else
{
include("$inside");
}
echo "</td></tr>";
echo "</table>";
// End of 2nd column
echo "</td><td width='25%'>";
// 3rd column
echo "<table height='350' cellpadding='10' width='100%'>
<tr valign='bottom'>
<td height='26'>
<font class='s-normal' id='w-bold'> ".(_("Editor's column"))."</font>
<div align='center'>";
line();
echo "</div>
</td>
</tr>
<tr valign='top'>
<td>";
include("include/pagethree.php");
if(isset($shortlng) && (strlen($shortlng) == 2))
{
echo "<p>
<font class='s-normal' id='w-normal'>
<a href='index.php?ins=search&lng=$shortlng'>".(_("Search"))."</a>
</font>
</p>
<p>
<font class='s-normal' id='w-normal'>
<a href='index.php?ins=map&lng=$shortlng'>".(_("Site map"))."</a>
</font>
</p>
<p>
<font class='s-normal' id='w-normal'>
<a href='index.php?ins=board&lng=$shortlng'>".(_("Message board"))."</a>
</font>
</p>";
}
else
{
echo "<p>
<font class='s-normal' id='w-normal'>
<a href='index.php?ins=search'>".(_("Search"))."</a>
</font>
<p>
<font class='s-normal' id='w-normal'>
<a href='index.php?ins=map'>".(_("Site map"))."</a>
</font>
</p>
<p>
<font class='s-normal' id='w-normal'>
<a href='index.php?ins=board'>".(_("Message board"))."</a>
</font>
</p>";
}
echo "</td>
</tr>
</table>";
// End of 3rd column
echo "</td></tr></table>";
line();
echo "<table width='100%'>
<tr valign='middle'>
<td height='30'>
<div align='center'>
<img src='skin/".($cfg["skin"])."/img/copy.jpg' alt='Powered by s-p-e: Sound PHP Engine' border='0' height='40'>
</div>
<font class='s-normal'>
<div align='center'>
<br>s-p-e is Free Software released under the GNU General Public License.
</div>
</font>
</td>
</tr>
</table>";
?>
</BODY>
</HTML>