-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
61 lines (49 loc) · 1.81 KB
/
index.php
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
55
56
57
58
59
60
61
<?php session_start();
if(!isset($_GET['t']) && !isset($_SESSION['tème'])) {
$_SESSION['tème'] = 'n';
} elseif (isset($_GET['t']) && htmlspecialchars($_GET['t']) === 'n') {
$_SESSION['tème'] = 'n';
echo '<script>window.location = "./"</script>';
} elseif (isset($_GET['t']) && htmlspecialchars($_GET['t']) === 'j'){
$_SESSION['tème'] = 'j';
echo '<script>window.location = "./"</script>';
}
if (isset($_SESSION['tème']) && $_SESSION['tème'] == 'n') {
ob_start();?>
<link rel="stylesheet" href="css/thèmesombre.css">
<script>t=false</script>
<?php $css = ob_get_clean();
} elseif(isset($_SESSION['tème']) && $_SESSION['tème'] == 'j') {
ob_start();?>
<link rel="stylesheet" href="css/thèmeclaire.css">
<script>t=true</script>
<?php $css = ob_get_clean();
}?>
<?php include_once('page/nav.php'); ?>
<?php include_once('page/home.php'); ?>
<?php include_once('page/contact.php'); ?>
<?php include_once('page/projet.php'); ?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Ludovic CASTIGLIA</title>
</head>
<body class="body" id="body" onload="load();">
<?php
if(isset($home) && isset($contact) && isset($projet) && isset($nav)) {
echo $nav;
echo $home;
echo $contact;
echo $projet;
} else {
echo 'vas te faire enculer hackeur de merde';
}
?>
<?php
echo $css;
?>
</body>
</html>