Skip to content

Commit

Permalink
updated
Browse files Browse the repository at this point in the history
Languages global
Backend and frontend modified with page name creation # links and
short urls layers of security slowly being implemented
  • Loading branch information
jehovahsays committed May 23, 2024
1 parent 3f7740a commit d451f1e
Show file tree
Hide file tree
Showing 41 changed files with 1,090 additions and 47 deletions.
4 changes: 3 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
GNU GENERAL PUBLIC LICENSE
This is meant to be a free software

GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007

Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Expand Down
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
# handle
<br>
<br>
updates
yes you can edit all the files<br>
and folders if you know how<br>
if you don't know how ask questions<br>
Recent Updates<br>
i created a folder named ai.<br>
in this folder is the simple way<br>
i build ai not like other developers<br>
the Search box located on index.html page collects user input data sends<br>
it to the PHP software<br>
that outputs the page on<br>
Expand Down
22 changes: 22 additions & 0 deletions ai/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# ai
This is how I build my ai brain
if you already have an http web server
with php installed drop this folder
in your root folder open your web
browser and visit the index.html
page. this is unfinished so that
you all can make it work the way
you need it to.
you will need to understand html
css js and php computer language
to change configurations.
read all of the files and edit them.

i was in hurry
none of this is finished.
i have many other fields to help
out so this is for those of you
starting from scratch with this.



11 changes: 11 additions & 0 deletions ai/brain/how_was_you_day.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

<!DOCTYPE html><meta name="viewport"content="user-scalable=yes, initial-scale=1.0, maximum-scale=1.0"/><title>how_was_you_day</title></br><br>
<form action="../index.php" method="post">
<input id="input" type="text" name="title"
onkeypress="return event.charCode != 32"
class="{{ \App\getAllClasses()['text'] }}"
class="create" style="create" class="titleInput"
style="height: 30px;" maxlength="30" autocomplete="true"
autocorrect="off" autocapitalize="off" spellcheck="true"
placeholder="create page">
</form>
24 changes: 24 additions & 0 deletions ai/brain/intelligence.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@

<!DOCTYPE html>
<meta name="viewport"content="user-scalable=yes, initial-scale=1.0, maximum-scale=1.0"/>
<title>intelligence</title></br><br>
<form action="../index.php" method="post">
<input id="input" type="text" name="title"
onkeypress="return event.charCode != 32"
class="{{ \App\getAllClasses()['text'] }}"
class="create" style="create" class="titleInput"
style="height: 30px;" maxlength="30" autocomplete="true"
autocorrect="off" autocapitalize="off" spellcheck="true"
placeholder="create memory">
</form>
<br>
<iframe
class="handle"
style="width: 150px; height: 150px; border: none"
src="https://www.youtube.com/embed?listType=playlist&list=PLwMe8hyy9osJxdMri5cnVfMKYbNA2T4i4&si=TH5HIkq-L0uWoxWT&autoplay=1&autoplay=1"
title="playlist"
frameborder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
allowfullscreen
>
</iframe>
127 changes: 127 additions & 0 deletions ai/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="charset=UTF-8">
<meta name="viewport" content="user-scalable=yes, initial-scale=1.0, maximum-scale=1.0" />
<style>
fieldset {

margin: 30px;
border-radius: 25px;
padding: 0;
position: center;
top: 200;
left: 0;
right: 0;
width: 80%;
}
search {

margin: 50px;
border-radius: 25px;
padding: 0;
position: fixed;
top: 25;
left: 0;
width: 70%;
}
list {
list-style: none;
padding: 0;
margin: 0;
position: fixed;
top: 0;
left: 0;
right: 0;
}
.handle {

position: fixed;
top: 0;
left: 0;
right: 0;
font-size: 1.2em;
padding: 0px;
animation: fadeIn 0.5s ease-in-out;
}
.handle:last-child {

position: fixed;
top: 0;
left: 0;
right: 0;
border-bottom: none;
}
@keyframes fadeIn {
from {
opacity: 0;
transform: translateY(-10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
}
</style>
<title>ai</title>
</head>
<body>
<br><br>
<center>

<fieldset>
<br>
<form action="./index.html">
<input id="list" onkeyup="handle()"
onkeydown="return event.key != 'Enter';"
name="search-memories"
placeholder="search memories"
type="search"
style="search" class="search" maxlength="30"
autocomplete="true" autocorrect="on"
autocapitalize="off" spellcheck="true">
</form>
<br>
<br>
<form action="./index.php" method="post">
<input id="input" type="text" name="create-memories"
class="create" style="create" class="titleInput"
style="height: 30px;" maxlength="30" autocomplete="true"
autocorrect="off" autocapitalize="off" spellcheck="true"
placeholder="create memories">
</form>
<br>
<p>developer: morgan shatee byers<br></p>
<a href="./sitemap.php">sitemap</a>
<script>
function handle() {

let input = document.getElementById('list').value;

input = input.toLowerCase();

let x = document.getElementsByClassName('handle');

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";

}

}

}
</script>

