-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsmart-finance.php
54 lines (39 loc) · 1.27 KB
/
smart-finance.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
<?php
include 'functions.php';
print_r(PHP_EOL);
print_r('|-------------------------------|'.PHP_EOL);
print_r('| Bem vindo ao SmartFinance! |'.PHP_EOL);
print_r('|-------------------------------|'.PHP_EOL);
$exit = false;
while ($exit == false) {
print_r(PHP_EOL.'O que voce deseja fazer agora? (Escolha uma das seguintes opcoes)'.PHP_EOL);
print_r(PHP_EOL);
print_r(PHP_EOL);
print_r('1) Cadastrar Receita '.PHP_EOL);
print_r('2) Cadastrar Despesa '.PHP_EOL);
print_r('3) Ver relatorio de gastos '.PHP_EOL);
print_r('4) Sair '.PHP_EOL);
print_r(PHP_EOL);
$option = readString('Digite uma opção: ');
switch ($option) {
case 1:
include 'options/create-recipe.php';
break;
case 2:
include 'options/create-expense.php';
break;
case 3:
include 'options/report.php';
break;
case 4:
$exit = true;
break;
default:
print_r('Opcao invalida!'.PHP_EOL);
break;
}
}
print_r(PHP_EOL);
print_r('|---------------------------------------------------|'.PHP_EOL);
print_r('| Ate logo! :-) Obrigado por usar o SmartFinance! |'.PHP_EOL);
print_r('|---------------------------------------------------|'.PHP_EOL);