<?php
date_default_timezone_set('Asia/Jakarta');

if (!defined('DB_HOST')) {
    define('DB_HOST', 'localhost');
}
if (!defined('DB_NAME')) {
    define('DB_NAME', 'bintang8_dbN');
}
if (!defined('DB_USER')) {
    define('DB_USER', 'bintang8_dbU');
}
if (!defined('DB_PASS')) {
    define('DB_PASS', ')noicTD1WaVWQC6e');
}

$db = new PDO("mysql:host=" . DB_HOST . ";dbname=" . DB_NAME, DB_USER, DB_PASS, [
    PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
    PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
    PDO::ATTR_EMULATE_PREPARES => false,
]);

$current_month = date('m');
$current_year = date('Y');
$previous_month = date('m', strtotime('first day of last month'));
$previous_year = date('Y', strtotime('first day of last month'));

$days = [
    'Sunday' => 'Minggu', 'Monday' => 'Senin', 'Tuesday' => 'Selasa',
    'Wednesday' => 'Rabu', 'Thursday' => 'Kamis', 'Friday' => 'Jumat',
    'Saturday' => 'Sabtu'
];

$date = range(1, cal_days_in_month(CAL_GREGORIAN, $current_month, $current_year));
$months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];

?>
