-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
54 lines (45 loc) · 1.26 KB
/
Copy pathindex.php
File metadata and controls
54 lines (45 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?php
date_default_timezone_set('America/Buenos_Aires');
// Where the site is hosted?
$url = "http://www.matysanchez.com/";
// Where the visitor is?
$category = (isset($_GET["cat"]) ? $_GET["cat"] : null);
// Default URL - This is to avoid any security problem when we include $where.html
$where = "home";
// Analytics?
$analytics = false;
// This is for the link on the header.
$navBar = array(
array("Portfolio", "portfolio"),
array("Resume", "resume"),
array("Contact", "contact")
);
// Get title and file for every sections
switch ($category):
case "portfolio":
$where = "portfolio";
$title = "Portfolio - ";
break;
case "contact":
$where = "contact";
$title = "Contact - ";
break;
case "resume":
$where = "resume";
break;
default;
$where = "home";
$title = null;
endswitch;
// Now we have the title, we can load the header
include( "bin/header.php" );
// Also we have the file name, so we can load the section
if ($where == "resume") {
header('Location: https://github.com/matysanchez/portfolio/blob/master/bin/resume.pdf?raw=true');
die();
} else {
include( "bin/sections/$where.html" );
}
// And.. the end...
include( "bin/footer.php" );
?>