Add SPOTA core PHP application
Add the main admin, dosen, mahasiswa, API, and service code needed to run the core legacy application with configurable upload storage.
This commit is contained in:
47
inc/konfigurasi.php
Normal file
47
inc/konfigurasi.php
Normal file
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Description of konfigurasi
|
||||
*
|
||||
* @author Ridwan
|
||||
*/
|
||||
|
||||
date_default_timezone_set('Asia/Jakarta');
|
||||
$now=date("Y-m-d H:i:s");
|
||||
$curdate=date("Y-m-d");
|
||||
$curtime=date("H:i:s");
|
||||
|
||||
$dbsetting['MySQLHost'] = getenv('DB_HOST') ?: "localhost";
|
||||
$dbsetting['MySQLUser'] = getenv('DB_USER') ?: "spota_informatika";
|
||||
$dbsetting['MySQLPasswd'] = getenv('DB_PASSWORD') ?: "Eud!}ZML3HVO";
|
||||
$dbsetting['MySQLDb'] = getenv('DB_NAME') ?: "spota_spotadb";
|
||||
|
||||
$dbsetting['ERR_report']=TRUE;
|
||||
|
||||
$appUrl = rtrim(getenv('APP_URL') ?: "//spota.untan.ac.id", '/');
|
||||
|
||||
DEFINE('DOMAIN_UTAMA', $appUrl);
|
||||
DEFINE('ADMIN_PAGE', $appUrl."/admin/");
|
||||
DEFINE('MHS_PAGE', $appUrl."/mahasiswa/");
|
||||
DEFINE('DOSEN_PAGE', $appUrl."/dosen/");
|
||||
|
||||
$dir_utama="/";
|
||||
$documentRoot = rtrim($_SERVER['DOCUMENT_ROOT'], '/\\');
|
||||
$defaultFilesPath = $documentRoot.$dir_utama.'files';
|
||||
$filesStoragePath = rtrim(getenv('FILES_STORAGE_PATH') ?: $defaultFilesPath, '/\\').DIRECTORY_SEPARATOR;
|
||||
DEFINE("LAMPIRAN_FILE", $filesStoragePath);
|
||||
DEFINE("DIR_GAMBAR",$_SERVER['DOCUMENT_ROOT'].$dir_utama."img/");
|
||||
DEFINE('LINK_GAMBAR',DOMAIN_UTAMA."/img/");
|
||||
DEFINE('NOW',$now);
|
||||
DEFINE('CURTIME',$curtime);
|
||||
DEFINE('CURDATE',$curdate);
|
||||
|
||||
if (!defined('GOOGLE_API_KEY')) {
|
||||
define("GOOGLE_API_KEY", "AIzaSyArEBTIbIKPHN214bC59UIkhxPyZI3b3E8");
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user