-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
113 lines (92 loc) · 2.53 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
<?php
session_start();
date_default_timezone_set("Asia/tehran");
$request = $_SERVER["REQUEST_URI"];
$request = str_replace("/SocialNetwork", "", $request);
switch ($request)
{
case ("/"):
case ("/index"):
case ("/index.php"):
case ("index"):
require "Controller/index.php";
break;
case ("/home.php/"):
case ("/home.php"):
case("/home"):
case ("/home"):
if($_SESSION["login_status"] == true)
{
require "Controller/home.php";
break;
}
else
{
require "Controller/index.php";
break;
}
case ("/profile.php/"):
case ("/profile.php"):
case("/profile"):
require "Controller/profile.php";
break;
case ("/register.php/"):
case ("/register.php"):
case("/register"):
require "Controller/register.php";
break;
case ("/register_process.php/"):
case ("/register_process.php"):
case("/register_process"):
require "Controller/register_process.php";
break;
case ("/login_process.php/"):
case ("/login_process.php"):
case("/login_process"):
require "Controller/login_process.php";
break;
case ("/post_process.php/"):
case ("/post_process.php"):
case("/post_process"):
require "Controller/post_process.php";
break;
case ("/add_comment.php/"):
case ("/add_comment.php"):
case("/add_comment"):
require "Controller/add_comment.php";
break;
case ("/logout_process.php/"):
case ("/logout_process.php"):
case ("/logout_process"):
require "Controller/logout_process.php";
break;
case ("/send_comment.php/"):
case ("/send_comment.php"):
case ("/send_comment"):
require "Controller/send_comment.php";
break;
case ("/send_like.php/"):
case ("/send_like.php"):
case ("/send_like"):
require "Controller/send_like.php";
break;
case ("/remove_post.php/"):
case ("/remove_post.php"):
case ("/remove_post"):
require "Controller/remove_post.php";
break;
case ("/edit_post.php/"):
case ("/edit_post.php"):
case ("/edit_post"):
require "Controller/edit_post.php";
break;
case ("/follow_unfollow_user.php/"):
case ("/follow_unfollow_user.php"):
case ("/follow_unfollow_user"):
require "Controller/follow_unfollow_user.php";
break;
default:
require "Controller/404.php";
break;
}
?>