<?php
error_reporting(0);
date_default_timezone_set('Asia/Jakarta');
$server = "localhost";
$username = "smkr3874_usersimpodik";
$password = "scriptsimpo123";
$database = "smkr3874_simpodik";
$conn = mysqli_connect($server,$username,$password,$database);

 
function average($arr){
	if (!is_array($arr)) return false;
	return array_sum($arr)/count($arr);
}

function cek_session_admin(){
	$level = $_SESSION[level];
	if ($level != 'admin' AND $cekakses <= '0'){
		echo "<script>document.location='index.php';</script>";
	}
}
