-
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.
- Loading branch information
Showing
29 changed files
with
697 additions
and
36 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<?php | ||
require_once INST_PATH.'app/controllers/admin_base_trait.php'; | ||
class IndexController extends Page { | ||
use AdminBaseTrait; | ||
|
||
public $exceptsBeforeFilter = [ | ||
'actions' => 'login,logout,signin' | ||
]; | ||
|
||
public function __construct() { | ||
$this->_init(); | ||
} | ||
|
||
public function before_filter() { | ||
Require_login(); | ||
$this->menuLinks = generalMenu(); | ||
} | ||
|
||
public function indexAction() { | ||
$this->render = ['text'=>'noop']; | ||
} | ||
|
||
public function loginAction() { | ||
$this->layout = false; | ||
} | ||
public function signinAction() { | ||
$code = HTTP_401; | ||
|
||
if (!empty($_POST['e']) and !empty($_POST['p'])): | ||
$id = $this->User->login($_POST['e'], $_POST['p']); | ||
$id > 0 and ($code = HTTP_202) and ($_SESSION['user'] = $id); | ||
endif; | ||
|
||
http_response_code($code); | ||
$this->respondToAJAX('{}'); | ||
} | ||
/** | ||
* Destroy all registered information of a session and redirect to the login page. | ||
*/ | ||
public function logoutAction() { | ||
$this->layout = false; | ||
php_sapi_name() !== 'cli' && session_destroy(); | ||
$_SESSION = null; | ||
unset($_SESSION); | ||
header('Location: /index/login'); | ||
} | ||
} |
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,17 @@ | ||
|
||
<script type="text/javascript"> | ||
<? readfile(INST_PATH.'app/webroot/libs/dumbo.min.js'); ?> | ||
<? readfile(INST_PATH.'app/webroot/libs/dmb-factories.min.js'); ?> | ||
<? file_exists(INST_PATH.'app/webroot/js/factories.min.js') and readfile(INST_PATH.'app/webroot/js/factories.min.js'); ?> | ||
<? readfile(INST_PATH.'app/webroot/libs/dmb-components.min.js'); ?> | ||
<? file_exists(INST_PATH.'app/webroot/js/components.min.js') and readfile(INST_PATH.'app/webroot/js/components.min.js'); ?> | ||
if('serviceWorker' in navigator) { | ||
navigator.serviceWorker.register('/sw.js') | ||
.then(function(registration) { | ||
/* NOOP */ | ||
}); | ||
navigator.serviceWorker.ready.then(function(registration) { | ||
/* NOOP */ | ||
}); | ||
} | ||
</script> |
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,39 @@ | ||
<meta charset="utf-8"/> | ||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<meta name="description" content="Basilisk Project Management"> | ||
<meta name="keywords" content="project,management"> | ||
<meta name="theme-color" content="#ff9901"> | ||
<meta name="mobile-web-app-capable" content="yes"> | ||
<meta name="apple-mobile-web-app-capable" content="yes"> | ||
<meta name="msapplication-TileColor" content="#ffffff"> | ||
<meta name="msapplication-TileImage" content="/ms-icon-144x144.png"> | ||
<meta name="msapplication-starturl" content="/"> | ||
|
||
<base href="<?=INST_URI;?>"> | ||
<title>Basilisk</title> | ||
|
||
<link rel="apple-touch-icon" sizes="57x57" href="/images/logo-57x57.png"> | ||
<link rel="apple-touch-icon" sizes="60x60" href="/images/logo-60x60.png"> | ||
<link rel="apple-touch-icon" sizes="72x72" href="/images/logo-72x72.png"> | ||
<link rel="apple-touch-icon" sizes="76x76" href="/images/logo-76x76.png"> | ||
<link rel="apple-touch-icon" sizes="114x114" href="/images/logo-114x114.png"> | ||
<link rel="apple-touch-icon" sizes="120x120" href="/images/logo-120x120.png"> | ||
<link rel="apple-touch-icon" sizes="144x144" href="/images/logo-144x144.png"> | ||
<link rel="apple-touch-icon" sizes="152x152" href="/images/logo-152x152.png"> | ||
<link rel="apple-touch-icon" sizes="180x180" href="/images/logo-180x180.png"> | ||
<link rel="icon" type="image/png" sizes="192x192" href="/images/logo-192x192.png"> | ||
<link rel="icon" type="image/png" sizes="32x32" href="/images/logo-32x32.png"> | ||
<link rel="icon" type="image/png" sizes="96x96" href="/images/logo-96x96.png"> | ||
<link rel="icon" type="image/png" sizes="16x16" href="/images/logo-16x16.png"> | ||
<link rel="manifest" href="/manifest.json"> | ||
|
||
<script type="text/javascript"> | ||
window.innerWidth = window.outerWidth; | ||
</script> | ||
|
||
<style type="text/css"> | ||
<? readfile(INST_PATH.'app/webroot/libs/dmb-styles.css'); ?> | ||
<? readfile(INST_PATH.'app/webroot/css/styles.css'); ?> | ||
</style> |
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,17 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<? require_once(INST_PATH.'app/views/_header-contents.phtml'); ?> | ||
</head> | ||
<body style="background: url(/images/basilisk.svg) no-repeat; background-size: contain;background-position: center;height: 100vh;width: 100vw;overflow: hidden;"> | ||
<noscript> | ||
<h1>Your browser does not support JS</h1> | ||
</noscript> | ||
<dmb-dialog open> | ||
<dmb-login target="/index/"> | ||
<? readfile(INST_PATH.'app/webroot/images/logo.svg'); ?> | ||
</dmb-login> | ||
</dmb-dialog> | ||
<? require_once(INST_PATH.'app/views/_footer-contents.phtml'); ?> | ||
</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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,60 @@ | ||
{ | ||
"name": "Basilisk Project Management", | ||
"short_name": "Basilisk", | ||
"display": "standalone", | ||
"background_color": "white", | ||
"orientation": "landscape", | ||
"theme_color": "#e30a33", | ||
"start_url": "/index/login", | ||
"icons": [ | ||
{ | ||
"src": "/images/logo-36x36.png", | ||
"sizes": "36x36", | ||
"type": "image/png", | ||
"density": "0.75", | ||
"purpose": "any maskable" | ||
}, | ||
{ | ||
"src": "/images/logo-48x48.png", | ||
"sizes": "48x48", | ||
"type": "image/png", | ||
"density": "1.0", | ||
"purpose": "any maskable" | ||
}, | ||
{ | ||
"src": "/images/logo-72x72.png", | ||
"sizes": "72x72", | ||
"type": "image/png", | ||
"density": "1.5", | ||
"purpose": "any maskable" | ||
}, | ||
{ | ||
"src": "/images/logo-96x96.png", | ||
"sizes": "96x96", | ||
"type": "image/png", | ||
"density": "2.0", | ||
"purpose": "any maskable" | ||
}, | ||
{ | ||
"src": "/images/logo-144x144.png", | ||
"sizes": "144x144", | ||
"type": "image/png", | ||
"density": "3.0", | ||
"purpose": "any maskable" | ||
}, | ||
{ | ||
"src": "/images/logo-192x192.png", | ||
"sizes": "192x192", | ||
"type": "image/png", | ||
"density": "4.0", | ||
"purpose": "any maskable" | ||
}, | ||
{ | ||
"src": "/images/logo-512x512.png", | ||
"sizes": "512x512", | ||
"type": "image/png", | ||
"density": "4.0", | ||
"purpose": "any maskable" | ||
} | ||
] | ||
} |
Oops, something went wrong.