diff --git a/hashbrown/includes/functions.php b/hashbrown/includes/functions.php index 4a3ef5d..d7f5946 100755 --- a/hashbrown/includes/functions.php +++ b/hashbrown/includes/functions.php @@ -3,7 +3,7 @@ $db_pass = $_ENV['DATABASE_PASSWORD']; $ip_addr = $_ENV['IP_ADDRESS']; -if ($_SERVER['HTTP_HOST'] == 'localhost') { +if ($_SERVER['HTTP_HOST'] == 'localhost:2440') { define('HOST', 'localhost'); define('USER', 'root'); define('PASS', $db_pass); @@ -14,7 +14,6 @@ if ($_SERVER['HTTP_HOST'] == 'localhost') { define('PASS', $db_pass); define('DB', 'secureusers'); } -// Make some constants function table_from_file($file) { diff --git a/includes b/includes new file mode 100644 index 0000000..399594c Binary files /dev/null and b/includes differ diff --git a/robot/css/.gitkeep b/robot/css/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/robot/css/styles.css b/robot/css/styles.css new file mode 100644 index 0000000..6a94ff9 --- /dev/null +++ b/robot/css/styles.css @@ -0,0 +1,63 @@ +@font-face { + font-family: 'Hack Nerd Font Mono'; + src: url('/includes/HackNerdFontMono-Regular.woff'); + font-weight: normal; + font-style: normal; +} + +* { + padding: 0; + margin: 0; + font-family: 'Hack Nerd Font Mono', Hack, sans-serif; +} + +h1 { + font-size: 5vw; + font-weight: 800; + text-align: center; + margin: 35px; +} + +h3 { + font-size: 3vw; + font-weight: 600; + text-align: center; +} + +p, +label, +select, +option, +input { + font-size: 1.75vw; + margin: 15px; +} + +pre { + font-size: 1.5vw; +} + +form { + width: 90%; + margin: 0 auto; + display: grid; + grid-template-columns: 25% 50%; + column-gap: 25%; +} + +input[type="submit"] { + grid-column: span 2; +} + +.card { + padding: 50px; + width: 40%; + margin: 0 auto; + background-color: green; + border-radius: 18px; +} + +.row { + display: flex; + flex-direction: row; +} diff --git a/robot/img/.gitkeep b/robot/img/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/robot/includes/.gitkeep b/robot/includes/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/robot/index.php b/robot/index.php new file mode 100644 index 0000000..f151142 --- /dev/null +++ b/robot/index.php @@ -0,0 +1,177 @@ +set_model($model); + $this->set_color($color); + $this->set_os($os); + } + + public function __toString() + { + return '

Your ' . $this->get_color() . ' ' . $this->get_model() . ' running ' . $this->get_os() . ' will be built shortly. Thank you.

'; + } + + public function get_model() + { + return $this->model; + } + + public function set_model($model) + { + $this->model = $model; + } + + public function get_color() + { + return $this->color; + } + + public function set_color($color) + { + $this->color = $color; + } + + public function get_os() + { + return $this->os; + } + + public function set_os($os) + { + $this->os = $os; + } +} + +?> + + + + + + Robot + + + + + +

I, Object

+ + + + + + + +
+ + + + + + + + + + +
+ + '; + + return $form; +} + +function message() +{ + if (isset($_POST['model']) && isset($_POST['color']) && isset($_POST['os'])) + $robot = new Robot($_POST['model'], $_POST['color'], $_POST['os']); + + if (!$robot) + return form(); + + ob_start(); + print_r($robot); + $dump = ob_get_clean(); + + $msg = ' +
+

Processing...

+ ' . $robot->__toString() . ' +
+    ';
+
+    $msg .= $dump;
+
+    $msg .= '
+            
+
+ '; + + return $msg; +} +?> diff --git a/robot/js/.gitkeep b/robot/js/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/robot/js/index.js b/robot/js/index.js new file mode 100644 index 0000000..e69de29