Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

mvahes / Lennubroneerimis_tarkvara

  • This project
    • Loading...
  • Sign in
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
Switch branch/tag
  • Lennubroneerimis_tarkvara
  • changedata.h
Find file
BlameHistoryPermalink
  • krmaet's avatar
    Update changedata.h, final · 5c3fa0c1
    krmaet committed 2 years ago
    5c3fa0c1
changedata.h 1.15 KB
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
#ifndef CHANGEDATA_H
#define CHANGEDATA_H

#include <ncurses.h>
#include <mysql/mysql.h>
#include "main.h"

#define USER_OPTIONS_CNT 5
#define ADMIN_OPTIONS_CNT 4
#define ASSISTANT_OPTIONS_CNT 3
#define STR_MAX 128
#define BUFFER_MAX 500
#define BOOKING_NUM 9

//Function to print out universal option menu
int optionMenu(char *options[], int count, char buffer[STR_MAX], int *row, int *col);

//Functions to check if provided info is correct
int CheckUser(MYSQL *con, char *username, char *password);
int CheckBooking(MYSQL *con, char *bookingNumber, int *row, int *col);
int CheckBookingDocument(MYSQL *con, char *bookingNumber, char *documentNumber, int *row, int *col);

//Functions to change data in bookings
void CheckIn(MYSQL *con, int *row, int *col);
void ChangeName(MYSQL *con, char *booking, int *row, int *col);
void ChangeDocument(MYSQL *con, char *booking, int *row, int *col);
void ChangeBaggage(MYSQL *con, char *booking, int *row, int *col);
void ChangeSeat(MYSQL *con, char *booking, int *row, int *col);

//Function to add or delete a flight
void AddFlightDest(MYSQL* con, int *col, int *row);
void DeleteFlight(MYSQL *con, int *rows, int *cols);

#endif