-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhome.phtml
executable file
·173 lines (161 loc) · 6.08 KB
/
home.phtml
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<title>PHP 8 Tips</title>
<!-- Bootstrap core CSS -->
<link href="/css/bootstrap.min.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="/css/scrolling-nav.css" rel="stylesheet">
<link rel="shortcut icon" href="/img/unlikelysource_logo.png" type="image/x-icon">
<link rel="icon" href="/img/unlikelysource_logo.png" type="image/x-icon">
<style>
li a, .dropbtn {
display: inline-block;
color: white;
text-align: center;
text-decoration: none;
vertical-align: top;
}
li a:hover, .dropdown:hover .dropbtn {
background-color: blue;
}
li.dropdown {
display: inline-block;
}
.dropdown-content {
display: none;
position: absolute;
background-color: blue;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 1;
}
.dropdown-content a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
text-align: left;
}
.dropdown-content a:hover {
background-color: gray;
}
.dropdown:hover .dropdown-content {
display: block;
}
</style>
</head>
<body id="page-top">
<!-- Navigation -->
<nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top" id="mainNav">
<div class="container">
<a href="/">
<span style="color:white;font-size:24pt;font-weight:bold;">PHP 8 Tips, Tricks, Best Practices</span>
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarResponsive" style="float:left;">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a class="nav-link js-scroll-trigger" href="/index.php">Home</a>
</li>
<li class="nav-item">
<a class="nav-link js-scroll-trigger" href="/phpmyadmin">phpMyAdmin</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropbtn" href="javascript:void(0)">php.ini</a>
<div class="dropdown-content">
<a class="nav-link js-scroll-trigger" href="/enable_assertions.php">+Assert</a>
<a class="nav-link js-scroll-trigger" href="/enable_overload.php">+Overload</a>
<a class="nav-link js-scroll-trigger" href="/enable_opcache.php">+OPcache</a>
<a class="nav-link js-scroll-trigger" href="/disable_password_hash.php">-Disable Func</a>
<a class="nav-link js-scroll-trigger" href="/restore_php_ini.php">+PHP.INI</a>
</div>
</li>
</ul>
</div>
<div style="margin-left:100px;"><a href="https://unlikelysource.com/"><img src="/img/unlikelysource_logo.png"/></a></div>
</div>
</nav>
<header class="bg-primary text-white" style="height: 50px;">
<div class="container">
<div style="float:left;">
<?= '<span style="font-size:16pt;font-weight:700;">PHP ' . PHP_VERSION . '</span>' ?>
</div>
<div style="float:right;">
<a href="/">
<?php if ($vers === 'php7') : ?>
<img src="/img/php7_logo.png" style="width:150px;height:150px;"/>
<?php else : ?>
<img src="/img/php8_logo.png" style="width:150px;height:150px;"/>
<?php endif; ?>
</a>
</div>
</div>
</header>
<?php if (!empty($filt) && $filt->valid()) : ?>
<section id="about">
<div class="container">
<?= ($message) ? $message : ''; ?>
<?php
// organize into chapters
$ch = 1;
$key = sprintf('ch%02d', $ch);
$hrefView = '';
$hrefRun = '';
echo '<div class="row">'
. '<div class="col-md-12" style="background-color:#F2F2F2;">'
. '<h5>Chapter ' . sprintf('%02d', $ch) . '</h5>'
. '</div></div>';
while ($filt->valid()) {
$fn = $filt->current();
if (strpos($fn, $key) === FALSE) {
$ch++;
$key = sprintf('ch%02d', $ch);
echo '<div class="row">'
. '<div class="col-md-12" style="background-color:#F2F2F2;">'
. '<h5>Chapter ' . sprintf('%02d', $ch) . '</h5>'
. '</div></div>';
}
$check = COLS - 1;
echo '<div class="row">';
for ($x = 0; $x < COLS; $x++) {
if ($filt->valid() && strpos($fn, $key) !== FALSE) {
$name = basename($fn);
$filt->next();
$fn = $filt->current();
$hrefRun = sprintf('<a target="_blank" href="/' . $key . '/%s" title="Run Only">*</a>', $name);
$hrefView = sprintf('<a target="_blank" href="/run.php?file=/' . $key . '/%s" title="View and Run Code">%s</a>', $name, $name);
} else {
$href = '';
}
echo '<div class="' . $col_class . '">' . $hrefView . ' ' . $hrefRun . '</div>' . PHP_EOL;
}
echo '</div>' . PHP_EOL;
}
?>
</div>
</section>
<?php endif; ?>
<?= $output; ?>
<!-- Footer -->
<footer class="py-5 bg-dark">
<div class="container">
<p class="m-0 text-center text-white">Copyright © <a href="https://unlikelysource.com/">unlikelysource.com</a> 2021</p>
</div>
<!-- /.container -->
</footer>
<!-- Bootstrap core JavaScript -->
<script src="/js/jquery.min.js"></script>
<script src="/js/bootstrap.bundle.min.js"></script>
<!-- Plugin JavaScript -->
<script src="/js/jquery-easing/jquery.easing.min.js"></script>
<!-- Custom JavaScript for this theme -->
<script src="/js/scrolling-nav.js"></script>
</body>
</html>