<?php
define("DB_HOST", "localhost");
define("DB_USERNAME", "estonewe_tianshu");
define("DB_PASSWORD", "68A[_=!q;+!b");
define("DB_DATABASE_NAME", "estonewe_tianshu");

define("AUTH_SECRET1", "tianshu");
define("AUTH_SECRET2", "denzen");
date_default_timezone_set("Asia/Kuala_Lumpur");

function connect_db() {
	return new mysqli(DB_HOST, DB_USERNAME, DB_PASSWORD, DB_DATABASE_NAME);
}

function logfile($filename, $msg){
	file_put_contents( $filename, "[" . date('Y-m-d H:i:s') . "] - " . $msg . "\n", FILE_APPEND );
}
