<?php
// namespace core;

/**
* Configuration : setup system wide settings and session definitions
**/
class Config{
	public function __construct(){
	/* Set default timezone, i use universal time counter to get all relative time errors escape */
	date_default_timezone_set('UTC');
	/* Simple check if site is @ local host or real server... */
	if(TEST){
		/* set prefix for sessions */
		define('SESSION_PREFIX','smvc_');
		/* site address */
		define('DIR','http://localhost:3222/');
		/* database details ONLY NEEDED IF USING A DATABASE */
		define('DB_TYPE','mysql');
		define('DB_HOST','localhost;port=3322');
		define('DB_NAME','my');
		define('DB_USER','root');
		define('DB_PASS','root');
		define('PREFIX','smvc_');
	}else{
		/* set prefix for sessions */
		define('SESSION_PREFIX','dtin_');
		/* site address */
		define('DIR','http://www.Date-IN.com/');
		/* database details ONLY NEEDED IF USING A DATABASE */
		define('DB_TYPE','mysql');
		define('DB_HOST','localhost');
		define('DB_NAME','rglxhost_di');
		define('DB_USER','rglxhost');
		define('DB_PASS','1qa2ws3ed');
		define('PREFIX','dtin_');
	}
	/* Optional create a constant for the name of the site */
	define('SITETITLE','Date-IN');
	define('LANGUAGE_CODE', 'en',true);
	define('LANGUAGE_DEFAULT_CODE','en');
	/* Crypt set : Crypt Blowfish->2a and Hash Cost Factor ->04, PHP's internal default is 10... */
	define("BLOWFISH_HASH_COST",'$2a$04$');
	/* Salt definition for remember me token!!! */
	define('SALT_TOKEN','Ud97M2kx0Pzy');
	/* Token used in current session login users if replaced all users will be log outed */
	define('USER_TOKEN','ZQ03nEJd4o0o0');
	/* Default value to display number of users per page */
	define('DISPLAY_USERS', 12);
	/* Default value to display number of messages */
	define('DISPLAY_MSGS', 20);
	/* FACEBOOK set : is the controller-action where the user is redirected to after getting authenticated via Facebook */
	define('FACEBOOK_LOGIN', false);
	// define('FACEBOOK_LOGIN_APP_ID', 'XXX');
	// define('FACEBOOK_LOGIN_APP_SECRET', 'XXX');
	// define('FACEBOOK_LOGIN_PATH', 'login/loginWithFacebook');
	// define('FACEBOOK_REGISTER_PATH', 'login/registerWithFacebook');
	/* Cookies set: 1209600 seconds = 2 weeks */
	/* Cookies set: domain where the cookie is valid for, for local development ".127.0.0.1" and ".localhost" will work but now it's better to leave it empty??? */
	/* Cookies set: IMPORTANT: always put a dot in front of the domain, like ".mydomain.com" ! */
	define('COOKIE_EXPIRES', 1209600);
	define('COOKIE_DOMAIN', '');
	define('COOKIE_PATH', '/');
	define('COOKIE_SECURE', 0);
	define('COOKIE_HTTPONLY', 1);
	/* Email box definitions */
	define("EMAIL_ADDRESS", "@Date-IN.com");
	define("EMAIL_NO_REPLY", "no-reply");
	define("EMAIL_INFO", "info");
	/* Configuration for: Email server credentials, how you to send emails.*/
	/* If you have successfully set up a mail server on your linux server and you know what you do, then you can skip this section. Otherwise please set EMAIL_USE_SMTP to true and fill in your SMTP provider account data.*/
	/* Please note that there are several issues with gmail, like gmail will block your server for "spam" reasons or you'll have a daily sending limit. See the readme.md for more info.*/
	// define("EMAIL_USE_SMTP", true);
	// define("EMAIL_SMTP_HOST", 'ssl://smtp.gmail.com');
	// define("EMAIL_SMTP_AUTH", true);
	// define("EMAIL_SMTP_USERNAME", 'xxxxxxxxxx@gmail.com');
	// define("EMAIL_SMTP_PASSWORD", 'xxxxxxxxxxxxxxxxxxxx');
	// define("EMAIL_SMTP_PORT", 465);
	// define("EMAIL_SMTP_ENCRYPTION", 'ssl');
	/* I think it's more recommended to use SMTP... */

	/* Turn on output buffering */
	// ob_start();
	/* Start sessions */
	Session::init();
	/* Turn on custom error handling */
	// set_exception_handler('logger::exception_handler');
	// set_error_handler('logger::error_handler');
	/* Define default template for use ??? */
	// Session::set('template','orn');
	// Session::set('language','he');
	}

}