-
Notifications
You must be signed in to change notification settings - Fork 0
/
public_project.php
executable file
·43 lines (33 loc) · 1.21 KB
/
public_project.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
<?php
$is_public = true;
include_once('utility_lgmis_lib.php');
include_once($link_to_utility_authorization);
if ((isset($_POST['id'])) && (isset($_GET['id'])) && ($_POST['id'] !== $_GET['id'])) {
$content = AlertMessage('alert-danger', 'Неоднозначные id');
} else {
$project = Project::FetchByID($_REQUEST['id']);
$header = '';
$content = '';
$footer = '';
$header_type = 'h4';
if ($project === NULL) {
$title = Language::Word('error');
$header = $title;
$content = Language::Word('internal server error');
} else if ($project === Error::no_translation) {
$title = Language::Word('error');
$header = Language::Word('sorry');
$content = Language::Word('no translation for this project');
} else {
$title = $project->name;
$header = htmlspecialchars($project->name);
$content .= '<br><div class="row" align="center">';
$content .= Language::Word('direction of project').': '.Direction::FetchByID($project->direction_id)->LinkToThis();
$content .= '</div>';
$content .= '<br><hr>';
$content .= '<div class="row"><div class="'.ColAllTypes(12).'">'.$project->text_block.'</div></div>';
$no_content_center = true;
}
}
include($link_to_public_template);
?>