-
Notifications
You must be signed in to change notification settings - Fork 0
/
update-document.php
798 lines (777 loc) · 38 KB
/
update-document.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
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
<?php
require './classes/PDFDocumentGenerator.php';
require './classes/PDFGenerator.php';
use PDF\Generator\PDFGenerator;
use PDFGenerator\Entity\PDFDocument;
$pdfDocument = new PDFDocumentGenerator();
if(!isset($_GET['id']))
{
echo 'Page introuvable';
exit;
}
$document = $pdfDocument->showDocument($_GET['id'])[0];
if($document === null)
{
echo 'Document introuvable';
exit;
}
if(isset($_POST['pageName']))
{
$document->setName($_POST['pageName']);
$document->setPageFormat($_POST['pageFormat']);
$document->setPageOrientation($_POST['pageOrientation']);
$document->setPageMargin($_POST['pageMargin']);
$document->setHeader($_POST['pageHeader']);
$document->setBody($_POST['pageBody']);
$document->setFooter($_POST['pageFooter']);
$message = $pdfDocument->editDocument($document, $_GET['id']);
$data = json_encode(array('message'=>$message));
echo $data;
exit;
}
?>
<!DOCTYPE html>
<html class="no-js css-menubar" 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.0, user-scalable=0, minimal-ui">
<meta name="description" content="bootstrap admin template">
<meta name="author" content="">
<title>PDFDocument Generator</title>
<link rel="apple-touch-icon" href="template/base/assets/images/apple-touch-icon.png">
<link rel="shortcut icon" href="template/base/assets/images/favicon.ico">
<!-- Stylesheets -->
<link rel="stylesheet" href="template/global/css/bootstrap.min.css">
<link rel="stylesheet" href="template/global/css/bootstrap-extend.min.css">
<link rel="stylesheet" href="template/base/assets/css/site.min.css">
<!-- Plugins -->
<link rel="stylesheet" href="template/global/vendor/animsition/animsition.css">
<link rel="stylesheet" href="template/global/vendor/asscrollable/asScrollable.css">
<link rel="stylesheet" href="template/global/vendor/switchery/switchery.css">
<link rel="stylesheet" href="template/global/vendor/intro-js/introjs.css">
<link rel="stylesheet" href="template/global/vendor/slidepanel/slidePanel.css">
<link rel="stylesheet" href="template/global/vendor/flag-icon-css/flag-icon.css">
<link rel="stylesheet" href="template/global/vendor/summernote/summernote.css">
<link rel="stylesheet" href="template/global/fonts/web-icons/web-icons.min.css">
<link rel="stylesheet" href="template/global/fonts/brand-icons/brand-icons.min.css">
<link rel='stylesheet' href='http://fonts.googleapis.com/css?family=Roboto:300,400,500,300italic'>
<!--[if lt IE 9]>
<script src="template/global/vendor/html5shiv/html5shiv.min.js"></script>
<![endif]-->
<!--[if lt IE 10]>
<script src="template/global/vendor/media-match/media.match.min.js"></script>
<script src="template/global/vendor/respond/respond.min.js"></script>
<![endif]-->
<!-- Scripts -->
<script src="template/global/vendor/breakpoints/breakpoints.js"></script>
<script>
Breakpoints();
</script>
</head>
<body class="animsition dashboard">
<!--[if lt IE 8]>
<p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
<![endif]-->
<nav class="site-navbar navbar navbar-default navbar-fixed-top navbar-mega" role="navigation">
<div class="navbar-header">
<button type="button" class="navbar-toggler hamburger hamburger-close navbar-toggler-left hided"
data-toggle="menubar">
<span class="sr-only">Toggle navigation</span>
<span class="hamburger-bar"></span>
</button>
<button type="button" class="navbar-toggler collapsed" data-target="#site-navbar-collapse"
data-toggle="collapse">
<i class="icon wb-more-horizontal" aria-hidden="true"></i>
</button>
<div class="navbar-brand navbar-brand-center site-gridmenu-toggle" data-toggle="gridmenu">
<span class="navbar-brand-text hidden-xs-down"> PDF Generator</span>
</div>
<button type="button" class="navbar-toggler collapsed" data-target="#site-navbar-search"
data-toggle="collapse">
<span class="sr-only">Toggle Search</span>
<i class="icon wb-search" aria-hidden="true"></i>
</button>
</div>
<div class="navbar-container container-fluid">
<!-- Navbar Collapse -->
<div class="collapse navbar-collapse navbar-collapse-toolbar" id="site-navbar-collapse">
<!-- Navbar Toolbar -->
<ul class="nav navbar-toolbar">
<li class="nav-item hidden-float" id="toggleMenubar">
<a class="nav-link" data-toggle="menubar" href="#" role="button">
<i class="icon hamburger hamburger-arrow-left">
<span class="sr-only">Toggle menubar</span>
<span class="hamburger-bar"></span>
</i>
</a>
</li>
<li class="nav-item hidden-sm-down" id="toggleFullscreen">
<a class="nav-link icon icon-fullscreen" data-toggle="fullscreen" href="#" role="button">
<span class="sr-only">Toggle fullscreen</span>
</a>
</li>
<li class="nav-item hidden-float">
<a class="nav-link icon wb-search" data-toggle="collapse" href="#" data-target="#site-navbar-search"
role="button">
<span class="sr-only">Toggle Search</span>
</a>
</li>
<li class="nav-item dropdown dropdown-fw dropdown-mega">
<a class="nav-link" data-toggle="dropdown" href="#" aria-expanded="false" data-animation="fade"
role="button">Mega <i class="icon wb-chevron-down-mini" aria-hidden="true"></i></a>
<div class="dropdown-menu" role="menu">
<div class="mega-content">
<div class="row">
<div class="col-md-4">
<h5>UI Kit</h5>
<ul class="blocks-2">
<li class="mega-menu m-0">
<ul class="list-icons">
<li><i class="wb-chevron-right-mini" aria-hidden="true"></i>
<a href="advanced/animation.html">Animation</a>
</li>
<li><i class="wb-chevron-right-mini" aria-hidden="true"></i>
<a href="uikit/buttons.html">Buttons</a>
</li>
<li><i class="wb-chevron-right-mini" aria-hidden="true"></i>
<a href="uikit/colors.html">Colors</a>
</li>
<li><i class="wb-chevron-right-mini" aria-hidden="true"></i>
<a href="uikit/dropdowns.html">Dropdowns</a>
</li>
<li><i class="wb-chevron-right-mini" aria-hidden="true"></i>
<a href="uikit/icons.html">Icons</a>
</li>
<li><i class="wb-chevron-right-mini" aria-hidden="true"></i>
<a href="advanced/lightbox.html">Lightbox</a>
</li>
</ul>
</li>
<li class="mega-menu m-0">
<ul class="list-icons">
<li><i class="wb-chevron-right-mini" aria-hidden="true"></i>
<a href="uikit/modals.html">Modals</a>
</li>
<li><i class="wb-chevron-right-mini" aria-hidden="true"></i>
<a href="uikit/panel-structure.html">Panels</a>
</li>
<li><i class="wb-chevron-right-mini" aria-hidden="true"></i>
<a href="structure/overlay.html">Overlay</a>
</li>
<li><i class="wb-chevron-right-mini" aria-hidden="true"></i>
<a href="uikit/tooltip-popover.html ">Tooltips</a>
</li>
<li><i class="wb-chevron-right-mini" aria-hidden="true"></i>
<a href="advanced/scrollable.html">Scrollable</a>
</li>
<li><i class="wb-chevron-right-mini" aria-hidden="true"></i>
<a href="uikit/typography.html">Typography</a>
</li>
</ul>
</li>
</ul>
</div>
<div class="col-md-4">
<h5>Media
<span class="badge badge-pill badge-success">4</span>
</h5>
<ul class="blocks-3">
<li>
<a class="thumbnail m-0" href="javascript:void(0)">
<img class="w-full" src="template/photos/placeholder.png" alt="..." />
</a>
</li>
<li>
<a class="thumbnail m-0" href="javascript:void(0)">
<img class="w-full" src="template/photos/placeholder.png" alt="..." />
</a>
</li>
<li>
<a class="thumbnail m-0" href="javascript:void(0)">
<img class="w-full" src="template/photos/placeholder.png" alt="..." />
</a>
</li>
<li>
<a class="thumbnail m-0" href="javascript:void(0)">
<img class="w-full" src="template/photos/placeholder.png" alt="..." />
</a>
</li>
<li>
<a class="thumbnail m-0" href="javascript:void(0)">
<img class="w-full" src="template/photos/placeholder.png" alt="..." />
</a>
</li>
<li>
<a class="thumbnail m-0" href="javascript:void(0)">
<img class="w-full" src="template/photos/placeholder.png" alt="..." />
</a>
</li>
</ul>
</div>
<div class="col-md-4">
<h5 class="mb-0">Accordion</h5>
<!-- Accordion -->
<div class="panel-group panel-group-simple" id="siteMegaAccordion" aria-multiselectable="true"
role="tablist">
<div class="panel">
<div class="panel-heading" id="siteMegaAccordionHeadingOne" role="tab">
<a class="panel-title" data-toggle="collapse" href="#siteMegaCollapseOne" data-parent="#siteMegaAccordion"
aria-expanded="false" aria-controls="siteMegaCollapseOne">
Collapsible Group Item #1
</a>
</div>
<div class="panel-collapse collapse" id="siteMegaCollapseOne" aria-labelledby="siteMegaAccordionHeadingOne"
role="tabpanel">
<div class="panel-body">
De moveat laudatur vestra parum doloribus labitur sentire partes, eripuit praesenti
congressus ostendit alienae, voluptati ornateque accusamus
clamat reperietur convicia albucius.
</div>
</div>
</div>
<div class="panel">
<div class="panel-heading" id="siteMegaAccordionHeadingTwo" role="tab">
<a class="panel-title collapsed" data-toggle="collapse" href="#siteMegaCollapseTwo"
data-parent="#siteMegaAccordion" aria-expanded="false"
aria-controls="siteMegaCollapseTwo">
Collapsible Group Item #2
</a>
</div>
<div class="panel-collapse collapse" id="siteMegaCollapseTwo" aria-labelledby="siteMegaAccordionHeadingTwo"
role="tabpanel">
<div class="panel-body">
Praestabiliorem. Pellat excruciant legantur ullum leniter vacare foris voluptate
loco ignavi, credo videretur multoque choro fatemur
mortis animus adoptionem, bello statuat expediunt naturales.
</div>
</div>
</div>
<div class="panel">
<div class="panel-heading" id="siteMegaAccordionHeadingThree" role="tab">
<a class="panel-title collapsed" data-toggle="collapse" href="#siteMegaCollapseThree"
data-parent="#siteMegaAccordion" aria-expanded="false"
aria-controls="siteMegaCollapseThree">
Collapsible Group Item #3
</a>
</div>
<div class="panel-collapse collapse" id="siteMegaCollapseThree" aria-labelledby="siteMegaAccordionHeadingThree"
role="tabpanel">
<div class="panel-body">
Horum, antiquitate perciperet d conspectum locus obruamus animumque perspici probabis
suscipere. Desiderat magnum, contenta poena desiderant
concederetur menandri damna disputandum corporum.
</div>
</div>
</div>
</div>
<!-- End Accordion -->
</div>
</div>
</div>
</div>
</li>
</ul>
<!-- End Navbar Toolbar -->
<!-- Navbar Toolbar Right -->
<!-- <ul class="nav navbar-toolbar navbar-right navbar-toolbar-right">
<li class="nav-item dropdown">
<a class="nav-link" data-toggle="dropdown" href="javascript:void(0)" data-animation="scale-up"
aria-expanded="false" role="button">
<span class="flag-icon flag-icon-us"></span>
</a>
<div class="dropdown-menu" role="menu">
<a class="dropdown-item" href="javascript:void(0)" role="menuitem">
<span class="flag-icon flag-icon-gb"></span> English</a>
<a class="dropdown-item" href="javascript:void(0)" role="menuitem">
<span class="flag-icon flag-icon-fr"></span> French</a>
<a class="dropdown-item" href="javascript:void(0)" role="menuitem">
<span class="flag-icon flag-icon-cn"></span> Chinese</a>
<a class="dropdown-item" href="javascript:void(0)" role="menuitem">
<span class="flag-icon flag-icon-de"></span> German</a>
<a class="dropdown-item" href="javascript:void(0)" role="menuitem">
<span class="flag-icon flag-icon-nl"></span> Dutch</a>
</div>
</li>
<li class="nav-item dropdown">
<a class="nav-link navbar-avatar" data-toggle="dropdown" href="#" aria-expanded="false"
data-animation="scale-up" role="button">
<span class="avatar avatar-online">
<img src="template/portraits/5.jpg" alt="...">
<i></i>
</span>
</a>
<div class="dropdown-menu" role="menu">
<a class="dropdown-item" href="javascript:void(0)" role="menuitem"><i class="icon wb-user" aria-hidden="true"></i> Profile</a>
<a class="dropdown-item" href="javascript:void(0)" role="menuitem"><i class="icon wb-payment" aria-hidden="true"></i> Billing</a>
<a class="dropdown-item" href="javascript:void(0)" role="menuitem"><i class="icon wb-settings" aria-hidden="true"></i> Settings</a>
<div class="dropdown-divider" role="presentation"></div>
<a class="dropdown-item" href="javascript:void(0)" role="menuitem"><i class="icon wb-power" aria-hidden="true"></i> Logout</a>
</div>
</li>
<li class="nav-item dropdown">
<a class="nav-link" data-toggle="dropdown" href="javascript:void(0)" title="Notifications"
aria-expanded="false" data-animation="scale-up" role="button">
<i class="icon wb-bell" aria-hidden="true"></i>
<span class="badge badge-pill badge-danger up">5</span>
</a>
<div class="dropdown-menu dropdown-menu-right dropdown-menu-media" role="menu">
<div class="dropdown-menu-header">
<h5>NOTIFICATIONS</h5>
<span class="badge badge-round badge-danger">New 5</span>
</div>
<div class="list-group">
<div data-role="container">
<div data-role="content">
<a class="list-group-item dropdown-item" href="javascript:void(0)" role="menuitem">
<div class="media">
<div class="pr-10">
<i class="icon wb-order bg-red-600 white icon-circle" aria-hidden="true"></i>
</div>
<div class="media-body">
<h6 class="media-heading">A new order has been placed</h6>
<time class="media-meta" datetime="2017-06-12T20:50:48+08:00">5 hours ago</time>
</div>
</div>
</a>
<a class="list-group-item dropdown-item" href="javascript:void(0)" role="menuitem">
<div class="media">
<div class="pr-10">
<i class="icon wb-user bg-green-600 white icon-circle" aria-hidden="true"></i>
</div>
<div class="media-body">
<h6 class="media-heading">Completed the task</h6>
<time class="media-meta" datetime="2017-06-11T18:29:20+08:00">2 days ago</time>
</div>
</div>
</a>
<a class="list-group-item dropdown-item" href="javascript:void(0)" role="menuitem">
<div class="media">
<div class="pr-10">
<i class="icon wb-settings bg-red-600 white icon-circle" aria-hidden="true"></i>
</div>
<div class="media-body">
<h6 class="media-heading">Settings updated</h6>
<time class="media-meta" datetime="2017-06-11T14:05:00+08:00">2 days ago</time>
</div>
</div>
</a>
<a class="list-group-item dropdown-item" href="javascript:void(0)" role="menuitem">
<div class="media">
<div class="pr-10">
<i class="icon wb-calendar bg-blue-600 white icon-circle" aria-hidden="true"></i>
</div>
<div class="media-body">
<h6 class="media-heading">Event started</h6>
<time class="media-meta" datetime="2017-06-10T13:50:18+08:00">3 days ago</time>
</div>
</div>
</a>
<a class="list-group-item dropdown-item" href="javascript:void(0)" role="menuitem">
<div class="media">
<div class="pr-10">
<i class="icon wb-chat bg-orange-600 white icon-circle" aria-hidden="true"></i>
</div>
<div class="media-body">
<h6 class="media-heading">Message received</h6>
<time class="media-meta" datetime="2017-06-10T12:34:48+08:00">3 days ago</time>
</div>
</div>
</a>
</div>
</div>
</div>
<div class="dropdown-menu-footer">
<a class="dropdown-menu-footer-btn" href="javascript:void(0)" role="button">
<i class="icon md-settings" aria-hidden="true"></i>
</a>
<a class="dropdown-item" href="javascript:void(0)" role="menuitem">
All notifications
</a>
</div>
</div>
</li>
<li class="nav-item dropdown">
<a class="nav-link" data-toggle="dropdown" href="javascript:void(0)" title="Messages"
aria-expanded="false" data-animation="scale-up" role="button">
<i class="icon wb-envelope" aria-hidden="true"></i>
<span class="badge badge-pill badge-info up">3</span>
</a>
<div class="dropdown-menu dropdown-menu-right dropdown-menu-media" role="menu">
<div class="dropdown-menu-header" role="presentation">
<h5>MESSAGES</h5>
<span class="badge badge-round badge-info">New 3</span>
</div>
<div class="list-group" role="presentation">
<div data-role="container">
<div data-role="content">
<a class="list-group-item" href="javascript:void(0)" role="menuitem">
<div class="media">
<div class="pr-10">
<span class="avatar avatar-sm avatar-online">
<img src="template/portraits/2.jpg" alt="..." />
<i></i>
</span>
</div>
<div class="media-body">
<h6 class="media-heading">Mary Adams</h6>
<div class="media-meta">
<time datetime="2017-06-17T20:22:05+08:00">30 minutes ago</time>
</div>
<div class="media-detail">Anyways, i would like just do it</div>
</div>
</div>
</a>
<a class="list-group-item" href="javascript:void(0)" role="menuitem">
<div class="media">
<div class="pr-10">
<span class="avatar avatar-sm avatar-off">
<img src="template/portraits/3.jpg" alt="..." />
<i></i>
</span>
</div>
<div class="media-body">
<h6 class="media-heading">Caleb Richards</h6>
<div class="media-meta">
<time datetime="2017-06-17T12:30:30+08:00">12 hours ago</time>
</div>
<div class="media-detail">I checheck the document. But there seems</div>
</div>
</div>
</a>
<a class="list-group-item" href="javascript:void(0)" role="menuitem">
<div class="media">
<div class="pr-10">
<span class="avatar avatar-sm avatar-busy">
<img src="template/portraits/4.jpg" alt="..." />
<i></i>
</span>
</div>
<div class="media-body">
<h6 class="media-heading">June Lane</h6>
<div class="media-meta">
<time datetime="2017-06-16T18:38:40+08:00">2 days ago</time>
</div>
<div class="media-detail">Lorem ipsum Id consectetur et minim</div>
</div>
</div>
</a>
<a class="list-group-item" href="javascript:void(0)" role="menuitem">
<div class="media">
<div class="pr-10">
<span class="avatar avatar-sm avatar-away">
<img src="template/portraits/5.jpg" alt="..." />
<i></i>
</span>
</div>
<div class="media-body">
<h6 class="media-heading">Edward Fletcher</h6>
<div class="media-meta">
<time datetime="2017-06-15T20:34:48+08:00">3 days ago</time>
</div>
<div class="media-detail">Dolor et irure cupidatat commodo nostrud nostrud.</div>
</div>
</div>
</a>
</div>
</div>
</div>
<div class="dropdown-menu-footer" role="presentation">
<a class="dropdown-menu-footer-btn" href="javascript:void(0)" role="button">
<i class="icon wb-settings" aria-hidden="true"></i>
</a>
<a class="dropdown-item" href="javascript:void(0)" role="menuitem">
See all messages
</a>
</div>
</div>
</li>
<li class="nav-item" id="toggleChat">
<a class="nav-link" data-toggle="site-sidebar" href="javascript:void(0)" title="Chat"
data-url="site-sidebar.tpl">
<i class="icon wb-chat" aria-hidden="true"></i>
</a>
</li>
</ul> -->
<!-- End Navbar Toolbar Right -->
</div>
<!-- End Navbar Collapse -->
<!-- Site Navbar Seach -->
<div class="collapse navbar-search-overlap" id="site-navbar-search">
<form role="search">
<div class="form-group">
<div class="input-search">
<i class="input-search-icon wb-search" aria-hidden="true"></i>
<input type="text" class="form-control" name="site-search" placeholder="Search...">
<button type="button" class="input-search-close icon wb-close" data-target="#site-navbar-search"
data-toggle="collapse" aria-label="Close"></button>
</div>
</div>
</form>
</div>
<!-- End Site Navbar Seach -->
</div>
</nav>
<div class="site-menubar">
<div class="site-menubar-body">
<div>
<div>
<ul class="site-menu" data-plugin="menu">
<li class="site-menu-category">
<a class="animsition-link" href="index.php">
<i class="white-600 wb wb-file"></i> <span class="site-menu-title">Mes documents</span>
</a>
</li>
</ul>
</div>
</div>
</div>
<div class="site-menubar-footer">
<a href="javascript: void(0);" class="fold-show" data-placement="top" data-toggle="tooltip"
data-original-title="Settings">
<span class="icon wb-settings" aria-hidden="true"></span>
</a>
<a href="javascript: void(0);" data-placement="top" data-toggle="tooltip" data-original-title="Lock">
<span class="icon wb-eye-close" aria-hidden="true"></span>
</a>
<a href="javascript: void(0);" data-placement="top" data-toggle="tooltip" data-original-title="Logout">
<span class="icon wb-power" aria-hidden="true"></span>
</a>
</div>
</div>
<div class="site-gridmenu">
<div>
<div>
<ul>
<li>
<a href="apps/mailbox/mailbox.html">
<i class="icon wb-envelope"></i>
<span>Mailbox</span>
</a>
</li>
<li>
<a href="apps/calendar/calendar.html">
<i class="icon wb-calendar"></i>
<span>Calendar</span>
</a>
</li>
<li>
<a href="apps/contacts/contacts.html">
<i class="icon wb-user"></i>
<span>Contacts</span>
</a>
</li>
<li>
<a href="apps/media/overview.html">
<i class="icon wb-camera"></i>
<span>Media</span>
</a>
</li>
<li>
<a href="apps/documents/categories.html">
<i class="icon wb-order"></i>
<span>Documents</span>
</a>
</li>
<li>
<a href="apps/projects/projects.html">
<i class="icon wb-image"></i>
<span>Project</span>
</a>
</li>
<li>
<a href="apps/forum/forum.html">
<i class="icon wb-chat-group"></i>
<span>Forum</span>
</a>
</li>
<li>
<a href="index.html">
<i class="icon wb-dashboard"></i>
<span>Dashboard</span>
</a>
</li>
</ul>
</div>
</div>
</div>
<!-- Page -->
<div class="page">
<div class="page-header">
<h1 class="page-title"></h1>
<p></p>
</div>
<div class="page-content container-fluid">
<div class="row" data-plugin="matchHeight" data-by-row="true">
<div class="col-lg-12">
<div class="panel">
<div class="panel-heading">
<h3 class="panel-title">Mise à jour du document</h3>
<div class="text-right" style="padding-right: 30px; margin-bottom: 20px">
<a href="index.php" class="btn btn-primary"><i class="white-600 wb wb-arrow-left"></i> Revenir à la liste des documents</a>
</div>
</div>
<div class="panel-body">
<form name="documentForm" action="<?php echo($_SERVER['PHP_SELF']) ?>" id="updateFormDoc" method="post">
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label>
Nom du document
</label>
<input type="text" value="<?php echo ($document->getName()); ?>" name="pageName" id="pageName" class="form-control form-control-sm" placeholder="Entrer le nom du document">
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label>
Format du document
</label>
<select name="pageFormat" id="pageFormat" class="form-control form-control-sm">
<option selected="" disabled="">
-- Choisir le format --
</option>
<option value="3" <?php if (intval($document->getPageFormat())===3) echo 'selected'; ?>>
A3
</option>
<option value="4" <?php if (intval($document->getPageFormat())===4) echo 'selected'; ?>>
A4
</option>
<option value="5" <?php if (intval($document->getPageFormat())===5) echo 'selected'; ?>>
A5
</option>
<option value="6" <?php if (intval($document->getPageFormat())===6) echo 'selected'; ?>>
A6
</option>
</select>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label>
Orientation du document
</label>
<select name="pageOrientation" id="pageOrientation" class="form-control form-control-sm">
<option selected="" disabled="">
-- Choisir l'orientation --
</option>
<option value="1" <?php if (intval($document->getPageOrientation())===1) echo 'selected'; ?>>
Portrait
</option>
<option value="2" <?php if (intval($document->getPageOrientation())===2) echo 'selected'; ?>>
Paysage
</option>
</select>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label>
Margins du document
</label>
<input type="text" name="pageMargin" id="pageMargin" class="form-control form-control-sm" placeholder="Margins du document" value="<?php echo $document->getPageMargin(); ?>">
<span class="help-bloc">
Entrer les margins du document séparés par une virgule. (e.g 10,12,10,15 )
</span>
</div>
</div>
<div class="col-md-12">
<div class="form-group">
<label>
Entete du document
</label>
<textarea id="summernoteHeader" name="pageHeader" data-plugin="summernote">
<?php echo $document->getHeader() ?>
</textarea>
</div>
</div>
<div class="col-md-12">
<div class="form-group">
<label>
Corps du document
</label>
<textarea id="summernoteBody" name="pageBody" data-plugin="summernote">
<?php echo $document->getBody() ?>
</textarea>
</div>
</div>
<div class="col-md-12">
<div class="form-group">
<label>
Pied du document
</label>
<textarea id="summernoteFooter" name="pageFooter" data-plugin="summernote">
<?php echo $document->getFooter() ?>
</textarea>
</div>
</div>
<div class="col-md-12">
<div class="form-group text-right">
<button type="submit" class="btn btn-primary" id="updateDocument" name="updateDocument">
Générer & Sauvergarder le document <i class="white-500 wb wb-file"></i>
</button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- End Page -->
<!-- Footer -->
<footer class="site-footer">
<div class="site-footer-legal">© 2017 <a href="http://themeforest.net/item/remark-responsive-bootstrap-admin-template/11989202">Remark</a></div>
<div class="site-footer-right">
Crafted with <i class="red-600 wb wb-heart"></i> by <a href="http://themeforest.net/user/amazingSurge">amazingSurge</a>
</div>
</footer>
<script src="template/global/vendor/babel-external-helpers/babel-external-helpers.js"></script>
<script src="template/global/vendor/jquery/jquery.js"></script>
<script src="template/global/vendor/tether/tether.js"></script>
<script src="template/global/vendor/bootstrap/bootstrap.js"></script>
<script src="template/global/vendor/animsition/animsition.js"></script>
<script src="template/global/vendor/mousewheel/jquery.mousewheel.js"></script>
<script src="template/global/vendor/asscrollbar/jquery-asScrollbar.js"></script>
<script src="template/global/vendor/asscrollable/jquery-asScrollable.js"></script>
<script src="template/global/vendor/ashoverscroll/jquery-asHoverScroll.js"></script>
<!-- Plugins -->
<script src="template/global/vendor/switchery/switchery.min.js"></script>
<script src="template/global/vendor/intro-js/intro.js"></script>
<script src="template/global/vendor/screenfull/screenfull.js"></script>
<script src="template/global/vendor/slidepanel/jquery-slidePanel.js"></script>
<script src="template/global/vendor/summernote/summernote.min.js"></script>
<!-- Scripts -->
<script src="template/global/js/State.js"></script>
<script src="template/global/js/Component.js"></script>
<script src="template/global/js/Plugin.js"></script>
<script src="template/global/js/Base.js"></script>
<script src="template/global/js/Config.js"></script>
<script src="template/base/assets/js/Section/Menubar.js"></script>
<script src="template/base/assets/js/Section/GridMenu.js"></script>
<script src="template/base/assets/js/Section/Sidebar.js"></script>
<script src="template/base/assets/js/Section/PageAside.js"></script>
<script src="template/base/assets/js/Plugin/menu.js"></script>
<script src="template/global/js/config/colors.js"></script>
<script src="template/base/assets/js/config/tour.js"></script>
<script>
Config.set('assets', 'template/base/assets');
</script>
<!-- Page -->
<script src="template/base/assets/js/Site.js"></script>
<script src="template/global/js/Plugin/asscrollable.js"></script>
<script src="template/global/js/Plugin/slidepanel.js"></script>
<script src="template/global/js/Plugin/switchery.js"></script>
<script src="template/global/js/Plugin/summernote.js"></script>
<script src="template/base/assets/examples/js/forms/editor-summernote.js"></script>
<script type="text/javascript" src="ajax/crud-document.js"></script>
<script type="text/javascript">
$('#updateFormDoc').on('submit',function(e){
e.preventDefault();
editDocument($(this), "<?php echo($_SERVER['PHP_SELF']) ?>?id=<?php echo $_GET['id']?>");
});
</script>
</body>
</html>