-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.php
executable file
·382 lines (314 loc) · 25.6 KB
/
setup.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
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
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
<?php
// EXIT IF DOES NOT HAVE ONE APP
$f = json_decode(file_get_contents(__DIR__."/../../elements/config_files/core/framework.config.json"));
if (!property_exists($f, 'installation')) {
exit("Framework Installer : Property [installation] is undefined in framework.config.json file");
} elseif ($f->installation != null) {
exit("Framework Installer : Cannot use the installer because you have already one app installed.");
}
?>
<!DOCTYPE html>
<html>
<head>
<!--
*
* This is an iumio Framework component
*
* (c) RAFINA DANY <dany.rafina@iumio.com>
*
* iumio Framework, an iumio component [https://www.iumio.com]
*
* To get more information about licence, please check the licence file
*
-->
<title>Framework Installer</title>
<link rel="icon" href="//<?= $_SERVER['HTTP_HOST'] ?>/assets/favicon.ico">
<link rel="stylesheet" href="assets/bootstrap/bootstrap.css" >
<link rel="stylesheet" href="assets/font-awesome/css/font-awesome.min.css" >
<script type="text/javascript" src="assets/jquery/jquery.js"></script>
<script type="text/javascript" src="assets/bootstrap/bootstrap.js"></script>
<script type="text/javascript" src="assets/default.js"></script>
<link rel="stylesheet" href="assets/default.css" >
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
</head>
<body>
<div class="container-fluid">
<div class="row hidden-step row-app">
<div class="sidebar iumio-theme col-xs-12 col-sm-3 col-lg-2 ">
<nav class=" nav-sidebar bg-faded sidebar-style-1 ">
<h1 class="site-title"><a href="https://framework.iumio.com""><img class="img-reponsive img-fluid img-logo-iumio d-block m-x-auto" src="assets/iumio.logo.white.framework.png"></a></h1>
<ul class="nav nav-pills flex-column sidebar-nav">
<li class="nav-item"><a class="nav-link active" id="s1" href="#"><em class="fa fa-dashboard"></em>Welcome <i class="fa fa-check hidden"></i> </a></li>
<li class="nav-item"><a class="nav-link" id="s2" href="#"><em class="fa fa-file-text-o"></em>Licence <i class="fa fa-check hidden"></i></a></li>
<li class="nav-item"><a class="nav-link" id="s3" href="#"><em class="fa fa-list"></em>Requirements <i class="fa fa-check hidden"></i></a></li>
<li class="nav-item"><a class="nav-link" id="s4" href="#"><em class="fa fa-terminal"></em>Naming <i class="fa fa-check hidden"></i></a></li>
<li class="nav-item"><a class="nav-link" id="s5" href="#"><em class="fa fa-desktop"></em>Theme <i class="fa fa-check hidden"></i></a></li>
<li class="nav-item"><a class="nav-link" id="s6" href="#"><em class="fa fa-list-alt"></em>Recap <i class="fa fa-check hidden"></i></a></li>
<li class="nav-item"><a class="nav-link" id="s7" href="#"><em class="fa fa-gears"></em>Processing <i class="fa fa-check hidden"></i></a></li>
<li class="nav-item"><a class="nav-link" id="s8"href="#"><em class="fa fa-check-circle"></em>End <i class="fa fa-check-circle hidden"></i></a></li>
</ul>
</nav>
</div>
<main class="col-xs-12 col-sm-9 offset-sm-3 col-lg-10 offset-lg-3 col-xl-10 offset-xl-2 pt-3 pl-4">
<header class="page-header row justify-center">
<div class="col-md-12 col-lg-12">
<div class="row">
<h1 class="float-left text-center text-md-left header-text-iumio">Framework - Installation</h1>
</div>
<div class="progress progress-custom progress-md" >
<div class="progress-bar bg-primary iumio-installer-global-pg" style="width: 2%" role="progressbar" aria-valuenow="2" aria-valuemin="0" aria-valuemax="100"></div>
</div>
</div>
<div class="clear"></div>
<div class="clear"></div>
</header>
<section class="row content-iumio-installer">
<div class="col-sm-12">
<section class="row">
<div class="col-md-12 col-lg-8">
<div class="jumbotron " id="step1">
<h1 class="mb-4">Welcome on the Framework Installer (FI)</h1>
<p class="lead">With this interface, you will install the various components of the framework and your first appplication.</p>
<p>We will guide you so that the installation is carried out correctly.</p>
<p class="lead"><a class="btn btn-primary btn-lg mt-2" href="#" id="clicked" role="button">I'm ready now</a></p>
</div>
<div class="jumbotron hidden" id="step2">
<h1 class="mb-4">Licence</h1>
<p class="errorlicence bg-danger text-light" style="display: none;text-align: center;font-size: 20px;">Please check "I agree and accept licence terms and conditions" to continue app installation.</p>
<p class="lead">iumio framework is MIT licensed. Please read the entire license below.</p>
<hr>
<div class="licence">
<h3 style="text-align: center;">MIT License</h3>
<p style="text-align: center;">Version 3, 29 June 2007</p>
<p>Copyright (c) <?= date("Y")?> Rafina Dany - dany.rafina@iumio.com<br/>
<a href="https://framework.iumio.com/">https://framework.iumio.com/</a>
</p>
<p>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.</p>
<p>Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:</p>
<p>The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.</p>
<p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
</p>
</div>
<br>
<hr class="">
<div class="row justify-content-center">
<div>
<div class="check check-terms text-left">
<input id="check" type="checkbox" class="cterms"/>
<label for="check">
<div class="box"><i class="fa fa-check fa-check-md"></i></div>
</label>
</div>
</div>
<p class="sentence-accept-terms ">
I agree and accept licence terms and conditions.
</p>
</div>
<div class="row justify-content-center">
<p class="lead"><a class="btn btn-danger btn-lg mt-2 decline-licence" href="#" id="clicked" role="button">Decline</a></p>
<p class="lead"><a class="btn btn-primary btn-lg mt-2 offset-2 accept-licence" href="#" id="clicked" role="button">Accept</a></p>
</div>
</div>
<div class="jumbotron hidden" id="step3">
<h1 class="mb-4">Requirements</h1>
<p class="lead">Installer checks if your environment are compatible and downloads required libraries.</p>
<div class="row">
<div class="list-group requirements-list">
<a href="#" class="list-group-item list-group-item-action flex-column align-items-start active phpversion">
<div class="d-flex w-100 justify-content-between">
<h5 class="mb-1" >PHP Version : <span class="phpversionnum"></span> <span class="isok"></span></h5>
<small><i class="fa fa-check text-success hidden-step"></i></small>
</div>
<p class="mb-1">Framework requires version 7.2 or higher to work.</p>
<div class="error bg-danger text-light hidden-step"></div>
</a>
<a href="#" class="list-group-item list-group-item-action flex-column align-items-start fversion">
<div class="d-flex w-100 justify-content-between">
<h5 class="mb-1" >Framework Version : <span class="fversionnum"></span> <span class="isok"></span></h5>
<small class="text-muted"><i class="fa fa-check text-success hidden-step"></i></small>
</div>
<p class="mb-1">The installer checks the version of the framework.</p>
<div class="error bg-danger text-light hidden-step"></div>
</a>
<a href="#" class="list-group-item list-group-item-action flex-column align-items-start wr">
<div class="d-flex w-100 justify-content-between">
<h5 class="mb-1">Writable and readable directories : <span class="isok">...</span> </h5>
<small class="text-muted"><i class="fa fa-check text-success hidden-step"></i></small>
</div>
<p class="mb-1">./web ./elements ./apps folders must have read, write, and execute permissions.</p>
<div class="error bg-danger text-light hidden-step"></div>
</a>
<a href="#" class="list-group-item list-group-item-action flex-column align-items-start libsr">
<div class="d-flex w-100 justify-content-between">
<h5 class="mb-1">Verify required librairies : <span class="isok">In progress</span> </h5>
<small class="text-muted"><i class="fa fa-check text-success hidden-step"></i></small>
</div>
<p class="mb-1">The installer should check if the libraries have been correctly installed.</p>
<div class="error bg-danger text-light hidden-step"></div>
</a>
</div>
</div>
<br>
<div class="row justify-content-center">
<p class="lead"><a id="retrys3" class="btn btn-danger btn-lg mt-2 hidden-step" onclick="step3()" href="#" role="button">Retry</a></p>
<p class="lead"><a id="continues3" class="btn btn-primary btn-lg mt-2 hidden-step" href="#" role="button">Next</a></p>
</div>
</div>
<div class="jumbotron hidden" id="step4">
<h1 class="mb-4">Naming your application</h1>
<p class="lead">Please, enter the name would like to your application.</p>
<h4 class="bg-danger text-light" style="font-size: 20px;text-align: center;display: none" id="error1">Your app name is incorrect</h4>
<div class="input-group mb-2 mr-sm-2 mb-sm-0">
<input type="text" class="form-control" id="appname" placeholder="Your application name">
</div>
<br>
<p class="text-light bg-primary text-left col-form-label" style="padding-left: 10px" <em><i class="fa fa-question"></i> In order to respect naming rules of iumio Framework, the name of your application will end with "App" keyword.</em></p>
<p class="text-light bg-info text-left col-form-label" style="padding-left: 10px" <em><i class="fa fa-warning"></i> The name of your application must contain at least 4 characters and do not start with a numeric value.</em></p>
<br>
<div class="row justify-content-around">
<p class="lead"><a id="continues4" class="btn btn-primary btn-lg mt-2" href="#" role="button">Next</a></p>
</div>
</div>
<div class="jumbotron hidden" id="step5">
<h1 class="mb-4">Starter Theme</h1>
<p class="lead">With iumio Framework, you have the possibility to install with your application, a default theme to help you in the development of an interface.</p>
<br>
<p class="text-light bg-primary text-left col-form-label" style="padding-left: 10px"><i class="fa fa-question"></i> Do you want to install this theme?</p>
<br>
<div class="row justify-content-center">
<p class="lead"><a class="btn btn-danger btn-lg mt-2" href="#" id="no5" role="button">I refuse</a></p>
<p class="lead"><a class="btn btn-primary btn-lg mt-2 offset-2" href="#" id="yes5" role="button">I want to install this theme</a></p>
</div>
</div>
<div class="jumbotron hidden" id="step6">
<h1 class="mb-4">Summary of the installation.</h1>
<p class="lead">Before proceeding with the installation of iumio Framework, here is a little summary so that you can see if everything is correct.</p>
<div class="bg-info text-light padd-bg" style="padding-left: 20px; padding-bottom: 15px">
<div class="row">
<div class="col-md-2">
<img class="img-thumbnail img-logo-iumio-thumb" src="assets/iumio.logo.white.framework.png"/>
</div>
<div class="col-md-10">
<span class="red-color"> Installation for <strong><span id="recapfedition"></span></strong></span>
<br>
<span>More info : <a class="alert-link" onclick="window.open('https://framework.iumio.com', '_blank')">Go to iumio Framework website</a></span>
</div>
</div>
</div>
<br>
<div class="list-group">
<a href="#" class="list-group-item list-group-item-action flex-column align-items-start active">
<div class="d-flex w-100 justify-content-between">
<h5 class="mb-1" id="appnamers"></h5>
<small><i class="fa fa-check text-success"></i></small>
</div>
<p class="mb-1">You named your application "<span id="appnamesplited"></span>". The keyword "App" has been added by the installer to respect the naming of iumio applications.</p>
</a>
<a href="#" class="list-group-item list-group-item-action flex-column align-items-start">
<div class="d-flex w-100 justify-content-between">
<h5 class="mb-1">Application enabled</h5>
<small class="text-muted"><i class="fa fa-check text-success"></i></small>
</div>
<p class="mb-1">As this is your first application on this instance of iumio framework, the installer has automatically activated this application so that it is directly usable.</p>
</a>
<a href="#" class="list-group-item list-group-item-action flex-column align-items-start">
<div class="d-flex w-100 justify-content-between">
<h5 class="mb-1">Theme installation : <span id="templaters"></span></h5>
<small class="text-muted"><i class="fa fa-check text-success"></i></small>
</div>
<p class="mb-1 rsp1-recap" style="display: none">You agreed to install the default theme. You will have a basic html / css structure to help you create your interface.</p>
<p class="mb-1 rsp2-recap" style="display: none">You have chosen not to install the default theme. The first display of your application will be a JSON.</p>
</a>
</div>
<br>
<div class="bg-warning text-light padd-bg" style="padding-left: 20px">
<p id="alphastage" style="display: none">
<span class="red-color">Warning</span> : This version is in alpha stage. Please don't use it for your production projects
</p>
<p id="betastage" style="display: none">
<span class="red-color">Warning</span> : This version is in beta stage. Please don't use it for your production projects
</p>
<p id="rcstage" style="display: none">
<span class="red-color">Warning</span> : This version is in release candidate stage. Please don't use it for your production projects
</p>
</div>
<div class="bg-info text-light padd-bg" style="padding-left: 20px; padding-bottom: 15px">
<div class="row">
<div class="col-md-2">
<img class="img-thumbnail img-logo-iumio-thumb" src="assets/logo_white.png"/>
</div>
<div class="col-md-10">
<span class="red-color">iumio Framework Installer is a property of iumio</span>
<br>
<span>More info about iumio : <a class="alert-link" onclick="window.open('https://www.iumio.com', '_blank')">Click here</a></span>
<br>
<span>More info about iumio Framework : <a class="alert-link" onclick="window.open('https://framework.iumio.com', '_blank')">Click here</a></span>
</div>
</div>
</div>
<br>
<h5>Is this configuration correct for you?</h5>
<br>
<div class="row justify-content-center">
<p class="lead"><a class="btn btn-danger btn-lg mt-2" href="#" id="cancelfinal" role="button">Cancel the installation</a></p>
<p class="lead"><a class="btn btn-primary btn-lg mt-2 offset-2" href="#" id="create" role="button">Yes, I want to create my app</a></p>
</div>
</div>
<div class="jumbotron hidden" id="step7">
<h1 class="mb-4">Processing</h1>
<p class="lead">The installer is in the process of installing your application.</p>
<div class="content-middle">
<h5> Installation : <strong><span id="appnamecreate"></span></strong></h5>
<br>
<div class="progress" style="background-color: #6eb4f9" >
<div class="progress-bar progress-bar-striped progress-bar-animated" id="prg-insta-iumio" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%;"></div>
</div>
</div>
</div>
<div class="jumbotron hidden" id="step8">
<h1 class="mb-4 text-success">Completed</h1>
<p class="lead">The installer has created your application successfully.</p>
<p>Your application is available at this url: <a id="furl" href="#"></a></p>
<div class="bg-info text-light padd-bg" style="padding-left: 20px; padding-bottom: 15px">
<div class="row">
<div class="col-md-2">
<img class="img-thumbnail img-logo-iumio-thumb" src="assets/logo_white.png"/>
</div>
<div class="col-md-10">
<span class="red-color">For more security, please remove the installer (entire "setup" folder)</span>
<br>
<span>More info : <a class="alert-link" onclick="window.open('https://framework.iumio.com', '_blank')">iumio Framework website</a></span>
</div>
</div>
</div>
<br>
<p class="lead"><a class="btn btn-primary btn-lg mt-2" href="#" id="furl2" role="button">Go to index</a></p>
</div>
<div class="jumbotron hidden" id="step9">
<h1 class="mb-4 text-danger">An error has been generated</h1>
<p class="lead">The installer generated an error while installing your application.</p>
<p>You must restart the installation if you wish to try again.</p>
<p class="lead"><a class="btn btn-primary btn-lg mt-2" href="#" id="retryinstallation" role="button">Restart the installation</a></p>
</div>
</div>
</div>
</section>
</main>
</div>
</div>
</body>
</html>