index.html 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  1. <!DOCTYPE html>
  2. <html lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta charset="UTF-8"/>
  5. <meta name="style" content="day1"/>
  6. <meta name="viewport" content="width=device-width, initial-scale=1"/>
  7. <!--
  8. Copyright 2021, 2024 5 Mode
  9. This file is part of SnipSwap.
  10. SnipSwap is free software: you can redistribute it and/or modify
  11. it under the terms of the GNU General Public License as published by
  12. the Free Software Foundation, either version 3 of the License, or
  13. (at your option) any later version.
  14. SnipSwap is distributed in the hope that it will be useful,
  15. but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. GNU General Public License for more details.
  18. You should have received a copy of the GNU General Public License
  19. along with SnipSwap. If not, see <https://www.gnu.org/licenses/>.
  20. -->
  21. <title>SwapSnippet: Swapping code like burgers..</title>
  22. <link rel="shortcut icon" href="Public/favicon.ico" />
  23. <meta name="description" content="Welcome to SnipSwap"/>
  24. <meta name="author" content="5 Mode"/>
  25. <meta name="keywords" content="SnipSwap,snippet,code,swap.swapping,on,premise,solution"/>
  26. <script src="Public/js/jquery-3.6.0.min.js" type="text/javascript"></script>
  27. <script src="Public/js/common.js" type="text/javascript"></script>
  28. <script src="Public/js/bootstrap.min.js" type="text/javascript"></script>
  29. <script src="Public/js/sha.js" type="text/javascript"></script>
  30. <link href="Public/css/bootstrap.min.css" type="text/css" rel="stylesheet">
  31. <link href="Public/css/style.css?v=163182756699" type="text/css" rel="stylesheet">
  32. <script>
  33. function showEncodedPassword() {
  34. if ($("#Password").val() === "") {
  35. $("#Password").addClass("emptyfield");
  36. return;
  37. }
  38. passw = encryptSha2( $("#Password").val() );
  39. msg = "Please set your new pasword in the config file with this value:";
  40. alert(msg + "\n\n" + passw);
  41. }
  42. function setOriginsPos() {
  43. h=parseInt(window.innerHeight);
  44. w=parseInt(window.innerWidth);
  45. mytop = parseInt(window.innerHeight - ($("#originsDisplay").height() + 60));
  46. $("#originsDisplay").css("top", mytop+"px");
  47. setTimeout("hideOrigins()",15000);
  48. }
  49. function hideOrigins() {
  50. $("#originsDisplay").css("visibility","hidden");
  51. }
  52. function hideTitle() {
  53. $("#myh1").hide("slow");
  54. }
  55. function startApp() {
  56. $("#HCsplash").css("display","none");
  57. //$("#HCsplash").hide("slow");
  58. $("#originsDisplay").show();
  59. $(document.body).css("background","#ffffff");
  60. $("#frmHC").show();
  61. }
  62. function _startApp() {
  63. setTimeout("startApp()", 1000);
  64. }
  65. window.addEventListener("load", function() {
  66. $("#frmHC").hide();
  67. setTimeout("setOriginsPos()", 500);
  68. //Splash
  69. $("#HCsplash").show();
  70. }, true);
  71. window.addEventListener("load", function() {
  72. // Fisnished the Intro load the app..
  73. //document.getElementById("vplayer").onended=_startApp;
  74. setTimeout("_startApp()", 6000);
  75. });
  76. </script>
  77. </head>
  78. <body style="background:#0d0d0d;">
  79. <div id="HCsplash" style="padding-top: 40px; text-align:center;color:#d4b0dc;font-family:'Bungee Hairline';">
  80. <div id="myh1" style="position:relative; top:80px;"><H1>Swap Snippet</H1></div><br><br><br><br>
  81. <img src="Public/res/code.png" style="width:310px;">
  82. </div>
  83. <form id="frmHC" method="POST" target="_self" enctype="multipart/form-data" style="display:none;">
  84. <div class="header" style="margin-top:18px; margin-left:18px; background: #FFFFFF;">
  85. <a href="http://swapcode.5mode-lab.com" target="_self" style="color:#000000; text-decoration: none;">&nbsp;<img src="Public/res/code.png" style="width:22px;">&nbsp;Swap Code</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="https://github.com/par7133/SwapCode" style="color:#000000;"><span style="color:#119fe2">on</span> github</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="mailto:info@swapsnippet.com" style="color:#000000;"><span style="color:#119fe2">for</span> feedback</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="tel:+39-331-4029415" style="font-size:13px;background-color:#15c60b;border:2px solid #15c60b;color:#000000;height:27px;text-decoration:none;">&nbsp;&nbsp;get support&nbsp;&nbsp;</a>
  86. </div>
  87. <br>
  88. <div style="clear:both; float:left; padding:8px; width:15%; height:780px; text-align:center; border-right: 1px solid lightgray;">
  89. <div style="padding-left:10px;text-align: left;">
  90. &nbsp;Download<br>
  91. &nbsp;<a href="https://github.com/par7133/SwapCode/archive/refs/tags/v2.1.8.zip">Release 2.1.8 (zip)</a><br>
  92. &nbsp;<a href="https://github.com/par7133/SwapCode/archive/refs/tags/v2.1.8.tar.gz">Release 2.1.8 (tar.gz)</a><br>
  93. </div>
  94. <br><br>
  95. <img src="Public/res/SSgenius.png" alt="SS Genius" title="SS Genius" style="position:relative; left:+2px; width:90%; border: 1px dashed #EEEEEE;">
  96. <br><br>
  97. <div style="font-weight:900;color:blue;white-space:nowrap;">
  98. <a href="http://5md.at/l/dona1" target="_blank">Donate to 5 Mode</a><br><br>
  99. <a href="https://m.do.co/c/c85e9d7bd946" target="_blank">And go with the shark!</a><br>
  100. </div>
  101. <!--<a href="https://m.do.co/c/c85e9d7bd946" target="_blank"><img src="Public/res/digitalocean_logo.png" title="Digital Ocean" alt="digital ocean" style="position:relative; left:+6px; width:90%; border: 1px solid darkgray;"></a>-->
  102. &nbsp;<br><br><br>
  103. &nbsp;<input type="text" id="Password" name="Password" placeholder="password" style="font-size:10px; background:#393939; color:#ffffff; width: 90%; border-radius:3px;" value="" autocomplete="off"><br>
  104. &nbsp;<a href="#" onclick="showEncodedPassword();" style="position:relative; left:-2px; top:+5px; color:#000000; font-size:12px;">Hash Me!</a>
  105. <br><br><br>
  106. </div>
  107. <div style="float:left; width:85%;height:100%; padding:8px;padding-top:12px;">
  108. <div id="splash" style="border-radius:20px; position:relative; left:+3px; width:99%; background-color: #f0f8fb; padding: 20px; margin:auto; margin-bottom:8px;">
  109. <button type="button" class="close" aria-label="Close" onclick="close-Splash();" style="position:relative; left:-10px;">
  110. <span aria-hidden="true">&times;</span>
  111. </button>
  112. Hello and welcome to Swap Code!<br><br>
  113. Swap Code is a light, simple, "peer-to-peer" software on premise for swapping your snippets of code with others.<br><br>
  114. Swap Code is released under GPLv3 license, it is supplied AS-IS and we do not take any responsibility for its misusage.<br><br>
  115. First step, use the left side panel password field to create the hashed password to insert in the config file.<br><br>
  116. As you are going to run Swap Code in the PHP process context, using a limited web server or phpfpm user, you must follow some simple directives for an optimal first setup:<br>
  117. <ol>
  118. <li>Check the write permissions of your "data" (repo) folder in your web app private path; and set its path in the config file.</li>
  119. <li>Set the default Business Label, Link and Email of the stuff your are going to swap.</li>
  120. <li>Set the MAX_DFT_NEW_SNIP value stating the max number of snippet the app is going to initially create.</li>
  121. <li>In Public/js/cube-code.js, in mystart class method, check if you are using 'http' or 'https'.</li>
  122. </ol>
  123. <br>
  124. Hope you can enjoy it and let us know about any feedback: <a href="mailto:my25mb@aol.com">my25mb@aol.com</a><br>
  125. <br>
  126. <b>Please note that version 2.0.5 &gt; is not compatible with previous versions.</b>
  127. <br><br><br><br><br><br><br>
  128. </div>
  129. <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
  130. <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
  131. <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
  132. <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
  133. <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
  134. <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
  135. </div>
  136. </form>
  137. <div id="originsDisplay">
  138. <br>
  139. &nbsp;<span class="originLabel">Coding:</span>&nbsp;Italy<br>
  140. &nbsp;<span class="originLabel">Server:</span>&nbsp;United States&nbsp;<br>
  141. &nbsp;<span class="originLabel"><a href="http://metrica.yandex.com" class="bbb">Metrics</a>:</span>&nbsp;Russia&nbsp;<br>
  142. <br>
  143. </div>
  144. <div class="footer">
  145. <div id="footerCont">&nbsp;</div>
  146. <div id="footer"><span style="background:#E1E1E1;color:black;opacity:1.0;margin-right:10px;">&nbsp;&nbsp;<a href="dd.html">Disclaimer</a>&nbsp;&nbsp;A <a href="http://5mode.com">5 Mode</a> project and <a href="http://demo.5mode.com">WYSIWYG</a> system. Some rights reserved.</span></div>
  147. </div>
  148. <script>
  149. function setFooterPos2() {
  150. if (document.getElementById("footerCont")) {
  151. //if ($("#Password").val() === "") {
  152. // tollerance = 48;
  153. // } else {
  154. // tollerance = 15;
  155. //}
  156. tollerance = 22;
  157. $("#footerCont").css("top", parseInt( window.innerHeight - $("#footerCont").height() - tollerance ) + "px");
  158. $("#footer").css("top", parseInt( window.innerHeight - $("#footer").height() - tollerance + 6) + "px");
  159. }
  160. }
  161. setFooterPos2();
  162. //window.addEventListener("load", function() {
  163. //
  164. // setTimeout("setFooterPos2()", 4000);
  165. //
  166. //}, true);
  167. </script>
  168. <!-- Yandex.Metrika counter -->
  169. <script type="text/javascript" >
  170. (function(m,e,t,r,i,k,a){m[i]=m[i]||function(){(m[i].a=m[i].a||[]).push(arguments)};
  171. m[i].l=1*new Date();k=e.createElement(t),a=e.getElementsByTagName(t)[0],k.async=1,k.src=r,a.parentNode.insertBefore(k,a)})
  172. (window, document, "script", "https://mc.yandex.ru/metrika/tag.js", "ym");
  173. ym(88233240, "init", {
  174. clickmap:true,
  175. trackLinks:true,
  176. accurateTrackBounce:true
  177. });
  178. </script>
  179. <noscript><div><img src="https://mc.yandex.ru/watch/88233240" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
  180. <!-- /Yandex.Metrika counter -->
  181. </body>
  182. </html>