-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.php
63 lines (60 loc) · 2.35 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
62
63
<?php
session_start();
require_once 'Model/m_main.php';
require_once 'View/sections/header.php';
$db = connect_db();
if(!isset($_SESSION['screen'])){
require_once 'choiceScreen.php';
}
else{
if (!isset($_GET['page'])) {
if(isset($_SESSION['screen']) and $_SESSION['screen'] == 'phone'){
require_once 'View/start.php';
}
else{
require_once 'ViewWS/accueil.php';
}
} else {
switch ($_GET['page']) {
case 'accueil': require_once 'Controller/c_home.php';
break;
case 'choix_ecran': require_once 'choiceScreen.php';
break;
case 'connexion': require_once 'Controller/c_connection.php';
break;
case 'profil': require_once 'Controller/c_profil.php';
break;
case 'animaux': require_once 'Controller/c_animals.php';
break;
case 'avis': require_once 'Controller/c_opinions.php';
break;
case 'carte': require_once 'Controller/c_carte.php';
break;
// Peremet de voir sa liste des contacts dans chat roulette
case 'contact': require_once 'Controller/c_contact.php';
break;
case 'chatroulette': require_once 'Controller/c_chatroulette.php';
break;
case 'snapchat': require_once 'Controller/c_snapchat.php';
break;
case 'rechercher': require_once 'Controller/c_search.php';
break;
case 'profiljeanpaul': require_once 'Controller/c_profiljeanpaul.php';
break;
case 'animauxjeanpaul': require_once 'Controller/c_animalsjeanpaul.php';
break;
case 'avisjeanpaul': require_once 'Controller/c_opinionsjeanpaul.php';
break;
case 'proposer': require_once 'Controller/c_propose.php';
break;
case 'wikichat': require_once 'Controller/c_wikichat.php';
break;
case 'article1_wiki': require_once 'Controller/c_article1_wiki.php';
break;
case 'deconnexion':
session_destroy();
header('Location: index.php?page=connexion');
break;
}
}
}