-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.php
261 lines (245 loc) · 12 KB
/
install.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
<?php
/*
* Copyright 2013, 2013 Andrea Ferroni
*
* This file is part of "JoM|The Job Manager".
*
* "JoM|The Job Manager" is free software: you can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* "JoM|The Job Manager" is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Nome-Programma. If not, see <http://www.gnu.org/licenses/>.
*
*/
define('DIR_BASE', './');
require_once(DIR_BASE.'cfg/config.php');
?>
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link type="text/plain" rel="author" href="./humans.txt" />
<link href="./css/bootstrap.min.css" rel="stylesheet" type="text/css" media="screen">
<link href="./css/jom_default_style.css" rel="stylesheet" type="text/css" media="screen">
<link href="./css/install.css" rel="stylesheet" type="text/css" media="screen">
<script language="javascript" type="text/javascript" src="./js/lib/jquery-1.9.0.min.js"></script>
<script language="javascript" type="text/javascript" src="./js/installation_procedure.js"></script>
<script language="javascript" type="text/javascript" src="./js/generic_lib.js"></script>
<title>Procedura di installazione</title>
<script>
$(document).ready(function() {
// install tooltips
$("#inst_db_createdb").tooltip();
$("#inst_db_tableprepend").tooltip();
// set default form statuses
create_new_database_toggled(0);
delete_existing_file_toggled(0)
$("#inst_db_createdb").removeAttr("checked");
$("#inst_db_removeifany").removeAttr("checked");
$("#inst_db_delprevfile").removeAttr("checked");
$("#inst_db_removeifanyfile").removeAttr("checked");
// set install step data
$("body").data('step', 0);
// smooth intro animation... just to add something unuseful...
jsJOMlib__animate_opacity($("h1 > img"), 1, function(){
jsJOMlib__animate_opacity($("h2"), 1, function(){
go_to_step(0);
});
});
});
</script>
</head>
<body>
<div class="container">
<div class="row">
<h1 class="text-center">
<img src="./img/JoM_logo.png" alt="JoM logo image: JoM - the Job Manager" title="JoM logo">
</h1>
</div>
<div class="row">
<h2>Software installation procedure</h2>
</div>
<!-- BACK -->
<div class="row" id="jom_rowback">
<div class="span12 text-center">
<div class="controls">
<a class="btn btn-primary" href="#" onclick="javascript: go_to_step(-1);"><i class="icon-chevron-left"></i> Go back</a>
</div>
</div>
</div>
<!-- FIELDSET 0 - database configuration -->
<div class="row" id="fieldset_0">
<div class="span6 offset3">
<form class="form-horizontal">
<fieldset>
<legend>1. Database configuration</legend>
<div class="control-group">
<label class="control-label" for="inst_db_type">Database type</label>
<div class="controls">
<select id="inst_db_type" placeholder="Select database type">
<option value="MySQL" selected>MySQL</option>
<option value="SQLite">SQLite</option>
</select>
</div>
</div>
<div class="control-group">
<label class="control-label" for="inst_db_name">Database name</label>
<div class="controls">
<input class="input-medium" type="text" id="inst_db_name">
</div>
</div>
</fieldset>
</form>
</div>
</div>
<!-- FIELDSET 1a - DBMS deeper parameters -->
<div class="row" id="fieldset_1">
<div class="span6">
<form class="form-horizontal">
<fieldset id="fieldset_1_a">
<legend>2a. Database server parameters</legend>
<div class="control-group">
<label class="control-label" for="inst_db_hostname">Host</label>
<div class="controls">
<input class="input-medium" id="inst_db_hostname" type="text" value="localhost">
</div>
</div>
<div class="control-group">
<label class="control-label" for="inst_db_createdb">Create new database</label>
<div class="controls">
<input id="inst_db_createdb" type="checkbox" title="if checked, existing database with the same name will be deleted" onclick="javascript: create_new_database_toggled($(this).is(':checked'));">
</div>
</div>
<div class="control-group">
<label class="control-label" for="inst_db_deliftbl_mysql">Clear tables if database exists</label>
<div class="controls">
<input id="inst_db_deliftbl_mysql" type="checkbox">
</div>
</div>
<div class="control-group">
<label class="control-label" for="inst_db_username">Username</label>
<div class="controls">
<input id="inst_db_username" type="text">
</div>
</div>
<div class="control-group">
<label class="control-label" for="inst_db_password">Password</label>
<div class="controls">
<input id="inst_db_password" type="password">
</div>
</div>
<div class="control-group">
<label class="control-label" for="inst_db_tableprepend">Tables prepend</label>
<div class="controls">
<input class="input-small" id="inst_db_tableprepend" type="text" title="Useful if using one single database for more than one application">
</div>
</div>
</fieldset>
</form>
</div>
<div class="span6">
<form class="form-horizontal">
<fieldset id="fieldset_1_b">
<legend>2b. Database admin parameters</legend>
<div class="control-group">
<p><span class="label label-info">Info</span> - following data will not be saved</p>
</div>
<div class="control-group jom_create_db">
<label class="control-label" for="inst_db_superuser">Username</label>
<div class="controls">
<input id="inst_db_superuser" type="text">
</div>
</div>
<div class="control-group jom_create_db">
<label class="control-label" for="inst_db_superpass">Password</label>
<div class="controls">
<input id="inst_db_superpass" type="password">
</div>
</div>
<div class="control-group">
<label class="control-label" for="inst_db_removeifany">Remove database if exists</label>
<div class="controls">
<input id="inst_db_removeifdbexists" type="checkbox">
</div>
</div>
</fieldset>
</form>
</div>
</div>
<!-- FIELDSET 1c - SQLITE parameters -->
<div class="row" id="fieldset_2">
<div class="span6 offset3">
<form class="form-horizontal">
<fieldset>
<legend>2. Database parameters</legend>
<div class="control-group">
<label class="control-label" for="inst_db_delprevfile">Delete existing file</label>
<div class="controls">
<input id="inst_db_delprevfile" type="checkbox" title="if checked, existing database file with the same name will be deleted" onclick="javascript: delete_existing_file_toggled($(this).is(':checked'))">
</div>
</div>
<div class="control-group">
<label class="control-label" for="inst_db_deliftbl_sqlite">Clear tables if database exists</label>
<div class="controls">
<input id="inst_db_deliftbl_sqlite" type="checkbox">
</div>
</div>
<div class="control-group">
<label class="control-label" for="inst_db_tableprependfile">Tables name prepend</label>
<div class="controls">
<input class="input-small" id="inst_db_tableprependfile" type="text" title="Useful if using one single database for more than one application">
</div>
</div>
</fieldset>
</form>
</div>
</div>
<div class="row" id="jom_install_feedback_bar">
<br>
<br>
<div class="span8 offset2">
<div class="progress">
<div class="bar" style="width: 0%;"></div>
</div>
</div>
</div>
<div id="jom_msgs_container">
<div class="row" id="jom_install_feedback_messages" style="opacity: 0">
<div class="span6 offset2">
<div class="alert alert-info">
<strong>Creazione</strong> file di configurazione
</div>
</div>
<div class="span2 text-center" style="opacity: 0">
<div class="alert alert-success">
<i class="icon-info-sign"></i>
<strong>OK</strong>
</div>
</div>
</div>
</div>
<!-- GO ON -->
<div class="row" id="jom_rowgoon">
<div class="span12 text-center" style="border-top: 1px solid #B9B9B9;">
<label class="control-label"></label>
<div class="controls">
<a class="btn btn-primary" href="#" onclick="javascript: go_to_step(1);">Proceed <i class="icon-chevron-right"></i></a>
</div>
</div>
</div>
</div>
<div id="jom_version_ribbon">
<div class="jom_label">ver.</div>
<div class="jom_version" title="<?php print(JOM_DESC_VER);?>" onclick="javascript: $(this).next().text(jsJOMlib__get_e_commerce_bullshit()); jsJOMlib__animate_opacity($(this).next(), 1);"><?php print(JOM_VERSION);?></div>
<div class="jom_useful_sentence"></div>
</div>
<script src="./js/lib/bootstrap.min.js"></script>
</body>
</html>