-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdetail.php
74 lines (52 loc) · 1.38 KB
/
detail.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
<?php
include_once "config.php";
include_once "functions.php";
include_once "langfunc.php";
//If the user hasn't chosen anything to display we go back to main menu
if (!isset($_GET['choix']) OR $_GET['choix']=='0')
{
header('Location: index.php');
}
$detailp = true;
$filePath = findFile($_GET['choix']);
$rawFile = findFile($_GET['choix'], RAWDIR, RAW_EXT);
if (!isset($langSet))
{
setLang(getSupported($textArray));
$langSet = true;
}
//if file exists
if ($filePath!==false)
{
//put the downloadable element in the sidenav
$postMenu = "<div class='downloadable'>" .
I18("Télécharger l'it") . "<br/>" . PHP_EOL .
downloadDoc($filePath, $rawFile) .
"</div>" . PHP_EOL;
//$canChange not defined yet (gets defined in header_generic.php)
if (isset($_SESSION['user']) AND $_SESSION['usrlvl']>=2)
{
$postMenu .= getUserAction('detail');
}
}
$pageTitle = $_GET['choix'];
$openbtny = '2px';
//HTML code starts in here
include("header_generic.php");
//HTML for the content
//if the file exists
if ($filePath!==false)
{
echo PHP_EOL . PHP_EOL . "<div id='main'>" . PHP_EOL;
//cette page montre une it
instructDisp($filePath);
echo PHP_EOL . "</div>" . PHP_EOL . PHP_EOL;
}
else // if file not found
{
echo "<h2 style='color: red'>" . I18("Cette it n'a pas été trouvée") . "</h2>";
}
//end of the HTML contents
//HTML code ends in here
include("trailer.php");
?>