<?
 error_reporting(E_ALL);

if(!($db=@mysql_connect('localhost', 'vkolhoze', 'M4h2A3k5')))
{
echo "<center>Тех.работы</center>";
exit;
}
// подключение к базе
if (!@mysql_select_db('vkolhoze',$db))
{
echo "Wrong MySQL db name";
exit;
}
mysql_query('set charset utf8',$db); 
mysql_query('SET names utf8',$db); 
mysql_query('set character_set_client="utf8"',$db); 
mysql_query('set character_set_connection="utf8"',$db); 
mysql_query('set character_set_result="utf8"',$db);

@session_name('SESS');
@session_start();
$sess=mysql_real_escape_string(session_id());
if (!preg_match('#[A-z0-9]{32}#i',$sess))$sess=md5(rand(09009,999999));
if(isset($_COOKIE['id'])  && isset($_COOKIE['pass'])) {
$ku = mysql_fetch_assoc(mysql_query("SELECT * FROM `kolhoz_user` WHERE `id` = '".($_COOKIE['id'])."' && `password` = '".($_COOKIE['pass'])."' LIMIT 1"));
}
$set=array();
$set['p_str']=10;

?>