Skip to content

Commit

Permalink
real-time 3d database visualization of website
Browse files Browse the repository at this point in the history
  • Loading branch information
jehovahsays committed Jun 26, 2024
1 parent c05b6c9 commit d8502ca
Show file tree
Hide file tree
Showing 87 changed files with 622 additions and 1,577,554 deletions.
311 changes: 164 additions & 147 deletions action.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,156 +24,173 @@
echo "<div id='results'>$totalCorrect / 1 correct</div>";
foreach($_POST as $variable => $value)
{
$value = str_replace(' ', '_', $value);
$file_pointer = "./en/" . $value . ".html";
if (file_exists($file_pointer))
{
echo "The file $file_pointer already exists <br>";
echo "<meta name='viewport' content='width=device-width'><a href='./en/$value.html'>$value</a>";
exit();
}
$handle = fopen("./en/" . $value . ".html", "a");
fwrite($handle,
"\n"
. "<!DOCTYPE html>"
. "<html lang=\"en\">"
. "<head>"
. "<meta "
. "name=\"viewport\""
. "content=\"width=device-width\">"
. ""
. "<title>"
. $value
. "</title>"
. ""
. "<link "
. "rel=\"stylesheet\" "
. "href=\"./css/merge.css\" />"
. "</link>"
. ""
. "</head>"
. "<body>"
. "<center>"
. "<fieldset>"
. "<legend>"
. "<a"
. "href=\"./$value.html\">"
. $value
. "</a>"
. "</legend>"
. ""
. "<form "
. "class=\"form-group\""
. "action=\"../action.php\""
. "method=\"post\">"
. ""
. "<input "
. "type=\"text\""
. "class=\"form-control\""
. "id=\"secure-form-answer-Human\""
. "type=\"text\""
. "name=\"secure-form-answer\""
. "maxlength=\"40\""
. "autocomplete=\"true\""
. "autocorrect=\"off\""
. "autocapitalize=\"off\""
. "spellcheck=\"true\""
. "placeholder=\"what word defines this word\""
. "required>"
. "<noscript>"
. "<label"
. "for=\"secure-form-answer-Human\">"
. "Human"
. "</label>"
. "</noscript>"
. "</form>"
. "<br>"
. ""
. "<a "
. "href=\"../index.html\">"
. "return to homepage"
. "</a>"
. ""
. "<br><br>"
. "<a href=\"../delete.php?action=delete&filename=./en/$value.html\">"
. "delete this page"
. "</a>"
. ""
. "<br><br>"
. ""
. "<article>"
. "$value definitions go here"
. "</article>"
. ""
. "</fieldset>"
. "</center>"
. "</body>"
. "</html>"
. "\n"
. "\r\n");

$handle = fopen("./index.html", "a");
fwrite($handle,
"<a href="
. "\""
. "./en/"
. $value
. ".html"
. "\""
. "class="
. "\""
. "edges"
. "\""
. "><button class="
. "\""
. "earth"
. "\""
. ">"
. $value
. "</button>"
. "</a><br>"
. "\r\n");

$handle = fopen("./js/merge.js", "a");
// load the data and delete the line from the array
$lines = file('./js/merge.js');
$last = sizeof($lines) - 1 ;
unset($lines[$last]);
// write the new data to the file
file_put_contents('./js/merge.js', $lines);
$value = str_replace(' ', '_', $value);
fwrite($handle,
"\""
. $value
. "\""
. ","
. "\n"
. "];var tc = TagCloud('.content', texts);console.log(tc);");

$handle = fopen("./js/chatbot.js", "a");
// load the data and delete the line from the array
$lines = file('./js/chatbot.js');
$last = sizeof($lines) - 1 ;
unset($lines[$last]);
// write the new data to the file
file_put_contents('./js/chatbot.js', $lines);
foreach($_POST as $variable => $value) {
$value = str_replace(' ', '_', $value);
fwrite($handle,
"\""
. $value
. "\""
. ","
. "\n"
. "];return responses[Math.floor(Math.random() * responses.length)];}window.onblur = function (tabs) {alert('switch tabs alert');};");
$value = str_replace(' ', '_', $value);
$file_pointer = "./en/" . $value . ".html";
if (file_exists($file_pointer))
{
echo "The file $file_pointer already exists <br>";
echo "<meta name='viewport' content='width=device-width'><a href='./en/$value.html'>$value</a>";
exit();
}
}
ob_start();
echo "<meta name='viewport' content='width=device-width'>successfully created <a href='./en/$value.html'>$value</a>";
echo "<body onload='loadout()'><script>function loadout(){window.location.href = './en/$value.html'}</script>";


foreach($_POST as $variable => $value)
{
$value = str_replace(' ', '_', $value);
$handle = fopen("./en/" . $value . ".html", "a");
fwrite($handle,
"<!DOCTYPE html>"
. "<html>"
. "<head>"
. "<meta "
. "name=\"viewport\""
. "content=\"width=device-width\">"
. "<style>"
. "/* mobile */"
. "p {"
. "width:100%; "
. "height:100%;"
. "position: fixed;"
. "padding: 0;"
. "margin-top: 200px;"
. "top: 0px;"
. "left: 0px;"
. "}"
. "</style>"
. "<title>"
. $value
. "</title>"
. "</head>"
. "<body>"
. "<a href="
. "\""
. "../../index.html"
. "\""
. "><button>return to homepage</button></a><br><br>"
. "<a href="
. "\""
. "./txt/edit.html"
. "\""
. ">"
. "<button>view this acticle</button></a>"
. "<br><br>"
. "<a href="
. "\""
. "../delete.php?action=delete&filename=./en/"
. $value
. ".html"
. "\""
. "><button>delete this page</button></a>"
. "<div class=\"p\">"
. "<p contenteditable=\"true\">"
. "click here to define the keyword\n"
. $value
. "</p>"
. "</div>"
. "</body>"
. "<html>");
}
foreach($_POST as $variable => $value)
{
$value = str_replace(' ', '_', $value);
$handle = fopen("./index.html", "a");
fwrite($handle,
"<a href="
. "\""
. "./en/"
. $value
. ".html"
. "\""
. "class="
. "\""
. "edges"
. "\""
. ">"
. "<button>"
. $value
. "</button>"
. "</a>"
. "\r\n");
}

foreach($_POST as $variable => $value)
{
$handle = fopen("./js/merge.js", "a");
// load the data and delete the line from the array
$lines = file('./js/merge.js');
$last = sizeof($lines) - 1 ;
unset($lines[$last]);
// write the new data to the file
file_put_contents('./js/merge.js', $lines);
$value = str_replace(' ', '_', $value);
fwrite($handle,
"\""
. $value
. "\""
. ","
. "\n"
. "];var tc = TagCloud('.content', texts);console.log(tc);");
}

foreach($_POST as $variable => $value)
{
$handle = fopen("./js/chatbot.js", "a");
// load the data and delete the line from the array
$lines = file('./js/chatbot.js');
$last = sizeof($lines) - 1 ;
unset($lines[$last]);
// write the new data to the file
file_put_contents('./js/chatbot.js', $lines);
$value = str_replace(' ', '_', $value);
fwrite($handle,
"\""
. $value
. "\""
. ","
. "\n"
. "];return responses[Math.floor(Math.random() * responses.length)];}window.onblur = function (tabs) {alert('switch tabs alert');};");
}

echo "<meta name='viewport' content='width=device-width'>successfully created <a href='./en/$value.html'>$value</a>";

foreach($_POST as $variable => $value)
{
$handle = fopen("./en/txt/edit.html", "a");
// load the data and delete the line from the array
$lines = file('./en/txt/edit.html');
$last = sizeof($lines) - 1 ;
unset($lines[$last]);
// write the new data to the file
file_put_contents('./en/txt/edit.html', $lines);

fwrite($handle,
"\n"
."<li><a data-page="
."\""
.$value
."\""
.">"
.$value
."</a></li>\n</ul>"
."<script type="
."\""
."text/javascript"
."\""
."src="
."\""
."../../js/edit.js"
."\""
."></script>"
."\r\n");

$handle = fopen("./en/txt/".$value.".txt", "a");
fwrite($handle,
"\n"
.$value
."\r\n");

echo "<body onload='loadout()'><script>function loadout(){window.location.href = './en/txt/edit.html'}</script>";
}
fclose($handle);
exit();

?>
11 changes: 6 additions & 5 deletions css/edit.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ h2 {
}

article {
width: 330px;
min-height: 500px;
width: 300px;
min-height: 200px;
margin: 0 auto;
padding: 15px;
background-image: repeating-linear-gradient(
Expand All @@ -27,14 +27,15 @@ article {
ul {
list-style-type: none;
padding-left: 0;
width: 480px;
width: 380px;
margin: 0 auto;
padding-bottom: 30px;
}

li {
float: left;
width: 23%;
float: right;
width: 50%;
height: 50px;
}

ul li a {
Expand Down
Loading

0 comments on commit d8502ca

Please sign in to comment.