-
Notifications
You must be signed in to change notification settings - Fork 0
/
Glob.h
64 lines (50 loc) · 1.34 KB
/
Glob.h
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
#ifndef _GLOBH_DEFINED_
#define _GLOBH_DEFINED_
#include <stdio.h>
#include <sqlite3.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <time.h>
#define NO_USER 0
#define ADMIN 1
#define OPER 2
#define CLIENT 3
extern sqlite3 *db;
extern sqlite3_stmt *res;
extern int rc;
extern int currUser;
extern int working;
extern char currLogin[100];
void performPreparations();
void showDefaultMenu();
void showAdminMenu();
void showOperMenu();
void showClientMenu();
void showAdminQueries();
void showOperQueries();
void login();
void signup();
void logout();
void addAccount();
void modifyAccount();
void deleteAccount();
void addClient();
void modifyClient();
void deleteClient();
void addAccountFromBase(int query);
void modifyAccountFromBase(int query);
void deleteAccountFromBase(int query);
void addClientFromBase(int query);
void modifyClientFromBase(int query);
void deleteClientFromBase(int query);
void checkConfig();
void sendAdminQuery(int code);
void sendOperQuery();
int credit(char *passportNo, char *cardNo, double money);
int debit (char *passportNo, char *cardNo, double money);
int transfer(char *passportNo, char *cardNoFrom, char *cardNoTo, double money);
void checkBalance();
extern void (* adminQueriesFromBase[])(int);
int callbackQueries(void *data, int argc, char **argv, char **azColName);
#endif // _GLOBH_DEFINED_