gethost.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. function gethost_Version(){
  2. return "1.0.0 - 20200910";
  3. }
  4. function getbasepath(){
  5. var host = window.location.hostname;
  6. if (((host == "127.0.0.1") || (host == "localhost") || (host == ""))
  7. && ((window.location.port == "80") || (window.location.port == "")))
  8. {
  9. // host = "http://192.168.2.219"; // jomjol interner test
  10. // host = "http://192.168.178.46"; // jomjol interner test
  11. host = "http://192.168.178.79"; // jomjol interner Real
  12. // host = "http://192.168.43.191";
  13. // host = "."; // jomjol interner localhost
  14. }
  15. else
  16. {
  17. host = "http://" + host;
  18. }
  19. if (window.location.port != "") {
  20. host = host + ":" + window.location.port;
  21. }
  22. return host;
  23. }
  24. function UpdatePage(_dosession = true){
  25. var zw = location.href;
  26. zw = zw.substr(0, zw.indexOf("?"));
  27. if (_dosession) {
  28. window.location = zw + '?session=' + Math.floor((Math.random() * 1000000) + 1);
  29. }
  30. else {
  31. window.location = zw;
  32. }
  33. }