File tree 1 file changed +11
-6
lines changed
1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change 2
2
$ dir_path = __DIR__ ;
3
3
$ dirs = glob ($ dir_path . '/* ' , GLOB_ONLYDIR );
4
4
if (count ($ dirs ) > 0 ) {
5
- usort ($ dirs , function ($ a , $ b ) {
6
- return intval ($ a ) - intval ($ b );
7
- });
8
- $ largest_dir = end ($ dirs );
5
+ natsort ($ dirs ); // Сортировка папок по числовым значениям
6
+ $ largest_dir = end ($ dirs ); // Получение наибольшей папки
9
7
$ dirname = basename ($ largest_dir );
10
8
$ current_url = (isset ($ _SERVER ['HTTPS ' ]) && $ _SERVER ['HTTPS ' ] === 'on ' ? "https " : "http " ) . ":// $ _SERVER [HTTP_HOST ]" . $ _SERVER ['REQUEST_URI ' ] . '/ ' . $ dirname ;
11
9
$ current_url = str_replace ("index.php " , "" , $ current_url );
16
14
<head>
17
15
<meta charset="UTF-8">
18
16
<meta name="viewport" content="width=device-width, initial-scale=1.0">
19
- <title>Redirect </title>
17
+ <title>Масоны-ДР (Masonry-AR) </title>
20
18
<style>
21
19
body, html {
22
20
margin: 0;
32
30
</style>
33
31
</head>
34
32
<body>
33
+ <script>
34
+ if (window.location.protocol === 'http:') {
35
+ var newUrl = window.location.href.replace('http:', 'https:')
36
+ window.location.assign(newUrl)
37
+ }
38
+ </script>
35
39
<iframe src="<?php echo $ current_url ; ?> " frameborder="0"></iframe>
36
40
</body>
37
41
</html>
40
44
exit ;
41
45
} else {
42
46
echo "No numeric folder in script directory! " ;
43
- }
47
+ }
48
+ ?>
You can’t perform that action at this time.
0 commit comments