-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
52 lines (47 loc) · 1.2 KB
/
Copy pathindex.php
File metadata and controls
52 lines (47 loc) · 1.2 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
<?php
include './layout/head.php';
include './layout/middle.php';
include './layout/header.php';
include './layout/footer.php';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?php
printHeader('AlduinDev');
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<body>
<?php
printMyHeader('home');
beginMiddle();
?>
<?php
endMiddle();
printFooter();
?>
<script type="text/javascript">
$(function(){
// This script makes sure back and forward buttons work since I am using
// hashes to move from page to page and ajax
$(window).hashchange( function(){
// Every time has changes the page tires to load the correct
//content with ajax
$("a").removeClass("current");
var currHash = location.hash.substring(1);
if(currHash.indexOf("?") != -1){
currHash = currHash.substring(0, currHash.indexOf("?"));
}
if(currHash == ""){
$("#middle").html(ajax_load).load("/home/content.php");
$("#home").addClass("current");
}else{
$("#middle").html(ajax_load).load("/" + currHash + "/content.php");
$("#" + currHash ).addClass("current");
}
})
// Trigger the event (useful on page load).
$(window).hashchange();
});
</script>
</body>
</html>