Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
krmaet
/
Lennubroneerimis_tarkvara
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Pipelines
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
4de8e0ad
authored
2 years ago
by
krmaet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add new file
parent
61284295
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
0 deletions
readdata.h
readdata.h
0 → 100644
View file @
4de8e0ad
#ifndef BRONEERING_H
#define BRONEERING_H
#define NAME_MAX 40
#define DOB_MAX 20
#define STR_MAX 128
#define SEAT_MAX 5
#define SEATS 72
#define DOC_MAX 10
#define ROWS 18
#define COLUMNS 4
#define ADMIN 2
#define ASSISTANT 1
#define CLIENT 0
#include <mysql/mysql.h>
typedef
struct
{
char
documentNum
[
DOC_MAX
];
char
fName
[
NAME_MAX
];
char
lName
[
NAME_MAX
];
char
dateOfBirth
[
DOB_MAX
];
char
email
[
STR_MAX
];
char
residency
[
STR_MAX
];
bool
checkedIn
;
char
seat
[
SEAT_MAX
];
int
luggageClass
;
int
flight_id
;
}
users
;
void
NewTicket
(
int
*
row
,
int
*
col
,
char
*
seat
,
int
flightID
,
MYSQL
*
con
,
int
count
);
int
CheckUser
(
MYSQL
*
con
,
char
*
username
,
char
*
password
);
MYSQL
*
connectToMySQLServer
();
void
finish_with_error
(
MYSQL
*
con
);
int
ShowDestinations
(
MYSQL
*
con
,
int
*
rows
,
int
*
cols
);
void
PrintRes
(
MYSQL_RES
*
result
);
int
GetRand
(
int
min
,
int
max
);
void
insertPersonIntoTable
(
MYSQL
*
con
,
users
data
,
int
*
rows
,
int
*
cols
);
void
FillSeatmap
(
int
seats
[
ROWS
][
COLUMNS
],
int
rows
,
int
cols
,
MYSQL
*
con
,
int
flightId
);
void
PrintSeats
(
int
data
[
ROWS
][
COLUMNS
],
int
rows
,
int
cols
,
int
*
row
,
int
*
col
,
char
*
seat
);
#endif
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment