diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..514b4ae Binary files /dev/null and b/.DS_Store differ diff --git a/app/.DS_Store b/app/.DS_Store new file mode 100644 index 0000000..dbafc61 Binary files /dev/null and b/app/.DS_Store differ diff --git a/app/controllers/Login.php b/app/controllers/Login.php new file mode 100644 index 0000000..3a422cb --- /dev/null +++ b/app/controllers/Login.php @@ -0,0 +1,30 @@ +login($username, $password); + } + + /** + * Show the application login page. + */ + + public function index(){ + if(isset($_POST['submit'])){ + $this->authenticate($_POST['email'], $_POST['password']); + } + + $template = new Template(); + return $template->render('login', []); + } + +} \ No newline at end of file diff --git a/config.php b/config.php new file mode 100644 index 0000000..bb4bb3e --- /dev/null +++ b/config.php @@ -0,0 +1,8 @@ + "", + "DB_NAME" => "", + "DB_USERNAME" => "", + "DB_PASSWORD" => "" +] +?> \ No newline at end of file diff --git a/index.php b/index.php index 2f6867c..28769d0 100644 --- a/index.php +++ b/index.php @@ -4,6 +4,7 @@ namespace Sealandia; session_start(); +require_once __DIR__ . '/config.php'; require_once __DIR__ . '/vendor/autoload.php'; require __DIR__ . '/routes/routes.php'; ?> \ No newline at end of file diff --git a/routes/routes.php b/routes/routes.php index 9332223..5b66885 100644 --- a/routes/routes.php +++ b/routes/routes.php @@ -4,6 +4,7 @@ use Sealandia\Core\Router; $routes = [ '/' => 'Welcome@index', + '/login' => 'Login@index' ]; $router = (new Router)->routeToController($routes); \ No newline at end of file diff --git a/views/includes/footer.php b/views/includes/footer.php new file mode 100644 index 0000000..826f5e0 --- /dev/null +++ b/views/includes/footer.php @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/views/includes/header.php b/views/includes/header.php new file mode 100644 index 0000000..b40b68e --- /dev/null +++ b/views/includes/header.php @@ -0,0 +1,11 @@ + + + Sealandia framework + + + + + + + + \ No newline at end of file diff --git a/views/login.view.php b/views/login.view.php new file mode 100644 index 0000000..1477106 --- /dev/null +++ b/views/login.view.php @@ -0,0 +1,41 @@ + + +
+
+
+
+
Login
+ +
+
+
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+
+ +
+
+
+
+
+
+
+
+ + \ No newline at end of file diff --git a/views/welcome.view.php b/views/welcome.view.php index d2702c6..916d798 100644 --- a/views/welcome.view.php +++ b/views/welcome.view.php @@ -1,72 +1,65 @@ - - - Sealandia framework - - - - - - -
-
-
- -

Welcome to Sealandia

-

Your application is ready to go!

-
-
-
+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - \ No newline at end of file +
+
+
+ +

Welcome to Sealandia

+

Your application is ready to go!

+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + \ No newline at end of file