session_start();
define('AntiBK', true);
include("../engline/config.php");
include("../engline/dbsimple/Generic.php");
include("../engline/functions/functions.php");
$adb = DbSimple_Generic::connect($database['adb']);
$adb->query("SET NAMES ? ",$database['db_encoding']);
$adb->setErrorHandler("databaseErrorHandler");
$lang = getVar('lang', 'ru', 5);
$lang = ($lang == 'ru' || $lang == 'en') ?$lang :'ru';
$cat = getVar('cat', 1, 5);
$cat = ($adb->selectRow("SELECT `id`, `main`, `name`, `text` FROM ?# WHERE `id` = ?d", "forum_menu_$lang", $cat)) ?$cat :1;
$cat = ($cat == 2 && $lang == 'ru') ?28 :$cat;
setCookie('lang', $lang, time() + 3600);
setCookie('cat', $cat, time() + 3600);
?>
Анти Бойцовский Клуб
$forum_menu = "forum_menu_$lang";
$forum_topics = "forum_topics_$lang";
$language = ($lang == "en") ?"RU | EN" :"RU | EN";
$lang = $adb->selectCol("SELECT `key` AS ARRAY_KEY, ?# FROM `forum_language`;", $lang);
$cat = $adb->selectRow("SELECT `id`, `main`, `prev`, `name`, `text` FROM ?# WHERE `id` = ?d", $forum_menu, $cat);
if (isset($_SESSION['guid']))
$char = Char::initialization($_SESSION['guid'], $adb);
?>
|
|
|
|
if (!getVar('smile', 0, 1)) {?>
getLogin() :$lang['nologin'];?>
$cats = $adb->select("SELECT `id`, `name` FROM ?# WHERE `main` = '0';", $forum_menu);
foreach ($cats as $category)
{
echo " $category[name] ";
if ($cat['id'] == $category['id'] || $cat['main'] == $category['id'])
{
$scats = $adb->select("SELECT `id`, `name` FROM ?# WHERE `prev` = ?d", $forum_menu, $category['id']);
foreach ($scats as $scat)
{
echo " $scat[name] ";
if ($cat['id'] == $scat['id'] || $cat['main'] == $scat['id'] || $cat['prev'] == $scat['id'])
{
$sscats = $adb->select("SELECT `id`, `name` FROM ?# WHERE `prev` = ?d", $forum_menu, $scat['id']);
foreach ($sscats as $sscat)
echo " $sscat[name] ";
}
}
}
}
?>
|
|
echo "$lang[conf] \"$cat[name]\""
. "$cat[text] "
. " $lang[rss] ";
?> |
|
} else {?>
|
|
for ($i = 0; $i < 3; $i++)
{
echo " $lang[image] | "
. " $lang[text] | "
. " $lang[atext] | ";
}
?>
$smiles = $adb->select("SELECT `text`, `atext`, `img` FROM `forum_smiles`;");
$i = 0;
foreach ($smiles as $smile)
{
$i++;
echo " | "
. "$smile[text] | "
. "$smile[atext] | ";
if ($i == 3)
{
$i = 0;
echo " ";
}
}
?>
}?>
|
|
|
|