From 28bbf1138f8c1194172c0eb16f41cb87fbc146ab Mon Sep 17 00:00:00 2001 From: "@jehovahsays" Date: Sat, 29 Jun 2024 14:59:20 -0400 Subject: [PATCH] corrected the trajectory of the content --- action.php | 84 +- css/edit.css | 52 ++ en/about.html | 27 +- en/books.html | 13 + en/cookies.html | 1 - browser.html => en/database.html | 339 +++++--- en/home.html | 1 - en/intelligence-absorption.html | 12 + en/light.html | 12 + en/magnetic-polarity.html | 12 + en/planetary-alignment.html | 12 + en/privacy.html | 1 - en/radio.html | 27 + ...ion_during_magnetic_field_disturbance.html | 12 + en/site_map.html | 1 - en/symbiosis.html | 12 + en/terms.html | 1 - en/tv.html | 28 + files/main.css | 4 +- index.htm | 103 +++ index.html | 768 ++++++++++++++---- index.php | 2 +- js/TagCloud.js | 4 +- js/chatbot.js | 24 +- js/edit.js | 29 + js/merge.js | 10 - js/search.js | 25 - js/search.json | 15 +- js/tagcloud.js | 14 + phpwin.json | 2 +- sitemap.php | 92 +++ 31 files changed, 1377 insertions(+), 362 deletions(-) create mode 100644 css/edit.css create mode 100644 en/books.html delete mode 100644 en/cookies.html rename browser.html => en/database.html (68%) delete mode 100644 en/home.html create mode 100644 en/intelligence-absorption.html create mode 100644 en/light.html create mode 100644 en/magnetic-polarity.html create mode 100644 en/planetary-alignment.html delete mode 100644 en/privacy.html create mode 100644 en/radio.html create mode 100644 en/reaction_based_on_interaction_during_magnetic_field_disturbance.html delete mode 100644 en/site_map.html create mode 100644 en/symbiosis.html delete mode 100644 en/terms.html create mode 100644 en/tv.html create mode 100644 index.htm create mode 100644 js/edit.js delete mode 100644 js/merge.js delete mode 100644 js/search.js create mode 100644 js/tagcloud.js create mode 100644 sitemap.php diff --git a/action.php b/action.php index 2764a1c..ad526a1 100644 --- a/action.php +++ b/action.php @@ -10,9 +10,9 @@ header( 'viewport: width=device-width, initial-scale=1.0' ); header( 'Accept-Language: en-US,en;q=0.5' ); header( 'Connection: Keep-alive' ); -header( 'Host: index' ); -header( 'description: index' ); -header( 'keywords: index' ); +header( 'Host: database' ); +header( 'description: database' ); +header( 'keywords: database' ); header( 'Vary: Accept-Encoding' ); header( 'Expires: 0' ); header( 'Referrer-Policy: same-origin' ); @@ -29,7 +29,8 @@ if (file_exists($file_pointer)) { echo "The file $file_pointer already exists
"; - echo "$value"; + //echo "$value"; + echo ""; exit(); } } @@ -39,42 +40,55 @@ $value = str_replace(' ', '_', $value); $handle = fopen("./en/" . $value . ".html", "a"); fwrite($handle, - "" - . "" - . "" - . "" - . "" - . $value - . "" - . "" - . "" - . "

" - . "

" - . $value - . "

" - . "" - . ""); + "\n\n" + ."\n" + ."\n$value\n\n" + ."\n" + ."
\n$value\n
\n\n"); } foreach($_POST as $variable => $value) { $value = str_replace(' ', '_', $value); - $handle = fopen("./index.html", "a"); + $handle = fopen("./en/database.html", "a"); fwrite($handle, "" + . "" + . "" + . "\r\n"); +} + +foreach($_POST as $variable => $value) +{ + $value = str_replace(' ', '_', $value); + $handle = fopen("./index.htm", "a"); + fwrite($handle, + "" . "

about

\ No newline at end of file + + + + + + +about + + + + +
+about +reaction_based_on_interaction_during_magnetic_field_disturbance +
+ + \ No newline at end of file diff --git a/en/books.html b/en/books.html new file mode 100644 index 0000000..65c2958 --- /dev/null +++ b/en/books.html @@ -0,0 +1,13 @@ + + + + +books + + + +

books

+ + \ No newline at end of file diff --git a/en/cookies.html b/en/cookies.html deleted file mode 100644 index 2119613..0000000 --- a/en/cookies.html +++ /dev/null @@ -1 +0,0 @@ -cookies

cookies

\ No newline at end of file diff --git a/browser.html b/en/database.html similarity index 68% rename from browser.html rename to en/database.html index 6b69373..33863b5 100644 --- a/browser.html +++ b/en/database.html @@ -1,48 +1,59 @@ - - - index - - - - + + + + + + + + + + + + - - - -
- - - + let input = document.getElementById('filterInput').value; + + input = input.toLowerCase(); + + let x = document.getElementsByClassName('titleInput'); + + for (i = 0; i < x.length; i++) { + + if (!x[i].innerHTML.toLowerCase().includes(input)) { + + x[i].style.display = "none"; + + } + + else { + + x[i].style.display = "list-item"; + + } + + } + +} + + +
+ + + +
+ +



