/jibas/keuangan/include/config.php
https://github.com/wildanm/Jibas · PHP · 109 lines · 65 code · 10 blank · 34 comment · 2 complexity · be0c0960986c72ccd05472d1788b8af5 MD5 · raw file
- <?
- /**[N]**
- * JIBAS Education Community
- * Jaringan Informasi Bersama Antar Sekolah
- *
- * @version: 18.0 (August 01, 2019)
- * @notes: JIBAS Education Community will be managed by Yayasan Indonesia Membaca (http://www.indonesiamembaca.net)
- *
- * Copyright (C) 2009 Yayasan Indonesia Membaca (http://www.indonesiamembaca.net)
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- **[N]**/ ?>
- <?
-
- // ------------------------------------------------------------
- // PATCH MANAGEMENT FRAMEWORK
- // ------------------------------------------------------------
-
- if (file_exists('../include/global.patch.manager.php'))
- {
- require_once('../include/global.patch.manager.php');
- ApplyGlobalPatch("..");
- }
- elseif (file_exists('../../include/global.patch.manager.php'))
- {
- require_once('../../include/global.patch.manager.php');
- ApplyGlobalPatch("../..");
- }
- elseif (file_exists('../../../include/global.patch.manager.php'))
- {
- require_once('../../../include/global.patch.manager.php');
- ApplyGlobalPatch("../../..");
- }
-
- require_once('module.patch.manager.php');
- ApplyModulePatch();
-
- // ------------------------------------------------------------
- // MAIN CONFIGURATION
- // ------------------------------------------------------------
-
- if (file_exists('../include/mainconfig.php'))
- {
- require_once('../include/mainconfig.php');
- }
- elseif (file_exists('../../include/mainconfig.php'))
- {
- require_once('../../include/mainconfig.php');
- }
- elseif (file_exists('../../../include/mainconfig.php'))
- {
- require_once('../../../include/mainconfig.php');
- }
-
- // ------------------------------------------------------------
- // DEFAULT CONSTANTS
- // ------------------------------------------------------------
-
- // Override global variable db_name
- $db_name = "jbsfina";
-
- // Full URL to academik module
- $full_url = "http://$G_SERVER_ADDR/keuangan/";
-
- $G_ENABLE_QUERY_ERROR_LOG = false;
-
- // ------------------------------------------------------------
- // FORMAT SPECIAL CHARACTERS WITHIN ALL REQUEST
- // ------------------------------------------------------------
- function FmtReq_FormatValue($value)
- {
- $value = str_replace("'", "`", $value); //'
- $value = str_replace('"', "`", $value); //"
- //$value = str_replace("<", "<", $value);
- //$value = str_replace(">", ">", $value);
- $value = addslashes($value);
-
- return $value;
- }
-
- function FmtReq_TraverseRequestArray(&$arr)
- {
- foreach($arr as $key => $value)
- {
- if (is_array($arr[$key]))
- FmtReq_TraverseRequestArray($arr[$key]);
- else
- $arr[$key] = FmtReq_FormatValue($value);
- }
- }
-
- foreach($_REQUEST as $key => $value)
- {
- if (is_array($_REQUEST[$key]))
- FmtReq_TraverseRequestArray($_REQUEST[$key]);
- else
- $_REQUEST[$key] = FmtReq_FormatValue($value);
- }
- ?>