Skip to content

Commit

Permalink
dd
Browse files Browse the repository at this point in the history
  • Loading branch information
hygison committed Jul 5, 2021
1 parent 80e1b9f commit 6621003
Show file tree
Hide file tree
Showing 11 changed files with 124 additions and 17 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@ MVC Architecture

- Composer (Google, PHPMailer)
- User Login (User Registration ,Max Num of tries, Password Recover)
- PHPMailer (Text email, HTML Email, Attachment)
- Google (Analytics Basic, SpreadSheet Basic, Drive Basic)
- PHPMailer (Text email, HTML Email, Attachment)
2 changes: 1 addition & 1 deletion app/config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
date_default_timezone_set("Asia/Tokyo");

define('APPROOT', dirname(dirname(__FILE__)));
define('URLROOT', 'localhost');
define('URLROOT', 'http://localhost');
define('SITENAME', 'My MVC Architecture');

define('DS', DIRECTORY_SEPARATOR);
Expand Down
13 changes: 8 additions & 5 deletions app/lib/controllers/pages.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,18 @@ public function __construct(){
}

public function index(){
$data = [
$pageDataArr = [
'title' => 'My MCV Architecture - Index Page',
'name' => 'Bola',
];
$this->view('pages/index', $data);
$this->view('pages/index', $pageDataArr);
}

public function about(){
$this->view('pages/about');

public function login(){
$pageDataArr = [
'title' => 'My MCV Architecture - Login',
];
$this->view('pages/login', $pageDataArr);
}
}

Expand Down
7 changes: 7 additions & 0 deletions app/lib/views/includes/footer.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

<script src="https://code.jquery.com/jquery-3.6.0.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js"></script>
<script src="<?php echo URLROOT ?>/public/js/main.js?=<?php echo time();?>"></script>
</body>
</html>
16 changes: 16 additions & 0 deletions app/lib/views/includes/header.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title><?php echo $data['title']?></title>

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css">


<link rel="stylesheet" href="<?php echo URLROOT ?>/public/css/style.css?k=<?php echo time();?>" />

</head>
<body class="bg-light">

16 changes: 16 additions & 0 deletions app/lib/views/includes/sidebar.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<div class="modal fade" id="modal" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Modal</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body d-flex justify-content-center"></div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
9 changes: 0 additions & 9 deletions app/lib/views/pages/about.php

This file was deleted.

55 changes: 55 additions & 0 deletions app/lib/views/pages/login.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<?php
$title = $data['title'];
include_once HEADER_PATH;
?>
<div class="">
<div class="container mt-5">

<div class="tab-area d-flex justify-content-center">
<div class="tab-content w-50 d-flex p-3">
<div class="tab active" checked>Register</div>
<div class="tab">Login</div>
</div>
</div>

<div class=" d-flex justify-content-center">
<form class="row w-50">
<div class="col-lg-12 p-3">
<h4>Register</h4>
</div>
<div class="col-lg-12 p-3">
<label>Given Name:</label>
<input class="form-control" placeholder="John">
</div>
<div class="col-lg-12 p-3">
<label>Family Name:</label>
<input class="form-control" placeholder="Doe">
</div>
<div class="col-lg-12 p-3">
<label>Email:</label>
<input class="form-control" placeholder="[email protected]">
</div>
<div class="col-lg-12 p-3">
<label>Password:</label>
<input class="form-control" type="password" placeholder="">
</div>
<div class="col-lg-12 p-3">
<label>Confirm Password:</label>
<input class="form-control" type="password" placeholder="">
</div>
</form>
</div>





</div>
</div>



<?php
include_once SIDEBAR_PATH;
include_once FOOTER_PATH;
?>
9 changes: 9 additions & 0 deletions public/css/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

.tab{
background: #0044ff;
padding: 20px 15px;
cursor: pointer;
}
.tab .active{
background: pink!important;
}
1 change: 1 addition & 0 deletions public/index.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php
require_once '../app/require.php';

?>

10 changes: 10 additions & 0 deletions public/js/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
$(document).ready(function(){








});

0 comments on commit 6621003

Please sign in to comment.