<?php

ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);

    include_once('setting.php');
    include_once(LIBRARY.'db.php');
    $db = NEW \DB\DB(DBSERVER,DBUSER,DBPASS,DBTABLE);
    include_once(LIBRARY.'functions.php');
    $func = NEW \FUNCTIONS\FUNCTIONS($db);
    include_once(LIBRARY.'user.php');
    $user = NEW \USER\USER($db);
    include_once(LIBRARY.'location.php');
    $location = NEW \LOCATION\LOCATION();
    include_once(LIBRARY.'session.php');
    $session = NEW \SESSION\SESSION();
    include_once(LIBRARY.'error.php');
    $error = NEW \ERROR\ERROR($session);
    $success = NEW \ERROR\SUCCESS($session);


    $payments = array(
        'havale' => 'HAVALE & EFT',
        'credit_cart' => 'KREDİ KARTI',
        'garanti_pay' => 'GARANTİ PAY'
    );

    //echo'<pre>';print_r($_SERVER);die();
    $konum = strpos($_SERVER['REQUEST_URI'], 'login.php');
    if($konum===false)
        if(!$user->isLogged()) $location->aredirect('login');

