<?php
defined('_IN_JOHNADM') or die('Error: restricted access');

if ($rights < 7)
    die('Error: restricted access');

echo '<div class="phdr"><a href="index.php"><b>Админ панель</b></a> | Управление Знакомствами</div>';
switch ($mod)
{


		
	case 'setting':
		function dop_exp($str)
		{
			$str = strtr($str, array('php'=>'', 'phtml'=>'', 'php3'=>'', 'php4'=>'', 'php5'=>'', 'php6'=>'', 'phps'=>'', 'cgi'=>'', 'pl'=>'', 'asp'=>'', 'aspx'=>'', 'shtml'=>'', 'shtm'=>'', 'fcgi'=>'', 'fpl'=>'', 'jsp'=>'', 'py'=>''));
			return $str;
		}
		echo '<div class="phdr">Настройки знакомств</div>';
		if($_POST)
		{
			$error = array();
			if (!$error)
			{
				mysql_query("UPDATE `cms_settings` SET `val`='" . $_POST['closed'] . "' WHERE `key` = 'mod_znak';");
				echo '<div class="rmenu">Настройки изменены</div>';
			}
			else
			{
				echo display_error($error);
			}
		}
        $set_znak = mysql_result(mysql_query("select `val` from `cms_settings` WHERE `key` = 'mod_znak';"),0);
		echo '<div class="menu">';
		echo '<form action="index.php?act=mod_znak&amp;mod=setting" method="POST">';
        echo '<li>Знакомства:<br />';
		echo '<input type="radio" value="0" name="closed" ' . ($set_znak == '0' ? 'checked="checked"' : '') . '/>&nbsp;Выкл ';
		echo '<input type="radio" value="1" name="closed" ' . ($set_znak == '1' ? 'checked="checked"' : '') . '/>&nbsp;Вкл</li>';
		echo '<input type="submit" value="Изменить" name="submit" /></form>';
		echo '</div>';
	break;
	
	
    default :
        echo '<div class="phdr"><a href="index.php?act=mod_znak&amp;mod=setting">Настройки</a></div>';
        echo '<div class="phdr"><a href="../znak/index.php">В знакомства</a></div>';
}

echo '<p class="bmenu">' . ($mod ? '<a href="index.php?act=mod_znak">Управление Знакомствами</a><br />' : '') . '<a href="index.php">Админ панель</a></p>';

?>