1
|
|
|
<?php |
2
|
|
|
/* |
3
|
|
|
* ***************************************************************************** |
4
|
|
|
* Contributions to this work were made on behalf of the GÉANT project, a |
5
|
|
|
* project that has received funding from the European Union’s Framework |
6
|
|
|
* Programme 7 under Grant Agreements No. 238875 (GN3) and No. 605243 (GN3plus), |
7
|
|
|
* Horizon 2020 research and innovation programme under Grant Agreements No. |
8
|
|
|
* 691567 (GN4-1) and No. 731122 (GN4-2). |
9
|
|
|
* On behalf of the aforementioned projects, GEANT Association is the sole owner |
10
|
|
|
* of the copyright in all material which was developed by a member of the GÉANT |
11
|
|
|
* project. GÉANT Vereniging (Association) is registered with the Chamber of |
12
|
|
|
* Commerce in Amsterdam with registration number 40535155 and operates in the |
13
|
|
|
* UK as a branch of GÉANT Vereniging. |
14
|
|
|
* |
15
|
|
|
* Registered office: Hoekenrode 3, 1102BR Amsterdam, The Netherlands. |
16
|
|
|
* UK branch address: City House, 126-130 Hills Road, Cambridge CB2 1PQ, UK |
17
|
|
|
* |
18
|
|
|
* License: see the web/copyright.inc.php file in the file structure or |
19
|
|
|
* <base_url>/copyright.php after deploying the software |
20
|
|
|
*/ |
21
|
|
|
|
22
|
|
|
/** |
23
|
|
|
* Back-end supplying information for the main_menu_content window |
24
|
|
|
* @author Tomasz Wolniewicz <[email protected]> |
25
|
|
|
* @package UserGUI |
26
|
|
|
* |
27
|
|
|
* This handles the popups from the main menu. The page argument is saved in the $page variable and used |
28
|
|
|
* to select the proper handler. If the contents is read form a file which supplies its own title |
29
|
|
|
* then you need to preappend the returned data with the 'no_title' string, this will cause |
30
|
|
|
* the receiving end to strip this marker and not add the title by itself. |
31
|
|
|
* |
32
|
|
|
*/ |
33
|
|
|
$cat = new core\CAT(); |
34
|
|
|
$skinObject = new \web\lib\user\Skinjob("classic"); |
35
|
|
|
/// eduroam CAT, twice the consortium name eduroam, twice eduroam CAT |
36
|
|
|
$out = sprintf(_("<span class='edu_cat'>%s</span> is built as a cooperation platform."), \config\Master::APPEARANCE['productname'])."<p>". |
37
|
|
|
sprintf(_("Local %s administrators enter their %s configuration details and based on them, <span class='edu_cat'>%s</span> builds customised installers for a number of popular platforms. ". |
38
|
|
|
"An installer prepared for one organisation will not work for users of another one, therefore if your organisation is not on the list, you cannot use this system. ". |
39
|
|
|
"Please contact your local administrators and try to influence them to add your %s configuration to <span class='edu_cat'>%s</span>."), |
40
|
|
|
\config\Master::APPEARANCE['productname'], |
41
|
|
|
\config\ConfAssistant::CONSORTIUM['display_name'], |
42
|
|
|
\config\ConfAssistant::CONSORTIUM['display_name'], |
43
|
|
|
\config\Master::APPEARANCE['productname'], |
44
|
|
|
\config\Master::APPEARANCE['productname']); |
45
|
|
|
$out .= "<p>" . sprintf(_("<span class='edu_cat'>%s</span> currently supports the following devices and EAP type combinations:"), \config\Master::APPEARANCE['productname']) . "</p>"; |
46
|
|
|
$out .= "<table><tr><th>" . _("Device Group") . "</th><th>" . _("Device") . "</th>"; |
47
|
|
|
foreach (\core\common\EAP::listKnownEAPTypes() as $oneeap) { |
48
|
|
|
$out .= "<th style='min-width: 80px;'>" . $oneeap->getPrintableRep() . "</th>"; |
49
|
|
|
} |
50
|
|
|
$out .= "</tr>"; |
51
|
|
|
foreach (\devices\Devices::listDevices() as $index => $onedevice) { |
52
|
|
|
if (isset($onedevice['options'])) { |
53
|
|
|
if ((isset($onedevice['options']['hidden']) && ( $onedevice['options']['hidden'] == 1 || $onedevice['options']['hidden'] == 2 ))|| (isset($onedevice['options']['redirect']) && ($onedevice['options']['redirect'] == 1))) { |
|
|
|
|
54
|
|
|
continue; |
55
|
|
|
} |
56
|
|
|
} |
57
|
|
|
$vendor = (new \web\lib\user\Skinjob())->findResourceUrl("IMAGES", "vendorlogo/" . $onedevice['group'] . ".png"); |
58
|
|
|
$vendorImg = ""; |
59
|
|
|
if ($vendor !== FALSE) { |
60
|
|
|
$vendorImg = "<img src='$vendor' alt='logo'>"; |
61
|
|
|
} |
62
|
|
|
$out .= "<tr><td class='vendor'>$vendorImg</td><td>" . $onedevice['display'] . "</td>"; |
63
|
|
|
$device_instance = new \core\DeviceFactory($index); |
64
|
|
|
foreach (\core\common\EAP::listKnownEAPTypes() as $oneeap) { |
65
|
|
|
$out .= "<td>"; |
66
|
|
|
if (in_array($oneeap->getArrayRep(), $device_instance->device->supportedEapMethods)) { |
67
|
|
|
$check = $skinObject->findResourceUrl("IMAGES", "icons/Tabler/square-rounded-check-filled-green.svg"); |
68
|
|
|
if ($check !== FALSE) { |
69
|
|
|
$out .= "<img src='$check' alt='SUPPORTED'>"; |
70
|
|
|
} |
71
|
|
|
} else { |
72
|
|
|
$not = $skinObject->findResourceUrl("IMAGES", "icons/Tabler/square-rounded-x-filled-red.svg"); |
73
|
|
|
if ($not !== FALSE) { |
74
|
|
|
$out .= "<img src='$not' alt='UNSUPPORTED'>"; |
75
|
|
|
} |
76
|
|
|
} |
77
|
|
|
$out .= "</td>"; |
78
|
|
|
} |
79
|
|
|
$out .= "</tr>"; |
80
|
|
|
} |
81
|
|
|
$out .= "</table>"; |
82
|
|
|
|
83
|
|
|
$validator = new \web\lib\common\InputValidation(); |
84
|
|
|
$host = $validator->hostname($_SERVER['SERVER_NAME']); |
85
|
|
|
if ($host === FALSE) { |
86
|
|
|
throw new Exception("We don't know our own hostname!"); |
87
|
|
|
} |
88
|
|
|
$out .= sprintf(_("<p><span class='edu_cat'>%s</span> is publicly accessible. To enable its use behind captive portals (e.g. on a 'setup' SSID which only allows access to CAT for device configuration), the following hostnames need to be allowed for port TCP/443 in the portal:</p>" |
89
|
|
|
. "<b><u>REQUIRED</u></b>" |
90
|
|
|
. "<ul>" |
91
|
|
|
. "<li><b>%s</b> (the service itself)</li>"), \config\Master::APPEARANCE['productname'], $host); |
92
|
|
|
if (!empty(\config\Master::APPEARANCE['webcert_CRLDP'])) { |
93
|
|
|
$out .= sprintf(ngettext("<li><b>%s</b> (the CRL Distribution Point for the site certificate), also TCP/80</li>", "<li><b>%s</b> (the CRL Distribution Points for the site certificate), also TCP/80</li>", count(\config\Master::APPEARANCE['webcert_CRLDP'])), implode(", ", \config\Master::APPEARANCE['webcert_CRLDP'])); |
94
|
|
|
} |
95
|
|
|
if (!empty(\config\Master::APPEARANCE['webcert_OCSP'])) { |
96
|
|
|
$out .= sprintf(ngettext("<li><b>%s</b> (the OCSP Responder for the site certificate), also TCP/80</li>", "<li><b>%s</b> (the OCSP Responder for the site certificate), also TCP/80</li>", count(\config\Master::APPEARANCE['webcert_OCSP'])), implode(", ", \config\Master::APPEARANCE['webcert_OCSP'])); |
97
|
|
|
} |
98
|
|
|
$out .= sprintf(_("<li><b>android.l.google.com</b> (Google Play access for Android App)</li>" |
99
|
|
|
. "<li><b>android.clients.google.com</b> (Google Play access for Android App)</li>" |
100
|
|
|
. "<li><b>play.google.com</b> (Google Play access for Android App)</li>" |
101
|
|
|
. "<li><b>ggpht.com</b> (Google Play access for Android App)</li>" |
102
|
|
|
. "</ul>" |
103
|
|
|
. "<b><u>RECOMMENDED</u></b> for full Google Play functionality (otherwise, Play Store will look broken to users and/or some non-vital functionality will not be available)" |
104
|
|
|
. "<ul>" |
105
|
|
|
. "<li><b>photos-ugc.l.google.com</b></li>" |
106
|
|
|
. "<li><b>googleusercontent.com</b></li>" |
107
|
|
|
. "<li><b>ajax.googleapis.com</b></li>" |
108
|
|
|
. "<li><b>play.google-apis.com</b></li>" |
109
|
|
|
. "<li><b>googleapis.l.google.com</b></li>" |
110
|
|
|
. "<li><b>apis.google.com</b></li>" |
111
|
|
|
. "<li><b>gstatic.com</b></li>" |
112
|
|
|
. "<li><b>www.google-analytics.com</b></li>" |
113
|
|
|
. "<li><b>wallet.google.com</b></li>" |
114
|
|
|
. "<li><b>plus.google.com</b></li>" |
115
|
|
|
. "<li><b>checkout.google.com</b></li>" |
116
|
|
|
. "<li><b>*.gvt1.com</li>" |
117
|
|
|
. "</ul>" |
118
|
|
|
)); |
119
|
|
|
|