diff --git a/.htaccess b/.htaccess new file mode 100644 index 0000000..5f3ffe9 --- /dev/null +++ b/.htaccess @@ -0,0 +1,5 @@ +ErrorDocument 400 /400.php +ErrorDocument 401 /401.php +ErrorDocument 403 /403.php +ErrorDocument 404 /404.php +ErrorDocument 500 /500.php \ No newline at end of file diff --git a/400.php b/400.php new file mode 100644 index 0000000..e945dae --- /dev/null +++ b/400.php @@ -0,0 +1,8 @@ + + +

400 Error:

+

Bad request

+ \ No newline at end of file diff --git a/400.shtml b/400.shtml new file mode 100644 index 0000000..e945dae --- /dev/null +++ b/400.shtml @@ -0,0 +1,8 @@ + + +

400 Error:

+

Bad request

+ \ No newline at end of file diff --git a/401.php b/401.php new file mode 100644 index 0000000..44a383c --- /dev/null +++ b/401.php @@ -0,0 +1,7 @@ + + +

401 Error:

+

Authorization required

diff --git a/401.shtml b/401.shtml new file mode 100644 index 0000000..44a383c --- /dev/null +++ b/401.shtml @@ -0,0 +1,7 @@ + + +

401 Error:

+

Authorization required

diff --git a/403.php b/403.php new file mode 100644 index 0000000..ce85bd7 --- /dev/null +++ b/403.php @@ -0,0 +1,7 @@ + + +

403 Error:

+

Forbidden

diff --git a/403.shtml b/403.shtml new file mode 100644 index 0000000..ce85bd7 --- /dev/null +++ b/403.shtml @@ -0,0 +1,7 @@ + + +

403 Error:

+

Forbidden

diff --git a/404.php b/404.php new file mode 100644 index 0000000..ccbcfe4 --- /dev/null +++ b/404.php @@ -0,0 +1,7 @@ + + +

404 Error:

+

Page not found

diff --git a/404.shtml b/404.shtml new file mode 100644 index 0000000..ccbcfe4 --- /dev/null +++ b/404.shtml @@ -0,0 +1,7 @@ + + +

404 Error:

+

Page not found

diff --git a/500.php b/500.php new file mode 100644 index 0000000..3cea3f5 --- /dev/null +++ b/500.php @@ -0,0 +1,7 @@ + + +

500 Error:

+

Internal server error

diff --git a/500.shtml b/500.shtml new file mode 100644 index 0000000..3cea3f5 --- /dev/null +++ b/500.shtml @@ -0,0 +1,7 @@ + + +

500 Error:

+

Internal server error

diff --git a/css/style.css b/css/style.css index f5833ab..84a293f 100644 --- a/css/style.css +++ b/css/style.css @@ -66,6 +66,7 @@ a:active { /* selected link */ #c1 { background: url(/images/home.jpeg) fixed no-repeat; background-size: cover; + font-size: 6em; } .content p { @@ -89,7 +90,3 @@ img { height: auto; box-shadow: 5px 5px 25px black; } - -#welcome{ - font-size: 6em; -} \ No newline at end of file diff --git a/error_page.php b/error_page.php new file mode 100644 index 0000000..8ed065d --- /dev/null +++ b/error_page.php @@ -0,0 +1,6 @@ + + +

404 Error: Page not found

diff --git a/helpers.php b/helpers.php index 7294fbb..3c67db0 100644 --- a/helpers.php +++ b/helpers.php @@ -1,5 +1,11 @@ "; + foreach ($headers as $head){ + $navigation .= "
  • ". $head['title'] . "

    Edit Delete
  • "; + } + $navigation .= ""; + + } else { + $navigation = 'Sorry, a critical error occurred.'; + } + return $navigation; + + +} + +function buildUserProfile($id){ + $people = getPeople(); + $content = null; + $admin = null; + + foreach ($people as $person){ + if ($person['user_id'] == $id){ + if($person['admin']){ + $admin = "YES"; + } else { + $admin = "NO"; + } + $content .= "

    ".$person['name']."

    "; + } + } + + return $content; +} + +function buildAdminProfile(){ + + + //display content list link + + //display list of users with editing abilitiy for each part + $people = getPeople(); + $content = "

    EDIT CONTENT

    USERS: