-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTravel.py
109 lines (86 loc) · 2.97 KB
/
Travel.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
import mysql.connector
import json
import textwrap
import urllib.request
from flask import Flask,render_template,request,render_template_string,url_for
from urllib.request import HTTPError
import cv2
from pyzbar import pyzbar
import speech_recognition as sr
import pyaudio
import time
# Other File
# fom app import app
app=Flask(__name__,template_folder='template')
@app.route('/')
def index():
return render_template('Travel.html')
@app.route('/home')
def home():
return render_template('home.html')
@app.route('/travel')
def travel():
return render_template('travel.html')
@app.route('/hotel')
def hotel():
return render_template('hotels.html')
@app.route('/food')
def food():
return render_template('food.html')
@app.route('/Itineraries')
def itineraries():
return render_template('Itineraries.html')
@app.route('/help')
def help():
return render_template('help.html')
@app.route('/trains')
def trains():
return render_template('trains.html')
@app.route('/buses')
def bus():
return render_template('Bus.html')
@app.route('/cabs')
def cabs():
return render_template('Cabs.html')
if __name__=='__main__':
app.run(debug=True,port=7000)
# TABLE CREATION
# CREATE TABLE USERS(ID INT PRIMARY KEY AUTO_INCREMENT,NAME VARCHAR(50),USERNAME VARCHAR(50),PASSWORD VARCHAR(50),EMAIL VARCHAR(50),ROLE VARCHAR(50));
# elif( username == u or password == p):
# print("Username Exists...")
# alert = """
# <html>
# <head>
# <script>
# alert("INCORRECT PASSWORD...")
# </script>
# </head>
# <body>
# </body>
# </html>
# """
#
# return render_template_string(alert)
#
# elif(username == u is False or password == p is True):
# print("Password Exists...")
# alert2= """
# <html>
# <head>
# <script>
# alert("INCORRECT USERNAME...")
# </script>
# </head>
# <body>
# </body>
# </html>
# """
#
# return render_template_string(alert2)
# select * from books where username={username}
#
# if password == password
# ---
# if(f"SELECT USERNAME FROM USERS WHERE USERNAME='{username}'"==request.form['username']):
# if(f"SELECT PASSWORD FROM USERS WHERE PASSWORD='{password}'"==request.form['password']):
# print("Login Success")