View file inc/core.php
<?php include('const.php'); ob_start(); session_start(); if (mysql_connect(db_host,db_user,db_password)) mysql_select_db(db_database); else { $_SESSION['error'] = 'Ошибка при подключении к базе данных'; redirect(URL); die(); } if (empty($_SESSION['access'])) $_SESSION['access'] = 0; ?>