-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathindex.php
More file actions
69 lines (55 loc) · 2.57 KB
/
index.php
File metadata and controls
69 lines (55 loc) · 2.57 KB
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
<?php
const LMPA_VERSION = '0.6.1';
define("APP_DIRECTORY", dirname(__FILE__));
if(PHP_OS !== "WINNT") exit("Only work on windows");
ini_set('max_execution_time', '-1');
require_once('vendor/autoload.php');
$bugsnag = Bugsnag\Client::make('279c41fe0baa7abbf7d0014d9f369262');
Bugsnag\Handler::register($bugsnag);
$climate = new League\CLImate\CLImate;
$climate->extend(['ctable' => \Lib\CompactTable::class]);
$progress = $climate->progress(100);
$updateAvailable = check_latest_version();
while(true) {
$climate->clear();
$climate->out("
<red>██╗ </red><green>███╗ ███╗</green><yellow>██████╗ </yellow><blue>█████╗ </blue>
<red>██║ </red><green>████╗ ████║</green><yellow>██╔══██╗</yellow><blue>██╔══██╗</blue>
<red>██║ </red><green>██╔████╔██║</green><yellow>██████╔╝</yellow><blue>███████║</blue>
<red>██║ </red><green>██║╚██╔╝██║</green><yellow>██╔═══╝ </yellow><blue>██╔══██║</blue>
<red>███████╗</red><green>██║ ╚═╝ ██║</green><yellow>██║ </yellow><blue>██║ ██║</blue>
<red>╚══════╝</red><green>╚═╝ ╚═╝</green><yellow>╚═╝ </yellow><blue>╚═╝ ╚═╝</blue>
<red>Laragon</red> <green>Multi</green><yellow>PHP</yellow> per <blue>App</blue> V: ". LMPA_VERSION);
if ($updateAvailable) {
$climate->yellow()->border('═', 58);
$climate->yellow(" Update available: " . LMPA_VERSION . " → " . $updateAvailable);
$climate->yellow(" https://github.com/dansleboby/LMPA/releases/latest");
$climate->yellow()->border('═', 58);
}
$climate->border();
$main = menu([
'Status',
'Manage PHP versions',
'Manage PHP extensions (imagick, yaml, Xdebug, redis, APCu, memcached, mongodb etc...)',
'Manage PHP modules (curl, exif, gettext, intl, gmp, mysqli, pdo, ftp etc...)',
'Manage vhosts',
'Settings',
'Initial Setup',
'Exit'
]);
if($main === "7") break;
if($main === "0")
new \Controller\StatusController($climate);
if($main === "1")
new \Controller\PHPVersionsController($climate);
if($main === "2")
new \Controller\PHPExtensionsController($climate);
if($main === "3")
new \Controller\PHPModulesController($climate);
if($main === "4")
new \Controller\AppsController($climate);
if($main === "5")
new \Controller\SettingsController($climate);
if($main === "6")
new \Controller\SetupController($climate);
}