+



+


+
+
+
+
+

+

+
+ +
+ +
+ +
+ +
+
+ +
+
+
+ + - - - - - + + + + + + +
    + + + + + + + + + + + + + diff --git a/en/home.html b/en/home.html deleted file mode 100644 index 9d49dd0..0000000 --- a/en/home.html +++ /dev/null @@ -1 +0,0 @@ -home

    home

    \ No newline at end of file diff --git a/en/intelligence-absorption.html b/en/intelligence-absorption.html new file mode 100644 index 0000000..748a6d9 --- /dev/null +++ b/en/intelligence-absorption.html @@ -0,0 +1,12 @@ + + + + +intelligence-absorption + + +
    +intelligence-absorption +
    + + \ No newline at end of file diff --git a/en/light.html b/en/light.html new file mode 100644 index 0000000..4aa25e3 --- /dev/null +++ b/en/light.html @@ -0,0 +1,12 @@ + + + + +light + + +
    +light +
    + + \ No newline at end of file diff --git a/en/magnetic-polarity.html b/en/magnetic-polarity.html new file mode 100644 index 0000000..ad315ac --- /dev/null +++ b/en/magnetic-polarity.html @@ -0,0 +1,12 @@ + + + + +magnetic-polarity + + +
    +magnetic-polarity +
    + + \ No newline at end of file diff --git a/en/planetary-alignment.html b/en/planetary-alignment.html new file mode 100644 index 0000000..7acda5a --- /dev/null +++ b/en/planetary-alignment.html @@ -0,0 +1,12 @@ + + + + +planetary-alignment + + +
    +planetary-alignment +
    + + \ No newline at end of file diff --git a/en/privacy.html b/en/privacy.html deleted file mode 100644 index 009f3a2..0000000 --- a/en/privacy.html +++ /dev/null @@ -1 +0,0 @@ -privacy

    privacy

    \ No newline at end of file diff --git a/en/radio.html b/en/radio.html new file mode 100644 index 0000000..601765c --- /dev/null +++ b/en/radio.html @@ -0,0 +1,27 @@ + + + + + +radio + + + + + + + \ No newline at end of file diff --git a/en/reaction_based_on_interaction_during_magnetic_field_disturbance.html b/en/reaction_based_on_interaction_during_magnetic_field_disturbance.html new file mode 100644 index 0000000..1c003e6 --- /dev/null +++ b/en/reaction_based_on_interaction_during_magnetic_field_disturbance.html @@ -0,0 +1,12 @@ + + + + +reaction_based_on_interaction_during_magnetic_field_disturbance + + +
    +reaction_based_on_interaction_during_magnetic_field_disturbance +
    + + \ No newline at end of file diff --git a/en/site_map.html b/en/site_map.html deleted file mode 100644 index f334e74..0000000 --- a/en/site_map.html +++ /dev/null @@ -1 +0,0 @@ -site_map

    site_map

    \ No newline at end of file diff --git a/en/symbiosis.html b/en/symbiosis.html new file mode 100644 index 0000000..66ec24f --- /dev/null +++ b/en/symbiosis.html @@ -0,0 +1,12 @@ + + + + +symbiosis + + +
    +symbiosis +
    + + \ No newline at end of file diff --git a/en/terms.html b/en/terms.html deleted file mode 100644 index 9d947f3..0000000 --- a/en/terms.html +++ /dev/null @@ -1 +0,0 @@ -terms

    terms

    \ No newline at end of file diff --git a/en/tv.html b/en/tv.html new file mode 100644 index 0000000..566c0ba --- /dev/null +++ b/en/tv.html @@ -0,0 +1,28 @@ + + + + + +tv + + + + + + + \ No newline at end of file diff --git a/files/main.css b/files/main.css index 8ea1ec8..beeb99c 100644 --- a/files/main.css +++ b/files/main.css @@ -162,7 +162,7 @@ h1 a { display: none; } - #panel.searchFocused #nodes { + #panel.searchFocused #filterInput { -webkit-mask-image: none; mask-image: none; background-color: inherit; @@ -238,7 +238,7 @@ h1 a { content: ""; } - #panel #nodes { + #panel #filterInput { flex: 1; width: 100%; font-size: 1rem; diff --git a/index.htm b/index.htm new file mode 100644 index 0000000..1f7cb9d --- /dev/null +++ b/index.htm @@ -0,0 +1,103 @@ + + + + + + +index + + + + + +
    + + +
      + + + + + + + + + + diff --git a/index.html b/index.html index bb4c59a..4e9b429 100644 --- a/index.html +++ b/index.html @@ -1,47 +1,53 @@ - - - - - - - - - - - - + + + index + + + + + + + +
      - -search - - - - - - - - -
      - + +
      +
      + +
      + +
      +
      + +
      + +
      +
      +
      +
      + +
      + +
