-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplan.php
More file actions
2323 lines (1894 loc) · 118 KB
/
plan.php
File metadata and controls
2323 lines (1894 loc) · 118 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
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
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?php
include("sessions/handler.php");
// Session Start (S)
if (session_status() == PHP_SESSION_NONE) {
session_start();
ob_start();
}
// Session Start (E)
include("load/config.php");
define('PERTI_MYSQL_ONLY', true);
include("load/connect.php");
$uri = explode('?', $_SERVER['REQUEST_URI']);
$id = $uri[1];
// Check Perms
$perm = false;
if (!defined('DEV')) {
if (isset($_SESSION['VATSIM_CID'])) {
// Getting CID Value
$cid = session_get('VATSIM_CID', '');
$p_check = $conn_sqli->query("SELECT * FROM users WHERE cid='$cid'");
if ($p_check) {
$perm = true;
}
}
} else {
$perm = true;
$_SESSION['VATSIM_FIRST_NAME'] = $_SESSION['VATSIM_LAST_NAME'] = $_SESSION['VATSIM_CID'] = 0;
}
$plan_info = $conn_sqli->query("SELECT * FROM p_plans WHERE id=$id")->fetch_assoc();
require_once('load/org_context.php');
$plan_org_code = $plan_info['org_code'] ?? null;
$org_mismatch = ($plan_org_code !== null && $plan_org_code !== get_org_code() && !is_org_global());
$is_global_scope = (get_org_code() === 'global');
?>
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Import CSS -->
<?php
$page_title = __('plan.pageTitle');
include("load/header.php");
?>
<link rel="stylesheet" href="assets/css/initiative_timeline.css<?= _v('assets/css/initiative_timeline.css') ?>">
<script>
function tooltips() {
$('[data-toggle="tooltip"]').tooltip('dispose');
$(function () {
$('[data-toggle="tooltip"]').tooltip()
});
}
</script>
<style>
/* Advisory builder: Facilities Included dropdown */
.adv-facilities-wrapper {
position: relative;
}
.adv-facilities-dropdown {
position: absolute;
top: 100%;
left: 0;
z-index: 1050;
display: none;
background-color: #ffffff;
border: 1px solid rgba(0, 0, 0, 0.15);
border-radius: 0.25rem;
padding: 0.5rem;
max-height: 260px;
overflow-y: auto;
min-width: 260px;
box-shadow: 0 0.25rem 0.5rem rgba(0,0,0,0.15);
}
.adv-facilities-grid {
display: grid;
grid-template-columns: repeat(4, minmax(0, 1fr));
grid-column-gap: 0.75rem;
grid-row-gap: 0.25rem;
}
.adv-facilities-grid .form-check {
margin-bottom: 0.25rem;
}
.adv-facilities-grid input[type="checkbox"] {
margin-right: 0.25rem;
}
.adv-facilities-grid label {
font-size: 0.75rem;
margin-bottom: 0;
}
</style>
<link href="https://unpkg.com/maplibre-gl@3.6.2/dist/maplibre-gl.css" rel="stylesheet" />
<script src="https://unpkg.com/maplibre-gl@3.6.2/dist/maplibre-gl.js"></script>
<script>
// PERTI Discord Notification globals
var PERTI_EVENT_NAME = <?= json_encode($plan_info['event_name']); ?>;
var PERTI_EVENT_DATE = <?= json_encode($plan_info['event_date']); ?>; // 'YYYY-MM-DD'
var PERTI_EVENT_START = <?= json_encode($plan_info['event_start']); ?>; // 'hhmm' Z
var PERTI_EVENT_END_DATE = <?= json_encode($plan_info['event_end_date'] ?? ''); ?>; // 'YYYY-MM-DD'
var PERTI_EVENT_END_TIME = <?= json_encode($plan_info['event_end_time'] ?? ''); ?>; // 'hhmm' Z
var PERTI_OPLEVEL = <?= json_encode($plan_info['oplevel']); ?>;
var PERTI_PLAN_ID = <?= json_encode($id); ?>;
var PERTI_HAS_PERM = <?= json_encode($perm); ?>;
// Compute event start/end as ISO strings for timeline
var PERTI_EVENT_START_ISO = null;
var PERTI_EVENT_END_ISO = null;
(function() {
// Parse event start
if (PERTI_EVENT_DATE && PERTI_EVENT_START) {
var startTime = PERTI_EVENT_START.padStart(4, '0');
PERTI_EVENT_START_ISO = PERTI_EVENT_DATE + 'T' + startTime.substring(0,2) + ':' + startTime.substring(2,4) + ':00Z';
}
// Parse event end
var endDate = PERTI_EVENT_END_DATE || PERTI_EVENT_DATE;
var endTime = PERTI_EVENT_END_TIME || '';
if (endDate && endTime) {
endTime = endTime.padStart(4, '0');
PERTI_EVENT_END_ISO = endDate + 'T' + endTime.substring(0,2) + ':' + endTime.substring(2,4) + ':00Z';
// If end is before start (cross-midnight) and no explicit end date, bump 1 day
if (!PERTI_EVENT_END_DATE && PERTI_EVENT_START_ISO && PERTI_EVENT_END_ISO < PERTI_EVENT_START_ISO) {
var tmp = new Date(PERTI_EVENT_END_ISO);
tmp.setUTCDate(tmp.getUTCDate() + 1);
PERTI_EVENT_END_ISO = tmp.toISOString();
}
} else if (PERTI_EVENT_START_ISO) {
// Default to 6 hours after start if no end time specified
var startDt = new Date(PERTI_EVENT_START_ISO);
var endDt = new Date(startDt.getTime() + 6 * 60 * 60 * 1000);
PERTI_EVENT_END_ISO = endDt.toISOString();
}
})();
</script>
</head>
<body>
<?php
include('load/nav.php');
if ($org_mismatch):
$stmt = $conn_sqli->prepare("SELECT display_name FROM organizations WHERE org_code = ?");
$stmt->bind_param("s", $plan_org_code);
$stmt->execute();
$plan_org_display = $stmt->get_result()->fetch_assoc()['display_name'] ?? strtoupper($plan_org_code);
$current_org_display = get_org_info($conn_sqli)['display_name'];
?>
<div class="container mt-5 text-center">
<div class="alert alert-warning py-4" role="alert">
<h5 class="mb-3"><i class="fas fa-exchange-alt mr-2"></i> <?= __('org.mismatch.title') ?></h5>
<p><?= __('org.mismatch.planBelongsTo', ['org' => htmlspecialchars($plan_org_display)]) ?>
<?= __('org.mismatch.currentlyViewing', ['org' => htmlspecialchars($current_org_display)]) ?></p>
<button class="btn btn-primary" onclick="switchOrg('<?= htmlspecialchars($plan_org_code) ?>')">
<i class="fas fa-sync-alt mr-1"></i> <?= __('org.mismatch.switchTo', ['org' => htmlspecialchars($plan_org_display)]) ?>
</button>
</div>
</div>
<?php else: ?>
<section class="perti-hero perti-hero--standard bg-position-center jarallax bg-dark text-light" data-jarallax data-speed="0.3">
<div class="container-fluid pt-2 pb-5 py-lg-6">
<img class="jarallax-img" src="assets/img/jumbotron/main.png" alt="" style="opacity: 50%; height: 100vh;">
<center>
<h1><b><span class="text-danger"><?= $plan_info['event_name']; ?></span> <?= __('plan.pageTitle') ?></b></h1>
<h5><a class="text-light" href="data?<?= $plan_info['id']; ?>"><i class="fas fa-table text-success"></i> <?= __('plan.editStaffingData') ?></a></h5>
</center>
</div>
</section>
<div class="container-fluid mt-3 mb-3">
<div class="row">
<div class="col-2 d-none d-lg-block" id="plan-sidebar">
<ul class="nav flex-column nav-pills" aria-orientation="vertical">
<li><a class="nav-link active rounded" data-toggle="tab" href="#overview"><?= __('plan.tabs.overview') ?></a></li>
<hr>
<li><a class="nav-link rounded" data-toggle="tab" href="#dcc_staffing"><?= __($is_global_scope ? 'plan.tabs.tmuStaffing' : 'plan.tabs.dccStaffing') ?></a></li>
<li><a class="nav-link rounded" data-toggle="tab" href="#historical"><?= __('plan.tabs.historical') ?></a></li>
<li><a class="nav-link rounded" data-toggle="tab" href="#forecast"><?= __('plan.tabs.forecast') ?></a></li>
<hr>
<li><a class="nav-link rounded" data-toggle="tab" href="#t_timelines"><?= __('plan.tabs.termTimelines') ?></a></li>
<li><a class="nav-link rounded" data-toggle="tab" href="#t_staffing"><?= __('plan.tabs.termStaffing') ?></a></li>
<li><a class="nav-link rounded" data-toggle="tab" href="#configs"><?= __('plan.tabs.configs') ?></a></li>
<li><a class="nav-link rounded" data-toggle="tab" href="#t_planning"><?= __('plan.tabs.termPlanning') ?></a></li>
<hr>
<li><a class="nav-link rounded" data-toggle="tab" href="#e_timelines"><?= __('plan.tabs.enrouteTimelines') ?></a></li>
<li><a class="nav-link rounded" data-toggle="tab" href="#e_staffing"><?= __('plan.tabs.enrouteStaffing') ?></a></li>
<li><a class="nav-link rounded" data-toggle="tab" href="#e_planning"><?= __('plan.tabs.enroutePlanning') ?></a></li>
<li><a class="nav-link rounded" data-toggle="tab" href="#e_splits"><?= __('plan.tabs.enrouteSplits') ?></a></li>
<hr>
<li><a class="nav-link rounded" data-toggle="tab" href="#group_flights"><?= __('plan.tabs.groupFlights') ?></a></li>
<li><a class="nav-link rounded" data-toggle="tab" href="#outlook"><?= __('plan.tabs.outlook') ?></a></li>
</ul>
</div>
<div class="col-12 col-lg-10">
<div class="tab-content">
<!-- Tab: Overview -->
<div class="tab-pane fade show active" id="overview">
<div class="row">
<div class="col-12 col-md-6">
<img src="<?= $plan_info['event_banner']; ?>" class="rounded" style="width: 100%;" alt="<?= $plan_info['event_name']; ?> Event Banner">
<hr>
<?php if ($perm == true) { ?>
<h4><b><?= __('plan.overview.operationalGoals') ?></b> <span class="badge badge-success" data-toggle="modal" data-target="#addgoalModal"><i class="fas fa-plus" data-toggle="tooltip" title="<?= __('plan.overview.addGoalTooltip') ?>"></i></span></h4>
<?php } else { ?>
<h4><b><?= __('plan.overview.operationalGoals') ?></b></h4>
<?php } ?>
<table class="table table-bordered">
<tbody id="goals_table"></tbody>
</table>
</div>
<div class="col-12 col-md-6">
<h4><b><?= __('plan.overview.eventInformation') ?></b></h4>
<table class="table table-striped table-bordered">
<tbody>
<tr>
<td><b><?= __('plan.overview.eventName') ?></b></td>
<td><?= $plan_info['event_name']; ?></td>
</tr>
<tr>
<td><b><?= __('plan.overview.eventStartDate') ?></b></td>
<td><?= $plan_info['event_date']; ?></td>
</tr>
<tr>
<td><b><?= __('plan.overview.eventStartTime') ?></b></td>
<td><?= $plan_info['event_start']; ?>Z</td>
</tr>
<tr>
<td><b><?= __('plan.overview.eventEndDate') ?></b></td>
<td><?php
$end_date = $plan_info['event_end_date'] ?? '';
if (!empty($end_date)) {
echo $end_date;
} else {
echo '<span class="text-muted">—</span>';
}
?></td>
</tr>
<tr>
<td><b><?= __('plan.overview.eventEndTime') ?></b></td>
<td><?php
$end_time = $plan_info['event_end_time'] ?? '';
if (!empty($end_time)) {
echo $end_time . 'Z';
} else {
echo '<span class="text-muted">—</span>';
}
?></td>
</tr>
<tr>
<td><b><?= __('plan.overview.tmuOpLevel') ?></b></td>
<?php
if ($plan_info['oplevel'] == 1) {
echo '<td class="text-dark">'.$plan_info['oplevel'].' - '.__('plan.overview.opLevel1').'</td>';
}
elseif ($plan_info['oplevel'] == 2) {
echo '<td class="text-success">'.$plan_info['oplevel'].' - '.__('plan.overview.opLevel2').'</td>';
}
elseif ($plan_info['oplevel'] == 3) {
echo '<td class="text-warning">'.$plan_info['oplevel'].' - '.__('plan.overview.opLevel3').'</td>';
}
elseif ($plan_info['oplevel'] == 4) {
echo '<td class="text-danger">'.$plan_info['oplevel'].' - '.__('plan.overview.opLevel4').'</td>';
}
?>
</tr>
</tbody>
</table>
<hr>
<button type="button" class="btn btn-sm btn-outline-secondary mb-2" onclick="AdvisoryConfig.showConfigModal();" data-toggle="tooltip" title="<?= __('plan.advisoryOrg.switchTooltip') ?>">
<i class="fas fa-globe"></i> <span id="advisoryOrgDisplay">DCC</span>
</button>
<button type="button" class="btn btn-sm btn-primary mb-2" onclick="openPertiModal();">
<?= __('plan.overview.createPertiNotification') ?>
</button>
<button type="button" class="btn btn-sm btn-outline-primary mb-2" onclick="openOpsPlanModal();">
<?= __('plan.overview.createOpsPlanAdvisory') ?>
</button>
<hr>
<h4><b><?= __('plan.overview.resources') ?></b></h4>
<ul>
<li><a href="https://perti.vatcscc.org/nod" target="_blank"><?= __('plan.overview.resourceNod') ?></a> <?= __('plan.overview.resourceNodDesc') ?></li>
<li><a href="https://perti.vatcscc.org/playbook" target="_blank"><?= __('plan.overview.resourcePlaybook') ?></a> <?= __('plan.overview.resourcePlaybookDesc') ?></li>
<li><a href="https://perti.vatcscc.org/route" target="_blank"><?= __('plan.overview.resourceRoute') ?></a> <?= __('plan.overview.resourceRouteDesc') ?></li>
<li><a href="https://perti.vatcscc.org/airport_config" target="_blank"><?= __('plan.overview.resourceAirportConfig') ?></a> <?= __('plan.overview.resourceAirportConfigDesc') ?></li>
<li><a href="https://perti.vatcscc.org/splits" target="_blank"><?= __('plan.overview.resourceSplits') ?></a> <?= __('plan.overview.resourceSplitsDesc') ?></li>
<li><a href="https://perti.vatcscc.org/gdt" target="_blank"><?= __('plan.overview.resourceGdt') ?></a> <?= __('plan.overview.resourceGdtDesc') ?></li>
<li><a href="https://perti.vatcscc.org/jatoc" target="_blank"><?= __('plan.overview.resourceJatoc') ?></a> <?= __('plan.overview.resourceJatocDesc') ?></li>
<?php if ($plan_org_code === 'canoc'): ?>
<li>VATCAN Discord <a href="https://discord.com/channels/567549256357904405/823308502696722432" target="_blank">#can-ntml</a> and <a href="https://discord.com/channels/567549256357904405/823309153036402738" target="_blank">#can-advisories</a> <?= __('plan.overview.resourceDiscordCanoc') ?></li>
<li>vATCSCC Discord <a href="https://discord.com/channels/358264961233059843/358295136398082048/" target="_blank">#ntml</a> and <a href="https://discord.com/channels/358264961233059843/358300240236773376/" target="_blank">#advisories</a> <?= __('plan.overview.resourceDiscordVatusa') ?></li>
<?php else: ?>
<li>vATCSCC Discord <a href="https://discord.com/channels/358264961233059843/358295136398082048/" target="_blank">#ntml</a> and <a href="https://discord.com/channels/358264961233059843/358300240236773376/" target="_blank">#advisories</a> <?= __('plan.overview.resourceDiscord') ?></li>
<?php endif; ?>
<?php if (stripos($plan_info['hotline'], 'Canada') !== false): ?>
<li>VATCAN <a href="ts3server://ts.vatcan.ca" target="_blank">TeamSpeak</a>, <span class="text-danger"><b>TMU Hang</b></span> <?= __('plan.overview.resourceHotlineVatcan') ?>
<ul><li><?= __('plan.overview.resourceCredentials') ?></li>
<li>The VATUSA <a href="ts3server://ts.vatusa.net" target="_blank">TeamSpeak</a>, <?= $plan_info['hotline']; ?> <?= __('plan.overview.resourcePrimaryBackupVatusa') ?></li>
<li>The vATCSCC Discord, <?= $plan_info['hotline']; ?> <?= __('plan.overview.resourceSecondaryBackup') ?></li></ul></li>
<?php else: ?>
<li>VATUSA <a href="ts3server://ts.vatusa.net" target="_blank">TeamSpeak</a>, <span class="text-danger"><b><?= $plan_info['hotline']; ?></b></span> <?= __('plan.overview.resourceHotlineVatusa') ?>
<ul><li><?= __('plan.overview.resourceCredentials') ?></li>
<li>The VATCAN <a href="ts3server://ts.vatcan.ca" target="_blank">TeamSpeak</a>, TMU Hang <?= __('plan.overview.resourcePrimaryBackupVatcan') ?></li>
<li>The vATCSCC Discord, <?= $plan_info['hotline']; ?> <?= __('plan.overview.resourceSecondaryBackup') ?></li></ul></li>
<?php endif; ?>
<li><?= __('plan.overview.resourceGroupFlights') ?> <a href="https://bit.ly/NTML_Entry" target="_blank"><?= __('plan.overview.resourceGroupFlightsLink') ?></a>.</li>
<?php if ($plan_org_code !== 'canoc'): ?>
<li><?= __('plan.overview.resourceCallsigns') ?> <a href="https://www.vatusa.net/info/policies/authorized-tmu-callsigns" target="_blank"><?= __('plan.overview.resourceCallsignsLink') ?></a>.</li>
<li><a href="https://bit.l/vATCSCC_Transgression_Reporting_Form" target="_blank"><?= __('plan.overview.resourceTransgression') ?></a> <?= __('plan.overview.resourceTransgressionDesc') ?></li>
<?php endif; ?>
</ul>
</div>
</div>
</div>
<!-- Tab: DCC/TMU Staffing -->
<div class="tab-pane fade" id="dcc_staffing">
<?php if ($perm == true) { ?>
<button class="btn btn-sm btn-success" data-toggle="modal" data-target="#add_dccstaffingModal"><i class="fas fa-plus"></i> <?= __('plan.dcc.addPersonnel') ?></button>
<hr>
<?php } ?>
<h4><b><?= __($is_global_scope ? 'plan.dcc.tmuPersonnel' : 'plan.dcc.dccPersonnel') ?></b></h4>
<button class="btn btn-sm btn-outline-secondary plan-group-toggle mb-2" data-table="dccPersonnel"><i class="fas fa-list"></i> <?= __('plan.tables.flatView') ?></button>
<table class="table table-striped table-bordered">
<thead>
<th class="text-center sortable" data-sort="position_facility" data-table="dccPersonnel" style="width:12%;"><b><?= __('plan.dcc.facility') ?></b> <i class="fas fa-sort sort-icon"></i></th>
<th class="sortable" data-sort="position_name" data-table="dccPersonnel" style="width:22%;"><b><?= __('plan.dcc.positionName') ?></b> <i class="fas fa-sort sort-icon"></i></th>
<th class="text-center sortable" data-sort="personnel_ois" data-table="dccPersonnel" style="width:8%;"><b><?= __('plan.dcc.ois') ?></b> <i class="fas fa-sort sort-icon"></i></th>
<th class="sortable" data-sort="personnel_name" data-table="dccPersonnel"><b><?= __('plan.dcc.personnelName') ?></b> <i class="fas fa-sort sort-icon"></i></th>
<?php if ($perm == true) {
echo '<th></th>';
}
?>
</thead>
<tbody id="dcc_table"></tbody>
</table>
<h4 class="mt-4"><b><?= __('plan.dcc.facilityPersonnel') ?></b></h4>
<button class="btn btn-sm btn-outline-secondary plan-group-toggle mb-2" data-table="dccFacility"><i class="fas fa-list"></i> <?= __('plan.tables.flatView') ?></button>
<table class="table table-striped table-bordered">
<thead>
<th class="text-center sortable" data-sort="position_facility" data-table="dccFacility" style="width:12%;"><b><?= __('plan.dcc.facility') ?></b> <i class="fas fa-sort sort-icon"></i></th>
<th class="sortable" data-sort="position_name" data-table="dccFacility" style="width:22%;"><b><?= __('plan.dcc.positionName') ?></b> <i class="fas fa-sort sort-icon"></i></th>
<th class="text-center sortable" data-sort="personnel_ois" data-table="dccFacility" style="width:8%;"><b><?= __('plan.dcc.ois') ?></b> <i class="fas fa-sort sort-icon"></i></th>
<th class="sortable" data-sort="personnel_name" data-table="dccFacility"><b><?= __('plan.dcc.personnelName') ?></b> <i class="fas fa-sort sort-icon"></i></th>
<?php if ($perm == true) {
echo '<th></th>';
}
?>
</thead>
<tbody id="dcc_staffing_table"></tbody>
</table>
</div>
<!-- Tab: Historical Data -->
<div class="tab-pane fade" id="historical">
<?php if ($perm == true) { ?>
<button class="btn btn-sm btn-success" data-toggle="modal" data-target="#addhistoricalModal"><i class="fas fa-plus"></i> <?= __('plan.historicalTab.addData') ?></button>
<hr>
<?php } ?>
<div class="row gutters-tiny py-20" id="historicaldata"></div>
</div>
<!-- Tab: Forecast Entry -->
<div class="tab-pane fade" id="forecast">
<?php if ($perm == true) { ?>
<button class="btn btn-sm btn-success" data-toggle="modal" data-target="#addforecastModal"><i class="fas fa-plus"></i> <?= __('plan.forecastTab.addForecast') ?></button>
<hr>
<?php } ?>
<div class="row gutters-tiny py-20" id="forecastdata"></div>
</div>
<!-- Tab: Terminal Timelines -->
<div class="tab-pane fade" id="t_timelines">
<?php if ($perm == true) { ?>
<button class="btn btn-sm btn-success mb-3" onclick="window.termInitTimeline && window.termInitTimeline.showAddModal()"><i class="fas fa-plus"></i> <?= __('plan.initiatives.addInitiative') ?></button>
<?php } ?>
<div id="term_inits_timeline"></div>
<!-- Legacy view (hidden by default, kept for backwards compatibility) -->
<div id="term_inits_legacy" style="display: none;">
<?php if ($perm == true) { ?>
<button class="btn btn-sm btn-success" data-toggle="modal" data-target="#addterminalinitModal"><i class="fas fa-plus"></i> <?= __('plan.initiatives.addInitiativeLegacy') ?></button>
<hr>
<?php } ?>
<center><div id="term_inits"></div></center>
</div>
</div>
<!-- Tab: Terminal Staffing -->
<div class="tab-pane fade" id="t_staffing">
<?php if ($perm == true) { ?>
<button class="btn btn-sm btn-success" data-toggle="modal" data-target="#addtermstaffingModal"><i class="fas fa-plus"></i> <?= __('plan.staffing.addStaffing') ?></button>
<hr>
<?php } ?>
<button class="btn btn-sm btn-outline-secondary plan-group-toggle mb-2" data-table="termStaffing"><i class="fas fa-list"></i> <?= __('plan.tables.flatView') ?></button>
<center><table class="table table-sm table-striped table-bordered w-75">
<thead>
<th class="text-center sortable" data-sort="facility_name" data-table="termStaffing"><b><?= __('plan.staffing.facilityName') ?></b> <i class="fas fa-sort sort-icon"></i></th>
<th class="text-center sortable" data-sort="staffing_status" data-table="termStaffing"><b><?= __('plan.staffing.status') ?></b> <i class="fas fa-sort sort-icon"></i></th>
<th class="text-center sortable" data-sort="staffing_quantity" data-table="termStaffing"><b><?= __('plan.staffing.quantity') ?></b> <i class="fas fa-sort sort-icon"></i></th>
<th class="text-center"><b><?= __('plan.staffing.comments') ?></b></th>
<?php if ($perm == true) {
echo '<th></th>';
}
?>
</thead>
<tbody id="term_staffing_table"></tbody>
</table></center>
</div>
<!-- Tab: Field Configs -->
<div class="tab-pane fade" id="configs">
<?php if ($perm == true) { ?>
<button class="btn btn-sm btn-success" data-toggle="modal" data-target="#addconfigModal"><i class="fas fa-plus"></i> <?= __('plan.configTab.addConfig') ?></button>
<hr>
<?php } ?>
<button class="btn btn-sm btn-outline-secondary plan-group-toggle mb-2" data-table="configs"><i class="fas fa-list"></i> <?= __('plan.tables.flatView') ?></button>
<center><table class="table table-sm table-striped table-bordered w-75">
<thead>
<th class="text-center sortable" data-sort="airport" data-table="configs"><b><?= __('plan.configTab.field') ?></b> <i class="fas fa-sort sort-icon"></i></th>
<th class="text-center sortable" data-sort="weather" data-table="configs"><b><?= __('plan.configTab.conditions') ?></b> <i class="fas fa-sort sort-icon"></i></th>
<th class="text-center sortable" data-sort="arrive" data-table="configs"><b><?= __('plan.configTab.arriving') ?></b> <i class="fas fa-sort sort-icon"></i></th>
<th class="text-center sortable" data-sort="depart" data-table="configs"><b><?= __('plan.configTab.departing') ?></b> <i class="fas fa-sort sort-icon"></i></th>
<th class="text-center sortable" data-sort="aar" data-table="configs"><b>AAR</b> <i class="fas fa-sort sort-icon"></i></th>
<th class="text-center sortable" data-sort="adr" data-table="configs"><b>ADR</b> <i class="fas fa-sort sort-icon"></i></th>
<th class="text-center"><b><?= __('plan.staffing.comments') ?></b></th>
<?php if ($perm == true) {
echo '<th></th>';
}
?>
</thead>
<tbody id="configs_table"></tbody>
</table></center>
</div>
<!-- Tab: Terminal Planning -->
<div class="tab-pane fade" id="t_planning">
<?php if ($perm == true) { ?>
<button class="btn btn-sm btn-success" data-toggle="modal" data-target="#addtermplanningModal"><i class="fas fa-plus"></i> <?= __('plan.planning.addPlan') ?></button>
<hr>
<?php } ?>
<div class="row gutters-tiny py-20" id="termplanningdata"></div>
</div>
<!-- Tab: Enroute Timelines -->
<div class="tab-pane fade" id="e_timelines">
<?php if ($perm == true) { ?>
<button class="btn btn-sm btn-success mb-3" onclick="window.enrouteInitTimeline && window.enrouteInitTimeline.showAddModal()"><i class="fas fa-plus"></i> <?= __('plan.initiatives.addInitiative') ?></button>
<?php } ?>
<div id="enroute_inits_timeline"></div>
<!-- Legacy view (hidden by default, kept for backwards compatibility) -->
<div id="enroute_inits_legacy" style="display: none;">
<?php if ($perm == true) { ?>
<button class="btn btn-sm btn-success" data-toggle="modal" data-target="#addenrouteinitModal"><i class="fas fa-plus"></i> <?= __('plan.initiatives.addInitiativeLegacy') ?></button>
<hr>
<?php } ?>
<center><div id="enroute_inits"></div></center>
</div>
</div>
<!-- Tab: Enroute Staffing -->
<div class="tab-pane fade" id="e_staffing">
<?php if ($perm == true) { ?>
<button class="btn btn-sm btn-success" data-toggle="modal" data-target="#addenroutestaffingModal"><i class="fas fa-plus"></i> <?= __('plan.staffing.addStaffing') ?></button>
<hr>
<?php } ?>
<button class="btn btn-sm btn-outline-secondary plan-group-toggle mb-2" data-table="enrouteStaffing"><i class="fas fa-list"></i> <?= __('plan.tables.flatView') ?></button>
<center><table class="table table-sm table-striped table-bordered w-75">
<thead>
<th class="text-center sortable" data-sort="facility_name" data-table="enrouteStaffing"><b><?= __('plan.staffing.facilityName') ?></b> <i class="fas fa-sort sort-icon"></i></th>
<th class="text-center sortable" data-sort="staffing_status" data-table="enrouteStaffing"><b><?= __('plan.staffing.status') ?></b> <i class="fas fa-sort sort-icon"></i></th>
<th class="text-center sortable" data-sort="staffing_quantity" data-table="enrouteStaffing"><b><?= __('plan.staffing.quantity') ?></b> <i class="fas fa-sort sort-icon"></i></th>
<th class="text-center"><b><?= __('plan.staffing.comments') ?></b></th>
<?php if ($perm == true) {
echo '<th></th>';
}
?>
</thead>
<tbody id="enroute_staffing_table"></tbody>
</table></center>
</div>
<!-- Tab: Enroute Planning -->
<div class="tab-pane fade" id="e_planning">
<?php if ($perm == true) { ?>
<button class="btn btn-sm btn-success" data-toggle="modal" data-target="#addenrouteplanningModal"><i class="fas fa-plus"></i> <?= __('plan.planning.addPlan') ?></button>
<hr>
<?php } ?>
<div class="row gutters-tiny py-20" id="enrouteplanningdata"></div>
</div>
<!-- Tab: Enroute Splits -->
<div class="tab-pane fade" id="e_splits">
<div class="d-flex justify-content-between align-items-center mb-3">
<h5 class="mb-0"><?= __('plan.splits.title') ?></h5>
<div>
<button class="btn btn-sm btn-outline-secondary mr-1" id="btn_refresh_splits" title="<?= __('common.refresh') ?>">
<i class="fas fa-sync-alt"></i>
</button>
<a href="./splits" class="btn btn-sm btn-outline-primary" target="_blank">
<i class="fas fa-external-link-alt mr-1"></i><?= __('plan.splits.configureSplits') ?>
</a>
</div>
</div>
<div id="plan_splits_map" style="width:100%;height:450px;border-radius:6px;margin-bottom:12px;display:none;"></div>
<div id="plan_splits_map_controls" class="mb-3" style="display:none;">
<div class="d-flex align-items-center flex-wrap small">
<span class="mr-2 font-weight-bold"><?= __('plan.splits.mapLayers') ?>:</span>
<div class="custom-control custom-checkbox custom-control-inline">
<input type="checkbox" class="custom-control-input" id="splits_layer_active" checked>
<label class="custom-control-label" for="splits_layer_active">
<span class="badge badge-success"><?= __('plan.splits.active') ?></span>
</label>
</div>
<div class="custom-control custom-checkbox custom-control-inline">
<input type="checkbox" class="custom-control-input" id="splits_layer_scheduled" checked>
<label class="custom-control-label" for="splits_layer_scheduled">
<span class="badge badge-info"><?= __('plan.splits.scheduled') ?></span>
</label>
</div>
<span class="mx-2 text-muted">|</span>
<div class="custom-control custom-checkbox custom-control-inline">
<input type="checkbox" class="custom-control-input" id="splits_layer_artcc" checked>
<label class="custom-control-label" for="splits_layer_artcc">
<span class="badge" style="background:#4682B4;color:#fff"><?= __('plan.splits.layerArtcc') ?></span>
</label>
</div>
<div class="custom-control custom-checkbox custom-control-inline">
<input type="checkbox" class="custom-control-input" id="splits_layer_superhigh">
<label class="custom-control-label" for="splits_layer_superhigh">
<span class="badge" style="background:#9932CC;color:#fff"><?= __('plan.splits.layerSuperhigh') ?></span>
</label>
</div>
<div class="custom-control custom-checkbox custom-control-inline">
<input type="checkbox" class="custom-control-input" id="splits_layer_high">
<label class="custom-control-label" for="splits_layer_high">
<span class="badge" style="background:#FF6347;color:#fff"><?= __('plan.splits.layerHigh') ?></span>
</label>
</div>
<div class="custom-control custom-checkbox custom-control-inline">
<input type="checkbox" class="custom-control-input" id="splits_layer_low">
<label class="custom-control-label" for="splits_layer_low">
<span class="badge" style="background:#228B22;color:#fff"><?= __('plan.splits.layerLow') ?></span>
</label>
</div>
<div class="custom-control custom-checkbox custom-control-inline">
<input type="checkbox" class="custom-control-input" id="splits_layer_tracon">
<label class="custom-control-label" for="splits_layer_tracon">
<span class="badge" style="background:#20B2AA;color:#fff"><?= __('plan.splits.layerTracon') ?></span>
</label>
</div>
</div>
<div id="plan_splits_config_toggles" class="d-flex align-items-center flex-wrap small mt-1"></div>
</div>
<div id="plan_splits_container">
<div class="text-center text-muted py-4">
<i class="fas fa-spinner fa-spin"></i> <?= __('common.loading') ?>
</div>
</div>
</div>
<!-- Tab: Group Flights -->
<div class="tab-pane fade" id="group_flights">
<?php if ($perm == true) { ?>
<button class="btn btn-sm btn-success" data-toggle="modal" data-target="#addgroupflightModal"><i class="fas fa-plus"></i> <?= __('plan.groupFlights.addFlight') ?></button>
<hr>
<?php } ?>
<center><table class="table table-striped table-bordered w-75">
<thead>
<th class="text-center"><b><?= __('plan.groupFlights.groupEntity') ?></b></th>
<th class="text-center"><b><?= __('plan.groupFlights.dep') ?></b></th>
<th class="text-center"><b><?= __('plan.groupFlights.arr') ?></b></th>
<th class="text-center"><b><?= __('plan.groupFlights.etd') ?></b></th>
<th class="text-center"><b><?= __('plan.groupFlights.eta') ?></b></th>
<th class="text-center"><b><?= __('plan.staffing.quantity') ?></b></th>
<th class="text-center"><b><?= __('plan.groupFlights.route') ?></b></th>
<?php if ($perm == true) {
echo '<th></th>';
}
?>
</thead>
<tbody id="group_flights_table"></tbody>
</table></center>
</div>
<!-- Tab: Extended Outlook -->
<div class="tab-pane fade" id="outlook">
<div class="row gutters-tiny py-20" id="outlook_data"></div>
</div>
</div>
</div>
</div>
</div>
<?php endif; // org_mismatch ?>
</body>
<?php include('load/footer.php'); ?>
<?php if ($perm == true) { ?>
<!-- Add Goal Modal -->
<div class="modal fade" id="addgoalModal" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title"><?= __('plan.modal.addGoalTitle') ?></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<form method="post" id="addgoal">
<div class="modal-body">
<input type="hidden" name="p_id" value="<?= $id; ?>">
<?= __('plan.modal.operationalGoalLabel') ?>:
<textarea class="form-control" name="comments" placeholder="Manage DTW airport operations to keep departure and airborne arrival delays to less than 30 minutes." rows="3"></textarea>
</div>
<div class="modal-footer">
<input type="submit" class="btn btn-sm btn-success" value="<?= __('plan.modal.add') ?>">
<button type="button" class="btn btn-sm btn-danger" data-dismiss="modal"><?= __('plan.modal.close') ?></button>
</div>
</div>
</form>
</div>
</div>
<!-- Edit Goal Modal -->
<div class="modal fade" id="editgoalModal" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title"><?= __('plan.modal.editGoalTitle') ?></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<form method="post" id="editgoal">
<div class="modal-body">
<input type="hidden" name="id" id="id">
<?= __('plan.modal.operationalGoalLabel') ?>:
<textarea class="form-control" name="comments" id="comments" placeholder="Manage DTW airport operations to keep departure and airborne arrival delays to less than 30 minutes." rows="3"></textarea>
</div>
<div class="modal-footer">
<input type="submit" class="btn btn-sm btn-warning" value="<?= __('plan.modal.edit') ?>">
<button type="button" class="btn btn-sm btn-danger" data-dismiss="modal"><?= __('plan.modal.close') ?></button>
</div>
</div>
</form>
</div>
</div>
<!-- Add DCC Personnel Modal -->
<div class="modal fade" id="add_dccstaffingModal" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title"><?= __('plan.dcc.addPersonnel') ?></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<form method="post" id="add_dccstaffing">
<div class="modal-body">
<input type="hidden" name="p_id" value="<?= $id; ?>">
<?= __('plan.dcc.facilityType') ?>:
<select class="form-control" id="add_dcc_type" onchange="planDcc.onTypeChange('add')">
<option value=""><?= __('plan.dcc.selectType') ?></option>
</select>
<div id="add_dcc_service_row" style="display:none; margin-top:8px;">
<?= __('plan.dcc.service') ?>:
<select class="form-control" id="add_dcc_service" onchange="planDcc.onServiceChange('add')">
<option value=""><?= __('plan.dcc.selectTypeFirst') ?></option>
</select>
</div>
<div id="add_dcc_facility_row" style="display:none; margin-top:8px;">
<?= __('plan.dcc.facility') ?>:
<select class="form-control" id="add_dcc_facility">
<option value=""><?= __('plan.dcc.selectTypeFirst') ?></option>
</select>
</div>
<div style="margin-top:8px;">
<?= __('plan.dcc.role') ?>:
<select class="form-control" id="add_dcc_role">
<option value=""><?= __('plan.dcc.selectTypeFirst') ?></option>
</select>
</div>
<input type="hidden" name="position_facility" id="add_position_facility">
<input type="hidden" name="position_name" id="add_position_name">
<hr>
<?= __('plan.dcc.personnelNameLabel') ?>:
<input type="text" class="form-control" name="personnel_name" maxlength="128" placeholder="<?= __('plan.dcc.leaveBlankForVacancy') ?>">
<?= __('plan.dcc.personnelOis') ?>:
<input type="text" class="form-control" name="personnel_ois" maxlength="2" placeholder="<?= __('plan.dcc.leaveBlankForVacancy') ?>">
</div>
<div class="modal-footer">
<input type="submit" class="btn btn-sm btn-success" value="<?= __('plan.modal.add') ?>">
<button type="button" class="btn btn-sm btn-danger" data-dismiss="modal"><?= __('plan.modal.close') ?></button>
</div>
</div>
</form>
</div>
</div>
<!-- Edit DCC Personnel Modal -->
<div class="modal fade" id="edit_dccstaffingModal" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title"><?= __('plan.dcc.editPersonnel') ?></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<form method="post" id="edit_dccstaffing">
<div class="modal-body">
<input type="hidden" name="id" id="id">
<?= __('plan.dcc.facilityType') ?>:
<select class="form-control" id="edit_dcc_type" onchange="planDcc.onTypeChange('edit')">
<option value=""><?= __('plan.dcc.selectType') ?></option>
</select>
<div id="edit_dcc_service_row" style="display:none; margin-top:8px;">
<?= __('plan.dcc.service') ?>:
<select class="form-control" id="edit_dcc_service" onchange="planDcc.onServiceChange('edit')">
<option value=""><?= __('plan.dcc.selectTypeFirst') ?></option>
</select>
</div>
<div id="edit_dcc_facility_row" style="display:none; margin-top:8px;">
<?= __('plan.dcc.facility') ?>:
<select class="form-control" id="edit_dcc_facility">
<option value=""><?= __('plan.dcc.selectTypeFirst') ?></option>
</select>
</div>
<div style="margin-top:8px;">
<?= __('plan.dcc.role') ?>:
<select class="form-control" id="edit_dcc_role">
<option value=""><?= __('plan.dcc.selectTypeFirst') ?></option>
</select>
</div>
<input type="hidden" name="position_facility" id="edit_position_facility">
<input type="hidden" name="position_name" id="edit_position_name">
<hr>
<?= __('plan.dcc.personnelNameLabel') ?>:
<input type="text" class="form-control" name="personnel_name" id="personnel_name" maxlength="128" placeholder="<?= __('plan.dcc.leaveBlankForVacancy') ?>">
<?= __('plan.dcc.personnelOis') ?>:
<input type="text" class="form-control" name="personnel_ois" id="personnel_ois" maxlength="2" placeholder="<?= __('plan.dcc.leaveBlankForVacancy') ?>">
</div>
<div class="modal-footer">
<input type="submit" class="btn btn-sm btn-warning" value="<?= __('plan.modal.edit') ?>">
<button type="button" class="btn btn-sm btn-danger" data-dismiss="modal"><?= __('plan.modal.close') ?></button>
</div>
</div>
</form>
</div>
</div>
<!-- Add Historical Modal -->
<div class="modal fade" id="addhistoricalModal" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title"><?= __('plan.historicalTab.addTitle') ?></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<form method="post" id="addhistorical">
<div class="modal-body">
<input type="hidden" name="p_id" value="<?= $id; ?>">
<?= __('plan.historicalTab.title') ?>:
<input type="text" class="form-control" name="title">
<?= __('plan.historicalTab.date') ?>:
<input type="text" class="form-control" id="ah_date" name="date" readonly>
<?= __('plan.historicalTab.summary') ?>:
<textarea class="form-control" name="summary" rows="3"></textarea>
<hr>
<?= __('plan.historicalTab.imageUrl') ?>:
<input type="text" class="form-control" name="image_url">
<?= __('plan.historicalTab.sourceUrl') ?>:
<input type="text" class="form-control" name="source_url">
</div>
<div class="modal-footer">
<input type="submit" class="btn btn-sm btn-success" value="<?= __('plan.modal.add') ?>">
<button type="button" class="btn btn-sm btn-danger" data-dismiss="modal"><?= __('plan.modal.close') ?></button>
</div>
</div>
</form>
</div>
</div>
<!-- Edit Historical Modal -->
<div class="modal fade" id="edithistoricalModal" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title"><?= __('plan.historicalTab.editTitle') ?></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<form method="post" id="edithistorical">
<div class="modal-body">
<input type="hidden" name="id" id="id">
<?= __('plan.historicalTab.title') ?>:
<input type="text" class="form-control" name="title" id="title">
<?= __('plan.historicalTab.date') ?>:
<input type="text" class="form-control" id="eh_date" name="date" readonly>
<?= __('plan.historicalTab.summary') ?>:
<textarea class="form-control" name="summary" id="summary" rows="3"></textarea>
<hr>
<?= __('plan.historicalTab.imageUrl') ?>:
<input type="text" class="form-control" name="image_url" id="image_url">
<?= __('plan.historicalTab.sourceUrl') ?>:
<input type="text" class="form-control" name="source_url" id="source_url">
</div>
<div class="modal-footer">
<input type="submit" class="btn btn-sm btn-warning" value="<?= __('plan.modal.edit') ?>">
<button type="button" class="btn btn-sm btn-danger" data-dismiss="modal"><?= __('plan.modal.close') ?></button>
</div>
</div>
</form>
</div>
</div>
<!-- Add Forecast Modal -->
<div class="modal fade" id="addforecastModal" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title"><?= __('plan.forecastTab.addTitle') ?></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<form method="post" id="addforecast">
<div class="modal-body">
<input type="hidden" name="p_id" value="<?= $id; ?>">
<?= __('plan.historicalTab.date') ?>:
<input type="text" class="form-control" id="af_date" name="date" readonly>
<?= __('plan.historicalTab.summary') ?>:
<textarea class="form-control" name="summary" rows="3"></textarea>
<hr>
<?= __('plan.historicalTab.imageUrl') ?>:
<input type="text" class="form-control" name="image_url">
</div>
<div class="modal-footer">
<input type="submit" class="btn btn-sm btn-success" value="<?= __('plan.modal.add') ?>">
<button type="button" class="btn btn-sm btn-danger" data-dismiss="modal"><?= __('plan.modal.close') ?></button>
</div>
</div>
</form>
</div>
</div>
<!-- Edit Forecast Modal -->
<div class="modal fade" id="editforecastModal" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">