From 0d8992a2762d6a2b983d9aa1c2944d6cebef7371 Mon Sep 17 00:00:00 2001 From: Mateja Date: Fri, 2 Oct 2020 12:46:32 +0200 Subject: Starting direct work... Made SQL notes. --- index.php | 6 +++--- notes.sql | 25 +++++++++++++++++++++++++ reservation.php | 13 ------------- 3 files changed, 28 insertions(+), 16 deletions(-) create mode 100644 notes.sql diff --git a/index.php b/index.php index 47b4069..938534c 100644 --- a/index.php +++ b/index.php @@ -36,11 +36,11 @@ session_start(); echo '
'; echo "\n"; - echo ""; + echo ""; echo ""; echo ""; echo ""; - echo "\n"; + echo "\n"; foreach($db->query("SELECT * FROM $table where approved=true") as $row) { echo ""; @@ -50,7 +50,7 @@ session_start(); echo "\n"; } - echo "
ImePrezimeGodine
\n
\n"; + echo "\n\n"; } catch (PDOException $e) { echo "

Error!: " . $e->getMessage() . "

"; die(); diff --git a/notes.sql b/notes.sql new file mode 100644 index 0000000..1794c53 --- /dev/null +++ b/notes.sql @@ -0,0 +1,25 @@ +CREATE DATABASE yota_db; +USE yota_db; + +CREATE TABLE activities( + `id` int(11) not null auto_increment primary key, + `fromTime` datetime not null, + `toTime` datetime not null, + `specialCall` varchar(50) not null, + `frequencies` varchar(255) not null, + `modes` varchar(255) not null, + `operatorCall` varchar(50) not null, + `operatorName` varchar(50) not null, + `operatorEmail` varchar(100) not null, + `operatorPhone` varchar(50) not null + ) charset=utf8; + +CREATE TABLE admins( + `id` int(11) not null auto_increment primary key, + `email` varchar(100) not null, + `password` varchar(255) not null + ) charset=utf8; + +GRANT ALL PRIVILEGES ON `yota_db`.* TO `yota_admin`@`localhost` IDENTIFIED BY 'quaequaquagh6ahwoh6Chahx1EiFooGh'; +GRANT SELECT ON `yota_db`.* TO `yota_user`@`localhost` IDENTIFIED BY 'gahdeer6shai9hogai2sai4quuaj1eVu'; +GRANT INSERT ON `yota_db`.`activities` TO `yota_requester`@`localhost` IDENTIFIED BY 'oon5iraeghaidoShi5sheefie2uuz3gu'; diff --git a/reservation.php b/reservation.php index f070d1c..7b34f71 100644 --- a/reservation.php +++ b/reservation.php @@ -44,19 +44,6 @@ if ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST['fname']) && isset($_PO } } ?> -
- - - - - - - -
- -
-
-
-- cgit v1.2.3