<center>
<ul id="list">
<a href="./brain/intelligence.html"class="handle"><fieldset><legend><center>intelligence</center></legend></fieldset></a></br>
27 changes: 27 additions & 0 deletions ai/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php
header( 'Location: ./index.html' );
gethostname();
$ip = $localIp = gethostbyname(gethostname());
$ip = $handle = "handle";
$ip = $handle = fopen("./index.html", "a");
foreach($ip = $_POST as $variable => $value) {
$value = str_replace(' ', '_', $value);
fwrite($ip = $handle, "<a href=" . "\"" . "./brain/" . $value . ".html" . "\"" . "class=" . "\"" . "handle" . "\"" . "><fieldset><legend><center>" . $value . "</center></legend></fieldset></a></br>" . "\r\n");
$ip = $handle = fopen("./brain/" . $value . ".html", "a");
fwrite($ip = $handle, "\n"
. "<!DOCTYPE html>"
. "<meta name=" . "\"" . "viewport" . "\"" . "content=" . "\"" . "user-scalable=yes, initial-scale=1.0, maximum-scale=1.0" . "\"" . "/>"
. "<title>" . $value . "</title>" . "</br>"
. "<br>\n"
. "<form action=\"../index.php\" method=\"post\">\n"
. "<input id=\"input\" type=\"text\" name=\"title\" \n"
. "onkeypress=\"return event.charCode != 32\" \n"
. "class=\"{{ \App\getAllClasses()['text'] }}\" \n"
. "class=\"create\" style=\"create\" class=\"titleInput\" \n"
. "style=\"height: 30px;\" maxlength=\"30\" autocomplete=\"true\" \n"
. "autocorrect=\"off\" autocapitalize=\"off\" spellcheck=\"true\" \n"
. "placeholder=\"create page\">\n"
. "</form>\n");
}
fclose($ip = $handle);
?>
96 changes: 96 additions & 0 deletions ai/sitemap.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@



<meta name="viewport" content="user-scalable=yes, initial-scale=1.0, maximum-scale=1.0"/>
<?php
gethostname();
$ip = $localIp = gethostbyname(gethostname());
$line = '';
$f = fopen('./index.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 "<br>recent ai memory<br></p>";
echo $line;
?>
<?php
$pathLen = 0;

function prePad($level)
{
$ss = "";

for ($ii = 0; $ii < $level; $ii++)
{
$ss = $ss . "|&nbsp;&nbsp;";
}

return $ss;
}

function myScanDir($dir, $level, $rootLen)
{
global $pathLen;

if ($handle = opendir($dir)) {

$allFiles = array();

while (false !== ($entry = readdir($handle))) {
if ($entry != "." && $entry != "..") {
if (is_dir($dir . "./brain/" . $entry))
{
$allFiles[] = "D: " . $dir . "./brain/" . $entry;
}
else
{
$allFiles[] = "F: " . $dir . "./brain/" . $entry;
}
}
}
closedir($handle);

natsort($allFiles);

foreach($allFiles as $value)
{
$displayName = substr($value, $rootLen + 4);
$fileName = substr($value, 3);
$linkName = str_replace(" ", "", substr($value, $pathLen + 3));
if (is_dir($fileName)) {
echo prePad($level) . $linkName . "<br>\n";
myScanDir($fileName, $level + 1, strlen($fileName));
} else {
echo prePad($level) . "<a href=\"" . $linkName . "\" style=\"text-decoration:none;\">" . $displayName . "</a><br>\n";
}
}
}
}

?>
<?php

$root = './brain/';

echo "<br>ai memories<br></p>";

$pathLen = strlen($root);

myScanDir($root, 0, strlen($root));

?>

Loading

0 comments on commit d451f1e

Please sign in to comment.