+ + + + + + + -
- - -
- -



-



-


-
-
-
-
-

-

-
- -
- - - - -
- -
-
-
- - - -
    - - - - - - + + \ No newline at end of file diff --git a/index.php b/index.php index fd53fac..8e6b6e8 100644 --- a/index.php +++ b/index.php @@ -18,6 +18,6 @@ header( 'Referrer-Policy: same-origin' ); header( 'Accept-Language: en-US,en;q=0.5' ); header( 'Connection: Keep-alive' ); -header( 'Location: ./index.html' ); +header( 'Location: ./en/database.html' ); exit(); ?> \ No newline at end of file diff --git a/js/TagCloud.js b/js/TagCloud.js index babedac..d48cace 100644 --- a/js/TagCloud.js +++ b/js/TagCloud.js @@ -433,8 +433,8 @@ reverseDirection: false, useContainerInlineStyles: true, useItemInlineStyles: true, - containerClass: 'nodes', - itemClass: 'edges', + containerClass: 'filterInput', + itemClass: 'titleInput', useHTML: false }; // speed value diff --git a/js/chatbot.js b/js/chatbot.js index 69f1256..77353fe 100644 --- a/js/chatbot.js +++ b/js/chatbot.js @@ -2,8 +2,8 @@ const chatbot = document.getElementById('chatbot'); const conversation = document.getElementById('conversation'); const inputForm = document.getElementById('input-form'); -const nodes = document.getElementById('nodes'); - +const filterInput = document.getElementById('filterInput'); +const response = document.getElementsByClassName('edges'); // Add event listener to input form inputForm.addEventListener('submit', function(event) { @@ -11,10 +11,10 @@ inputForm.addEventListener('submit', function(event) { event.preventDefault(); // Get user input - const input = nodes.value; + const input = filterInput.value; // Clear input field - nodes.value = ''; + filterInput.value = ''; const currentTime = new Date().toLocaleTimeString([], { hour: '2-digit', minute: "2-digit" }); // Add user input to conversation @@ -42,10 +42,16 @@ function generateResponse(input) { // Do not delete the last line of this file because the logger will break and delete entire file. const responses = [ -"home", + +"database", "about", -"site_map", -"privacy", -"terms", -"cookies", +"books", +"light", +"radio", +"tv", +"symbiosis", +"magnetic-polarity", +"planetary-alignment", +"intelligence-absorption", +"reaction_based_on_interaction_during_magnetic_field_disturbance", ];return responses[Math.floor(Math.random() * responses.length)];}window.onblur = function (tabs) {alert('switch tabs alert');}; \ No newline at end of file diff --git a/js/edit.js b/js/edit.js new file mode 100644 index 0000000..6848a25 --- /dev/null +++ b/js/edit.js @@ -0,0 +1,29 @@ + + const myArticle = document.querySelector("article"); + const myLinks = document.querySelectorAll("ul a"); + for (const link of myLinks) { + link.onclick = (e) => { + e.preventDefault(); + const linkData = e.target.getAttribute("data-page"); + getData(linkData); + }; + } + + function getData(pageId) { + console.log(pageId); + const myRequest = new Request(`${pageId}.txt`); + + fetch(myRequest) + .then((response) => { + if (!response.ok) { + throw new Error(`HTTP error, status = ${response.status}`); + } + return response.text(); + }) + .then((text) => { + myArticle.innerText = text; + }) + .catch((error) => { + myArticle.innerText = `Error: ${error.message}`; + }); + } \ No newline at end of file diff --git a/js/merge.js b/js/merge.js deleted file mode 100644 index 41cc90d..0000000 --- a/js/merge.js +++ /dev/null @@ -1,10 +0,0 @@ -// Do not delete the last line of this file because the logger will break and delete entire file. -var texts = [ - -"home", -"about", -"site_map", -"privacy", -"terms", -"cookies", -];var tc = TagCloud('.content', texts);console.log(tc); \ No newline at end of file diff --git a/js/search.js b/js/search.js deleted file mode 100644 index 9b84898..0000000 --- a/js/search.js +++ /dev/null @@ -1,25 +0,0 @@ -function edges() { - - let input = document.getElementById('nodes').value; - - input = input.toLowerCase(); - - let x = document.getElementsByClassName('edges'); - - for (i = 0; i < x.length; i++) { - - if (!x[i].innerHTML.toLowerCase().includes(input)) { - - x[i].style.display = "none"; - - } - - else { - - x[i].style.display = "list-item"; - - } - - } - -} \ No newline at end of file diff --git a/js/search.json b/js/search.json index 19fd5e4..5e2901b 100644 --- a/js/search.json +++ b/js/search.json @@ -3,10 +3,15 @@ { "manual": { - "home":"en/home", + "database":"en/database", "about":"en/about" - ,"site_map":"en/site_map" -,"privacy":"en/privacy" -,"terms":"en/terms" -,"cookies":"en/cookies" +,"books":"en/books" +,"light":"en/light" +,"radio":"en/radio" +,"tv":"en/tv" +,"symbiosis":"en/symbiosis" +,"magnetic-polarity":"en/magnetic-polarity" +,"planetary-alignment":"en/planetary-alignment" +,"intelligence-absorption":"en/intelligence-absorption" +,"reaction_based_on_interaction_during_magnetic_field_disturbance":"en/reaction_based_on_interaction_during_magnetic_field_disturbance" }}} \ No newline at end of file diff --git a/js/tagcloud.js b/js/tagcloud.js new file mode 100644 index 0000000..566f01f --- /dev/null +++ b/js/tagcloud.js @@ -0,0 +1,14 @@ +var texts = [ + +"database", +"about", +"books", +"light", +"radio", +"tv", +"symbiosis", +"magnetic-polarity", +"planetary-alignment", +"intelligence-absorption", +"reaction_based_on_interaction_during_magnetic_field_disturbance", +];var tc = TagCloud('.content', texts);console.log(tc); \ No newline at end of file diff --git a/phpwin.json b/phpwin.json index a64ac60..6d08b10 100644 --- a/phpwin.json +++ b/phpwin.json @@ -1,3 +1,3 @@ { - "index": "index.html index.php" + "index": "/en/database.html index.php" } diff --git a/sitemap.php b/sitemap.php new file mode 100644 index 0000000..50cadf5 --- /dev/null +++ b/sitemap.php @@ -0,0 +1,92 @@ +
    recent changes
    '; +$f = fopen('./en/database.html', 'r'); +$cursor = -1; +fseek($f, $cursor, SEEK_END); +$char = fgetc($f); +//Trim trailing newline characters in the file +while ($char === " +" || $char === "\r") { + fseek($f, $cursor--, SEEK_END); + $char = fgetc($f); +} +//Read until the next line of the file begins or the first newline char +while ($char !== false && $char !== " +" && $char !== "\r") { + //Prepend the new character + $line = $char . $line; + fseek($f, $cursor--, SEEK_END); + $char = fgetc($f); +} +echo $line; +?> +\n"; + myScanDir($fileName, $level + 1, strlen($fileName)); + } else { + echo prePad($level) . "" . $displayName . "
    \n"; + } + } + } +} + +?> +sitemap

    "; + + $pathLen = strlen($root); + + myScanDir($root, 0, strlen($root)); + +?> + +