-
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
9 changed files
with
215 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?php | ||
function url_for($script_path) { | ||
// add the leading '/' if not present | ||
if($script_path[0] != '/') { | ||
$script_path = "/" . $script_path; | ||
} | ||
return WWW_ROOT . $script_path; | ||
} | ||
?> |
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,22 @@ | ||
<?php | ||
// Assign file paths to PHP constants | ||
// __FILE__ returns the current path to this file | ||
// dirname() returns the path to the parent directory | ||
define("PRIVATE_PATH", dirname(__FILE__)); | ||
define("PROJECT_PATH", dirname(PRIVATE_PATH)); | ||
define("PUBLIC_PATH", PROJECT_PATH . '/public'); | ||
define("SHARED_PATH", PRIVATE_PATH . '/shared'); | ||
|
||
// Assign the root URL to a PHP constant | ||
// * Do not need to include the domain | ||
// * Use same document root as webserver | ||
// * Can set a hardcoded value: | ||
// define("WWW_ROOT", '/globe_bank/public'); | ||
// define("WWW_ROOT", ''); | ||
// * Can dynamically find everything in URL up to "/public" | ||
$public_end = strpos($_SERVER['SCRIPT_NAME'], '/public') + 7; | ||
$doc_root = substr($_SERVER['SCRIPT_NAME'], 0, $public_end); | ||
define("WWW_ROOT", $doc_root); | ||
|
||
require_once 'functions.php'; | ||
?> |
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,5 @@ | ||
<footer> | ||
© <?= date('Y');?> Globe Bank | ||
</footer> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php if(!isset($page_title)) {$page_title = 'Staff Area'; } ?> | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>GBI - <?= $page_title; ?></title> | ||
<link rel="stylesheet" href="<?= url_for('/stylesheets/staff.css'); ?> " media="all"> | ||
</head> | ||
<body> | ||
<header> | ||
<h1>GBI Staff Area</h1> | ||
</header> | ||
|
||
<navigation> | ||
<ul> | ||
<li><a href="<?= url_for('/staff/index.php'); ?>">Menu</a></li> | ||
</ul> | ||
</navigation> |
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,12 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | ||
<title>Globe Bank</title> | ||
</head> | ||
<body> | ||
<h1>Globe Bank: Coming Soon</h1> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php require_once '../../private/initialize.php'; ?> | ||
<?php $page_title = 'Staff Menu';?> | ||
<?php include SHARED_PATH.'/staff_header.php'; ?> | ||
<div id="content"> | ||
<div id="main-menu"> | ||
<h2>Main Menu</h2> | ||
<ul> | ||
<li><a href="subjects/index.php">Subjects</a></li> | ||
</ul> | ||
</div> | ||
</div> | ||
<?php include SHARED_PATH.'/staff_footer.php'; ?> | ||
|
||
|
Empty file.
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,5 @@ | ||
<?php require_once '../../../private/initialize.php'; ?> | ||
<?php $page_title = 'Subjects'; ?> | ||
<?php include SHARED_PATH.'/staff_header.php'; ?> | ||
<div id="content"></div> | ||
<?php include SHARED_PATH.'/staff_footer.php'; ?> |
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,130 @@ | ||
html { | ||
height: 100%; | ||
width: 100%; | ||
} | ||
|
||
body { | ||
height: 980px; | ||
width: 100%; | ||
margin: 0; | ||
padding: 0; | ||
} | ||
|
||
header { | ||
width: 980px; | ||
height: 40px; | ||
margin: 0 0 10px 0; | ||
padding: 0; | ||
background: #0055DD; | ||
color: white; | ||
} | ||
|
||
header h1 { | ||
margin: 0; | ||
padding: 5px; | ||
font-size: 20px; | ||
font-family: Verdana, Arial, Helvetica, sans-serif; | ||
text-align: center; | ||
} | ||
|
||
navigation { | ||
width: 980px; | ||
margin: 0; | ||
padding: 0; | ||
text-align: center; | ||
} | ||
|
||
navigation ul { | ||
width: 980px; | ||
list-style: none; | ||
padding: 0; | ||
margin: 0; | ||
} | ||
|
||
navigation ul li { | ||
display: inline; | ||
margin-right: 1em; | ||
} | ||
|
||
#content { | ||
width: 920px; | ||
min-height: 500px; | ||
padding: 0 30px; | ||
} | ||
|
||
footer { | ||
width: 940px; | ||
height: 20px; | ||
margin: 0 0 10px 0; | ||
padding: 10px 20px; | ||
background: #0055DD; | ||
color: white; | ||
} | ||
|
||
/* Actions */ | ||
|
||
.actions { | ||
margin-bottom: 1em; | ||
} | ||
|
||
|
||
/* Lists */ | ||
|
||
table { | ||
border-collapse: collapse; | ||
vertical-align: top; | ||
} | ||
|
||
table.list { | ||
width: 100%; | ||
} | ||
|
||
table.list tr td { | ||
border: 1px solid #999999; | ||
} | ||
|
||
table.list tr th { | ||
border: 1px solid #0055DD; | ||
background: #0055DD; | ||
color: white; | ||
text-align: left; | ||
} | ||
|
||
/* Forms */ | ||
|
||
dl { | ||
clear: both; | ||
overflow: hidden; | ||
margin: 0.5em 0; | ||
} | ||
|
||
dt { | ||
float: left; | ||
font-weight: bold; | ||
width: 125px; | ||
} | ||
|
||
dd { | ||
float: left; | ||
margin-left: 1em; | ||
} | ||
|
||
#operations { | ||
clear: both; | ||
margin: 1em 0 1em 75px; | ||
} | ||
|
||
/* Errors */ | ||
|
||
.errors { | ||
display: inline-block; | ||
border: 2px solid red; | ||
color: red; | ||
padding: 1em; | ||
margin-bottom: 1em; | ||
} | ||
|
||
.errors ul { | ||
margin-bottom: 0; | ||
padding-left: 1em; | ||
} |