-
Notifications
You must be signed in to change notification settings - Fork 1
/
Index.php
executable file
·55 lines (47 loc) · 1.71 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
<?php
$dir = dirname(__FILE__);
$page = file_get_contents($dir."/Index.html");
if (isset($_GET["mode"]))
{
if($_GET["mode"]=="utilisateur" && $_GET["page"]=="TraceView")
{
$arr = explode ('=',$_SERVER ["QUERY_STRING"]);
$trace_uri = urldecode($arr[3]) ;
$array = explode ('/',$trace_uri);
$trace_name = $array[count($array)-2];
$a = explode ($trace_name,$trace_uri);
$base_uri = $a[0];
$page = file_get_contents($dir."/indexU.html");
$page = str_replace("\$trace_name", $trace_name, $page);
$page = str_replace("\$base_uri", $base_uri, $page);
echo $page;
}
else if($_GET["mode"]=="admin" && $_GET["page"]=="TraceView")
{
$arr = explode ('=',$_SERVER ["QUERY_STRING"]);
$trace_uri = urldecode($arr[3]) ;
$array = explode ('/',$trace_uri);
$trace_name = $array[count($array)-2];
$a = explode ($trace_name,$trace_uri);
$base_uri = $a[0];
$page = str_replace("\$trace_name", $trace_name, $page);
$page = str_replace("\$base_uri", $base_uri, $page);
$page = str_replace("NA", "A", $page);
echo $page;
}
}
else if ($_GET["page"]=="TraceView")
{
$arr = explode ('=',$_SERVER ["QUERY_STRING"]);
$trace_uri = urldecode($arr[2]) ;
$array = explode ('/',$trace_uri);
$trace_name = $array[count($array)-2];
$a = explode ($trace_name,$trace_uri);
$base_uri = $a[0];
$page = str_replace("\$trace_name", $trace_name, $page);
$page = str_replace("\$base_uri", $base_uri, $page);
echo $page;
}
else
{echo $page;
}