home.php 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. <?php
  2. /**
  3. * Copyright 2021, 2024 5 Mode
  4. *
  5. * This file is part of Xslt-Master.
  6. *
  7. * Xslt-Master is free software: you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation, either version 3 of the License, or
  10. * (at your option) any later version.
  11. *
  12. * Xslt-Master is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with Xslt-Master. If not, see <https://www.gnu.org/licenses/>.
  19. *
  20. * fileName.php
  21. *
  22. * Xslt-Master description of the file.
  23. *
  24. * @author Daniele Bonini <my25mb@aol.com>
  25. * @copyrights (c) 2016, 2024 5 Mode
  26. */
  27. ?>
  28. <!DOCTYPE html>
  29. <html lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
  30. <head>
  31. <meta name="viewport" content="width=device-width, initial-scale=1"/>
  32. <!--<?PHP echo(APP_LICENSE);?>-->
  33. <title><?PHP echo(APP_TITLE);?></title>
  34. <link rel="shortcut icon" href="/favicon.ico" />
  35. <meta name="description" content="Welcome to Xslt-Master!"/>
  36. <meta name="keywords" content="Xslt-Master,xsl,generator,on,premise,solution"/>
  37. <meta name="robots" content="index,follow"/>
  38. <meta name="author" content="5 Mode"/>
  39. <script src="/js/jquery-3.6.0.min.js" type="text/javascript"></script>
  40. <script src="/js/common.js" type="text/javascript"></script>
  41. <script src="/js/home.js?r=<?PHP echo(time());?>" type="text/javascript"></script>
  42. <link href="/css/style.css?r=<?PHP echo(time());?>" type="text/css" rel="stylesheet">
  43. </head>
  44. <body>
  45. <div id="content">
  46. <br><br>
  47. Welcome!
  48. <br><br>
  49. This time we would like to load dynamically in data coming from multiple data source of type xml/xls.<br><br>
  50. We would like to create a good skeleton to automatize the update of portals and websites.
  51. <br><br><br><br>
  52. <div id="cont-singers">
  53. <span class="list-title">Singers:</span><br><br>
  54. <div id="singers">&nbsp;</div>
  55. </div>
  56. <div id="cont-songs">
  57. <span class="list-title">Songs:</span><br><br>
  58. <div id="songs">&nbsp;</div>
  59. </div>
  60. <br><br><br><br> <br><br><br><br> <br><br><br><br> <br><br><br><br> <br><br><br><br>
  61. <div style"clear:both;margin:auto;height:230px;">
  62. <br><br><br><br>
  63. We are the bad tech guys behind 5 Mode.
  64. <br><br><br><br>
  65. Feedback: <a href="mailto:posta@elettronica.lol">posta@elettronica.lol</a>
  66. </div>
  67. </div>
  68. <div id="resources">
  69. <br><br>
  70. <div id="cont-files">
  71. <span class="list-title">Files (in /Private/data):</span><br><br>
  72. <div id="files">
  73. <div><a href="/donwload/Linkin-Park-songs.xml">Linkin-Park-songs.xml</a></div>
  74. <div><a href="/donwload/Linkin-Park-songs.xsl">Linkin-Park-songs.xsl</a></div>
  75. <div><a href="/donwload/Tina-Turner-songs.xml">Tina-Turner-songs.xml</a></div>
  76. <div><a href="/donwload/Tina-Turner-songs.xml">Tina-Turner-songs.xsl</a></div>
  77. <div><a href="/donwload/singers.xml">singers.xml</a></div>
  78. <div><a href="/donwload/singers.xml">singers.xsl</a></div>
  79. </div>
  80. </div>
  81. <div id="cont-code">
  82. <span class="list-title">Code:</span><br><br>
  83. <div id="cont-precode">
  84. <pre id="code">
  85. function loadXML(divName, resName) {
  86. const xsltProcessor = new XSLTProcessor();
  87. // Load the xsl file
  88. //alert(resName);
  89. myXMLHTTPRequest = new XMLHttpRequest();
  90. myXMLHTTPRequest.open("GET", "/xsl?d="+resName, false);
  91. myXMLHTTPRequest.send(null);
  92. const xslRef = myXMLHTTPRequest.responseXML;
  93. xsltProcessor.importStylesheet(xslRef);
  94. // Load the XML file
  95. myXMLHTTPRequest = new XMLHttpRequest();
  96. myXMLHTTPRequest.open("GET", "/xml?d="+resName, false);
  97. myXMLHTTPRequest.send(null);
  98. xmlDoc = myXMLHTTPRequest.responseXML;
  99. const fragment = xsltProcessor.transformToFragment(xmlDoc, document);
  100. myDOM = fragment;
  101. $("#"+divName).html(fragment);
  102. }
  103. </pre>
  104. </div>
  105. </div>
  106. </div>
  107. <div id="footerCont">&nbsp;</div>
  108. <div id="footer">
  109. <span style="background:#FFFFFF; opacity:0.7;">&nbsp;&nbsp; <a href="dd.html" class="aaa">Disclaimers</a>. A <a href="http://5mode.com" class="aaa">5 Mode</a> project and <a href="http://demo.5mode.com" class="aaa">WYSIWYG</a> system. Some rights reserved.</span>
  110. </div>
  111. <script>
  112. window.addEventListener("load", function(){
  113. loadXML("singers", "singers");
  114. });
  115. </script>
  116. </body>
  117. </html>