/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

  1. <?
  2. /**[N]**
  3. * JIBAS Education Community
  4. * Jaringan Informasi Bersama Antar Sekolah
  5. *
  6. * @version: 18.0 (August 01, 2019)
  7. * @notes: JIBAS Education Community will be managed by Yayasan Indonesia Membaca (http://www.indonesiamembaca.net)
  8. *
  9. * Copyright (C) 2009 Yayasan Indonesia Membaca (http://www.indonesiamembaca.net)
  10. *
  11. * This program is free software: you can redistribute it and/or modify
  12. * it under the terms of the GNU General Public License as published by
  13. * the Free Software Foundation, either version 3 of the License, or
  14. * (at your option) any later version.
  15. *
  16. * This program is distributed in the hope that it will be useful,
  17. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  19. * GNU General Public License for more details.
  20. *
  21. * You should have received a copy of the GNU General Public License
  22. **[N]**/ ?>
  23. <?
  24. // ------------------------------------------------------------
  25. // PATCH MANAGEMENT FRAMEWORK
  26. // ------------------------------------------------------------
  27. if (file_exists('../include/global.patch.manager.php'))
  28. {
  29. require_once('../include/global.patch.manager.php');
  30. ApplyGlobalPatch("..");
  31. }
  32. elseif (file_exists('../../include/global.patch.manager.php'))
  33. {
  34. require_once('../../include/global.patch.manager.php');
  35. ApplyGlobalPatch("../..");
  36. }
  37. elseif (file_exists('../../../include/global.patch.manager.php'))
  38. {
  39. require_once('../../../include/global.patch.manager.php');
  40. ApplyGlobalPatch("../../..");
  41. }
  42. require_once('module.patch.manager.php');
  43. ApplyModulePatch();
  44. // ------------------------------------------------------------
  45. // MAIN CONFIGURATION
  46. // ------------------------------------------------------------
  47. if (file_exists('../include/mainconfig.php'))
  48. {
  49. require_once('../include/mainconfig.php');
  50. }
  51. elseif (file_exists('../../include/mainconfig.php'))
  52. {
  53. require_once('../../include/mainconfig.php');
  54. }
  55. elseif (file_exists('../../../include/mainconfig.php'))
  56. {
  57. require_once('../../../include/mainconfig.php');
  58. }
  59. // ------------------------------------------------------------
  60. // DEFAULT CONSTANTS
  61. // ------------------------------------------------------------
  62. // Override global variable db_name
  63. $db_name = "jbsfina";
  64. // Full URL to academik module
  65. $full_url = "http://$G_SERVER_ADDR/keuangan/";
  66. $G_ENABLE_QUERY_ERROR_LOG = false;
  67. // ------------------------------------------------------------
  68. // FORMAT SPECIAL CHARACTERS WITHIN ALL REQUEST
  69. // ------------------------------------------------------------
  70. function FmtReq_FormatValue($value)
  71. {
  72. $value = str_replace("'", "`", $value); //&#39;
  73. $value = str_replace('"', "`", $value); //&#34;
  74. //$value = str_replace("<", "&lt;", $value);
  75. //$value = str_replace(">", "&gt;", $value);
  76. $value = addslashes($value);
  77. return $value;
  78. }
  79. function FmtReq_TraverseRequestArray(&$arr)
  80. {
  81. foreach($arr as $key => $value)
  82. {
  83. if (is_array($arr[$key]))
  84. FmtReq_TraverseRequestArray($arr[$key]);
  85. else
  86. $arr[$key] = FmtReq_FormatValue($value);
  87. }
  88. }
  89. foreach($_REQUEST as $key => $value)
  90. {
  91. if (is_array($_REQUEST[$key]))
  92. FmtReq_TraverseRequestArray($_REQUEST[$key]);
  93. else
  94. $_REQUEST[$key] = FmtReq_FormatValue($value);
  95. }
  96. ?>