index-old-latin2.php 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <?php
  2. //session_save_path("./tmp") ;
  3. session_start();
  4. date_default_timezone_set('Europe/Warsaw');// PHP 5 >= 5.1.0 required by date functions
  5. error_reporting(0);
  6. ini_set('error_reporting', 0);
  7. ini_set('display_startup_errors','0');
  8. //display_startup_errors(0);
  9. if (!isset($_SESSION['DEBUG'])) $_SESSION['DEBUG'] = 0;// set default value
  10. if (file_exists(dirname(__FILE__)."/config/.config_".$_SERVER['SERVER_NAME'].".php")) {
  11. require(dirname(__FILE__)."/config/.config_".$_SERVER['SERVER_NAME'].".php");
  12. }
  13. if (file_exists(".config.php")) include(".config.php");
  14. //require("../.config.php");
  15. require("./superedit-SEF.php");
  16. #Bzyk @ 2009-02-11 - dodatkowe funkcje dla BIALL-NET
  17. if (file_exists("function2.php")) require("function2.php");
  18. //STD INCLUDE 2010-01-14
  19. require("superedit-logistyka.php");
  20. SEF("M_DIST_CLAIM_DATE");
  21. SEF("M_DIST_FILES");
  22. SEF("K_OD_KOGO");
  23. SEF("GORA");
  24. SEF("WIEVTABLE");
  25. if (file_exists("229dodaj_functions.php")) include("229dodaj_functions.php");
  26. foreach ($_GET as $k => $v) {
  27. if (is_array($v)) continue;
  28. $_GET[$k] = addslashes($v);
  29. }
  30. foreach ($_POST as $k => $v) {
  31. if (is_array($v)) continue;
  32. $_POST[$k] = addslashes($v);
  33. }
  34. // register globals
  35. $MENU_INIT = isset($_REQUEST['MENU_INIT'])? $_REQUEST['MENU_INIT'] : null;
  36. $ARG1 = isset($_REQUEST['ARG1'])? $_REQUEST['ARG1'] : null;
  37. $ARG1_VAL = isset($_REQUEST['ARG1_VAL'])? $_REQUEST['ARG1_VAL'] : null;
  38. if (!isset($_REQUEST['HEADER_NOT_INIT']) || $_REQUEST['HEADER_NOT_INIT'] != 'YES') GORA();
  39. if (!$_SESSION['AUTHORIZE_IP']) AUTHORIZE_IP($_SERVER['REMOTE_ADDR']);
  40. AUTHORIZE_USER();
  41. $_SESSION['USER_SESSION_LAST_ACTIVITY'] = time();// update procesy5.php logout time
  42. SEF("TREE");
  43. SEF("TREEJS");
  44. if ($_SESSION['DEBUG']) echo "FUNCTION_INIT()";
  45. DETECT_TABLE_COLUMN();// TODO: $thiss tworzone na podstawie 'CURRENT_MENU' ustawianej w MENU_INIT, teraz raczej zbedne wywolanie
  46. SEF('FUNCTION_INIT');
  47. FUNCTION_INIT();
  48. if ($_SESSION['DEBUG']) echo "MENU_INIT()";
  49. SEF('MENU');
  50. SEF('MENU_INIT');
  51. MENU_INIT();
  52. DOL();
  53. if ($_SESSION['DEBUG']){
  54. echo"<hr>_POST:\n<br><pre>";
  55. print_r($_POST);
  56. echo "<hr>_SESSION:\n<br>";
  57. print_r($_SESSION);
  58. echo"<hr>\n_GET:<br>\n";
  59. print_r($_GET);
  60. echo'</pre>';
  61. }