superedit-SEF.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. //by Arkadiusz Binder @ 2010-11-10
  3. //function to join needed functions looks them from the expected name and execute it
  4. // it should be called ex.: SEF(AUTHORIZE_USER_BY_AUTH_MODULE('ARG1','ARG2'));
  5. if(!function_exists("SEF")) {
  6. function SEF($ARG1) {
  7. global $localpath;
  8. if (!function_exists('DEBUG_S')) include_once('superedit-DEBUG_S.php');
  9. //DEBUG_S(6,'SEF szuka',$ARG1);
  10. if (function_exists($ARG1)) return;
  11. if (isset($_SESSION['INIT_TABLE_FILE'][$ARG1])) {
  12. eval($_SESSION['INIT_TABLE_FILE'][$ARG1]);
  13. return;
  14. }
  15. if (defined('APP_PATH_ROOT')) {
  16. if (file_exists(APP_PATH_ROOT . "/superedit-{$ARG1}.php")) {
  17. require(APP_PATH_ROOT . "/superedit-{$ARG1}.php");
  18. return;
  19. }
  20. }
  21. if (file_exists("superedit-{$ARG1}.php")) {
  22. require("superedit-{$ARG1}.php");
  23. }
  24. else if (isset($_SESSION['INIT_TABLE_FILE'][$ARG1])) {
  25. eval($_SESSION['INIT_TABLE_FILE'][$ARG1]);
  26. }
  27. else if (file_exists($localpath."billing-".$ARG1.".php")) {
  28. include("{$localpath}billing-{$ARG1}.php");
  29. }
  30. else if (file_exists("{$localpath}{$ARG1}.php")) {
  31. include("{$localpath}{$ARG1}.php");
  32. }
  33. }
  34. }