-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.c
2012 lines (1637 loc) · 62.7 KB
/
main.c
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
#include <stdio.h>
//#include <graphics.h>
#include <stdlib.h>
#include <string.h>
#include <windows.h>
#include <time.h>
#include <conio.h>
#include <wchar.h>
#include "warna.h"
#include "arrow.h"
#include "cursor.h"
#define MAX 4
#define MIN 1
typedef struct katalog{
char nama[70];
int harga;
int nomor;
int quantity;
struct katalog *prev, *next;
}katalog;
typedef struct costumer{
char *name[70];
char *address[70];
}costumer;
typedef struct node {
char *name;
int price;
struct node * next;
} Node;
Node *atas = NULL;
Node *temp=NULL;
costumer *entries;
katalog *entry;
katalog *head = NULL;
katalog *tail = NULL;
katalog *tampil;
katalog *tampil2;
katalog *hapus;
double time_spent = 0;
int a = 0;
int pos = 1;
int sum = 0;
int posisi = 1;
int nomer = 0;
int loop = 0;
int quantity[20] = {};
int quantity1=0,quantity2=0,quantity3=0,quantity4=0,quantity5=0;
int quantity6=0,quantity7=0,quantity8=0,quantity9=0,quantity10=0,
quantity11=0,quantity12=0;
int quantityfix1=0;
int quantityfix2=0;
int quantityfix3=0;
int quantityfix4=0;
int quantityfix5=0;
int quantityfix6=0;
int quantityfix7=0;
int quantityfix8=0;
int quantityfix9=0;
int quantityfix10=0;
int quantityfix11=0;
int quantityfix12=0;
int kart[20] = {};
int total = 0;
int total2 = 0;
int total3 = 0;
int counter_total = 0;
int j = 0;
int temp_belanjaan = 0;
//password
#define maxPasswordLength (int)15
char password[maxPasswordLength + 1];
char loginpassword[] = "sienltd";
char ch;
int characterPosition = 0;
//MENU KATALOG
//buah
char *bs1 = "Apel Amerika";
int harga_bs1 = 25000; //perkilo
int no_bs1 = 101;
char *bs2 = "Mangga Arumanis";
int harga_bs2 = 16000;
int no_bs2 = 102;
char *bs3 ="Nanas Kimono";
int harga_bs3 = 12000;//perkilo
int no_bs3 = 103;
char *bs4 ="Anggur Monalisa";
int harga_bs4= 80000;//perkilo
int no_bs4 = 104;
char *bs5 ="Tomat French";
int harga_bs5 = 13000;//satuan
int no_bs5 = 105;
int temp_bs[] = { 25000 , 16000 , 12000 , 80000 , 13000 };
//elektronik
char *el1 ="TV LED Panasnich VIERA 32'' Inch.";
int harga_el1 = 2155000;
int no_el1 = 201;
char *el6 ="Lenopo Stereo Bombud LS293D";
int harga_el6 = 3190000;
int no_el6 = 202;
char *el2 ="HP Envy 15 X360 AMD Ryzen 5 TOUCH";
int harga_el2 = 10750000;
int no_el2 = 202;
char *el3 ="Kodok Pixpro 5x Zoom FZ53-BK 16MP";
int harga_el3 = 1400000;
int no_el3 = 203;
char *el5 = "Iron Man Suit X756 PREMIUM";
int harga_el5= 2000000000;
int no_el5 = 205;
int temp_el[8] = { 0, 0, 0, 0, 0, 2155000 , 10750000 , 1400000 };
//Bahan Pokok
char *bp1 ="Beras 5 Kg Cap Topi Koki ";
int harga_bp1 = 59900; //perkilo
int no_bp1 = 301;
char *bp2 ="Gula Pasir Cap Semut";
int harga_bp2 = 11500;//perkilo
int no_bp2 = 302;
char *bp3 ="Telur Ayam Ras Cap Jaya";
int harga_bp3 = 18900;//perkilo
int no_bp3 = 303;
char *bp4 ="Minyak Goreng SANCO";
int harga_bp4 = 25000;//perkilo
int no_bp4 = 304;
char *mentega ="Mentega Blue Band";
int harga_mentega= 8700;//satuan
int no_bp5 = 305;
//fish and meat
char *fm1 = "Fillet Dori Lokal 0.45 gram";
int harga_fm1 = 28500; //perpack
int no_fm1 = 401;
char *fm2 ="Salmon Kirimi 2x300 gram";
int harga_fm2 = 230500;//perpack
int no_fm2 = 402;
char *fm3 ="Teri Jengki Medan 110gram";
int harga_fm3 = 18500;//perpack
int no_fm3 = 403;
char *fm4 ="Kentang Shoestring";
int harga_fm4 = 28000;//perkilo
int no_fm4 = 404;
char *fm5 ="Otak-otak Ikan 500gram";
int harga_fm5 = 22500;//perpack
int no_fm5 = 405;
//sports
char *sp1 = "Boston Leather Chess Set XXI";
int harga_sp1 = 20000000;
int no_sp1 = 501;
char *sp2 = "Molten AFR Football's ball'";
int harga_sp2 = 200000;
int no_sp2 = 502;
char *sp3 = "Columbia Eruption Violet Bowling";
int harga_sp3 = 2400000;
int no_sp3 = 503;
char *sp4 = "Sepeda Kucing";
int harga_sp4 = 150000;
int no_sp4 = 504;
char *sp5 = "e";
int harga_sp5 = 50000;
int no_sp5 = 505;
int temp_sp[12] = { 0, 0, 0, 0, 0, 0 , 0 , 0 , 20000000 , 200000 , 2400000, 150000 };
void gotoxy(int x,int y);
void loading();
void login();
void daging_ikan();
void KatalogAnimation();
void menu();
void yukBelanja();
void keluar();
void arrowHere(int realPosition, int arrowPosition);
void hidecursor();
void logo();
void logoformenu_top();
void logoformenu_bottom();
void bantuan();
void about();
void printback();
void entry_katalog_buah();
void entry_katalog_elektro();
void entry_katalog_sport();
void AddKatalog();
void printer();
void arrowKatalog();
void beli();
void fullscreen();
int Sum(katalog *head);
void pop_free();
void insert(char *name, int price);
void print_the_list();
void sort();
void search();
void remove_scrollbar();
void delete_node();
int MAX_STRING_LENGTH=30;
void admin_mode();
void isi_data();
void database_inventaris();
void prompt_admin();
void createfile();
#include <stdbool.h>
#define false 0
void hide_scrollbar();
int main(){
// CONSOLE_SCREEN_BUFFER_INFO csbi;
//int ret;
//ret = GetConsoleScreenBufferInfo(GetStdHandle( STD_OUTPUT_HANDLE ),&csbi);
//if(ret)
//{
// printf("Console Buffer Width: %d\n", csbi.dwSize.X);
// printf("Console Buffer Height: %d\n", csbi.dwSize.Y);
//}
hidecursor();
int p=1;
int press;
int u = 0;
while(press!=13){
gotoxy(45,12);
printf("Jalankan Program Fullscreen?");
gotoxy(45,14);
arrowHere(1,p);printf("| YES |");
gotoxy(45,16);
arrowHere(2,p);printf("| NOE |");
press = getch();
if(press == 80 && p!=2){
p++;
}else if(press == 72 && p!=1){
p--;
}
}
switch(p){
case 1:
hide_scrollbar();
fullscreen();
system("cls");
for (u=150;u>50;u--){
hidecursor();
gotoxy(u,16);red();printf("__ ________ _ _____ ____ __ __ ______ ");
gotoxy(u,17);yellow();printf("\\ \\ / / ____| | / ____/ __ \\| \\/ | ____|");
gotoxy(u,18);Green();printf(" \\ \\ /\\ / /| |__ | | | | | | | | \\ / | |__ ");
gotoxy(u,19);Blue();printf(" \\ \\/ \\/ / | __| | | | | | | | | |\\/| | __| ");
gotoxy(u,20);Magenta();printf(" \\ /\\ / | |____| |___| |___| |__| | | | | |____ ");
gotoxy(u,21);BoldCyan();printf(" \\/ \\/ |______|______\\_____\\____/|_| |_|______|");
reset();
system("cls");
}
loading();
logo();
Sleep(1000);
system("cls");
hidecursor();
menu();
break;
case 2:
system("cls");
loading();
logo();
Sleep(1000);
system("cls");
hidecursor();
menu();
break;
}
return 0;
}
void gotoxy(int x,int y){
COORD coord;
coord.X = x;
coord.Y = y;
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), coord);
}
void loading(){
system("cls");
hidecursor();
int r,q,o,i;
gotoxy(45,12);
printf("Loading . . . ");
gotoxy(45,14);
for(r=1;r<=5;r++){
for(q=0;q<=5;q++){
printf("%c",219);
Sleep(100);
}
}
for(i=0;i<5;i++)
printf("\n"); Sleep(25);
}
void printback(){
printf(" .----------------------.\n");
printf(" | Tap Enter to Back! |\n");
printf(" '----------------------'\n");
}
void menu(){
system("cls");
int position = 1;
int keyPressed = 9;
while (keyPressed != 13){
system("cls");
logoformenu_top();
printf("\t\t ¦¦¦¦¦¦¦¦¦¦"); arrowHere(1,position); printf(" Yuk Belanja!"); printf(" ¦¦C\n");
printf("\t\t ¦¦¦¦¦¦¦¦¦"); printf(" ¦¦¦; |\\/| _ ._| __|_\n");
printf("\t\t '¦¦¦¦¦¦¦¦"); arrowHere(2,position); printf(" Bantuan"); printf(" ¦¦¦¦ | |(_|| |<}_ | \n");
printf("\t\t ¯¦¦¦¦¦¦"); printf(" ¦¦¦¦¦\n");
printf("\t\t ¯¦¦¦¦¦¦"); arrowHere(3,position); printf(" About"); printf(" ¦¦¦¦¦¦ |~)| _ _ _\n");
printf("\t\t ¯¦¦¦¦¦ ¦¦¦¦¦¦_ |~ |(_|(_}_\n");
printf("\t\t ¦¦¦¦¦"); arrowHere(4,position); printf(" Keluar"); printf(" ¦¦¦¦¦¦¦Ç\n");
logoformenu_bottom();
keyPressed = getch();
if(keyPressed == 80 && position!= MAX){
position ++;
}
else if(keyPressed == 72 && position!= MIN){
position--;
}
else{
position = position;
}
if(keyPressed == 32){
printer(0);
}
if(keyPressed == 00){
prompt_admin();
}
}
switch(position){
case 1:
KatalogAnimation();
yukBelanja();
break;
case 2:
bantuan();
break;
case 3:
about();
break;
case 4:
keluar();
break;
default:
printf("");
}
}
void yukBelanja(){
hidecursor();
int poss= 1;
int keyPressed = 9;
int max1 = 3;
int max2 = 6;
int min1 = 1;
int min2 = 4;
int i = 0;
while (keyPressed!=13){
system("cls");
printf("\t .===========================================================================================.\n");
printf("\t || ||\n");BoldYellow();
printf(" _/ _/ _/_/ _/_/_/_/_/ _/_/ _/ _/_/ _/_/_/ \t ");reset();printf("|| \n");BoldYellow();
printf(" _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ \t ");reset();printf("|| \n");BoldYellow();
printf(" _/_/ _/_/_/_/ _/ _/_/_/_/ _/ _/ _/ _/ _/_/ \t ");reset();printf("|| \n");BoldYellow();
printf(" _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ \t ");reset();printf("|| \n");BoldYellow();
printf("_/ _/ _/ _/ _/ _/ _/ _/_/_/_/ _/_/ _/_/ \t ");reset();printf("|| \n");
printf("\t || ||\n");
printf("\t || . ||\n");
printf("\t || ,--./,-. /""*. _ ||\n");
printf("\t || / # \\ .-*'` `*-.._.-'/ ||\n");
printf("\t || | | < * )) , ( ||\n");
printf("\t || \\ / `*-._`._(__.--*''.\\ ||\n");
printf("\t || `._,._,' ||\n");
printf("\t || ||\n");
printf("\t || "); arrowKatalog(1,poss); printf(" Buah-Buahan ");arrowKatalog(4,poss); printf(" Mainan Anak ||\n");
printf("\t ||");printf(" ||\n");
printf("\t ||");printf(" _______________________ __ ||\n");
printf("\t ||");printf(" / _/\\ .'''.''. || \n");
printf("\t ||");printf(" / IC / \\/\\ :._.''._.: || \n");
printf("\t ||");printf(" /_____________________/\\ : \\__/ : || \n");
printf("\t ||");printf(" \\_____________________\\/ './ \\.' || \n");
printf("\t ||");printf(" \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ '''' || \n");
printf("\t || ||\n");
printf("\t || "); arrowKatalog(2,poss);printf(" Elektronik "); printf(" ");arrowKatalog(5,poss); printf(" Sports & Outdoors ||\n");
printf(" .--------------------. ||\n");
printf(" | Back to Menu! ");arrowKatalog(3,poss);printf("| ||\n");
printf(" '--------------------' [SPACE to display cart] ||\n");
printf("\t '==========================================================================================='\n");
keyPressed = getch();
if( keyPressed == 80 && poss!= max1){
poss++;
}
else if(keyPressed == 72 && poss!= min1){
poss--;
}
else{
poss = poss;
}
if(poss == 3 && keyPressed == 75){
poss = 1;
}
if(poss >= 6){
poss = 3;
}
for(i=1;i<=2;i++){
if(keyPressed == 77 && poss==i){
poss+=3;
}
else{
poss = poss;
}
}
for(i=1;i<=3;i++){
if(keyPressed == 75 && poss==i+2){
poss-=3;
}
else{
poss = poss;
}
}
if(keyPressed == 32){
printer();
}
}
int tekan = 9;
switch(poss){
case 1:
laman2:
while(tekan!=13){
system("cls");
printf(" .======================================================================================.\n"
" || ||\n"
" _/_/_/_/ _/ _/ _/_/_/ _/ _/ || \n"
" _/ _/ _/ _/ _/ _/ _/ _/ F R U I T s ||\n"
" _/ _/ _/ _/ _/ _/ _/ _/ _/_/_/_/_/_/ ||\n"
" _/_/_/_/ _/ _/ _/_/_/_/_/ _/_/_/_/_/ ||\n"
" _/ _/ _/ _/ _/ _/ _/ _/ ||\n"
" _/ _/ _/ _/ _/ _/ _/ _/ [SPACE to display cart] || \n"
"_/_/_/_/ _/_/_/_/ _/ _/ _/ _/ ||\n"
" ||\t\t \\ ||\n"
" ||\t\t _(_ ()() ||\n"
" ||\t\t ( '\\ ()()() ||\n"
" ||\t\t \\ ; ()() ||\n"
" ||\t\t `-'-' () ||\n");
printf(" || "); arrowKatalog(1,posisi); printf(" %s....Rp. %d,000,00 ", bs1,harga_bs1/1000); arrowKatalog(4,posisi); printf(" %s....Rp. %d,000,00 ||\n", bs4,harga_bs4/1000);
printf(" || ||\n" );
printf( " ||\t\t _\\_ ,v. ||\n"
" ||\t\t .' ; (( ) ,v. ||\n"
" ||\t\t / / `'' (( ) ||\n"
" ||\t\t '--''` '' ||\n");
printf(" || "); arrowKatalog(2,posisi); printf(" %s....Rp. %d,000,00 ", bs2,harga_bs2/1000); arrowKatalog(5,posisi); printf(" %s....Rp. %d,000,00 ||\n", bs5,harga_bs5/1000);
printf(" || ||\n" );
printf( " ||\t\t \\|/ .--------------------. ||\n"
" ||\t\t AXA | Back to Katalog! | ||\n");
printf( " ||\t\t /XXX\\ | ");arrowKatalog(6,posisi);printf(" | ||\n");
printf( " ||\t\t \\XXX/ '--------------------' ||\n"
" ||\t\t `^' ||\n");
printf(" || "); arrowKatalog(3,posisi); printf(" %s....Rp. %d,000,00 ||\n", bs3,harga_bs3/1000);
// ||
printf(" || ||\n" );
printf(" '======================================================================================'");
//
tekan = getch();
if( tekan == 80 && posisi!= 3){
posisi++;
}
else if(tekan == 72 && posisi!= 1){
posisi--;
}
else{
posisi = posisi;
}
if(tekan == 80 && posisi >= 6){
posisi = 6;
}
if(tekan == 32){
printer();
}
for(i=1;i<=3;i++){
if(tekan == 77 && posisi==i){
posisi+=3;
}
else{
posisi = posisi;
}
}
for(i=1;i<=3;i++){
if(tekan == 75 && posisi==i+3){
posisi-=3;
}
else{
posisi = posisi;
}
}
}
//ambil posisi untuk linkedlist
entry_katalog_buah();
AddKatalog();
break;
case 2:
awal:
laman3:
while(tekan!=13){
system("cls");
posisi = 1;
tekan = 9;
printf(
" .======================================================================================. \n");BoldCyan();printf(
" _/_/_/_/ _/ _/_/_/_/ _/ _/ _/_/_/_/_/ _/_/_/ _/_/_/ \n"
" _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ \n"
" _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ G O O D s \n"
" _/_/_/_/ _/ _/_/_/_/ _/_/ _/ _/_/_/ _/ _/ _/ _/ _/ _/ _/ \n"
" _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ \n"
" _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ \n"
"_/_/_/_/ _/_/_/_/ _/_/_/_/ _/ _/ _/ _/ _/ _/_/_/ \n");reset();printf(
" || || \n"
" || .---..-----------------------------------------------..---. || \n"
" || | ||.---------------------------------------------.|| | || \n"
" || | o ||| _0_o O/oo _0_ \\O/ _ _0_ O_0_o_O/ooO _0_ ||| o | || \n"
" || | _ |||O oo _0_ _0_o\\O _O/~' O oo__0_ _0_o\\O ||| _ | || \n"
" || |(_)|||_0_ \\O oo /) _0_ \\O_0_ \\O oo |||(_)| || \n"
" || | |||---------------------------------------------||| | || \n"
" || |.-.||| __....------------------------....___ |||.-.| || \n"
" || | o |||---'' RACING _.--._ ` ||| o | || \n"
" || |`-'||| _.--._ 'O---O-' |||`-'| || \n"
" || | ||| _.--._ 'O---O-'_.--._ _.--._ ||| | || \n"
" || |.-.||| 'O---O-' 'O---O-''O---O-' |||.-.| || \n"
" || | O |||__,,...,----------------------....___ ||| O | || \n"
" || |`-'||`-----------------PANASNICH-------------------'||`-'| || \n"
" || `---'`-----------------------------------------------'`---' || \n"
" || _||_ _||_ || \n"
" || /____\\ /____\\ || \n"
" || || \n"
" || ");arrowKatalog(1,posisi);printf(" %s.......Rp. %d,00 ||\n", el1,harga_el1);
printf(
" || || \n"
" || [SPACE to display cart] [ESC TO BACK] NEXT > || \n"
" '======================================================================================'"
);
tekan = getch();
if(tekan == 27){
KatalogAnimation();
return yukBelanja();
}
if(tekan == 32){
printer();
}
if (tekan == 77){
laman4:
while(tekan!=13){
posisi = 2;
x:
system("cls");
printf(
" .======================================================================================. \n"
" _/_/_/_/ _/ _/_/_/_/ _/ _/ _/_/_/_/_/ _/_/_/ _/_/_/ \n"
" _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ \n"
" _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ G O O D s \n"
" _/_/_/_/ _/ _/_/_/_/ _/_/ _/ _/_/_/ _/ _/ _/ _/ _/ _/ _/ \n"
" _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ \n"
" _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ \n"
"_/_/_/_/ _/_/_/_/ _/_/_/_/ _/ _/ _/ _/ _/ _/_/_/ \n"
" || || \n"
" || ._________________. || \n"
" || |.---------------.| || \n"
" || || || || \n"
" || || -._ .-. || .-------------------. || \n"
" || || -._| | | || /--^--.------.------/| || \n"
" || || -._|'|'| || |Kodok|__Ll__| [==] || || \n"
" || || -._|.-.| || | | .--. | '''' || || \n"
" || ||_______HP______|| | |( () )| || || \n"
" || /.-.-.-.-.-.-.-.-.\\ | | `--' | |/ || \n"
" || /.-.-.-.-.-.-.-.-.-.\\ `-----'------'------' || \n"
" || /.-.-.-.-.-.-.-.-.-.-.\\ || \n"
" || /______/__AMD_____\\___o_\\ || \n"
" || \\_______________________/ || \n"
" || || \n"
" || || \n"
" || ");arrowKatalog(2,posisi);printf(" %s.......Rp. %d,00 ||\n", el2,harga_el2);printf(
" || || \n");printf(
" || ");arrowKatalog(3,posisi);printf(" %s.......Rp. %d,00 ||\n",el3,harga_el3);
printf(
" || || \n"
" || < PREVIOUS [ESC TO BACK] [SPACE to display cart] || \n"
" '======================================================================================'"
);
tekan = getch();
if( tekan == 80){
posisi = 3;
goto x;
}
else if(tekan == 72){
posisi = 2;
goto x;
}
if(tekan == 32){
printer();
}
if (tekan == 75){
goto awal;
}
else if(tekan == 27){
KatalogAnimation();
return yukBelanja();
}
}
}
}
entry_katalog_elektro();
AddKatalog();
//elektronik
break;
case 3:
logo();
return menu();
//bahanpokok
break;
case 4:
system("cls");
daging_ikan();
//daginikan
break;
case 5:
system("cls");
while(tekan!=13){
system("cls");
posisi = 1;
tekan = 9;
printf(
" .======================================================================================. \n"
" _/_/_/ _/_/_/ _/_/_/ _/_/_/ _/_/_/ _/_/_/ || \n"
" _/ _/ _/ _/ _/ _/ _/ _/ _/ || \n"
" _/_/_/ _/_/_/ _/ _/ _/_/_/ _/ _/_/_/ G O O D s || \n"
" _/ _/ _/ _/ _/ _/ _/ _/ _/_/_/_/_/ || \n"
"_/_/_/ _/ _/_/_/ _/ _/ _/ _/_/_/ || \n"
" || || \n"
" || _______________ || \n"
" || 8 |_|#|_|#|_|#|_|#| || \n"
" || 7 |#|_|#|_|#|_|#|_| || \n"
" || 6 |_|#|_|#|_|#|_|#| .-'''-. || \n"
" || 5 |#|_|#|_|#|_|#|_| / _ \\ || \n"
" || 4 |_|#|_|#|_|#|_|#| | (8) | || \n"
" || 3 |#|_|#|_|#|_|#|_| \\ ^ / || \n"
" || 2 |_|#|_|#|_|#|_|#| '-...-' || \n"
" || 1 |#|_|#|_|#|_|#|_| || \n"
" || a b c d e f g h || \n"
" || || \n"
" || || \n"
" || || \n"
" || _.-=''=-._ o__ || \n"
" || .'\\\\-++++-//'. ,>/_ || \n"
" || ( || || ) (*)`(*) || \n"
" || '.// \\\\.' || \n"
" || `'-=..=-'` || \n"
" || || \n"
" || || \n"
" || || \n"
" || UDER CONSTRUCTION, PRESS ESCAPE OR ENTER TO BACK || \n");
Sum(tampil);
tekan = getch();
if(tekan == 27 || tekan == 13){
KatalogAnimation();
yukBelanja();
}
}
break;
default:
printf("");
}
}
void KatalogAnimation(){
int poss = 1;
printf("\t .===========================================================================================.\n");Sleep(10);
printf("\t || ||\n");BoldYellow();Sleep(10);
printf(" _/ _/ _/_/ _/_/_/_/_/ _/_/ _/ _/_/ _/_/_/ \t ");reset();printf("|| \n");BoldYellow();Sleep(10);
printf(" _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ \t ");reset();printf("|| \n");BoldYellow();Sleep(10);
printf(" _/_/ _/_/_/_/ _/ _/_/_/_/ _/ _/ _/ _/ _/_/ \t ");reset();printf("|| \n");BoldYellow();Sleep(10);
printf(" _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ \t ");reset();printf("|| \n");BoldYellow();Sleep(10);
printf("_/ _/ _/ _/ _/ _/ _/ _/_/_/_/ _/_/ _/_/ \t ");reset();printf("|| \n"); Sleep(10);
printf("\t || ||\n");Sleep(10);
printf("\t || . ||\n"); Sleep(10);
printf("\t || ,--./,-. /""*. _ ||\n");Sleep(10);
printf("\t || / # \\ .-*'` `*-.._.-'/ ||\n");Sleep(10);
printf("\t || | | < * )) , ( ||\n");Sleep(10);
printf("\t || \\ / `*-._`._(__.--*''.\\ ||\n");Sleep(10);
printf("\t || `._,._,' ||\n");Sleep(10);
printf("\t || ||\n");Sleep(10);
printf("\t || "); arrowKatalog(1,poss); printf(" Buah-Buahan ");arrowKatalog(4,poss); printf(" Mainan Anak ||\n");Sleep(10);
printf("\t ||");printf(" ||\n");Sleep(10);
printf("\t ||");printf(" _______________________ __ ||\n"); Sleep(10);
printf("\t ||");printf(" / _/\\ .'''.''. || \n");Sleep(10);
printf("\t ||");printf(" / IC / \\/\\ :._.''._.: || \n");Sleep(10);
printf("\t ||");printf(" /_____________________/\\ : \\__/ : || \n");Sleep(10);
printf("\t ||");printf(" \\_____________________\\/ './ \\.' || \n");Sleep(10);
printf("\t ||");printf(" \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ '''' || \n"); Sleep(10);
printf("\t || ||\n");Sleep(10);
printf("\t || "); arrowKatalog(2,poss);printf(" Elektronik "); printf(" ");arrowKatalog(10,poss); printf(" Bahan-bahan Pokok ||\n");Sleep(10);
printf(" .--------------------. ||\n");Sleep(10);
printf(" | Back to Menu! ");arrowKatalog(3,poss);printf("| ||\n");Sleep(10);
printf(" '--------------------' ||\n"); Sleep(10);
printf("\t '==========================================================================================='\n");Sleep(10);
}
void bantuan(){
void hidecursor();
int back = 0;
system("cls");
while(back != 13){
printf("\n\n Admin Mode: CTRL + SHIFT + 2\n Enter to Back!");
back = getch();
if(back != 13){
return bantuan();
}
else{
logo();
return menu();
}
}
}
void about(){
void hidecursor();
int back = 0;
system("cls");
while(back != 13){
printf("\n .~~~~~~~~~~~~~~~~~~~~~~~.\n");
printf(" | ABOUT US |\n");
printf(" '~~~~~~~~~~~~~~~~~~~~~~~'\n\n");
printf("\t .-------------------------------------------\n");
printf("\t | \n");
printf("\t | SIEN Digital Marketplace, Ltd. adalah sebuah prototype dari platform \n");
printf("\t | layanan perbelanjaan digital, dimana kami ingin membuat kepercayaan dalam\n");
printf("\t | berbelanja seperti layaknya di Supermarket dengan konsep yang cepat,\n");
printf("\t | fleksibel dan efisien sehingga tidak memakan waktu berharga Anda. \n");
printf("\t \n");
printf("\t Anda bisa menggunakan aplikasi yang kami sediakan, atau mendatangi | \n");
printf("\t Supermarket favorit Anda yang sudah tersedia layanan SIEN digital. |\n");
printf("\t Cocok bagi Anda yang seorang mahasiswa atau seorang jomblo, aplikasi |\n");
printf("\t SIEN Digital Marketplace adalah aplikasi idaman Anda. |\n");
printf("\t |\n");
printf("\t -----------------------------------------------'\n\n");
printback();
back = getch();
if(back != 13){
return about();
}
else{
logo();
return menu();
}
}
}
void keluar(){
int m=0;
double n;
char welcome[]= "\t If you have any questions or concerns please do contact us:\n\t [email protected] / 083870975096\n\t [email protected] / 081316259144\n\t Thank you :)\t\t\t\t\t\t\t\t\t\t";
system("cls");
printf("\n\n\n\n\n\n\n\n\n");
for(m=0;welcome[m]!='\0';m++){
printf("%c",welcome[m]);
for(n=0;n<=4999999;n++){}
}
exit(0);
}
void logo(){
printf("\t\t ,g_\n");Sleep(10);
printf("\t\t ,__¦¦¦¦¦¦\n");Sleep(10);
printf("\t\t ,+_¦¦¦¦¦¦¦¦¦¦¦¦¦\n");Sleep(10);
printf("\t\t ,__o +¯¯¯¯¦¦¦¦¦¦_\n");Sleep(10);
printf("\t\t __¦¦¦¦¯ _¦¦¦¯- '¦¦¦¦¦¦¦µ\n");Sleep(10);
printf("\t\t +__¦¦¦¦¦¦¦¦- +¦¦¦¯ _¦¦¦¬ +_ ¯¦¦¦µ\n");Sleep(10);
printf("\t\t ,__¦¦¦¦¦¦¦¦¦¦¦¦¦o ¬¦¦¦¯ ,¦¦¦¦¦¦¬ +¦¦ ¯¦¦¦\n");Sleep(10);
printf("\t\t ,__¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦ ¦¦¦¦ ¦¦¦¦¦¦¦¦ ¦¦¦ ¦¦¦¦\n");Sleep(10);
printf("\t\t ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦U ¦¯¯ +¯¯++++- ¦¯¦\n");Sleep(10);
printf("\t\t ¯¦¦¦¦¦¦¦¦¦¦¦¦\n");Sleep(10);
printf("\t\t ¯¦¦¦¦¦¦¦¦¦¦¦ ¦ |~\\o(~|o_|_ _ |\n");Sleep(10);
printf("\t\t ¦¦¦¦¦¦¦¦¦¦¦ ¦_ |_/| _|| | (_||\n");Sleep(10);
printf("\t\t ¦¦¦¦¦¦¦¦¦¦ ¦¦C\n");Sleep(10);
printf("\t\t ¦¦¦¦¦¦¦¦¦ ¦¦¦; |\\/| _ ._| __|_\n");Sleep(10);
printf("\t\t '¦¦¦¦¦¦¦¦ ¦¦¦¦ | |(_|| |<}_ | \n");Sleep(10);
printf("\t\t ¦¦¦¦¦¦¦¦ ¦¦¦¦¦\n");Sleep(10);
printf("\t\t ¯¦¦¦¦¦¦ ¦¦¦¦¦¦ |~)| _ _ _\n");Sleep(10);
printf("\t\t ¯¦¦¦¦¦ ¦¦¦¦¦¦_ |~ |(_|(_}_\n");Sleep(10);
printf("\t\t ¦¦¦¦¦ ¦¦¦¦¦¦¦Ç\n"); Sleep(10);
printf("\t\t ¦¦¦¦ ¦¦¦¦¦¦¦¦¬ | _|_ _|\n");Sleep(10);
printf("\t\t ¦¦¦ ¦¦¦¦¦¦¦¦¦. |_ | (_|o\n");Sleep(10);
printf("\t\t ¦¦\n");Sleep(10);
printf("\t\t ¦ _¦¯¯¯¯¦¦¦¦ ¯¯¦¦¦¯¯ ¯¯¦¦¦¯¯¯¯¯¦¦¦ ¯¯¦¦¦¯¯ ¯¯¦¦¦¯¯\n");Sleep(10);
printf("\t\t ¦¦ ¯¦¦ ¦¦¦ ¦¦¦ ¯¦ ¦¦¦¦_ ¦¦¦\n");Sleep(10);
printf("\t\t ¯¦¦¦___. ¦¦¦ ¦¦¦ _¦¦ ¯ ¦¦¦ ¯¦¦_ ¦¦¦\n");Sleep(10);
printf("\t\t '¯¯¦¦¦¦¦¦_ ¦¦¦ ¦¦¦¯¯¯¦¦ ¦¦¦ ¦¦¦_ ¦¦¦\n");Sleep(10);
printf("\t\t ¦_ +¦¦ ¦¦¦ ¦¦¦ ¦¦ ¦¦¦ ¦¦¦¦¦¦¦\n");Sleep(10);
printf("\t\t ¦¦_; +¦¦ ¦¦¦ ¦¦¦ ¦¦¦ ¦¦¦ ¯¦¦¦¦\n");Sleep(10);
printf("\t\t ¯¯¦¦¦¦¯¯ ¯¯¯¯¯¯¯ ¯¯¦¦¦¯¯¯¯¯¦¦ ¯¯¦¦¦¯¯ ¯¯¦¦¦¯¯\n");Sleep(10);
}
void logoformenu_top(){
printf("\t\t ,g_\n");
printf("\t\t ,__¦¦¦¦¦¦\n");
printf("\t\t ,+_¦¦¦¦¦¦¦¦¦¦¦¦¦\n");
printf("\t\t ,__o +¯¯¯¯¦¦¦¦¦¦_\n");
printf("\t\t __¦¦¦¦¯ _¦¦¦¯- '¦¦¦¦¦¦¦µ\n");
printf("\t\t +__¦¦¦¦¦¦¦¦- +¦¦¦¯ _¦¦¦¬ +_ ¯¦¦¦µ\n");
printf("\t\t ,__¦¦¦¦¦¦¦¦¦¦¦¦¦o ¬¦¦¦¯ ,¦¦¦¦¦¦¬ +¦¦ ¯¦¦¦\n");
printf("\t\t ,__¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦ ¦¦¦¦ ¦¦¦¦¦¦¦¦ ¦¦¦ ¦¦¦¦\n");
printf("\t\t ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦U ¦¯¯ +¯¯++++- ¦¯¦\n");
printf("\t\t ¯¦¦¦¦¦¦¦¦¦¦¦¦\n");
printf("\t\t ¯¦¦¦¦¦¦¦¦¦¦¦ ¦ |~\\o(~|o_|_ _ |\n");
printf("\t\t ¦¦¦¦¦¦¦¦¦¦¦ ¦_ |_/| _|| | (_||\n");
}
void logoformenu_bottom(){
printf("\t\t ¦¦¦¦ ¦¦¦¦¦¦¦¦¬ | _|_ _|\n");
printf("\t\t ¦¦¦ ¦¦¦¦¦¦¦¦¦. |_ | (_|o\n");
printf("\t\t ¦¦\n");
printf("\t\t ¦ _¦¯¯¯¯¦¦¦¦ ¯¯¦¦¦¯¯ ¯¯¦¦¦¯¯¯¯¯¦¦¦ ¯¯¦¦¦¯¯ ¯¯¦¦¦¯¯\n");
printf("\t\t ¦¦ ¯¦¦ ¦¦¦ ¦¦¦ ¯¦ ¦¦¦¦_ ¦¦¦\n");
printf("\t\t ¯¦¦¦___. ¦¦¦ ¦¦¦ _¦¦ ¯ ¦¦¦ ¯¦¦_ ¦¦¦\n");
printf("\t\t '¯¯¦¦¦¦¦¦_ ¦¦¦ ¦¦¦¯¯¯¦¦ ¦¦¦ ¦¦¦_ ¦¦¦\n");
printf("\t Developed by AlFa ¦_ +¦¦ ¦¦¦ ¦¦¦ ¦¦ ¦¦¦ ¦¦¦¦¦¦¦\n");
printf("\t Alfian & Fahri ¦¦_; +¦¦ ¦¦¦ ¦¦¦ ¦¦¦ ¦¦¦ ¯¦¦¦¦\n");
printf("\t Copyright@2018 ¯¯¦¦¦¦¯¯ ¯¯¯¯¯¯¯ ¯¯¦¦¦¯¯¯¯¯¦¦ ¯¯¦¦¦¯¯ ¯¯¦¦¦¯¯\n");
}
// Linked List
void printer(){
system("cls");
if(head == NULL){
int i = 0;
int tekan = 1;
while(tekan!=13){
printf(