├── client
├── App.js
├── index.js
├── .gitignore
├── src
│ ├── container
│ │ ├── addMovie.scss
│ │ ├── slide.css
│ │ ├── loading.js
│ │ ├── card.css
│ │ ├── movie.css
│ │ ├── loading.css
│ │ ├── order.css
│ │ ├── movieList.js
│ │ ├── userViewOrder.css
│ │ ├── movieCards.js
│ │ ├── CatInputs.js
│ │ ├── ordered.js
│ │ └── adminViewOrders.css
│ ├── env
│ │ ├── .env
│ │ └── api.js
│ ├── components
│ │ ├── editMoive.css
│ │ ├── login.css
│ │ ├── user.js
│ │ ├── home.css
│ │ ├── admin.css
│ │ ├── OrderPage
│ │ │ ├── components
│ │ │ │ ├── date.js
│ │ │ │ ├── groupDate.js
│ │ │ │ ├── schedule.js
│ │ │ │ ├── time.js
│ │ │ │ ├── groupSeat.js
│ │ │ │ ├── note.js
│ │ │ │ └── seat.js
│ │ │ ├── container
│ │ │ │ ├── content.js
│ │ │ │ └── heading.js
│ │ │ ├── App.css
│ │ │ └── App.js
│ │ ├── 404.js
│ │ ├── signUp.css
│ │ └── 404.scss
│ ├── fonts
│ │ └── feather
│ │ │ ├── feather-webfont.eot
│ │ │ ├── feather-webfont.ttf
│ │ │ └── feather-webfont.woff
│ ├── images
│ │ ├── flags
│ │ │ ├── bd.svg
│ │ │ ├── pl.svg
│ │ │ ├── de.svg
│ │ │ ├── am.svg
│ │ │ ├── bq.svg
│ │ │ ├── lu.svg
│ │ │ ├── mc.svg
│ │ │ ├── ua.svg
│ │ │ ├── gb-sct.svg
│ │ │ ├── at.svg
│ │ │ ├── dk.svg
│ │ │ ├── gb-eng.svg
│ │ │ ├── id.svg
│ │ │ ├── lv.svg
│ │ │ ├── ae.svg
│ │ │ ├── fi.svg
│ │ │ ├── pe.svg
│ │ │ ├── bw.svg
│ │ │ ├── ga.svg
│ │ │ ├── sl.svg
│ │ │ ├── gf.svg
│ │ │ ├── ma.svg
│ │ │ ├── ml.svg
│ │ │ ├── ne.svg
│ │ │ ├── td.svg
│ │ │ ├── ye.svg
│ │ │ ├── ci.svg
│ │ │ ├── co.svg
│ │ │ ├── ng.svg
│ │ │ ├── fr.svg
│ │ │ ├── gp.svg
│ │ │ ├── mf.svg
│ │ │ ├── mq.svg
│ │ │ ├── mv.svg
│ │ │ ├── ru.svg
│ │ │ ├── th.svg
│ │ │ ├── bg.svg
│ │ │ ├── cr.svg
│ │ │ ├── ch.svg
│ │ │ ├── gh.svg
│ │ │ ├── gn.svg
│ │ │ ├── mg.svg
│ │ │ ├── mu.svg
│ │ │ ├── wf.svg
│ │ │ ├── bl.svg
│ │ │ ├── dz.svg
│ │ │ ├── hu.svg
│ │ │ ├── be.svg
│ │ │ ├── ie.svg
│ │ │ ├── it.svg
│ │ │ ├── nc.svg
│ │ │ ├── pm.svg
│ │ │ ├── re.svg
│ │ │ ├── ro.svg
│ │ │ ├── yt.svg
│ │ │ ├── ee.svg
│ │ │ ├── no.svg
│ │ │ ├── sj.svg
│ │ │ ├── sr.svg
│ │ │ ├── cd.svg
│ │ │ ├── to.svg
│ │ │ ├── nl.svg
│ │ │ ├── tt.svg
│ │ │ ├── lc.svg
│ │ │ ├── ss.svg
│ │ │ ├── mk.svg
│ │ │ ├── jm.svg
│ │ │ ├── qa.svg
│ │ │ ├── bf.svg
│ │ │ ├── la.svg
│ │ │ ├── bj.svg
│ │ │ ├── cz.svg
│ │ │ ├── cg.svg
│ │ │ ├── pw.svg
│ │ │ ├── sd.svg
│ │ │ ├── lt.svg
│ │ │ ├── jp.svg
│ │ │ ├── sn.svg
│ │ │ ├── kw.svg
│ │ │ ├── ax.svg
│ │ │ ├── ly.svg
│ │ │ ├── vc.svg
│ │ │ ├── gm.svg
│ │ │ ├── is.svg
│ │ │ ├── so.svg
│ │ │ ├── vn.svg
│ │ │ ├── sc.svg
│ │ │ ├── tz.svg
│ │ │ ├── ps.svg
│ │ │ ├── az.svg
│ │ │ ├── gy.svg
│ │ │ ├── bs.svg
│ │ │ ├── bh.svg
│ │ │ ├── cl.svg
│ │ │ ├── dj.svg
│ │ │ ├── bv.svg
│ │ │ ├── fo.svg
│ │ │ ├── gg.svg
│ │ │ ├── gl.svg
│ │ │ ├── tl.svg
│ │ │ ├── cu.svg
│ │ │ ├── sy.svg
│ │ │ ├── cw.svg
│ │ │ ├── pr.svg
│ │ │ ├── tr.svg
│ │ │ ├── se.svg
│ │ │ ├── cf.svg
│ │ │ ├── gr.svg
│ │ │ ├── rw.svg
│ │ │ ├── jo.svg
│ │ │ ├── bb.svg
│ │ │ ├── st.svg
│ │ │ ├── nr.svg
│ │ │ ├── lr.svg
│ │ │ ├── gw.svg
│ │ │ ├── tg.svg
│ │ │ ├── tk.svg
│ │ │ ├── cm.svg
│ │ │ ├── mm.svg
│ │ │ ├── cn.svg
│ │ │ ├── pa.svg
│ │ │ ├── ag.svg
│ │ │ ├── pk.svg
│ │ │ ├── ws.svg
│ │ │ ├── gb.svg
│ │ │ ├── mr.svg
│ │ │ ├── fm.svg
│ │ │ ├── kn.svg
│ │ │ ├── in.svg
│ │ │ ├── tn.svg
│ │ │ ├── kp.svg
│ │ │ ├── ca.svg
│ │ │ ├── il.svg
│ │ │ ├── mh.svg
│ │ │ ├── za.svg
│ │ │ ├── eh.svg
│ │ │ ├── ve.svg
│ │ │ ├── hn.svg
│ │ │ ├── tf.svg
│ │ │ └── eu.svg
│ │ ├── crypto-currencies
│ │ │ ├── eos.svg
│ │ │ ├── dash.svg
│ │ │ ├── ethereum.svg
│ │ │ └── litecoin.svg
│ │ └── browsers
│ │ │ └── blackberry.svg
│ └── App.js
├── .firebaserc
├── build
│ └── static
│ │ ├── css
│ │ ├── 1.7da48ac6.chunk.css
│ │ └── 1.7da48ac6.chunk.css.map
│ │ └── media
│ │ ├── feather-webfont.2cf523cd.woff
│ │ ├── feather-webfont.b8e9cbc7.ttf
│ │ ├── feather-webfont.cc5143b2.eot
│ │ ├── bd.b12e3060.svg
│ │ ├── pl.2257cff6.svg
│ │ ├── de.01e89f77.svg
│ │ ├── am.af917f4b.svg
│ │ ├── bq.4cac15ed.svg
│ │ ├── lu.06956a13.svg
│ │ ├── mc.4241d3ff.svg
│ │ ├── gb-sct.772350bf.svg
│ │ ├── ua.acc88be0.svg
│ │ ├── at.511e196f.svg
│ │ ├── gb-eng.a933214c.svg
│ │ ├── id.ee020a0f.svg
│ │ ├── lv.83353fa9.svg
│ │ ├── dk.44761537.svg
│ │ ├── fi.58bcc4af.svg
│ │ ├── ae.1f331bd9.svg
│ │ ├── pe.4cabbfc6.svg
│ │ ├── bw.8ecb0b8e.svg
│ │ ├── ga.33442fb9.svg
│ │ ├── gf.4ea8e159.svg
│ │ ├── ma.8c27c493.svg
│ │ ├── ml.be076fd9.svg
│ │ ├── ne.bad21adc.svg
│ │ ├── sl.835d44f6.svg
│ │ ├── td.079a2525.svg
│ │ ├── ye.55897575.svg
│ │ ├── ci.1334b221.svg
│ │ ├── co.433d22ad.svg
│ │ ├── ng.2ddc320b.svg
│ │ ├── mq.4c4286cd.svg
│ │ ├── ru.517e32a1.svg
│ │ ├── th.50269587.svg
│ │ ├── bg.bc04745d.svg
│ │ ├── cr.20a9e6bf.svg
│ │ ├── fr.a178bcfb.svg
│ │ ├── gp.a178bcfb.svg
│ │ ├── mf.a178bcfb.svg
│ │ ├── mv.e343afe8.svg
│ │ ├── ch.d5161894.svg
│ │ ├── gh.d4b35e14.svg
│ │ ├── gn.e472dff7.svg
│ │ ├── mg.0c0da5f0.svg
│ │ ├── mu.974b9e6c.svg
│ │ ├── wf.4b4f5462.svg
│ │ ├── bl.a5c508b2.svg
│ │ ├── dz.333db1ef.svg
│ │ ├── be.fb18617c.svg
│ │ ├── hu.a8abaf37.svg
│ │ ├── it.bd6b5ff3.svg
│ │ ├── nc.a2dc6650.svg
│ │ ├── pm.a2dc6650.svg
│ │ ├── re.a2dc6650.svg
│ │ ├── ro.552b5d97.svg
│ │ ├── yt.a2dc6650.svg
│ │ ├── ee.57f366b0.svg
│ │ ├── ie.d609c4e7.svg
│ │ ├── no.8331157c.svg
│ │ ├── sj.8331157c.svg
│ │ ├── sr.65cdb1de.svg
│ │ ├── cd.020e3d1e.svg
│ │ ├── to.fa884203.svg
│ │ ├── nl.de2a39a2.svg
│ │ ├── tt.f09daa6d.svg
│ │ ├── lc.6c2940da.svg
│ │ ├── ss.0c7c9ffc.svg
│ │ ├── mk.29cb0cb2.svg
│ │ ├── jm.7db0ffd8.svg
│ │ ├── qa.20a4d741.svg
│ │ ├── bf.f88288fa.svg
│ │ ├── la.bdfc4ab5.svg
│ │ ├── bj.ea52986c.svg
│ │ ├── cg.497d91d1.svg
│ │ ├── cz.6731f872.svg
│ │ ├── pw.0557592e.svg
│ │ ├── sd.a14badd5.svg
│ │ ├── lt.14b63eab.svg
│ │ ├── jp.fd264681.svg
│ │ ├── sn.4dc603d1.svg
│ │ ├── kw.3e24a94a.svg
│ │ ├── ax.3301f616.svg
│ │ ├── ly.ededce32.svg
│ │ ├── vc.f3912357.svg
│ │ ├── gm.9423800e.svg
│ │ ├── is.ec1fb876.svg
│ │ ├── so.3bdb1de2.svg
│ │ ├── vn.0b7571b8.svg
│ │ ├── tz.d5c9c20a.svg
│ │ ├── sc.fdc11a48.svg
│ │ ├── ps.225ede35.svg
│ │ ├── az.ba2d1e5e.svg
│ │ ├── gy.19bcfc34.svg
│ │ ├── bs.421969c2.svg
│ │ ├── bh.805f2682.svg
│ │ ├── cl.9d5227cb.svg
│ │ ├── dj.f4c086cc.svg
│ │ ├── bv.58761e89.svg
│ │ ├── fo.dc9ed815.svg
│ │ ├── gg.d339aeb2.svg
│ │ ├── gl.d02c42ea.svg
│ │ ├── tl.f563fdae.svg
│ │ ├── cu.050058cb.svg
│ │ ├── sy.0fedea07.svg
│ │ ├── cw.07a0d3f9.svg
│ │ ├── pr.e489537c.svg
│ │ ├── tr.aabe02c2.svg
│ │ ├── se.22475f52.svg
│ │ ├── cf.f75250a7.svg
│ │ ├── gr.9a9a62a1.svg
│ │ ├── rw.46fb809f.svg
│ │ ├── jo.d1405940.svg
│ │ ├── bb.c568edd5.svg
│ │ ├── st.230410b5.svg
│ │ ├── nr.f2afa5b9.svg
│ │ ├── gw.e1d47aa4.svg
│ │ ├── lr.5485e606.svg
│ │ ├── tg.b96ee542.svg
│ │ ├── tk.22d4831b.svg
│ │ ├── cm.17f2e2c9.svg
│ │ ├── mm.e6d7c5a4.svg
│ │ ├── cn.c2814ac0.svg
│ │ ├── pa.91076135.svg
│ │ ├── ag.7cb635f0.svg
│ │ ├── pk.db891066.svg
│ │ ├── ws.23b64335.svg
│ │ ├── gb.5638bbd9.svg
│ │ ├── mr.6b3d082d.svg
│ │ ├── fm.2bd7d4df.svg
│ │ ├── kn.7ab9462c.svg
│ │ ├── in.2d667fbb.svg
│ │ ├── tn.ef273685.svg
│ │ ├── kp.b2729dfa.svg
│ │ ├── ca.af259017.svg
│ │ ├── il.0ea7e9da.svg
│ │ ├── mh.a3bb001b.svg
│ │ ├── za.d8ffed67.svg
│ │ ├── eh.e4f13505.svg
│ │ ├── ve.6f48a1b9.svg
│ │ ├── hn.3d726baa.svg
│ │ ├── tf.adc24fb2.svg
│ │ └── eu.17beaf81.svg
└── firebase.json
├── package.json
├── .gitignore
├── server
├── src
│ ├── utils
│ │ ├── data.xlsx
│ │ ├── exports.js
│ │ ├── exports.1.js
│ │ └── index.js
│ ├── middleware
│ │ └── getlog.js
│ ├── db_operators
│ │ ├── createDatabase.js
│ │ ├── search.js
│ │ ├── delete.js
│ │ └── insert.js
│ ├── cache_system
│ │ └── cache_movies.js
│ ├── controller
│ │ ├── user
│ │ │ ├── userGetSeatedOfMovie.js
│ │ │ ├── userDeleteOrder.js
│ │ │ ├── userUpdateSeat.js
│ │ │ └── userGetMovies.js
│ │ ├── getOneMovie.js
│ │ └── getOneMoviePromise.js
│ └── mysql
│ │ └── connect.js
├── redis-database.js
├── server.js
└── package.json
└── .github
└── workflows
└── rust.yml
/client/App.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/index.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/.gitignore:
--------------------------------------------------------------------------------
1 | /node_modules
--------------------------------------------------------------------------------
/client/src/container/addMovie.scss:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/env/.env:
--------------------------------------------------------------------------------
1 | API_URL=http://localhost:8000
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "dependencies": {}
3 | }
4 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | server/node_modules
2 | config.js
3 | server/sessions/
4 | /serverless
5 |
--------------------------------------------------------------------------------
/client/.firebaserc:
--------------------------------------------------------------------------------
1 | {
2 | "projects": {
3 | "default": "bookingpicker"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/client/src/container/slide.css:
--------------------------------------------------------------------------------
1 | .move {
2 | margin-bottom: 50px;
3 | margin-top: 20px;
4 | }
5 |
--------------------------------------------------------------------------------
/client/src/env/api.js:
--------------------------------------------------------------------------------
1 | const apiLocalhost = "http://localhost:8080";
2 |
3 | module.exports = {apiLocalhost};
--------------------------------------------------------------------------------
/server/src/utils/data.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sangqle/mysql-crud-nodejs/HEAD/server/src/utils/data.xlsx
--------------------------------------------------------------------------------
/client/build/static/css/1.7da48ac6.chunk.css:
--------------------------------------------------------------------------------
1 | .move{margin-bottom:50px;margin-top:20px}
2 | /*# sourceMappingURL=1.7da48ac6.chunk.css.map */
--------------------------------------------------------------------------------
/client/src/components/editMoive.css:
--------------------------------------------------------------------------------
1 | form {
2 | display: flex;
3 | flex-direction: column;
4 | }
5 |
6 | .container {
7 | padding: 12px;
8 | }
9 |
--------------------------------------------------------------------------------
/client/src/fonts/feather/feather-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sangqle/mysql-crud-nodejs/HEAD/client/src/fonts/feather/feather-webfont.eot
--------------------------------------------------------------------------------
/client/src/fonts/feather/feather-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sangqle/mysql-crud-nodejs/HEAD/client/src/fonts/feather/feather-webfont.ttf
--------------------------------------------------------------------------------
/client/src/fonts/feather/feather-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sangqle/mysql-crud-nodejs/HEAD/client/src/fonts/feather/feather-webfont.woff
--------------------------------------------------------------------------------
/client/src/components/login.css:
--------------------------------------------------------------------------------
1 | .btn-back {
2 | color: white;
3 | }
4 |
5 | .btn-back:hover {
6 | color: white;
7 | text-decoration: none;
8 | }
9 |
--------------------------------------------------------------------------------
/client/build/static/media/feather-webfont.2cf523cd.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sangqle/mysql-crud-nodejs/HEAD/client/build/static/media/feather-webfont.2cf523cd.woff
--------------------------------------------------------------------------------
/client/build/static/media/feather-webfont.b8e9cbc7.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sangqle/mysql-crud-nodejs/HEAD/client/build/static/media/feather-webfont.b8e9cbc7.ttf
--------------------------------------------------------------------------------
/client/build/static/media/feather-webfont.cc5143b2.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sangqle/mysql-crud-nodejs/HEAD/client/build/static/media/feather-webfont.cc5143b2.eot
--------------------------------------------------------------------------------
/client/src/images/flags/bd.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/server/src/middleware/getlog.js:
--------------------------------------------------------------------------------
1 | const getTime = (req, res, next) => {
2 | console.log('Time:', new Date().toISOString().replace(/T/, ' ').replace(/\..+/, ''));
3 | next();
4 | }
5 |
6 | module.exports = { getTime };
--------------------------------------------------------------------------------
/client/build/static/media/bd.b12e3060.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/pl.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/de.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/pl.2257cff6.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/components/user.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 |
3 | const User = () => {
4 | return (
5 |
6 |
Ten
7 | Ngay Chieu
8 |
9 | );
10 | };
11 |
12 | export default User;
13 |
--------------------------------------------------------------------------------
/client/src/images/flags/am.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/bq.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/de.01e89f77.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/lu.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/mc.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/ua.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/am.af917f4b.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/bq.4cac15ed.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/gb-sct.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/lu.06956a13.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/mc.4241d3ff.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/components/home.css:
--------------------------------------------------------------------------------
1 | .btn-home {
2 | color: white;
3 | }
4 |
5 | .btn-home:hover {
6 | text-decoration: none;
7 | color: white;
8 | }
9 |
10 | .user {
11 | color: white;
12 | }
13 |
14 | .user:hover {
15 | color: white;
16 | }
17 |
--------------------------------------------------------------------------------
/client/src/images/flags/at.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/gb-sct.772350bf.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/ua.acc88be0.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/dk.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/gb-eng.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/id.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/lv.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/ae.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/fi.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/pe.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/at.511e196f.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/gb-eng.a933214c.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/id.ee020a0f.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/lv.83353fa9.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/dk.44761537.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/fi.58bcc4af.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/App.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 |
3 | import { Container } from "reactstrap";
4 | import Home from "./components/Home";
5 |
6 | class App extends React.Component {
7 | render() {
8 | return ;
9 | }
10 | }
11 |
12 | export default App;
13 |
--------------------------------------------------------------------------------
/client/src/images/flags/bw.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/ae.1f331bd9.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/pe.4cabbfc6.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/bw.8ecb0b8e.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/firebase.json:
--------------------------------------------------------------------------------
1 | {
2 | "hosting": {
3 | "public": "build",
4 | "ignore": ["firebase.json", "**/.*", "**/node_modules/**"],
5 | "rewrites": [
6 | {
7 | "source": "**",
8 | "destination": "/index.html"
9 | }
10 | ]
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/client/src/images/flags/ga.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/sl.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/gf.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/ma.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/ml.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/ne.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/td.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/ye.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/server/src/utils/exports.js:
--------------------------------------------------------------------------------
1 | var json2xls = require('json2xls');
2 | var fs = require('fs');
3 | var json = {
4 | foo: 'bar',
5 | qux: 'moo',
6 | poo: 123,
7 | stux: new Date()
8 | }
9 |
10 | var xls = json2xls(json);
11 |
12 | fs.writeFileSync('data.xlsx', xls, 'binary');
--------------------------------------------------------------------------------
/client/build/static/media/ga.33442fb9.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/ci.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/co.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/ng.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/server/src/utils/exports.1.js:
--------------------------------------------------------------------------------
1 | var json2xls = require('json2xls');
2 | var fs = require('fs');
3 | var json = {
4 | foo: 'bar',
5 | qux: 'moo',
6 | poo: 123,
7 | stux: new Date()
8 | }
9 |
10 | var xls = json2xls(json);
11 |
12 | fs.writeFileSync('data.xlsx', xls, 'binary');
--------------------------------------------------------------------------------
/client/build/static/media/gf.4ea8e159.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/ma.8c27c493.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/ml.be076fd9.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/ne.bad21adc.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/sl.835d44f6.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/td.079a2525.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/ye.55897575.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/fr.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/gp.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/mf.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/mq.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/mv.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/ru.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/th.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/ci.1334b221.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/co.433d22ad.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/ng.2ddc320b.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/container/loading.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import './loading.css';
3 |
4 | const loading = () => {
5 | return (
6 |
11 | );
12 | };
13 |
14 | export default loading;
15 |
--------------------------------------------------------------------------------
/client/src/images/flags/bg.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/cr.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.github/workflows/rust.yml:
--------------------------------------------------------------------------------
1 | name: Rust
2 |
3 | on: [push]
4 |
5 | jobs:
6 | build:
7 |
8 | runs-on: ubuntu-latest
9 |
10 | steps:
11 | - uses: actions/checkout@v1
12 | - name: Build
13 | run: cargo build --verbose
14 | - name: Run tests
15 | run: cargo test --verbose
16 |
--------------------------------------------------------------------------------
/client/build/static/media/mq.4c4286cd.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/ru.517e32a1.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/th.50269587.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/container/card.css:
--------------------------------------------------------------------------------
1 | .card {
2 | width: 100%;
3 | height: fit-content;
4 | }
5 |
6 | .card-img-top {
7 | width: 100%;
8 | height: auto;
9 | }
10 |
11 | .btn-order {
12 | color: white;
13 | }
14 |
15 | .btn-order:hover {
16 | text-decoration: none;
17 | color: yellow;
18 | }
19 |
--------------------------------------------------------------------------------
/client/src/images/flags/ch.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/gh.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/gn.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/mg.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/mu.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/wf.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/bg.bc04745d.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/cr.20a9e6bf.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/fr.a178bcfb.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/gp.a178bcfb.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/mf.a178bcfb.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/mv.e343afe8.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/bl.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/dz.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/hu.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/ch.d5161894.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/gh.d4b35e14.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/gn.e472dff7.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/mg.0c0da5f0.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/mu.974b9e6c.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/wf.4b4f5462.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/components/admin.css:
--------------------------------------------------------------------------------
1 | .input {
2 | margin-top: 0.7rem;
3 | display: flex;
4 | flex-direction: row;
5 | }
6 |
7 | .search-box {
8 | width: 50%;
9 | padding: 5px;
10 | font-size: 20px;
11 | border-radius: 10px;
12 | color: tomato;
13 | margin-right: 10px;
14 | outline: none;
15 | }
16 |
--------------------------------------------------------------------------------
/client/src/images/flags/be.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/ie.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/it.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/nc.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/pm.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/re.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/ro.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/yt.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/bl.a5c508b2.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/dz.333db1ef.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/ee.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/be.fb18617c.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/hu.a8abaf37.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/it.bd6b5ff3.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/nc.a2dc6650.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/pm.a2dc6650.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/re.a2dc6650.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/ro.552b5d97.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/yt.a2dc6650.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/no.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/sj.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/ee.57f366b0.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/ie.d609c4e7.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/no.8331157c.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/sj.8331157c.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/sr.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/sr.65cdb1de.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/cd.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/to.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/server/src/db_operators/createDatabase.js:
--------------------------------------------------------------------------------
1 | const { connection } = require("../mysql/connect");
2 |
3 | const createDatabse = (table_name, fields) => {
4 | connection.query("CREATE DATABASE mydb", function(err, result) {
5 | if (err) throw err.message;
6 | console.log("Database created");
7 | });
8 | };
9 |
10 | module.exports = { createDatabse };
11 |
--------------------------------------------------------------------------------
/client/build/static/css/1.7da48ac6.chunk.css.map:
--------------------------------------------------------------------------------
1 | {"version":3,"sources":["C:/Users/npt/Desktop/mysql-crud-nodejs/client/src/container/C:/Users/npt/Desktop/mysql-crud-nodejs/client/src/container/slide.css"],"names":[],"mappings":"AAAA,MACE,mBAAoB,AACpB,eAAiB,CAClB","file":"1.7da48ac6.chunk.css","sourcesContent":[".move {\r\n margin-bottom: 50px;\r\n margin-top: 20px;\r\n}\r\n"]}
--------------------------------------------------------------------------------
/client/build/static/media/cd.020e3d1e.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/nl.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/to.fa884203.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/tt.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/nl.de2a39a2.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/tt.f09daa6d.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/lc.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/ss.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/lc.6c2940da.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/mk.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/ss.0c7c9ffc.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/jm.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/mk.29cb0cb2.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/jm.7db0ffd8.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/qa.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/bf.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/qa.20a4d741.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/bf.f88288fa.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/crypto-currencies/eos.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/container/movie.css:
--------------------------------------------------------------------------------
1 | .media-left {
2 | width: 30%;
3 | }
4 |
5 | .media-left img {
6 | width: 94%;
7 | }
8 |
9 | .media {
10 | margin-top: 1em;
11 | box-shadow: 4px 7px lightblue;
12 | border-radius: 0 0 22px 0;
13 | }
14 |
15 | .col-2 {
16 | margin-top: 1em;
17 | }
18 |
19 | .media-heading {
20 | font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
21 | color: #2831a7;
22 | font-size: 30px;
23 | }
24 |
--------------------------------------------------------------------------------
/client/src/images/flags/la.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/la.bdfc4ab5.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/bj.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/cz.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/server/src/utils/index.js:
--------------------------------------------------------------------------------
1 | const mysql = require('mysql');
2 |
3 | const con = mysql.createConnection({
4 | host: 'localhost',
5 | user: 'root',
6 | password: 'root'
7 | });
8 |
9 | con.connect((err) => {
10 | if(err) throw err;
11 | console.log('Connected to server Mysql');
12 | con.query('create database mydb', (err, result) => {
13 | if(err) throw err;
14 | console.log('Database created');
15 | });
16 | });
17 |
--------------------------------------------------------------------------------
/client/src/components/OrderPage/components/date.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 |
3 | const renderDate = ({ day }) => {
4 | return (
5 |
14 | );
15 | };
16 |
17 | export default renderDate;
18 |
--------------------------------------------------------------------------------
/client/src/components/OrderPage/components/groupDate.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import Date from "./date";
3 |
4 | const GroupDate = ({ days }) => {
5 | return (
6 |
7 |
Select date play
8 |
9 | {days.map(day => (
10 |
11 | ))}
12 |
13 |
14 | );
15 | };
16 |
17 | export default GroupDate;
18 |
--------------------------------------------------------------------------------
/client/src/images/flags/cg.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/pw.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/bj.ea52986c.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/sd.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/cg.497d91d1.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/cz.6731f872.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/lt.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/pw.0557592e.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/sd.a14badd5.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/components/OrderPage/components/schedule.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import Time from "./time";
3 |
4 | const Schedule = ({ times }) => {
5 | return (
6 |
7 |
Selected schedule
8 |
9 | {times.map(time => (
10 |
11 | ))}
12 |
13 |
14 | );
15 | };
16 |
17 | export default Schedule;
18 |
--------------------------------------------------------------------------------
/client/src/images/flags/jp.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/sn.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/lt.14b63eab.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/kw.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/jp.fd264681.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/sn.4dc603d1.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/kw.3e24a94a.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/components/404.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import "./404.scss";
3 |
4 | const Background = "http://i.giphy.com/l117HrgEinjIA.gif";
5 | const NotFound = () => {
6 | return (
7 |
17 | );
18 | };
19 |
20 | export default NotFound;
21 |
--------------------------------------------------------------------------------
/client/src/images/flags/ax.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/ly.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/ax.3301f616.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/vc.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/ly.ededce32.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/vc.f3912357.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/gm.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/is.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/so.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/vn.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/gm.9423800e.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/is.ec1fb876.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/so.3bdb1de2.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/vn.0b7571b8.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/sc.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/tz.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/ps.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/tz.d5c9c20a.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/server/redis-database.js:
--------------------------------------------------------------------------------
1 | class RedisDatabase {
2 | constructor() {
3 | this.redis = require("redis");
4 | }
5 |
6 | connectDB() {
7 | const client = this.redis.createClient({
8 | host: "127.0.0.1",
9 | port: 6379
10 | });
11 |
12 | client.on("error", err => {
13 | console.log("Error " + err);
14 | });
15 |
16 | client.on("ready", err => {
17 | console.log("Ready ");
18 | });
19 |
20 | return client;
21 | }
22 | }
23 |
24 | module.exports = new RedisDatabase().connectDB();
25 |
--------------------------------------------------------------------------------
/client/build/static/media/sc.fdc11a48.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/az.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/ps.225ede35.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/gy.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/az.ba2d1e5e.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/bs.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/gy.19bcfc34.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/components/OrderPage/components/time.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 |
3 | const Time = ({ time }) => {
4 | return (
5 |
17 | );
18 | };
19 |
20 | export default Time;
21 |
--------------------------------------------------------------------------------
/client/src/images/crypto-currencies/dash.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/bs.421969c2.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/server/server.js:
--------------------------------------------------------------------------------
1 | const http = require("http");
2 | const { App } = require("./app");
3 | const server = http.createServer(App);
4 | let count = 1;
5 | let port = process.env.PORT || 8080;
6 | server.on("error", error => console.log(error));
7 |
8 | server.listen(port, () => console.log(`Server running on ${port}`));
9 |
10 | server.on("connection", connect => {
11 | let time = new Date().getTime();
12 | console.log(
13 | `>>>> Count Connection: ${count++} at ${new Date().toLocaleString()}`
14 | );
15 | // console.log(new Date(time).toLocaleString());
16 | });
17 |
--------------------------------------------------------------------------------
/client/src/images/flags/bh.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/cl.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/crypto-currencies/ethereum.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/dj.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/bh.805f2682.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/cl.9d5227cb.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/bv.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/dj.f4c086cc.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/fo.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/bv.58761e89.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/gg.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/fo.dc9ed815.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/gl.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/tl.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/gg.d339aeb2.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/gl.d02c42ea.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/tl.f563fdae.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/cu.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/components/OrderPage/container/content.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import GroupDate from "../components/groupDate";
3 | import Schedule from "../components/schedule";
4 | import GroupSeat from "../components/groupSeat";
5 |
6 | const days = ["19/11", "20/11", "21/11"];
7 | const times = ["9h", "10h", "11h"];
8 | const seats = [1, 1, 0, 1, 0, 1, 0, 0];
9 |
10 | const Content = props => {
11 | return (
12 |
13 |
14 |
15 |
16 |
17 | );
18 | };
19 |
20 | export default Content;
21 |
--------------------------------------------------------------------------------
/client/build/static/media/cu.050058cb.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/components/OrderPage/App.css:
--------------------------------------------------------------------------------
1 | .card-play {
2 | background: #ffffff;
3 | border: 1px solid #dfe1e6;
4 | border-radius: 4px;
5 | padding: 20px;
6 | margin-bottom: 20px;
7 | }
8 |
9 | .selectgroup-button {
10 | font-size: 18px;
11 | color: #444444;
12 | }
13 |
14 | .icon-r {
15 | padding-right: 8px;
16 | }
17 | .p-10 {
18 | padding: 10px 15px;
19 | }
20 |
21 | .mr {
22 | margin-top: 20px;
23 | margin-bottom: -10px;
24 | }
25 | .mt {
26 | margin-top: 20px;
27 | }
28 | .mr-seat-info {
29 | margin-left: 12px;
30 | top: 4px;
31 | position: absolute;
32 | }
33 |
34 | .mb {
35 | margin-bottom: 20px;
36 | }
37 |
--------------------------------------------------------------------------------
/client/src/images/flags/sy.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/container/loading.css:
--------------------------------------------------------------------------------
1 | @keyframes bouncing-loader {
2 | to {
3 | opacity: 0.1;
4 | transform: translate3d(0, -1rem, 0);
5 | }
6 | }
7 | .bouncing-loader {
8 | display: flex;
9 | justify-content: center;
10 | }
11 | .bouncing-loader > div {
12 | width: 1rem;
13 | height: 1rem;
14 | margin: 3rem 0.2rem;
15 | background: #8385aa;
16 | border-radius: 50%;
17 | animation: bouncing-loader 0.6s infinite alternate;
18 | }
19 | .bouncing-loader > div:nth-child(2) {
20 | animation-delay: 0.2s;
21 | }
22 | .bouncing-loader > div:nth-child(3) {
23 | animation-delay: 0.4s;
24 | }
--------------------------------------------------------------------------------
/client/build/static/media/sy.0fedea07.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/components/OrderPage/components/groupSeat.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import Seat from "./seat";
3 | import Note from "../components/note";
4 |
5 | const groupSeat = ({ seats }) => {
6 | return (
7 |
8 |
Select seat
9 |
10 |
11 |
12 | {seats.map(seat => (
13 |
14 | ))}
15 |
16 |
17 |
18 |
19 |
20 | );
21 | };
22 |
23 | export default groupSeat;
24 |
--------------------------------------------------------------------------------
/client/src/images/flags/cw.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/pr.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/cw.07a0d3f9.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/tr.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/pr.e489537c.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/tr.aabe02c2.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/container/order.css:
--------------------------------------------------------------------------------
1 | .card-play {
2 | background: #ffffff;
3 | border: 1px solid #dfe1e6;
4 | border-radius: 4px;
5 | padding: 20px;
6 | margin-bottom: 20px;
7 | }
8 | label {
9 | display: inline-block !important;
10 | }
11 | .selectgroup-button {
12 | font-size: 18px;
13 | color: #444444;
14 | }
15 |
16 | .icon-r {
17 | padding-right: 8px;
18 | }
19 | .p-10 {
20 | padding: 10px 15px;
21 | }
22 |
23 | .mr {
24 | margin-top: 20px;
25 | margin-bottom: -10px;
26 | }
27 | .mt {
28 | margin-top: 20px;
29 | }
30 | .mr-seat-info {
31 | margin-left: 12px;
32 | top: 4px;
33 | position: absolute;
34 | }
35 |
36 | .mb {
37 | margin-bottom: 20px;
38 | }
39 |
--------------------------------------------------------------------------------
/server/src/cache_system/cache_movies.js:
--------------------------------------------------------------------------------
1 | let movies = [];
2 |
3 | let date = {
4 | id_movie: 1,
5 | data: {
6 | instaces: 3,
7 | dates: [
8 | {
9 | id_date: 1,
10 | date: 19
11 | },
12 | {
13 | id_date: 2,
14 | date: 20
15 | },
16 | {
17 | id_date: 3,
18 | date: 21
19 | }
20 | ]
21 | }
22 | };
23 | let date_of_movies = []; // cache date for movies
24 |
25 | /*{
26 | id_movie: 1,
27 | id_date: 2,
28 | times: [12, 19, 20]
29 | }
30 | */
31 |
32 | let time_of_movies = []; // cache time for date by movies/.
33 |
34 | module.exports = { movies, date_of_movies, time_of_movies };
35 |
--------------------------------------------------------------------------------
/client/src/components/OrderPage/App.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import Heading from "./container/heading";
3 | import Content from "./container/content";
4 | import "./App.css";
5 |
6 | class App extends React.Component {
7 | render() {
8 | return (
9 |
10 |
11 |
12 |
13 |
14 |
17 |
18 |
19 |
20 | );
21 | }
22 | }
23 |
24 | export default App;
25 |
--------------------------------------------------------------------------------
/client/src/images/flags/se.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/cf.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/se.22475f52.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/cf.f75250a7.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/gr.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/gr.9a9a62a1.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/server/src/controller/user/userGetSeatedOfMovie.js:
--------------------------------------------------------------------------------
1 | const { pool } = require("../../mysql/connect");
2 |
3 | exports.userGetSeatedOfMovie = (req, res) => {
4 | console.log(req.params);
5 | var { id_movie, id_date, id_time } = req.params;
6 | let sql = `call choNgoiDaDuocDat(${id_movie}, ${id_date}, ${id_time});`;
7 | try {
8 | pool.query(sql, (error, results, fields) => {
9 | if (error) {
10 | return res.status(400).send({ error });
11 | }
12 | var seated = results[0];
13 | res.status(200).send({
14 | instaces: seated.length,
15 | seated: seated
16 | });
17 | });
18 | } catch (error) {
19 | res.status(400).send({ error });
20 | }
21 | };
--------------------------------------------------------------------------------
/client/src/images/flags/rw.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/jo.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/rw.46fb809f.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/bb.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/server/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "mysql-crud-nodejs",
3 | "version": "1.0.0",
4 | "main": "index.js",
5 | "license": "MIT",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1",
8 | "dev:server": "nodemon --ignore sessions/ server.js",
9 | "dev:start": "nodemon server.js"
10 | },
11 | "dependencies": {
12 | "aws-sdk": "^2.362.0",
13 | "bcrypt": "^3.0.2",
14 | "body-parser": "^1.18.3",
15 | "cors": "^2.8.5",
16 | "express": "^4.16.4",
17 | "express-limit-api": "0.0.3",
18 | "jsonwebtoken": "^8.3.0",
19 | "morgan": "^1.9.1",
20 | "multer": "^1.4.1",
21 | "mysql": "^2.16.0",
22 | "nodemon": "^1.18.6",
23 | "redis": "^2.8.0",
24 | "uuid": "^3.3.2"
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/server/src/db_operators/search.js:
--------------------------------------------------------------------------------
1 | //const { connection } = require('../mysql/connect');
2 | const searchDb = (connection, query, table_name) =>
3 | new Promise((resolve, reject) => {
4 | let sql = `select *
5 | from ${table_name} a
6 | where a.${query.type} like '%${query.key}%';`;
7 | connection.query(sql, (err, result) => {
8 | if (err) {
9 | reject(err);
10 | }
11 | resolve(result);
12 | });
13 | });
14 |
15 | module.exports = { searchDb };
16 | // let query = {
17 | // key: "ng",
18 | // type: "hoten"
19 | // }
20 | // searchDb(connection, query, 'book').then((data) => {
21 | // console.log(data);
22 | // }, (err) => {
23 | // console.log(err.toString());
24 | // })
25 |
--------------------------------------------------------------------------------
/client/build/static/media/jo.d1405940.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/st.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/bb.c568edd5.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/crypto-currencies/litecoin.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/nr.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/st.230410b5.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/container/movieList.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import Movie from "./movie";
3 |
4 | const MovieList = ({ movies, search }) => {
5 | return (
6 | movies &&
7 | movies
8 | .filter(movie => {
9 | return movie.title.toLowerCase().indexOf(search.toLowerCase()) !== -1;
10 | })
11 | .map((movie, i) => (
12 |
23 | ))
24 | );
25 | };
26 |
27 | export default MovieList;
28 |
--------------------------------------------------------------------------------
/client/src/images/flags/lr.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/nr.f2afa5b9.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/gw.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/tg.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/container/userViewOrder.css:
--------------------------------------------------------------------------------
1 | .item1 {
2 | grid-area: idOrder;
3 | }
4 | .item2 {
5 | grid-area: name;
6 | }
7 | .item3 {
8 | grid-area: title;
9 | }
10 | .item4 {
11 | grid-area: date;
12 | }
13 | .item5 {
14 | grid-area: time;
15 | }
16 | .item6 {
17 | grid-area: seat;
18 | }
19 | .item7 {
20 | grid-area: price;
21 | }
22 | .item8 {
23 | grid-area: status;
24 | }
25 | .item9 {
26 | grid-area: timeAt;
27 | }
28 |
29 | .grid-container {
30 | width: 1150px;
31 | display: grid;
32 | grid-gap: 2px;
33 | grid-template-columns: 80px 250px 80px 80px 80px 80px 100px 200px;
34 | }
35 |
36 | .item {
37 | padding: 5px;
38 | background-color: tomato;
39 | }
40 |
41 | .order-container {
42 | width: 1150px;
43 | background-color: rgb(225, 245, 219);
44 | }
45 |
--------------------------------------------------------------------------------
/client/src/images/flags/tk.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/gw.e1d47aa4.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/lr.5485e606.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/tg.b96ee542.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/cm.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/mm.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/tk.22d4831b.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/cm.17f2e2c9.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/mm.e6d7c5a4.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/cn.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/server/src/controller/getOneMovie.js:
--------------------------------------------------------------------------------
1 | const { pool } = require("../mysql/connect");
2 |
3 | exports.getOneMovie = (req, res) => {
4 | const idMovie = req.params.idMovie;
5 | let sql = `select * from movies where id_movie = ${idMovie}`;
6 | try {
7 | pool.query(sql, (error, results) => {
8 | if (error)
9 | return res.json({
10 | message: "Error execute SQL satement in getOneMovie API",
11 | error: error,
12 | path: __filename
13 | });
14 | let movie = results[0];
15 | res.json({movie});
16 | });
17 | } catch (e) {
18 | if (e)
19 | return res.json({
20 | message: "Error throw from catch getOneMovie",
21 | error: e,
22 | path: __filename
23 | });
24 | }
25 | };
26 |
--------------------------------------------------------------------------------
/client/src/images/flags/pa.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/cn.c2814ac0.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/pa.91076135.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/components/signUp.css:
--------------------------------------------------------------------------------
1 | .container {
2 | margin-top: 40px;
3 | }
4 |
5 | .App {
6 | text-align: left;
7 | padding: 1em;
8 | margin: 1em;
9 | border: 2px solid #d3d3d3;
10 | border-radius: 0.5em;
11 | vertical-align: middle;
12 | margin-left: auto;
13 | margin-right: auto;
14 | width: 600px;
15 | margin-top: 40px;
16 | }
17 |
18 | .form {
19 | padding: 1em;
20 | }
21 |
22 | label {
23 | display: flex;
24 | font-weight: 600;
25 | }
26 |
27 | button {
28 | display: flex;
29 | align-items: center;
30 | justify-content: center;
31 | }
32 |
33 | .App-title {
34 | font-size: 1.5em;
35 | }
36 |
37 | .App-intro {
38 | font-size: large;
39 | }
40 |
41 | @keyframes App-logo-spin {
42 | from {
43 | transform: rotate(0deg);
44 | }
45 | to {
46 | transform: rotate(360deg);
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/client/src/images/flags/ag.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/pk.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/ag.7cb635f0.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/components/OrderPage/components/note.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 |
3 | const Note = props => {
4 | return (
5 |
6 |
7 |
8 |
12 |
13 |
14 |
15 |
16 |
20 |
21 |
22 |
23 | );
24 | };
25 |
26 | export default Note;
27 |
--------------------------------------------------------------------------------
/client/src/container/movieCards.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import Card from "./card";
3 | import { Col } from "reactstrap";
4 |
5 | const movieCard = ({ movies, search }) => {
6 | return (
7 | movies &&
8 | movies
9 | .filter(movie => {
10 | return movie.title.toLowerCase().indexOf(search.toLowerCase()) !== -1;
11 | })
12 | .map((movie, i) => {
13 | // console.table(movie);
14 | return (
15 |
16 |
24 |
25 | );
26 | })
27 | );
28 | };
29 |
30 | export default movieCard;
31 |
--------------------------------------------------------------------------------
/client/build/static/media/pk.db891066.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/server/src/mysql/connect.js:
--------------------------------------------------------------------------------
1 | let mysql = require("mysql");
2 | var util = require("util");
3 |
4 | let { config } = require("./config");
5 |
6 | let pool = mysql.createPool(config);
7 |
8 | pool.getConnection((err, connection) => {
9 | if (err) {
10 | if (err.code === "PROTOCOL_CONNECTION_LOST") {
11 | console.error("Database connection was closed.");
12 | }
13 | if (err.code === "ER_CON_COUNT_ERROR") {
14 | console.error("Database has too many connections.");
15 | }
16 | if (err.code === "ECONNREFUSED") {
17 | console.error("Database connection was refused.");
18 | }
19 | }
20 | if (connection) {
21 | console.log("Connected to database");
22 | connection.release();
23 | }
24 | return;
25 | });
26 |
27 | pool.query = util.promisify(pool.query); // Magic happens here.
28 |
29 | module.exports = { pool };
30 |
--------------------------------------------------------------------------------
/client/src/container/CatInputs.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 |
3 | const CatInputs = props => {
4 | return props.cats.map((val, idx) => {
5 | let catId = `cat-${idx}`,
6 | ageId = `age-${idx}`;
7 | return (
8 |
9 |
10 |
18 |
19 |
27 |
28 | );
29 | });
30 | };
31 | export default CatInputs;
32 |
--------------------------------------------------------------------------------
/client/src/images/flags/ws.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/components/404.scss:
--------------------------------------------------------------------------------
1 | @import url("https://fonts.googleapis.com/css?family=Spicy+Rice");
2 |
3 | .FourOhFour {
4 | position: absolute;
5 | top: 0;
6 | left: 0;
7 | width: 100vw;
8 | height: 100vh;
9 | color: red;
10 | background: #121212;
11 | display: flex;
12 | align-items: center;
13 | justify-content: center;
14 |
15 | .bg {
16 | position: absolute;
17 | top: 0;
18 | left: 0;
19 | width: 100vw;
20 | height: 100vh;
21 | background-size: cover;
22 | mix-blend-mode: overlay;
23 | }
24 |
25 | .code {
26 | font-family: "Spicy Rice", cursive;
27 | font-size: 144px;
28 | height: 100vh;
29 | color: white;
30 | width: 100%;
31 | display: flex;
32 | background-position: center;
33 | align-items: center;
34 | background-size: cover;
35 | justify-content: center;
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/client/build/static/media/ws.23b64335.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/server/src/controller/getOneMoviePromise.js:
--------------------------------------------------------------------------------
1 | const { pool } = require("../mysql/connect");
2 |
3 | exports.getOneMovie = (req, res) => {
4 | return new Promise((resolve, reject) => {
5 | const idMovie = req.params.idMovie;
6 | let sql = `select * from movies where id_movie = ${idMovie}`;
7 | try {
8 | pool.query(sql, (error, results) => {
9 | if (error)
10 | return reject({
11 | message: "Error execute SQL satement in getOneMovie API",
12 | error: error,
13 | path: __filename
14 | });
15 | let movie = results[0];
16 | return resolve(movie);
17 | });
18 | } catch (e) {
19 | if (e)
20 | return reject({
21 | message: "Error throw from catch getOneMovie",
22 | error: e,
23 | path: __filename
24 | });
25 | }
26 | });
27 | };
28 |
--------------------------------------------------------------------------------
/client/src/images/flags/gb.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/mr.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/gb.5638bbd9.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/mr.6b3d082d.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/components/OrderPage/components/seat.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 |
3 | const Seat = ({ seat }) => {
4 | return seat === 1 ? (
5 |
6 |
15 |
16 | ) : (
17 |
18 |
28 |
29 | );
30 | };
31 |
32 | export default Seat;
33 |
--------------------------------------------------------------------------------
/client/src/images/flags/fm.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/kn.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/fm.2bd7d4df.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/kn.7ab9462c.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/in.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/tn.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/in.2d667fbb.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/tn.ef273685.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/kp.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/kp.b2729dfa.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/ca.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/client/build/static/media/ca.af259017.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/client/src/images/flags/il.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/mh.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/il.0ea7e9da.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/za.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/mh.a3bb001b.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/container/ordered.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 |
3 | const Ordered = ({ State }) => {
4 | State.sort((a, b) => {
5 | let nameA = a.name.toUpperCase();
6 | let nameB = b.name.toUpperCase();
7 | return nameA < nameB ? -1 : nameA > nameB ? 1 : 0;
8 | }).map(val => {
9 | return (
10 |
11 |
{val.id_order}
12 |
{val.name}
13 |
{val.title}
14 |
{val.date}
15 |
{val.time}
16 |
{val.id_seat}
17 |
{val.price}.000 VND
18 |
{val.status}
19 |
{val.time_order}
20 |
21 | );
22 | });
23 | };
24 |
25 | export default Ordered;
26 |
--------------------------------------------------------------------------------
/client/build/static/media/za.d8ffed67.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/container/adminViewOrders.css:
--------------------------------------------------------------------------------
1 | .item1 {
2 | grid-area: idOrder;
3 | }
4 | .item2 {
5 | grid-area: name;
6 | }
7 | .item3 {
8 | grid-area: title;
9 | }
10 | .item4 {
11 | grid-area: date;
12 | }
13 | .item5 {
14 | grid-area: time;
15 | }
16 | .item6 {
17 | grid-area: seat;
18 | }
19 | .item7 {
20 | grid-area: price;
21 | }
22 | .item8 {
23 | grid-area: status;
24 | }
25 | .item9 {
26 | grid-area: timeAt;
27 | }
28 |
29 |
30 |
31 | .grid-container {
32 | width: 1150px;
33 | display: grid;
34 | grid-template-columns: 80px 170px 230px 80px 80px 80px auto 100px 170px;
35 | background-color: rgb(244, 247, 244);
36 | }
37 |
38 | .nav-bar {
39 | background-color: rgb(225, 245, 220);
40 | font-weight: bold;
41 | }
42 |
43 | .item {
44 | padding-left: 5px;
45 | }
46 |
47 | .order {
48 | margin-top: 1px;
49 | padding: 0px;
50 | padding-left: 5px;
51 | }
52 | /* .order-container {
53 | width: 1150px;
54 | background-color: rgb(225, 245, 219)
55 | } */
56 |
--------------------------------------------------------------------------------
/server/src/controller/user/userDeleteOrder.js:
--------------------------------------------------------------------------------
1 | const { pool } = require("../../mysql/connect");
2 |
3 | /* User delete order was booked */
4 | exports.userDeleteOrder = (req, res) => {
5 | if (req.user.role !== "user")
6 | return res.send({ message: "Please login as customer" });
7 | let { id_order } = req.params;
8 | try {
9 | let sql = `call xoaVe(${req.user.id_user}, ${id_order});`;
10 | pool.query(sql, (error, results, fields) => {
11 | if (error) {
12 | return res.status(400).send({ error });
13 | }
14 | if (results.affectedRows) {
15 | res.status(200).send({
16 | statusCode: 200,
17 | results: `The order '${id_order}' was deleted.`
18 | });
19 | } else {
20 | res.status(400).send({
21 | statusCode: 400,
22 | message: `The id order ${id_order} dose not exist`
23 | });
24 | }
25 | });
26 | } catch (error) {
27 | res.status(400).send({ error });
28 | }
29 | };
30 |
--------------------------------------------------------------------------------
/server/src/controller/user/userUpdateSeat.js:
--------------------------------------------------------------------------------
1 | const { pool } = require("../../mysql/connect");
2 |
3 | exports.userUpdateSeat = (req, res) => {
4 | if (req.user.role !== "user")
5 | return res.send({ message: "Please login as customer" });
6 | let { id_order, id_newSeat} = req.body;
7 | try {
8 | let sql = `call doiChoNgoi(${req.user.id_user}, ${id_order}, ${id_newSeat});`;
9 | pool.query(sql, (error, results, fields) => {
10 | if (error) {
11 | return res.status(400).send({ error });
12 | }
13 | if (results) {
14 | res.status(200).send({
15 | statusCode: 200,
16 | results: results
17 | });
18 | } else {
19 | res.status(400).send({
20 | statusCode: 400,
21 | message: `The id order ${id_order} or id new seat ${id_newSeat} is invalid`
22 | });
23 | }
24 | });
25 | } catch (error) {
26 | res.status(400).send({ error });
27 | }
28 | };
--------------------------------------------------------------------------------
/client/src/images/flags/eh.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/eh.e4f13505.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/server/src/controller/user/userGetMovies.js:
--------------------------------------------------------------------------------
1 | const { pool } = require("../../../src/mysql/connect");
2 | const cache_system = require('../../cache_system/cache_movies')
3 |
4 | exports.userGetMovies = (req, res) => {
5 | if (cache_system.movies.length) {
6 | console.log("Get Movie from cache");
7 | return res.status(200).send({
8 | instaces: cache_system.movies.length,
9 | movies: cache_system.movies
10 | });
11 | }
12 | let sql = `call chonPhim();`;
13 | try {
14 | pool.query(sql, (error, results, fields) => {
15 | if (error) {
16 | return res.status(400).send({ error });
17 | }
18 | var movies = results[0];
19 | for (movie of movies) {
20 | cache_system.movies.push(movie);
21 | }
22 | console.log("Get Movie from MSYQL");
23 | return res.status(200).send({
24 | instaces: movies.length,
25 | movies: movies
26 | });
27 | });
28 | } catch (error) {
29 | return res.status(400).send({ error });
30 | }
31 | };
32 |
--------------------------------------------------------------------------------
/client/src/images/flags/ve.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/ve.6f48a1b9.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/hn.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/images/flags/tf.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/hn.3d726baa.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/tf.adc24fb2.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/components/OrderPage/container/heading.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 |
3 | const Heading = props => {
4 | return (
5 |
6 |
14 | {""}
15 |
16 |
17 |
20 |
21 | When Eddie Brock acquires the powers of a symbiote, he will have to
22 | release his alter-ego "Venom" to save his life.
23 |
24 |
25 |
29 |
30 |
31 |
32 | );
33 | };
34 |
35 | export default Heading;
36 |
--------------------------------------------------------------------------------
/server/src/db_operators/delete.js:
--------------------------------------------------------------------------------
1 | //const { connection } = require('../mysql/connect');
2 |
3 | const deleteOne = (connection, table_name, field, where) =>
4 | new Promise((resolve, reject) => {
5 | let sql = `DELETE FROM ${table_name}
6 | WHERE ${field} = '${where}'`;
7 | connection.query(sql, (err, result) => {
8 | if (err) {
9 | reject(err);
10 | } else {
11 | resolve(result);
12 | }
13 | });
14 | });
15 |
16 | const deleteBook = (connection, table_name, field1, where1, field2, where2) =>
17 | new Promise((resolve, reject) => {
18 | let sql = `DELETE FROM ${table_name}
19 | WHERE ${field1} = '${where1}' && ${field2} = '${where2}'`;
20 | connection.query(sql, (err, result) => {
21 | if (err) {
22 | reject(err);
23 | }
24 | if (result) {
25 | if (result.affectedRows) resolve(result);
26 | else reject("Can not update check of your data");
27 | } else reject("Can not update check of your data");
28 | });
29 | });
30 |
31 | module.exports = { deleteOne, deleteBook };
32 |
--------------------------------------------------------------------------------
/client/src/images/flags/eu.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/build/static/media/eu.17beaf81.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/server/src/db_operators/insert.js:
--------------------------------------------------------------------------------
1 | //const { connection } = require('../mysql/connect');
2 |
3 | const insertOne = (connection, table_name, data) =>
4 | new Promise((resolve, reject) => {
5 | try {
6 | let entity = Object.keys(data).map(key => {
7 | return [`"${data[key]}"`];
8 | }); // must '"property"'
9 | let fields = Object.keys(data);
10 | let stmt = `INSERT INTO ${table_name} (${fields}) VALUES (${entity})`;
11 | connection.query(stmt, data, (err, result, fields) => {
12 | if (err) {
13 | reject(err);
14 | }
15 | resolve(result);
16 | });
17 | } catch (error) {
18 | reject(error);
19 | }
20 | });
21 |
22 | // test Inset record to db
23 | // let data = {
24 | // mave: 'ct01',
25 | // hoten: 'Nguyen Phuoc Dong',
26 | // sdt: '035444256',
27 | // thoigian: '2h30'
28 | // }
29 | // insertOne('book', data).then((result) => {
30 | // console.log(result);
31 | // }, (err) => {
32 | // console.log(err.toString());
33 | // }).catch((err) => {
34 | // console.log(err.toString());
35 | // });
36 |
37 | module.exports = { insertOne };
38 |
--------------------------------------------------------------------------------
/client/src/images/browsers/blackberry.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------