-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Installation page and system update.
- Loading branch information
Sunny Jirakit
authored and
Sunny Jirakit
committed
May 25, 2023
1 parent
edc8d57
commit 9c0c973
Showing
7 changed files
with
67 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module.exports = (err) => { | ||
var timeStamp = require('../modules/timestamp') | ||
|
||
if(err.code == ER_NO_SUCH_TABLE) { | ||
res.render('default') | ||
res.end() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Default Pages | Sunny-Framework</title> | ||
<%-include('include/head')%> | ||
<script src="//cdn.jsdelivr.net/npm/sweetalert2@11"></script> | ||
</head> | ||
<body> | ||
<%-include('include/nav')%> | ||
<br> | ||
<div class="container card white rounded p-20" id="mainpage"> | ||
<h1>This is a default page of Sunny-Framework.</h1> | ||
<p>if contents were added to the databases. Home page will be change.</p> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,29 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Home | Sunny-Framework</title> | ||
<title>Installation Page | Sunny-Framework</title> | ||
<%-include('include/head')%> | ||
<meta name="robots" content="noindex"> | ||
<script src="//cdn.jsdelivr.net/npm/sweetalert2@11"></script> | ||
</head> | ||
<body> | ||
<%-include('include/nav')%> | ||
<% | ||
let installed = false | ||
if(tables_status.contents == true && tables_status.admin == true && tables_status.profile == true && tables_status.pages == true) { | ||
installed = true | ||
} | ||
%> | ||
<br> | ||
<div class="container card rounded white p-20" id="mainpage"> | ||
<h2 class="ml-10">Installation.</h2> | ||
<ul> | ||
<li>Contents table status: </li> | ||
<li>Admin table status: </li> | ||
<li>Profile table status: </li> | ||
<li>Pages table status: </li> | ||
<li>Contents table status: <%if(tables_status.contents == true) {%><span class="text-green">Installed</span><%} else {%><span class="text-red">Not Installed</span><%}%></li> | ||
<li>Admin table status: <%if(tables_status.admin == true) {%><span class="text-green">Installed</span><%} else {%><span class="text-red">Not Installed</span><%}%></li> | ||
<li>Profile table status: <%if(tables_status.profile == true) {%><span class="text-green">Installed</span><%} else {%><span class="text-red">Not Installed</span><%}%></li> | ||
<li>Pages table status: <%if(tables_status.pages == true) {%><span class="text-green">Installed</span><%} else {%><span class="text-red">Not Installed</span><%}%></li> | ||
</ul> | ||
<button class="btn darkblue" onclick="window.location.href='/install/start'">Install</button> | ||
<button class="btn darkblue" onclick="window.location.href='/install/start'" <%if(installed == true) {%>disabled<%}%> >Install</button> | ||
</div> | ||
</body> | ||
</html> |