index.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php
  2. require_once "../path.php";
  3. ?>
  4. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
  5. <html>
  6. <head>
  7. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
  8. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  9. <title>PCD Sync</title>
  10. <script src="../public/js/jquery.js"></script>
  11. <script src="../public/js/comm.js"></script>
  12. <script src="sync.js"></script>
  13. </head>
  14. <body class="sync_body" onload="sync_index_init()">
  15. <div class="fun_block">
  16. <h2>Sync</h2>
  17. <div id="wiki_search" style="width:100%;">
  18. <div>
  19. <h3>Server Address</h3>
  20. <input id="sync_server_address" type="input" placeholder="server address" value="https://www.wikipali.org/demo" style="width:30em;" />
  21. <h3>Local Address</h3>
  22. <input id="sync_local_address" type="input" placeholder="local address" value="" style="width:30em;" />
  23. <button onclick="sync_start()">Start</button>
  24. </div>
  25. </div>
  26. <div id="sync_result">
  27. </div>
  28. </div>
  29. <script>
  30. let localhost;
  31. let base = "/app/sync/";
  32. let path="";
  33. if(location.pathname.indexOf(base)>=0){
  34. path = location.pathname.slice(0,location.pathname.indexOf(base));
  35. }
  36. localhost=location.protocol +"//"+ location.hostname + location.port + path;
  37. $("#sync_local_address").val(localhost);
  38. </script>
  39. </body>
  40. </html>