forked from bbdoc/PoracleWeb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
add_mons.php
443 lines (389 loc) · 21.8 KB
/
add_mons.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
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
<?php
include "./header.php";
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<title><?php echo $title; ?> - Add Mons</title>
<link rel="icon" type="image/x-icon" href="favicon.png" />
<!-- Custom fonts for this template-->
<link href="node_modules/@fortawesome/fontawesome-free/css/all.min.css" rel="stylesheet" type="text/css">
<link
href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i"
rel="stylesheet">
<!-- Custom styles for this template-->
<link href="css/custom-bootstrap.css?v=<?=time();?>" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/gh/gitbrent/[email protected]/css/bootstrap4-toggle.min.css"
rel="stylesheet">
<link rel="stylesheet" type="text/css" href="css/style.css?v=<?=time();?>">
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script type="text/javascript" src="search_mons.js?v=<?=time();?>"></script>
<script type="text/javascript">
$(document).ready(function() {
$("input[type='checkbox']").change(function() {
var maxAllowed = 100;
var cnt = $("input[type='checkbox']:checked").length;
if (cnt > maxAllowed) {
$(this).prop("checked", "");
alert('Sorry, you cannot select more than ' + maxAllowed + ' Pokemons at a time!');
}
});
});
$(document).ready(function() {
$(window).keydown(function(event) {
if (event.keyCode == 13) {
event.preventDefault();
return false;
}
});
});
$(function() {
$("#mon_0").click(function() {
if ($(this).is(":checked")) {
$("#dvSearchBox").hide();
$("#dvMonsList").hide();
$("#dvAlertTypeAll").hide();
} else {
$("#dvSearchBox").show();
$("#dvMonsList").show();
$("#dvAlertTypeAll").show();
}
});
});
</script>
</head>
<body id="page-top">
<!-- Page Wrapper -->
<div id="wrapper">
<!-- Content Wrapper -->
<div id="content-wrapper" class="d-flex flex-column">
<!-- Main Content -->
<div id="content">
<!-- Topbar -->
<nav class="navbar fixed-top navbar-expand navbar-dark topbar mb-4 static-top shadow"
style="background-color: #000000;">
<a class="navbar-brand" href="<?php echo $redirect_url; ?>"><?php echo $title; ?></a>
<!-- Topbar Navbar -->
<ul class="navbar-nav ml-auto">
<!-- Nav Item - User Information -->
<li class="nav-item dropdown no-arrow" id="Dropdown">
<a class="nav-link dropdown-toggle" href="#" data-toggle="modal"
data-target="#profileSettingsModal">
<span
class="mr-2 d-none d-lg-inline text-gray-600 small"><?php echo $_SESSION['username']; ?></span>
<img class="img-profile rounded-circle" src="<?php echo $avatar ?>">
</a>
</li>
<div class="topbar-divider d-none d-sm-block"></div>
<!-- Nav Item - Logout -->
<li class="nav-item dropdown no-arrow">
<a class="nav-link dropdown-toggle" href="#" data-toggle="modal" data-target="#logoutModal">
<i class="fas fa-sign-out-alt fa-fw"></i>
</a>
</li>
</ul>
</nav>
<!-- End of Topbar -->
<!-- Begin Page Content -->
<div class="container-fluid col-lg-8 col-md-12">
<!-- Profile Settings Modal -->
<?php include "./modal/profile_settings_modal.php"; ?>
<!-- Page Heading -->
<div class="row">
<div class="col">
<div class="alert alert-secondary text-center" role="alert">
<strong><?php echo i8ln("NEW MONSTER ALARM"); ?></strong>
</div>
</div>
</div>
<?php
$clean_0_checked = 0;
$clean_1_checked = 0;
if ($all_mon_cleaned == "1") {
$clean_1_checked = 'checked';
} else {
$clean_0_checked = 'checked';
}
?>
<form action='./form_action.php' method='POST'>
<?php if ($disable_location <> "True") { ?>
<div class="form-row align-items-center">
<div class="col-sm-12 my-1">
<div class="input-group">
<div class="input-group-prepend">
<div class="input-group-text"><?php echo i8ln("Distance"); ?></div>
</div>
<input type="number" id='distance' name='distance' value='0' min='0'
class="form-control text-center">
<div class="input-group-append">
<span class="input-group-text">m</span>
</div>
</div>
</div>
</div>
<?php } else { ?>
<input type="hidden" id='distance' name='distance' value='0' min='0'>
<?php } ?>
<div class="form-row align-items-center">
<div class="col-sm-12 my-1">
<div class="input-group">
<div class="input-group-prepend">
<div class="input-group-text">
<?php echo i8ln("IV"); ?>
</div>
</div>
<input type='number' id='min_iv' name='min_iv' size=1 value='-1' min='-1' max='100'
class="form-control text-center">
<div class="input-group-append">
<div class="input-group-text"><?php echo i8ln("MIN"); ?></div>
</div>
<input type='number' id='max_iv' name='max_iv' size=1 value='100' min='-1' max='100'
class="form-control text-center">
<div class="input-group-append">
<span class="input-group-text"><?php echo i8ln("MAX"); ?></span>
</div>
</div>
</div>
</div>
<div class="form-row align-items-center">
<div class="col-sm-12 my-1">
<div class="input-group">
<div class="input-group-prepend">
<div class="input-group-text">
<?php echo i8ln("CP"); ?>
</div>
</div>
<input type='number' id='min_cp' name='min_cp' size=1 value='0' min='0' max='9000'
class="form-control text-center">
<div class="input-group-append">
<div class="input-group-text"><?php echo i8ln("MIN"); ?></div>
</div>
<input type='number' id='max_cp' name='max_cp' size=1 value='9000' min='0'
max='9000' class="form-control text-center">
<div class="input-group-append">
<span class="input-group-text"><?php echo i8ln("MAX"); ?></span>
</div>
</div>
</div>
</div>
<div class="form-row align-items-center">
<div class="col-sm-12 my-1">
<div class="input-group">
<div class="input-group-prepend">
<div class="input-group-text"> <?php echo i8ln("LVL"); ?>
</div>
</div>
<input type='number' id='min_level' name='min_level' size=1 value='0' min='0'
max='50' class="form-control text-center">
<div class="input-group-append">
<div class="input-group-text"><?php echo i8ln("MIN"); ?></div>
</div>
<input type='number' id='max_level' name='max_level' size=1 value='40' min='0'
max='50' class="form-control text-center">
<div class="input-group-append">
<span class="input-group-text"><?php echo i8ln("MAX"); ?></span>
</div>
</div>
</div>
</div>
<div class="form-row align-items-center">
<div class="col-sm-12 my-1">
<div class="input-group">
<div class="input-group-prepend">
<div class="input-group-text"><?php echo i8ln("Weight"); ?></div>
</div>
<input type='number' id='min_weight' name='min_weight' size=2 value='0' min='0'
max='9000000' class="form-control text-center">
<div class="input-group-append">
<div class="input-group-text"><?php echo i8ln("MIN"); ?></div>
</div>
<input type='number' id='max_weight' name='max_weight' size=4 value='9000000'
min='0' max='9000000' class="form-control text-center">
<div class="input-group-append">
<span class="input-group-text"><?php echo i8ln("MAX"); ?></span>
</div>
</div>
</div>
</div>
<div class="form-row align-items-center">
<div class="col-sm-12 my-1">
<label><?php echo i8ln("MIN STATS"); ?></label>
<div class="input-group">
<input type='number' id='atk' name='atk' size=1 value='0' min='0' max='15'
class="form-control text-center">
<div class="input-group-append">
<div class="input-group-text"><?php echo i8ln("ATK"); ?></div>
</div>
<input type='number' id='def' name='def' size=1 value='0' min='0' max='15'
class="form-control text-center">
<div class="input-group-append">
<span class="input-group-text"><?php echo i8ln("DEF"); ?></span>
</div>
<input type='number' id='sta' name='sta' size=1 value='0' min='0' max='15'
class="form-control text-center">
<div class="input-group-append">
<span class="input-group-text"><?php echo i8ln("STA"); ?></span>
</div>
</div>
</div>
</div>
<div class="form-row align-items-center">
<div class="col-sm-12 my-1">
<label><?php echo i8ln("MAX STATS"); ?></label>
<div class="input-group">
<input type='number' id='max_atk' name='max_atk' size=1 value='15' min='0' max='15'
class="form-control text-center">
<div class="input-group-append">
<div class="input-group-text"><?php echo i8ln("ATK"); ?></div>
</div>
<input type='number' id='max_def' name='max_def' size=1 value='15' min='0' max='15'
class="form-control text-center">
<div class="input-group-append">
<span class="input-group-text"><?php echo i8ln("DEF"); ?></span>
</div>
<input type='number' id='max_sta' name='max_sta' size=1 value='15' min='0' max='15'
class="form-control text-center">
<div class="input-group-append">
<span class="input-group-text"><?php echo i8ln("STA"); ?></span>
</div>
</div>
</div>
</div>
<hr>
<div class="form-row align-items-center">
<div class="col-sm-12 my-1">
<label><?php echo i8ln("PvP Great"); ?></label>
<div class="input-group">
<div class="input-group-prepend">
<div class="input-group-text"><?php echo i8ln("MIN Rank"); ?></div>
</div>
<input type='number' id='great_league_ranking' name='great_league_ranking' size=1
value='4096' min='0' max='4096' class="form-control text-center">
<div class="input-group-prepend">
<span class="input-group-text"><?php echo i8ln("MIN CP"); ?></span>
</div>
<input type='number' id='great_league_ranking_min_cp'
name='great_league_ranking_min_cp' size=1 value='0' min='0' max='4096'
class="form-control text-center">
</div>
</div>
</div>
<div class="form-row align-items-center">
<div class="col-sm-12 my-1">
<label><?php echo i8ln("PvP Ultra"); ?></label>
<div class="input-group">
<div class="input-group-prepend">
<div class="input-group-text"><?php echo i8ln("MIN Rank"); ?></div>
</div>
<input type='number' id='ultra_league_ranking' name='ultra_league_ranking' size=1
value='4096' min='0' max='4096' class="form-control text-center">
<div class="input-group-prepend">
<span class="input-group-text"><?php echo i8ln("MIN CP"); ?></span>
</div>
<input type='number' id='ultra_league_ranking_min_cp'
name='ultra_league_ranking_min_cp' size=1 value='0' min='0' max='4096'
class="form-control text-center">
</div>
</div>
</div>
<hr>
<div class="form-row align-items-center">
<div class="col-sm-12 my-1">
<div class="btn-group btn-group-toggle" data-toggle="buttons">
<div class="input-group">
<div class="input-group-prepend">
<div class="input-group-text"><?php echo i8ln("Gender"); ?></div>
</div>
</div>
<label class="btn btn-secondary">
<input type="radio" name="gender" id="gender_0" value="gender_0" checked><?php echo i8ln("All"); ?>
</label>
<label class="btn btn-secondary">
<input type="radio" name="gender" id="gender_1" value="gender_1"><?php echo i8ln("Male"); ?>
</label>
<label class="btn btn-secondary">
<input type="radio" name="gender" id="gender_2" value="gender_2"><?php echo i8ln("Female"); ?>
</label>
</div>
</div>
</div>
<div class="form-row align-items-center">
<div class="col-sm-12 my-1">
<div class="btn-group btn-group-toggle" data-toggle="buttons">
<div class="input-group">
<div class="input-group-prepend">
<div class="input-group-text"><?php echo i8ln("Clean"); ?></div>
</div>
</div>
<label class="btn btn-secondary">
<input type="radio" name="clean" id="clean_0" value="clean_0"
<?php echo $clean_0_checked; ?>>
<?php echo i8ln("No"); ?>
</label>
<label class="btn btn-secondary">
<input type="radio" name="clean" id="clean_1" value="clean_1"
<?php echo $clean_1_checked; ?>>
<?php echo i8ln("Yes"); ?>
</label>
</div>
</div>
</div>
<hr>
<div class='searchmons text-center'>
<ul>
<li><input type='checkbox' name='mon_0' id='mon_0' />
<label for='mon_0' style='padding:15px;' class='text-uppercase'>
<?php echo i8ln("Apply to all Pokémons"); ?>
</label>
</li>
</ul>
</div>
<div class="alert alert-info alert-dismissible fade show" role="alert" id='dvAlertTypeAll'>
<?php echo i8ln("Type"); ?> <strong>ALL</strong> <?php echo i8ln("to display all Pokémons"); ?>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<!-- Add Search Box -->
<input type='hidden' id='search_type' value='mon'>
<div class='mb-3' id='dvSearchBox'>
<input type='text' class='form-control form-control-lg' id='search' placeholder='<?php echo i8ln("Search") ?>'>
</div>
<div class='searchmons text-center' id='dvMonsList'>
<ul>
<!-- Add Empty Div to be used by Ajax to display results -->
<div id='display'></div>
</ul>
</div>
<div class="float-right mb-3 mt-3">
<input class="btn btn-primary" type='submit' name='add_mon' value='<?php echo i8ln("Submit"); ?>'>
<a href='<?php echo $redirect_url ?>'>
<button type="button" class="btn btn-secondary"><?php echo i8ln("Cancel"); ?></button>
</a>
</div>
</form>
</div>
<!-- /.container-fluid -->
</div>
<!-- End of Main Content -->
</div>
<!-- End of Content Wrapper -->
</div>
<!-- End of Page Wrapper -->
<!-- Logout Modal-->
<?php include "./modal/logout_modal.php"; ?>
<!-- Bootstrap core JavaScript-->
<script src="node_modules/jquery/dist/jquery.min.js"></script>
<script src="node_modules/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
<!-- Core plugin JavaScript-->
<script src="node_modules/jquery.easing/jquery.easing.min.js"></script>
<!-- Custom scripts for all pages-->
<script src="js/scripts.js"></script>
<script src="https://cdn.jsdelivr.net/gh/gitbrent/[email protected]/js/bootstrap4-toggle.min.js"></script>
</body>
</html>