-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
compatibility.php
72 lines (62 loc) · 2.53 KB
/
compatibility.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
<?php
// +------------------------------------------------------------------------+
// | @author Oscar Garcés (SoyVillareal)
// | @author_url 1: https://soyvillareal.com
// | @author_url 2: https://github.com/soyvillareal
// | @author_email: [email protected]
// +------------------------------------------------------------------------+
// | PHP Magazine - The best digital magazine for newspapers or bloggers
// | Licensed under the MIT License. Copyright (c) 2022 PHP Magazine.
// +------------------------------------------------------------------------+
require_once('./assets/init.php');
$browsers = array(
array(
'name' => 'Google Chrome',
'link' => 'https://www.google.com/chrome/index.html',
'logo' => Functions::GetFile('images/browsers/chrome.png', 2)
),
array(
'name' => 'Microsoft Edge',
'link' => 'https://www.microsoft.com/edge',
'logo' => Functions::GetFile('images/browsers/edgium.png', 2)
),
array(
'name' => 'Opera',
'link' => 'https://www.opera.com/',
'logo' => Functions::GetFile('images/browsers/opera.png', 2)
),
array(
'name' => 'Mozilla Firefox',
'link' => 'https://www.mozilla.org/firefox/new/',
'logo' => Functions::GetFile('images/browsers/firefox.png', 2)
)
);
foreach ($browsers as $key => $browser) {
$TEMP['!class'] = '';
$TEMP['!name'] = $browser['name'];
$TEMP['!link'] = $browser['link'];
$TEMP['!logo'] = $browser['logo'];
if($key == 1){
$TEMP['!class'] = ' second';
} else if($key == end(array_keys($browsers))){
$TEMP['!class'] = ' last';
}
$TEMP['browsers'] .= Functions::Build('includes/compatibility/browsers');
}
Functions::DestroyBuild();
$TEMP['title'] = $TEMP['#word']['browser_up_date'];
$TEMP['description'] = str_replace('{$settings->title}', $TEMP['#settings']['title'], $TEMP['#word']['can_use_latest_features']);
if(true){
if(!isset($_COOKIE['not_supported'])){
setcookie("not_supported", true, time() + 315360000, "/");
}
$TEMP['title'] = $TEMP['#word']['please_update_browser'];
$TEMP['description'] = str_replace('{$settings->title}', $TEMP['#settings']['title'], $TEMP['#word']['browser_isnt_supported_anymore']);
} else {
setcookie('not_supported', null, -1, '/');
}
$TEMP['#title'] = $TEMP['#word']['browser_not_supported']. ' - ' . $TEMP['#settings']['title'];
$TEMP['#description'] = $TEMP['#settings']['description'];
$TEMP['#keywords'] = $TEMP['#settings']['keywords'];
echo Functions::Build('compatibility');
?>