$mysql=mysql_connect($config['mysql']['host'],$config['mysql']['user'],$config['mysql']['pass']);
if(!$mysql && !strpos($_SERVER['REQUEST_URI'],"admin.html?config=mysqlopen") && empty($_POST) && !isset($_GET['logout']) && !isset($_GET['login'])) {
header("Location: ".$config['path']."admin.html?config=mysqlopen");
die();
}
elseif($mysql && !mysql_select_db($config['mysql']['db'],$mysql) && !strpos($_SERVER['REQUEST_URI'],"admin.html?config=mysqldb") && empty($_POST) && !isset($_GET['logout']) && !isset($_GET['login'])) {
header("Location: ".$config['path']."admin.html?config=mysqldb");
die();
}
mysql_query("SET NAMES 'latin5'");
mysql_query("SET CHARACTER SET 'latin5'");
mysql_query("SET COLLATION_CONNECTION = 'latin5_turkish_ci'");