diff --git a/app/controllers/admin.php b/app/controllers/admin.php
new file mode 100644
index 0000000..cb251cf
--- /dev/null
+++ b/app/controllers/admin.php
@@ -0,0 +1,38 @@
+auth(url::post("username"), url::post("password"))){
+ session::set("id", $user["id"]);
+ session::set("username", $user["username"]);
+ session::set("fname", $user["fname"]);
+ session::set("lname", $user["lname"]);
+ url::redir("/admin/home");
+ }else{
+ $data = array("error" => "
Username or Password Incorrect.
");
+ load::view("admin/login", $data);
+ }
+ }else{
+ load::view("admin/login");
+ }
+ }
+ }
+
+ function home(){
+ if(!common::isLoggedIn()){
+ url::redir("/");
+ }else{
+ load::view("admin/home");
+ }
+ }
+
+ function doLogout(){
+ session::endSession();
+ url::redir("/");
+ }
+ }
+ ?>
diff --git a/app/controllers/main.php b/app/controllers/main.php
new file mode 100644
index 0000000..bdda0ed
--- /dev/null
+++ b/app/controllers/main.php
@@ -0,0 +1,8 @@
+
diff --git a/app/models/admins.php b/app/models/admins.php
new file mode 100644
index 0000000..32e8061
--- /dev/null
+++ b/app/models/admins.php
@@ -0,0 +1,25 @@
+model->query("SELECT * FROM `admins` WHERE `username`=? AND `password`=? AND `dFlag`=?",
+ array($username, $password, 0));
+ if($row = $this->model->fetch_assoc()){
+ return $row;
+ }else{
+ return false;
+ }
+ }
+
+ }
+?>
diff --git a/app/views/admin/home.php b/app/views/admin/home.php
new file mode 100644
index 0000000..8cb080d
--- /dev/null
+++ b/app/views/admin/home.php
@@ -0,0 +1,7 @@
+
+
+
+
Administration Page
+
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+
+
diff --git a/app/views/admin/login.php b/app/views/admin/login.php
new file mode 100644
index 0000000..55fb933
--- /dev/null
+++ b/app/views/admin/login.php
@@ -0,0 +1,15 @@
+
+
+=(isset($error)) ? $error : ""?>
+
+
diff --git a/app/views/admin/template/foot.php b/app/views/admin/template/foot.php
new file mode 100644
index 0000000..eea1be8
--- /dev/null
+++ b/app/views/admin/template/foot.php
@@ -0,0 +1,4 @@
+
+
+