-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathahp.php
executable file
·112 lines (88 loc) · 3.23 KB
/
ahp.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
<?php
/*
* AHP hierarchy project calculation with alternatives
* @author Klaus D. Goepel
* @package AHP-OS
* @since 2013-12-01 release first version ahp hierarchy
*
*
Copyright (C) 2022 <Klaus D. Goepel>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
include 'includes/config.php';
session_start();
$version = substr('$LastChangedDate: 2024-08-16 12:26:02 +0800 (Fr, 16 Aug 2024) $', 18, 10);
$rev = trim('$Rev: 222 $', "$");
$class = 'Ahp' . $lang;
$ahpOs = new $class();
$_SESSION['lang'] = $lang;
$js = new JsCheck();
$login = new Login();
$loggedIn = $login->IsUserLoggedIn();
/*
* --- Web Page HTML OUTPUT ---
*/
$webHtml = new WebHtml($ahpOs->titles['pageTitle']);
if (!(isset($_SESSION['javascript']) && $_SESSION['javascript'])) {
$js->checkJsByForm();
}
// $js->checkJsByCookies();
$loginHeaderText = "<a href=".$urlHome.">BPMSG Home</a>
<a href='ahp-news.php'>Latest News</a>";
if ($js->isJsActivated() === false) {
$loginHeaderText .= "<span class='err'> For full functionality
please allow JavaScript! </span>";
} else {
$loginHeaderText .= "<span class='msg'> Java is enabled. </span>";
}
include 'includes/login/form.login-hl.php';
echo $ahpOs->titles['h1title'];
if (defined('SYS_MSG')) {
echo "<p class='hl'>" . SYS_MSG . "</p>";
}
if (!empty($login->errors) || !empty($login->messages)) {
echo $login->getErrors();
}
$webHtml->displayLanguageSelection();
if (DONATIONS) {
echo "<p>Donation (please \"Send\", not \"Request\"):
<a href='https://paypal.me/ahpDonation'>paypal.me/ahpDonation</a></p>";
}
echo $ahpOs->titles['h2subTitle'];
echo $ahpOs->info['intro11'];
echo $ahpOs->info['intro12'];
echo $ahpOs->info['intro13'];
// --- Terms of use link
echo $ahpOs->info['intro14'];
if (DONATIONS) {
echo $ahpOs->info['intro15'];
}
echo $ahpOs->info['intro16'];
if (!$loggedIn && ($lang == 'EN' || $lang == 'ES' || $lang == 'PT' || $lang == 'RU')) {
echo $ahpOs->info['intro21'];
echo $ahpOs->info['intro22'];
echo $ahpOs->info['intro23'];
echo $ahpOs->info['intro24'];
}
echo "<div style='clear:both;'>";
if (!$loggedIn) {
if (defined('CMTLNK')) {
echo $ahpOs->titles['h2contact'];
printf($ahpOs->info['contact'], CMTLNK);
}
echo "<small>The AHP-OS package is realized in php and available from the author
on <a href='https://github.com/bpmsg/ahp-os' target='_blank' >Github</a>.</small>";
} elseif (in_array($_SESSION['user_id'], $admin)) {
echo "<small><a href='includes/login/do/do-user-admin.php'>AHP-OS admin</a></small>";
}
echo "</div>";
$webHtml->webHtmlFooter($version);