-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
114 lines (93 loc) · 3.62 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
114
<?php
session_start();
if (!isset($_COOKIE['mode']))
{
setcookie("mode", "dark");
}
$titles = array(
"index"=>"<title> خرید رهن اجاره آپارتمان خانه ویلایی و تجاری و اداری 🏠 | املاک آنلاین</title>",
"404"=> "<title> 404 :: صفحه مورد نظر پیدا نشد| املاک آنلاین</title>",
"magazines" => "<title> مقالات ملک آنلاین | املاک آنلاین </title>",
"contact-us" => "<title> ارتباط با ما | املاک آنلاین </title>",
"profile" => "<title> صفحه پروفایل شما | املاک آنلاین </title>",
"houses"=>"<title> خرید رهن اجاره آپارتمان خانه ویلایی و تجاری و اداری | املاک آنلاین</title>",
);
$_SESSION['titels'] = $titles;
date_default_timezone_set("Asia/Tehran");
$request = $_SERVER["REQUEST_URI"];
if(!empty($_GET['id']))
{
$id = $_GET['id'];
}
else
{
$id = '';
}
switch ($request) {
case("/MelkOnline"):
case("/MelkOnline/"):
case("/MelkOnline/index"):
case("/MelkOnline/index/"):
require __DIR__."/controller/index.php";
break;
case("/MelkOnline/magazine"):
require __DIR__."/controller/magazine.php";
break;
case("/MelkOnline/magazine?id=".$id):
require __DIR__."/controller/magazine.php";
break;
case("/MelkOnline/contact-us"):
require __DIR__."/controller/contact-us.php";
break;
case("/MelkOnline/SendMessage"):
require __DIR__."/controller/send_message.php";
break;
case("/MelkOnline/login"):
require __DIR__."/controller/login.php";
break;
case("/MelkOnline/GetRegion"):
require __DIR__."/controller/postRegion.php";
break;
case("/MelkOnline/register"):
require __DIR__."/controller/sign_up.php";
break;
case("/MelkOnline/logOut"):
require __DIR__."/controller/logout.php";
break;
case("/MelkOnline/personalInfo"):
require __DIR__."/controller/profile.php";
break;
case("/MelkOnline/bookmarks"):
require __DIR__."/controller/profile.php";
break;
case("/MelkOnline/changePass"):
require __DIR__."/controller/profile.php";
break;
case("/MelkOnline/changePassword"):
require __DIR__."/controller/changePassword.php";
break;
case("/MelkOnline/changePersonalInfo"):
require __DIR__."/controller/changePersonalInfo.php";
break;
case("/MelkOnline/houses"):
require __DIR__."/controller/houses.php";
break;
case("/MelkOnline/houses?id=".$id):
require __DIR__."/controller/house.php";
break;
case("/MelkOnline/ManageBookmarks"):
require __DIR__."/controller/manage_bookmarks.php";
break;
case("/MelkOnline/send-comment"):
require __DIR__."/controller/add_comment.php";
break;
case("/MelkOnline/searchRegions"):
require __DIR__."/controller/searchRegions.php";
break;
case("/MelkOnline/searchHouse"):
require __DIR__."/controller/searchHouse.php";
break;
default:
require __DIR__."/controller/404.php";
break;
}