gethost.js 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. {
  10. // host = "http://192.168.2.219"; // jomjol interner test
  11. // host = "http://192.168.178.46"; // jomjol interner test
  12. host = "http://192.168.178.62"; // jomjol interner Real
  13. // host = "http://192.168.43.191";
  14. // host = "."; // jomjol interner localhost
  15. }
  16. else
  17. {
  18. host = "http://" + host;
  19. if (window.location.port != "") {
  20. host = host + ":" + window.location.port;
  21. }
  22. }
  23. return host;
  24. }
  25. function UpdatePage(_dosession = true){
  26. var zw = location.href;
  27. zw = zw.substr(0, zw.indexOf("?"));
  28. if (_dosession) {
  29. window.location = zw + '?session=' + Math.floor((Math.random() * 1000000) + 1);
  30. }
  31. else {
  32. window.location = zw;
  33. }
  34. }