-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpersonnal-home.php
More file actions
682 lines (630 loc) · 39.9 KB
/
Copy pathpersonnal-home.php
File metadata and controls
682 lines (630 loc) · 39.9 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
<?php require_once './ressources/configuration/settings.php' ?>
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<?php require './ressources/view/metadata/metadata.php' ?>
<title>Huro :: Personnal Home</title>
<link rel="icon" type="image/png" href="assets/img/favicon.png" />
<!--Core CSS -->
<link rel="stylesheet" href="assets/css/app.css" />
<link rel="stylesheet" href="assets/css/main.css" />
<!-- Fonts -->
<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@500;600;700;800;900&display=swap" rel="stylesheet" />
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,600,700" rel="stylesheet" />
<!--Mapbox styles-->
</head>
<body>
<!-- Google Tag Manager (noscript) -->
<!-- End Google Tag Manager (noscript) -->
<div id="huro-app" class="app-wrapper">
<div class="app-overlay"></div>
<!--Full pageloader-->
<!-- Pageloader -->
<div class="pageloader is-full"></div>
<div class="infraloader is-full is-active"></div>
<!--Webapp navbar regular-->
<div class="webapp-navbar">
<div class="webapp-navbar-inner">
<div class="left">
<a href="index.html" class="brand">
<img class="light-image" src="assets/img/logos/logo/logo.svg" alt="" />
<img class="dark-image" src="assets/img/logos/logo/logo-light.svg" alt="" />
</a>
<div class="separator"></div>
<div class="dropdown project-dropdown dropdown-trigger is-spaced">
<div class="h-avatar is-small">
<span class="avatar is-fake is-h-green">
<span>Ph</span>
</span>
</div>
<span class="status-indicator"></span>
<?php require './type.php' ?>
</div>
<h1 id="webapp-page-title" class="title is-5">Personnal Home</h1>
</div>
<?php require './center_right.php' ?>
</div>
</div>
<?php require './webapp_subnav.php' ?>
<!--Languages panel-->
<?php require './langage.php' ?>
<!--Activity panel-->
<?php require './activity.php' ?>
<!--Page body-->
<!-- Content Wrapper -->
<div id="app-project" class="view-wrapper is-webapp" data-page-title="Personnal Home" data-naver-offset="214" data-menu-item="#layouts-navbar-menu" data-mobile-item="#home-sidebar-menu-mobile">
<div class="page-content-wrapper">
<div class="page-content-inner">
<!--Ecommerce Dashboard V1-->
<div class="ecommerce-dashboard ecommerce-dashboard-v1">
<!--Header-->
<div class="dashboard-header">
<div class="h-avatar is-large">
<img class="avatar" src="https://via.placeholder.com/150x150" data-demo-src="assets/img/avatars/photos/8.jpg" alt="" />
</div>
<div class="start">
<h3 class="dark-inverted">Welcome back, <?php echo $utilisateur->telephone ?></h3>
<p>We're very happy to see you again on your dashboard.</p>
</div>
<div class="end">
<button class="button h-button is-dark-outlined">
Activités
</button>
<button class="button h-button is-primary is-elevated">
Manage Shop
</button>
</div>
</div>
<?php
$tst = 0;
$tic = 0;
$loss = 0;
$revenuecemois = 0;
$revenuemoisdernier = 0;
$query = "SELECT produit.id_produit, vente.qte, vente.prix_vente, vente.status_vente, vente.date_vente FROM produit, vente WHERE vente.date_vente = ? and vente.id_utilisateur = ? and vente.id_produit = produit.id_produit ";
$stmt = $HURO->prepare($query);
$today = date('Y-m-d');
$stmt->bind_param('ss', $today, $utilisateur->telephone);
$stmt->execute();
$stmt->store_result();
$stmt->bind_result($id_produit, $quantite, $prix_vente, $status, $date);
while ($stmt->fetch()) {
if ($today == $date) {
$produit = new Produit($id_produit);
if ($prix_vente == -1) {
$go = $produit->prix_standard;
# code...
} elseif ($prix_vente == 0) {
$go = $produit->prix_minimum;
# code...
} else {
$go = $prix_vente;
}
$tst += $go * $quantite;
if ($status == "complete") {
$tic += $go * $quantite;
# code...
} else {
$loss += $go * $quantite;
}
# code...
}
# code...
}
?>
<div class="columns is-multiline">
<!--Dashboard tile-->
<div class="column is-3">
<div class="dashboard-tile">
<div class="tile-head">
<h3>Chiffres Aff. Today</h3>
<div class="h-icon is-info is-rounded">
<i data-feather="gift"></i>
</div>
</div>
<div class="dashboard-tile-inner">
<div class="left">
<span class="dark-inverted"> <?php echo $tst / 1000 ?>K</span>
</div>
<div class="right">
<div id="spark1"></div>
</div>
</div>
</div>
</div>
<!--Dashboard tile-->
<div class="column is-3">
<div class="dashboard-tile">
<div class="tile-head">
<h3>Today Revenue</h3>
<div class="h-icon is-purple is-rounded">
<i data-feather="dollar-sign"></i>
</div>
</div>
<div class="dashboard-tile-inner">
<div class="left">
<span class="dark-inverted"><?php echo $tic / 1000 ?>K</span>
</div>
<div class="right">
<div id="spark2"></div>
</div>
</div>
</div>
</div>
<!--Dashboard tile-->
<div class="column is-3">
<div class="dashboard-tile">
<div class="tile-head">
<h3>Ventes Faites Today</h3>
<div class="h-icon is-green is-rounded">
<i data-feather="box"></i>
</div>
</div>
<div class="dashboard-tile-inner">
<div class="left">
<span class="dark-inverted">
<?php
$query = mysqli_query($HURO, "SELECT COUNT(DISTINCT(id_vente)) as sells FROM vente
where id_utilisateur = '$admin->telephone' and id_entreprise = '$entreprise->id_entreprise'
and
MONTH(date_vente) = MONTH(CURDATE()) and YEAR(vente.date_vente) = YEAR(CURDATE())
");
$result = mysqli_fetch_assoc($query);
echo $result['sells'];
?>
</span>
</div>
<div class="right">
<div id="spark3"></div>
</div>
</div>
</div>
</div>
<!--Dashboard tile-->
<div class="column is-3">
<div class="dashboard-tile">
<div class="tile-head">
<h3>Ventes Annulées</h3>
<div class="h-icon is-orange is-rounded">
<i data-feather="shopping-cart"></i>
</div>
</div>
<div class="dashboard-tile-inner">
<div class="left">
<span class="dark-inverted"><?php echo $loss / 1000 ?> k</span>
</div>
<div class="right">
<div id="spark4"></div>
</div>
</div>
</div>
</div>
<!--Line Stats Widget-->
<div class="column is-6">
<div class="stat-widget line-stats-widget is-straight">
<div class="widget-head">
<h3 class="dark-inverted">Revenue Personnel Annuel - <?php echo date("Y") ?></h3>
<!--Dropdown-->
<div class="dropdown is-spaced is-dots is-right dropdown-trigger">
<div class="is-trigger" aria-haspopup="true">
<i data-feather="more-vertical"></i>
</div>
<div class="dropdown-menu" role="menu">
<div class="dropdown-content">
<a href="#" class="dropdown-item is-media">
<div class="icon">
<i class="lnil lnil-reload"></i>
</div>
<div class="meta">
<span>Reload</span>
<span>Reload chart</span>
</div>
</a>
<a href="#" class="dropdown-item is-media">
<div class="icon">
<i class="lnil lnil-users-alt"></i>
</div>
<div class="meta">
<span>Customers</span>
<span>View customer reports</span>
</div>
</a>
<a href="#" class="dropdown-item is-media">
<div class="icon">
<i class="lnil lnil-gift-alt-1"></i>
</div>
<div class="meta">
<span>Products</span>
<span>View product reports</span>
</div>
</a>
<hr class="dropdown-divider" />
<a href="#" class="dropdown-item is-media">
<div class="icon">
<i class="lnil lnil-bank"></i>
</div>
<div class="meta">
<span>Finance</span>
<span>View financial reports</span>
</div>
</a>
</div>
</div>
</div>
</div>
<?php
$revenuecemois = 0;
$revenuemoisdernier = 0;
$query = "SELECT produit.id_produit, vente.qte, vente.prix_vente, vente.status_vente, vente.date_vente FROM produit, vente WHERE vente.id_utilisateur = ? and vente.id_produit = produit.id_produit ";
$stmt = $HURO->prepare($query);
$mois = date('m');
$stmt->bind_param('s', $utilisateur->telephone);
$stmt->execute();
$stmt->store_result();
$stmt->bind_result($id_produit, $quantite, $prix_vente, $status, $date);
while ($stmt->fetch()) {
if (IsthisMonth($date, 'Y-m-d') == 0) {
$produit = new Produit($id_produit);
if ($prix_vente == -1) {
$go = $produit->prix_standard;
# code...
} elseif ($prix_vente == 0) {
$go = $produit->prix_minimum;
# code...
} else {
$go = $prix_vente;
}
if ($status == "complete") {
$revenuecemois += $go * $quantite;
# code...
}
# code...
} elseif (IsthisMonth($date, 'Y-m-d') == 1) {
if ($status == "complete") {
$revenuemoisdernier += $go * $quantite;
# code...
}
# code...
}
# code...
}
?>
<div class="line-stats">
<div class="line-stat">
<span>Ce mois - <?php echo date("F") ?></span>
<span class="current"><?php echo $revenuecemois / 1000 ?> k</span>
</div>
<div class="line-stat">
<span>Mois dernier</span>
<span class="dark-inverted"><?php echo $revenuemoisdernier / 1000 ?> k</span>
</div>
</div>
<div id="line-stats-widget-chart"></div>
</div>
</div>
<!--Line Stats Widget-->
<div class="column is-6">
<div class="stat-widget area-stats-widget is-straight">
<div class="widget-head">
<h3 class="dark-inverted">Votre Chiffre d'Affaires - Revenue - Abandon: <?php echo date("Y") ?></h3>
<!--Dropdown-->
<div class="dropdown is-spaced is-dots is-right dropdown-trigger">
<div class="is-trigger" aria-haspopup="true">
<i data-feather="more-vertical"></i>
</div>
<div class="dropdown-menu" role="menu">
<div class="dropdown-content">
<a href="#" class="dropdown-item is-media">
<div class="icon">
<i class="lnil lnil-reload"></i>
</div>
<div class="meta">
<span>Reload</span>
<span>Reload chart</span>
</div>
</a>
<a href="#" class="dropdown-item is-media">
<div class="icon">
<i class="lnil lnil-users-alt"></i>
</div>
<div class="meta">
<span>Customers</span>
<span>View customer reports</span>
</div>
</a>
<a href="#" class="dropdown-item is-media">
<div class="icon">
<i class="lnil lnil-gift-alt-1"></i>
</div>
<div class="meta">
<span>Products</span>
<span>View product reports</span>
</div>
</a>
<hr class="dropdown-divider" />
<a href="#" class="dropdown-item is-media">
<div class="icon">
<i class="lnil lnil-bank"></i>
</div>
<div class="meta">
<span>Finance</span>
<span>View financial reports</span>
</div>
</a>
</div>
</div>
</div>
</div>
<!-- <div class="area-stats">
<div class="area-stat">
<span>New Customers</span>
<span class="current">249</span>
</div>
<div class="area-stat">
<span>Returning</span>
<span class="dark-inverted">684</span>
</div>
</div> -->
<div id="area-stats-widget-chart"></div>
</div>
</div>
<!--Flex Stat Widget-->
<!-- <div class="column is-6">
<div class="stat-widget flex-stat-widget is-straight">
<div class="chart-media">
<div class="meta">
<h4 class="dark-inverted">Product Returns</h4>
<span class="is-dark-primary">Avg. 642</span>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Bonum integritas corporis: misera debilitas. Ita ne hoc
quidem modo paria.
</p>
</div>
<div class="chart-container">
<div id="flex-stat-circle"></div>
</div>
</div>
</div>
</div> -->
<!--Flex Stat Widget-->
<!-- <div class="column is-6">
<div class="stat-widget flex-stat-widget is-straight has-fullheight">
<div class="chart-media">
<div class="meta">
<h4 class="dark-inverted">Customer Engagement</h4>
<span class="is-dark-primary">+34.2%</span>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Bonum integritas corporis: misera debilitas. Ita ne hoc
quidem modo paria.
</p>
</div>
<div class="chart-container">
<div id="flex-stat-radial"></div>
</div>
</div>
</div>
</div> -->
<!--Grouped Stat Widget-->
<!-- <div class="column is-6">
<div class="stat-widget grouped-stat-widget is-straight">
<div class="widget-head">
<h3 class="dark-inverted">Shipping Stats</h3>
</div>
<div class="chart-group">
<div class="group">
<div class="group-content">
<div class="chart-container">
<div id="widget-group-radial-1"></div>
</div>
<span class="dark-inverted">36.8K</span>
<p>Free Shipping</p>
</div>
</div>
<div class="group">
<div class="group-content">
<div class="chart-container">
<div id="widget-group-radial-2"></div>
</div>
<span class="dark-inverted">292.3K</span>
<p>Ground Shipping</p>
</div>
</div>
<div class="group">
<div class="group-content">
<div class="chart-container">
<div id="widget-group-radial-3"></div>
</div>
<span class="dark-inverted">108.2K</span>
<p>Next Day Air</p>
</div>
</div>
</div>
</div>
</div> -->
<!--Grouped Stat Widget-->
<!-- <div class="column is-6">
<div class="stat-widget grouped-stat-widget is-straight">
<div class="widget-head">
<h3 class="dark-inverted">Customer Support</h3>
</div>
<div class="chart-group">
<div class="group">
<div class="group-content">
<div class="chart-container is-gauge">
<div id="widget-group-radial-4"></div>
</div>
<span class="dark-inverted">641</span>
<p>Active Tickets</p>
</div>
</div>
<div class="group">
<div class="group-content">
<div class="chart-container is-gauge">
<div id="widget-group-radial-5"></div>
</div>
<span class="dark-inverted">84</span>
<p>Escalated</p>
</div>
</div>
<div class="group">
<div class="group-content">
<div class="chart-container is-gauge">
<div id="widget-group-radial-6"></div>
</div>
<span class="dark-inverted">1,749</span>
<p>Closed Tickets</p>
</div>
</div>
</div>
</div>
</div> -->
<!--Table-->
<div class="column is-12">
<!--Header-->
<div class="table-header">
<h3 class="dark-inverted">Ventes Récentes</h3>
<div class="field">
<div class="control">
<div class="h-select">
<div class="select-box">
<span>Last 30 days</span>
</div>
<div class="select-icon">
<i data-feather="chevron-down"></i>
</div>
<div class="select-drop has-slimscroll-sm">
<div class="drop-inner">
<div class="option-row">
<input type="radio" name="instagram_period_select" />
<div class="option-meta">
<span>Last Week</span>
</div>
</div>
<div class="option-row">
<input type="radio" name="instagram_period_select" />
<div class="option-meta">
<span>Last 30 days</span>
</div>
</div>
<div class="option-row">
<input type="radio" name="instagram_period_select" />
<div class="option-meta">
<span>Last 60 days</span>
</div>
</div>
<div class="option-row">
<input type="radio" name="instagram_period_select" />
<div class="option-meta">
<span>Last 90 days</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="flex-table">
<!--Table header-->
<div class="flex-table-header">
<span class="is-grow">Customer</span>
<span>Date</span>
<span>Amount</span>
<span>Status</span>
<span>Tracking</span>
<span class="cell-end">Actions</span>
</div>
<?php
$query = "SELECT DISTINCT(id_vente) as idvente, date_vente, id_client FROM vente WHERE status_vente = 'complete' and id_entreprise = '$entreprise->id_entreprise' and id_utilisateur = '$utilisateur->telephone' ORDER BY date_vente LIMIT 10";
$query = mysqli_query($HURO, $query);
while ($result = mysqli_fetch_assoc($query)) {
$idvente = $result['idvente'];
$date_vente = $result['date_vente'];
$id_client = $result['id_client'];
$q = "SELECT produit.id_produit, vente.qte, vente.prix_vente FROM produit, vente WHERE vente.id_utilisateur = '$utilisateur->telephone' and vente.id_vente = '$idvente' and vente.id_produit = produit.id_produit ";
$q = mysqli_query($HURO, $q);
$facture = 0;
while ($r = mysqli_fetch_assoc($q)) {
$produit = new Produit($r['id_produit']);
if ($r['prix_vente'] == -1) {
$go = $produit->prix_standard;
# code...
} elseif ($r['prix_vente'] == 0) {
$go = $produit->prix_minimum;
# code...
} else {
$go = $r['prix_vente'];
}
$facture += $go * $r['qte'];
# code...
}
echo '
<!--Table item-->
<div class="flex-table-item">
<div class="flex-table-cell is-media is-grow" data-th="">
<div>
<span
class="item-name dark-inverted is-font-alt is-weight-600"><a href="tel:' . $id_client . '">' . $id_client . '</a></span>
<span class="item-meta">
<span>#158456</span>
</span>
</div>
</div>
<div class="flex-table-cell" data-th="Date">
<span class="light-text">' . $date_vente . '</span>
</div>
<div class="flex-table-cell" data-th="Amount">
<span class="dark-inverted is-weight-500">' . $facture . '</span>
</div>
<div class="flex-table-cell" data-th="Status">
<span class="tag is-green is-rounded">Paid</span>
</div>
<div class="flex-table-cell" data-th="Tracking">
<a href="./facture.php?ktds=' . $idvente . '" class="action-link is-pushed-mobile">' . $idvente . '</a>
</div>
<div class="flex-table-cell cell-end" data-th="Actions">
<button class="button h-button is-dark-outlined is-pushed-mobile">
View Order
</button>
</div>
</div>
';
# code...
}
?>
</div>
</div>
</div>
</div>
</div>
</div>
<?php require './ressources/modal/_modal.php' ?>
<!--Huro Scripts-->
<!--Load Mapbox-->
<!-- Concatenated plugins -->
<script src="assets/js/app.js"></script>
<!-- Huro js -->
<script src="assets/js/functions.js"></script>
<script src="assets/js/main.js" async></script>
<script src="assets/js/components.js" async></script>
<script src="assets/js/popover.js" async></script>
<script src="assets/js/widgets.js" async></script>
<!-- Additional Features -->
<script src="assets/js/touch.js" async></script>
<!-- Async -->
<script src="./async/js/async.js"></script>
<!-- Landing page js -->
<!-- Dashboards js -->
<!-- Charts js -->
<!--Forms-->
<!--Wizard-->
<!-- Layouts js -->
<script src="assets/js/datatables.js" async></script>
<script src="assets/js/syntax.js" async></script>
</div>
</body>
<!-- Mirrored from huro.cssninja.io/webapp-list-datatable-1.html by HTTrack Website Copier/3.x [XR&CO'2014], Tue, 19 Nov 2024 11:41:33 GMT -->
</html>