gethost.js 906 B

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