Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
mvahes
/
Lennubroneerimis_tarkvara
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
d996d898
authored
Apr 24, 2023
by
krmaet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update readdata.h, final
parent
5df15104
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
4 deletions
readdata.h
readdata.h
View file @
d996d898
...
...
@@ -7,6 +7,7 @@
#define SEAT_MAX 5
#define SEATS 72
#define DOC_MAX 10
#define LUGGAGE_COUNT 3
#define ROWS 18
#define COLUMNS 4
...
...
@@ -31,18 +32,29 @@ typedef struct{
}
users
;
int
CheckLetters
(
char
word
[
STR_MAX
]);
//Function for new ticket
void
NewTicket
(
int
*
row
,
int
*
col
,
char
*
seat
,
int
flightID
,
MYSQL
*
con
,
int
count
);
int
CheckUser
(
MYSQL
*
con
,
char
*
username
,
char
*
password
);
//Functions for mysql
MYSQL
*
connectToMySQLServer
();
void
finish_with_error
(
MYSQL
*
con
);
int
ShowDestinations
(
MYSQL
*
con
,
int
*
rows
,
int
*
cols
);
void
PrintRes
(
MYSQL_RES
*
result
);
void
finish_with_error
(
MYSQL
*
con
);
//Function for program working
int
GetRand
(
int
min
,
int
max
);
int
CheckLetters
(
char
word
[
STR_MAX
]);
int
MenuList
(
char
*
options
,
int
count
,
int
starty
);
//Function to insert new ticket into table in database
void
insertPersonIntoTable
(
MYSQL
*
con
,
users
data
,
int
*
rows
,
int
*
cols
);
//Functions to alter seat map
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
);
//Funtions to read from database and display info
int
ShowDestinations
(
MYSQL
*
con
,
int
*
rows
,
int
*
cols
);
#endif
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