Файл: zfarm.mobi/inc/system/start_sess.php
Строк: 19
<?
error_reporting(E_ALL);
if(!($db=@mysql_connect('localhost', 'zfa827_kolhoz', 'kolhoz123ss')))
{
echo "<center>Тех.работы</center>";
exit;
}
// подключение к базе
if (!@mysql_select_db('zfa827_kolhoz',$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;
?>