svaze commited on
Commit
5026c77
·
verified ·
1 Parent(s): 6053a28

Upload 125 files

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +2 -0
  2. .gitignore +5 -0
  3. Dockerfile +20 -0
  4. abc.html +83 -0
  5. main.py +5 -0
  6. requirements.txt +0 -0
  7. website/__init__.py +105 -0
  8. website/__pycache__/__init__.cpython-311.pyc +0 -0
  9. website/__pycache__/__init__.cpython-312.pyc +0 -0
  10. website/__pycache__/auth.cpython-311.pyc +0 -0
  11. website/__pycache__/auth.cpython-312.pyc +0 -0
  12. website/__pycache__/models.cpython-311.pyc +0 -0
  13. website/__pycache__/models.cpython-312.pyc +0 -0
  14. website/__pycache__/postage_calc.cpython-312.pyc +0 -0
  15. website/__pycache__/views.cpython-311.pyc +0 -0
  16. website/__pycache__/views.cpython-312.pyc +0 -0
  17. website/auth.py +462 -0
  18. website/mmm.py +13 -0
  19. website/models.py +57 -0
  20. website/postage_calc.py +5 -0
  21. website/static/.idea/inspectionProfiles/profiles_settings.xml +6 -0
  22. website/static/.idea/modules.xml +8 -0
  23. website/static/.idea/static.iml +8 -0
  24. website/static/.idea/workspace.xml +46 -0
  25. website/static/images/bg1.jpg +3 -0
  26. website/static/images/document.svg +1 -0
  27. website/static/images/envelope.svg +2 -0
  28. website/static/images/facebook.svg +22 -0
  29. website/static/images/globe.svg +2 -0
  30. website/static/images/heart.svg +2 -0
  31. website/static/images/instagram.svg +24 -0
  32. website/static/images/logout.svg +4 -0
  33. website/static/images/marker.svg +8 -0
  34. website/static/images/menu-dots-vertical.svg +2 -0
  35. website/static/images/postoffice.webp +0 -0
  36. website/static/images/search.svg +2 -0
  37. website/static/images/shipping-timed.svg +4 -0
  38. website/static/images/shop.svg +2 -0
  39. website/static/images/stamp1.png +0 -0
  40. website/static/images/stamp2.png +0 -0
  41. website/static/images/stamp3.png +0 -0
  42. website/static/images/stamp4.png +0 -0
  43. website/static/images/stamp5.png +0 -0
  44. website/static/images/truck-check.svg +4 -0
  45. website/static/images/twitter-alt.svg +4 -0
  46. website/static/images/user-add.svg +2 -0
  47. website/static/images/user.svg +2 -0
  48. website/static/style.css +592 -0
  49. website/templates.zip +3 -0
  50. website/templates/DOP_BulkCustomerIntegration_v8_1.pdf +3 -0
.gitattributes CHANGED
@@ -33,3 +33,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ website/static/images/bg1.jpg filter=lfs diff=lfs merge=lfs -text
37
+ website/templates/DOP_BulkCustomerIntegration_v8_1.pdf filter=lfs diff=lfs merge=lfs -text
.gitignore ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ .env
2
+ .flaskenv
3
+ instance
4
+ /instance
5
+ scraper.zip
Dockerfile ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10.12
2
+
3
+ # Set the working directory in the container
4
+ WORKDIR /app
5
+
6
+ # Copy the application code
7
+ COPY . /app
8
+
9
+ # Install dependencies
10
+ RUN pip install --no-cache-dir -r requirements.txt
11
+
12
+ # Copy the environment variable files into the container
13
+ COPY .env /app/.env
14
+ COPY .flaskenv /app/.flaskenv
15
+
16
+ # Expose port 7860
17
+ EXPOSE 7860
18
+
19
+ # Command to run the Flask app using Gunicorn (or Flask run for simple cases)
20
+ CMD ["gunicorn", "--bind", "0.0.0.0:7860", "main:app"]
abc.html ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Aadhaar Card Appointment - Post Office</title>
7
+ <style>
8
+ body {
9
+ font-family: Arial, sans-serif;
10
+ background-color: #f4f4f4;
11
+ padding: 20px;
12
+ }
13
+ .container {
14
+ max-width: 600px;
15
+ margin: auto;
16
+ background-color: #fff;
17
+ padding: 20px;
18
+ box-shadow: 0 0 10px rgba(0,0,0,0.1);
19
+ border-radius: 10px;
20
+ }
21
+ h2 {
22
+ text-align: center;
23
+ }
24
+ label {
25
+ font-weight: bold;
26
+ }
27
+ input, select, button {
28
+ width: 100%;
29
+ padding: 10px;
30
+ margin: 10px 0;
31
+ border: 1px solid #ccc;
32
+ border-radius: 5px;
33
+ }
34
+ button {
35
+ background-color: #007BFF;
36
+ color: white;
37
+ cursor: pointer;
38
+ }
39
+ button:hover {
40
+ background-color: #0056b3;
41
+ }
42
+ </style>
43
+ </head>
44
+ <body>
45
+
46
+ <div class="container">
47
+ <h2>Book Your Aadhaar Appointment</h2>
48
+ <form action="submit_appointment.php" method="POST">
49
+ <!-- Personal Information Section -->
50
+ <label for="name">Full Name:</label>
51
+ <input type="text" id="name" name="name" required>
52
+
53
+ <label for="mobile">Mobile Number:</label>
54
+ <input type="tel" id="mobile" name="mobile" pattern="[0-9]{10}" required>
55
+
56
+ <label for="email">Email Address (optional):</label>
57
+ <input type="email" id="email" name="email">
58
+
59
+ <label for="aadhar">Aadhaar Number:</label>
60
+ <input type="text" id="aadhar" name="aadhar" pattern="[0-9]{12}" required>
61
+
62
+ <!-- Service Type -->
63
+ <label for="service">Service Type:</label>
64
+ <select id="service" name="service" required>
65
+ <option value="new">New Aadhaar Enrollment</option>
66
+ <option value="update">Update Existing Aadhaar</option>
67
+ <option value="biometric">Biometric Update</option>
68
+ </select>
69
+
70
+ <!-- Appointment Date and Time -->
71
+ <label for="date">Preferred Appointment Date:</label>
72
+ <input type="date" id="date" name="date" required>
73
+
74
+ <label for="time">Preferred Appointment Time:</label>
75
+ <input type="time" id="time" name="time" required>
76
+
77
+ <!-- Submit Button -->
78
+ <button type="submit">Book Appointment</button>
79
+ </form>
80
+ </div>
81
+
82
+ </body>
83
+ </html>
main.py ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ from website import create_app
2
+
3
+ app = create_app()
4
+ if __name__ == '__main__':
5
+ app.run(debug=True)
requirements.txt ADDED
Binary file (1.03 kB). View file
 
website/__init__.py ADDED
@@ -0,0 +1,105 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from flask import Flask
2
+ from flask_sqlalchemy import SQLAlchemy
3
+ from flask_login import LoginManager
4
+ from os import path
5
+ import os
6
+ from authlib.integrations.flask_client import OAuth
7
+ import logging
8
+ import jwt # Import PyJWT
9
+ from datetime import datetime, timedelta
10
+
11
+
12
+ from dotenv import load_dotenv
13
+
14
+ db = SQLAlchemy()
15
+ oauth = OAuth()
16
+ # DB_NAME = "postoffice.db"
17
+
18
+ load_dotenv()
19
+
20
+ def create_app():
21
+ logging.basicConfig(level=logging.DEBUG)
22
+ app = Flask(__name__, static_folder='static')
23
+ # app.config['SECRET_KEY'] = 'vdjdvn224bc'
24
+ app.config['SECRET_KEY'] = os.getenv('SECRET_KEY')
25
+ # app.config['SQLALCHEMY_DATABASE_URI'] = f'sqlite:///{DB_NAME}'
26
+ # app.config['JWT_SECRET_KEY'] = 'bfsfsjfbjh342' # Set your JWT secret key
27
+ app.config['JWT_SECRET_KEY'] = os.getenv('JWT_SECRET_KEY') # Set your JWT secret key
28
+
29
+ # app.config['SQLALCHEMY_DATABASE_URI'] = ('mysql+pymysql://root:%40Tomic123@localhost/postoffice')
30
+ # app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql+pymysql://freedb_svaze:KC%2A4Mg%24GMZfu3W2@sql.freedb.tech/freedb_postoffice'
31
+ app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql+pymysql://avnadmin:AVNS_fTFB8fx9pp0I4w18QMH@mysql-10993d7e-vazeswaroop-f46c.i.aivencloud.com:24112/defaultdb'
32
+ # app.config['SQLALCHEMY_DATABASE_URI'] = (os.getenv('SQLALCHEMY_DATABASE_URI'))
33
+
34
+ try:
35
+ db.init_app(app)
36
+ with app.app_context():
37
+ db.create_all()
38
+ logging.info("Connected to Mysql")
39
+ except Exception as e:
40
+ logging.error("Connection Failed: ",e)
41
+
42
+
43
+ # app.config['GOOGLE_CLIENT_ID'] = '6038375898-kb3j34c970gcn5ajbf85b9fnglu49er2.apps.googleusercontent.com'
44
+ app.config['GOOGLE_CLIENT_ID'] = os.getenv('GOOGLE_CLIENT_ID')
45
+
46
+
47
+ # app.config['GOOGLE_CLIENT_SECRET'] = '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'
48
+ app.config['GOOGLE_CLIENT_SECRET'] = os.getenv('GOOGLE_CLIENT_SECRET')
49
+
50
+
51
+ oauth.init_app(app)
52
+
53
+ google = oauth.register(
54
+ name='google',
55
+ client_id=app.config['GOOGLE_CLIENT_ID'],
56
+ client_secret=app.config['GOOGLE_CLIENT_SECRET'],
57
+ access_token_url='https://accounts.google.com/o/oauth2/token',
58
+ access_token_params=None,
59
+ authorize_url='https://accounts.google.com/o/oauth2/auth',
60
+ authorize_params=None,
61
+ userinfo_endpoint='https://www.googleapis.com/oauth2/v1/userinfo', # For getting user info
62
+ server_metadata_url='https://accounts.google.com/.well-known/openid-configuration',
63
+ client_kwargs={'scope': 'openid profile email'},
64
+ redirect_uri='http://localhost:5000/google/callback',
65
+ claims_options={
66
+ "iss": {
67
+ # "essential": True,
68
+ "values": ["https://accounts.google.com"]
69
+ }
70
+ }
71
+ )
72
+
73
+ from .views import views
74
+ from .auth import auth
75
+
76
+ app.register_blueprint(views, url_prefix='/')
77
+ app.register_blueprint(auth, url_prefix='/')
78
+ # app.register_blueprint(auth, url_prefix='/newUser')
79
+ # app.register_blueprint(auth, url_prefix='/register')
80
+
81
+ # from .models import User, Pincodes, Offices, EF71929279
82
+
83
+ # create_db(app)
84
+ #
85
+ # print(f"Current working directory: {os.getcwd()}")
86
+
87
+ login_manager = LoginManager()
88
+ login_manager.login_view = 'auth.login'
89
+ login_manager.init_app(app)
90
+
91
+ @login_manager.user_loader
92
+ def load_user(user_id):
93
+ from .models import User # Import User model here to avoid circular imports
94
+ return User.query.get(int(user_id))
95
+
96
+ return app
97
+
98
+ # def create_db(app):
99
+ # pat = f'instance/{DB_NAME}'
100
+ # if not path.exists(pat): # Ensure the database file is checked in the current directory
101
+ # with app.app_context():
102
+ # db.create_all() # Create the database tables
103
+ # print("Database created.")
104
+ # else:
105
+ # print("Database already exists.")
website/__pycache__/__init__.cpython-311.pyc ADDED
Binary file (4.08 kB). View file
 
website/__pycache__/__init__.cpython-312.pyc ADDED
Binary file (3.47 kB). View file
 
website/__pycache__/auth.cpython-311.pyc ADDED
Binary file (23 kB). View file
 
website/__pycache__/auth.cpython-312.pyc ADDED
Binary file (20.5 kB). View file
 
website/__pycache__/models.cpython-311.pyc ADDED
Binary file (5.93 kB). View file
 
website/__pycache__/models.cpython-312.pyc ADDED
Binary file (5.84 kB). View file
 
website/__pycache__/postage_calc.cpython-312.pyc ADDED
Binary file (1.62 kB). View file
 
website/__pycache__/views.cpython-311.pyc ADDED
Binary file (699 Bytes). View file
 
website/__pycache__/views.cpython-312.pyc ADDED
Binary file (601 Bytes). View file
 
website/auth.py ADDED
@@ -0,0 +1,462 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from flask import Blueprint, render_template, request, redirect, url_for, flash, session, jsonify
2
+ from requests import delete
3
+ from .models import User, Pincodes, Offices, EF71929279, Bookings
4
+ from . import db, oauth
5
+ from werkzeug.security import generate_password_hash, check_password_hash
6
+ # from sqlalchemy import text
7
+ import jwt # Import PyJWT
8
+ import datetime
9
+ from functools import wraps
10
+ from flask import current_app
11
+ # import sqlite3
12
+ from math import ceil
13
+ from urllib.parse import urlencode
14
+ import secrets
15
+ from flask_mail import Mail, Message
16
+ from itsdangerous import URLSafeTimedSerializer
17
+
18
+ auth = Blueprint('auth', __name__)
19
+
20
+
21
+ def calc_post(service_type, article, weight):
22
+ if service_type == 'DOMESTIC':
23
+ if article == 'Single Card':
24
+ return 0.5
25
+ elif article == 'Reply Card':
26
+ return 1
27
+ elif article == 'Meghdoot Post Card':
28
+ return 0.25
29
+ elif article == 'Printed Card':
30
+ return 6
31
+ elif article == 'Inland Letter Card':
32
+ return 2.5
33
+ elif article == 'Letters/Documents':
34
+ if weight <= 20:
35
+ return 5
36
+ else:
37
+ total = ceil(weight / 20) * 5
38
+ return total
39
+ elif article == 'Book Pattern and Sample Packets':
40
+ if weight <= 50:
41
+ return 4
42
+ else:
43
+ total = ceil((weight - 50) / 50) * 3 + 4
44
+ return total
45
+ elif article == 'Blind Literature packets ':
46
+ return 0
47
+ elif article == 'Parcels':
48
+ if weight <= 500:
49
+ return 19
50
+ else:
51
+ return ceil((weight - 500) / 500) * 16 + 19
52
+ elif article == 'Registered News Paper':
53
+ if weight <= 50:
54
+ return 0.25
55
+ elif weight <= 100:
56
+ return 0.5
57
+ else:
58
+ total = ceil((weight - 100) / 100) * 0.2 + 0.5
59
+ else:
60
+ return 10
61
+ elif service_type == 'INTERNATIONAL':
62
+ if article == 'DOCUMENT':
63
+ if weight <= 250:
64
+ return 150
65
+ else:
66
+ return ceil((weight - 250) / 250) * 15 + 150
67
+
68
+ elif article == 'MERCHANDISE':
69
+ if weight <= 250:
70
+ return 400
71
+ else:
72
+ return ceil((weight - 250) / 250) * 40 + 400
73
+ else:
74
+ return 300
75
+
76
+
77
+ # def get_db_connection():
78
+ # conn = sqlite3.connect('postoffice.db') # Replace with your database path
79
+ # conn.row_factory = sqlite3.Row # This will allow us to fetch rows as dictionaries
80
+ # print("Connection Successful")
81
+ # res = conn.execute("SELECT name FROM sqlite_master WHERE type='table' AND name='pincodes';")
82
+ # print(res)
83
+ # return conn
84
+
85
+
86
+ def token_required(f):
87
+ @wraps(f)
88
+ def decorated(*args, **kwargs):
89
+ token = session.get('token') # Retrieve token from session
90
+ if not token:
91
+ # jsonify({'message': 'Token is missing!'}), 403
92
+ return redirect(url_for('auth.login'))
93
+ try:
94
+ data = jwt.decode(token, current_app.config['JWT_SECRET_KEY'], algorithms=["HS256"])
95
+ except jwt.ExpiredSignatureError:
96
+ # return jsonify({'message': 'Token has expired!'}), 403
97
+ return redirect(url_for('auth.login'))
98
+ except jwt.InvalidTokenError:
99
+ # return jsonify({'message': 'Invalid token!'}), 403
100
+ return redirect(url_for('auth.login'))
101
+
102
+ return f(*args, **kwargs)
103
+
104
+ return decorated
105
+
106
+
107
+ @auth.route('/register.html', methods=['GET', 'POST'])
108
+ def register():
109
+ if request.method == 'POST':
110
+ userid = request.form.get('userid')
111
+ pwd = request.form.get('password')
112
+ user = User.query.filter_by(userid=userid).first()
113
+ print(user)
114
+ if not user:
115
+ session['userid'] = userid
116
+ session['pwd'] = pwd
117
+ print("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
118
+ return redirect(url_for('auth.newUser'))
119
+ else:
120
+ print('Email Exists!')
121
+ return redirect(url_for('auth.login'))
122
+
123
+ return render_template("register.html")
124
+
125
+
126
+ @auth.route('/login.html', methods=['GET', 'POST'])
127
+ def login():
128
+ if request.method == 'POST':
129
+ userid = request.form.get('userid')
130
+ pwd = request.form.get('password')
131
+ user = User.query.filter_by(userid=userid).first()
132
+ if not user:
133
+ return redirect(url_for('auth.register'))
134
+ else:
135
+ if check_password_hash(user.password, pwd):
136
+ token = jwt.encode({
137
+ 'user_id': user.userid,
138
+ 'exp': datetime.datetime.now(datetime.UTC) + datetime.timedelta(hours=1) # Token expires in 1 hour
139
+ }, current_app.config['JWT_SECRET_KEY'], algorithm="HS256")
140
+ session['token'] = token # Store token in session
141
+ session['name'] = f"{user.firstname} {user.lastname}"
142
+ # print(name)
143
+ return redirect(url_for('views.homepage'), 201)
144
+ else:
145
+ flash("Wrong Password Try Again!")
146
+ return redirect(url_for('auth.login'))
147
+ return render_template("login.html")
148
+
149
+
150
+ @auth.route('/google/login')
151
+ def google_login():
152
+ # Google OAuth2 endpoint
153
+ google_auth_url = "https://accounts.google.com/o/oauth2/v2/auth"
154
+
155
+ # Parameters for the request
156
+ params = {
157
+ 'client_id': current_app.config['GOOGLE_CLIENT_ID'],
158
+ 'redirect_uri': url_for('auth.google_callback', _external=True),
159
+ 'response_type': 'code',
160
+ 'scope': 'openid email profile',
161
+ 'access_type': 'offline',
162
+ 'include_granted_scopes': 'true',
163
+ 'state': secrets.token_urlsafe(16) # Generate a random state parameter
164
+ }
165
+
166
+ # Store state in session for verification
167
+ session['oauth_state'] = params['state']
168
+
169
+ # Build the authorization URL
170
+ auth_url = f"{google_auth_url}?" + urlencode(params)
171
+
172
+ return redirect(auth_url)
173
+
174
+
175
+ @auth.route('/google/callback')
176
+ def google_callback():
177
+ try:
178
+ # Get token info directly from request
179
+ if 'error' in request.args:
180
+ raise Exception(f"OAuth error: {request.args['error']}")
181
+
182
+ if 'id_token' in request.args:
183
+ # If the ID token is in URL parameters
184
+ id_token = request.args.get('id_token')
185
+ print(id_token)
186
+ else:
187
+ # Get the authorization code
188
+ code = request.args.get('code')
189
+
190
+ print(f"Received authorization code: {code}")
191
+
192
+ user_info = {
193
+ 'email': 'soorya.sivaramakrishnan22@spit.ac.in',
194
+ 'given_name': 'Soorya',
195
+ 'family_name': 'Siva'
196
+ }
197
+
198
+ # Check if user exists
199
+ user = User.query.filter_by(userid=user_info['email']).first()
200
+
201
+ if not user:
202
+ session['userid'] = user_info['email']
203
+ session['pwd'] = None
204
+ return redirect(url_for('auth.newUser'))
205
+ else:
206
+ # Generate JWT token
207
+ token = jwt.encode({
208
+ 'user_id': user_info['email'],
209
+ 'exp': datetime.datetime.now(datetime.UTC) + datetime.timedelta(hours=1)
210
+ }, current_app.config['JWT_SECRET_KEY'], algorithm="HS256")
211
+
212
+ session['token'] = token
213
+ session['name'] = f"{user.firstname} {user.lastname}"
214
+ return redirect(url_for('views.homepage'))
215
+
216
+ except Exception as e:
217
+ print(f"OAuth error: {str(e)}")
218
+ import traceback
219
+ print(f"Traceback: {traceback.format_exc()}")
220
+ print(f"Request args: {request.args}") # Print request args for debugging
221
+ flash("Authentication failed. Please try again.")
222
+ return redirect(url_for('auth.login'))
223
+
224
+
225
+ @auth.route('/newUser', methods=['GET', 'POST'])
226
+ def newUser():
227
+ userid = session.get('userid')
228
+ pwd = session.get('pwd')
229
+ if request.method == 'POST':
230
+ fname = request.form.get('firstname')
231
+ lname = request.form.get('lastname')
232
+ mobile = request.form.get('mobile')
233
+ gender = request.form.get('gender')
234
+ pincode = request.form.get('pincode')
235
+ city = request.form.get('city-district')
236
+ state = request.form.get('state')
237
+ country = request.form.get('country')
238
+ add1 = request.form.get('address1')
239
+ add2 = request.form.get('address2')
240
+ print(
241
+ f"Inputs: {userid}, {fname}, {lname}, {mobile}, {gender}, {pincode}, {city}, {state}, {country}, {add1}, {add2}")
242
+ print("AAAAAAAAAAAAAAAAAAAAAAAAA")
243
+ if pwd is None:
244
+ pwd = "abcd"
245
+ new_user = User(userid=userid, firstname=fname, lastname=lname, mobile=mobile, gender=gender, pincode=pincode,
246
+ city=city, state=state, country=country, add1=add1, add2=add2,
247
+ password=generate_password_hash(pwd, method='pbkdf2:sha256'))
248
+ print("BBBBBBBBBBBBBBBBBBBBBBBBBBBBBB")
249
+ db.session.add(new_user)
250
+ print("CCCCCCCCCCCCCCCCCCCCCCCCCCCCCC")
251
+ db.session.commit()
252
+ print("DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD")
253
+ token = jwt.encode({
254
+ 'user_id': new_user.userid,
255
+ 'exp': datetime.datetime.now(datetime.UTC) + datetime.timedelta(hours=1) # Token expires in 1 hour
256
+ }, current_app.config['JWT_SECRET_KEY'], algorithm="HS256")
257
+ session['token'] = token # Store token in session
258
+ return redirect(url_for('auth.login'), 201)
259
+
260
+ print("*******************************************")
261
+ return render_template('newUser.html')
262
+
263
+
264
+ @auth.route('logout.html')
265
+ def logout():
266
+ session.clear()
267
+ return redirect(url_for('views.homepage'))
268
+
269
+
270
+ @auth.route('/trackconsignment.html', methods=['GET', 'POST'])
271
+ @token_required
272
+ def track():
273
+ token = session.get('token') # Check if the token exists in the session
274
+ if token:
275
+ name = session.get('name')
276
+ # If token exists, render the findpincode page
277
+ if request.method == 'POST':
278
+ id_ = request.form.get('trackingid')
279
+ if id_ != 'EF71929279':
280
+ return render_template("trackconsignment.html", result=None, Name=name)
281
+ consign = EF71929279.query.all()
282
+ print(consign)
283
+ return render_template("trackconsignment.html", result=consign, Name=name)
284
+ return render_template("trackconsignment.html", result=None, Name=name)
285
+ else:
286
+ # If no token exists, redirect to the homepage
287
+ return redirect(url_for('auth.login'))
288
+
289
+
290
+ @auth.route('/calculatepostage.html', methods=['GET', 'POST'])
291
+ @token_required
292
+ def calcpost():
293
+ token = session.get('token') # Check if the token exists in the session
294
+ if token:
295
+ name = session.get('name')
296
+ # If token exists, render the findpincode page
297
+ if request.method == 'POST':
298
+ service_type = request.form.get('service-type').upper()
299
+ service = request.form.get('service')
300
+ weight = request.form.get('weight')
301
+ weight = int(weight)
302
+ print(service_type, service, weight)
303
+ value = calc_post(service_type, service, weight)
304
+ print(value)
305
+ return render_template("calculatepostage.html", Name=name, value=value)
306
+ return render_template("calculatepostage.html", Name=name, value=0)
307
+ else:
308
+ # If no token exists, redirect to the homepage
309
+ return redirect(url_for('auth.login'))
310
+
311
+
312
+ @auth.route('/findpincode.html', methods=['GET', 'POST'])
313
+ @token_required
314
+ def findpincode():
315
+ token = session.get('token') # Check if the token exists in the session
316
+ if token:
317
+ name = session.get('name')
318
+ if request.method == 'POST':
319
+ poname = request.form.get('poname').strip()
320
+ city = request.form.get('city-district').strip().upper()
321
+ state = request.form.get('state').strip().upper()
322
+ print(poname, city, state)
323
+ # conn = get_db_connection()
324
+ if poname == 'NULL':
325
+ results = Pincodes.query.filter_by(District=city, StateName=state).all()
326
+ else:
327
+ results = Pincodes.query.filter_by(OfficeName=poname).all()
328
+ # conn.close()
329
+ print(results)
330
+ # Pass the results to the template
331
+ return render_template("findpincode.html", Name=name, results=results)
332
+
333
+ # If token exists, render the findpincode page
334
+ return render_template("findpincode.html", Name=name, results=None)
335
+ else:
336
+ # If no token exists, redirect to the homepage
337
+ return redirect(url_for('auth.login'))
338
+
339
+
340
+ @auth.route('/locatepostoffice.html', methods=['GET', 'POST'])
341
+ @token_required
342
+ def locpost():
343
+ token = session.get('token') # Check if the token exists in the session
344
+ if token:
345
+ name = session.get('name')
346
+ if request.method == 'POST':
347
+ pincode = request.form.get('pincode').strip().upper()
348
+ # city = request.form.get('city-district').upper()
349
+ # state = request.form.get('state').upper()
350
+ # conn = get_db_connection()
351
+ results = Offices.query.filter_by(Pincode=pincode).all()
352
+
353
+ return render_template("locatepostoffice.html", Name=name, results=results)
354
+
355
+ return render_template("locatepostoffice.html", Name=name, results=None)
356
+ else:
357
+ # If no token exists, redirect to the homepage
358
+ return redirect(url_for('views.homepage'))
359
+
360
+
361
+ @auth.route('/buystamps.html', methods=['GET', 'POST'])
362
+ @token_required
363
+ def stamp():
364
+ token = session['token']
365
+ if token:
366
+ name = session.get('name')
367
+ return render_template('buystamps.html', Name=name)
368
+ else:
369
+ return redirect(url_for('auth.login'))
370
+
371
+
372
+ @auth.route('/tenders.html', methods=['GET', 'POST'])
373
+ @token_required
374
+ def tender():
375
+ token = session['token']
376
+ if token:
377
+ name = session.get('name')
378
+ return render_template('tenders.html', Name=name)
379
+ else:
380
+ return redirect(url_for('auth.login'))
381
+
382
+
383
+ @auth.route('/recruitment.html', methods=['GET', 'POST'])
384
+ @token_required
385
+ def recruit():
386
+ token = session['token']
387
+ if token:
388
+ name = session.get('name')
389
+ return render_template('recruitment.html', Name=name)
390
+ else:
391
+ return redirect(url_for('auth.login'))
392
+
393
+
394
+ @auth.route('/addhaarbooking.html', methods=['GET', 'POST'])
395
+ @token_required
396
+ def addhaarbooking():
397
+ token = session['token']
398
+ if token:
399
+ name = session.get('name')
400
+ if request.method == 'POST':
401
+ name = request.form.get('fullname')
402
+ mobile = request.form.get('mobile')
403
+ email = request.form.get('email')
404
+ aadhar = request.form.get('addhaar')
405
+ service = request.form.get('addhaarbookingtype')
406
+ date = request.form.get('date')
407
+ time = request.form.get('time')
408
+ print(name, mobile, email, aadhar, service, date, time)
409
+ new_book = Bookings(name=name, mobile=mobile, email=email, aadhar=aadhar, service=service,
410
+ date=date, time=time)
411
+ db.session.add(new_book)
412
+ db.session.commit()
413
+ return render_template('addhaarbooking.html', Name=name)
414
+ else:
415
+ return redirect(url_for('auth.login'))
416
+
417
+
418
+ @auth.route('/insurance.html', methods=['GET', 'POST'])
419
+ @token_required
420
+ def insurance():
421
+ token = session['token']
422
+ if token:
423
+ name = session.get('name')
424
+ return render_template('insurance.html', Name=name)
425
+ else:
426
+ return redirect(url_for('auth.login'))
427
+
428
+
429
+
430
+
431
+
432
+
433
+
434
+
435
+
436
+
437
+
438
+
439
+
440
+
441
+
442
+
443
+
444
+
445
+
446
+
447
+
448
+
449
+
450
+
451
+
452
+
453
+
454
+
455
+
456
+
457
+
458
+
459
+
460
+
461
+
462
+
website/mmm.py ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import sqlite3
2
+
3
+ conn = sqlite3.connect('postoffice.db')
4
+
5
+ cursor = conn.cursor()
6
+
7
+ cursor.execute("select * from user;")
8
+ tables = cursor.fetchall()
9
+
10
+ for row in tables:
11
+ print(row)
12
+
13
+ conn.close()
website/models.py ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from . import db
2
+ from flask_login import UserMixin
3
+
4
+ class User(db.Model, UserMixin):
5
+ userid = db.Column(db.String(300), primary_key=True)
6
+ password = db.Column(db.String(300), nullable=True)
7
+ firstname = db.Column(db.String(255), nullable=False)
8
+ lastname = db.Column(db.String(255), nullable=False)
9
+ mobile = db.Column(db.String(200), nullable=False)
10
+ gender = db.Column(db.String(255), nullable=False)
11
+ pincode = db.Column(db.String(200), nullable=False)
12
+ city = db.Column(db.String(255), nullable=False)
13
+ state = db.Column(db.String(255), nullable=False)
14
+ country = db.Column(db.String(255), nullable=False)
15
+ add1 = db.Column(db.String(1000), nullable=False)
16
+ add2 = db.Column(db.String(1000), nullable=False)
17
+
18
+ class Pincodes(db.Model):
19
+ CircleName = db.Column(db.String(255), nullable=False)
20
+ RegionName = db.Column(db.String(255), nullable=False)
21
+ DivisionName = db.Column(db.String(255), nullable=False)
22
+ OfficeName = db.Column(db.String(255), primary_key=True)
23
+ Pincode = db.Column(db.String(255), nullable=False)
24
+ OfficeType = db.Column(db.String(255), nullable=False)
25
+ Delivery = db.Column(db.String(255), nullable=False)
26
+ District = db.Column(db.String(255), nullable=False)
27
+ StateName = db.Column(db.String(255), nullable=False)
28
+ Latitude = db.Column(db.String(255), nullable=False)
29
+ Longitude = db.Column(db.String(255), nullable=False)
30
+
31
+ class Offices(db.Model):
32
+ PostOfficeName = db.Column(db.String(255), primary_key=True)
33
+ Pincode = db.Column(db.String(255), nullable=False)
34
+ OfficeType = db.Column(db.String(255), nullable=False)
35
+ Services = db.Column(db.String(5000), nullable=False)
36
+ Location = db.Column(db.String(255), nullable=False)
37
+ Telephone = db.Column(db.String(255), nullable=False)
38
+ DepartmentalInformation = db.Column(db.String(255), nullable=False)
39
+
40
+ class EF71929279(db.Model):
41
+ Date = db.Column(db.String(255), nullable=False)
42
+ Time = db.Column(db.String(255), primary_key=True)
43
+ Office = db.Column(db.String(255), nullable=False)
44
+ Event = db.Column(db.String(255), nullable=False)
45
+
46
+ class Bookings(db.Model):
47
+ name = db.Column(db.String(2000), nullable=False)
48
+ mobile = db.Column(db.String(100), nullable=False)
49
+ email = db.Column(db.String(200), primary_key=True)
50
+ aadhar = db.Column(db.String(100), nullable=False)
51
+ service = db.Column(db.String(200), nullable=False)
52
+ date = db.Column(db.String(100), nullable=False)
53
+ time = db.Column(db.String(100), nullable=False)
54
+
55
+
56
+
57
+
website/postage_calc.py ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ from math import ceil
2
+
3
+
4
+
5
+
website/static/.idea/inspectionProfiles/profiles_settings.xml ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ <component name="InspectionProjectProfileManager">
2
+ <settings>
3
+ <option name="USE_PROJECT_PROFILE" value="false" />
4
+ <version value="1.0" />
5
+ </settings>
6
+ </component>
website/static/.idea/modules.xml ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectModuleManager">
4
+ <modules>
5
+ <module fileurl="file://$PROJECT_DIR$/.idea/static.iml" filepath="$PROJECT_DIR$/.idea/static.iml" />
6
+ </modules>
7
+ </component>
8
+ </project>
website/static/.idea/static.iml ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <module type="PYTHON_MODULE" version="4">
3
+ <component name="NewModuleRootManager">
4
+ <content url="file://$MODULE_DIR$" />
5
+ <orderEntry type="inheritedJdk" />
6
+ <orderEntry type="sourceFolder" forTests="false" />
7
+ </component>
8
+ </module>
website/static/.idea/workspace.xml ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ChangeListManager">
4
+ <list default="true" id="af6e5b43-16f7-499d-8047-13f022d0da77" name="Changes" comment="" />
5
+ <option name="SHOW_DIALOG" value="false" />
6
+ <option name="HIGHLIGHT_CONFLICTS" value="true" />
7
+ <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
8
+ <option name="LAST_RESOLUTION" value="IGNORE" />
9
+ </component>
10
+ <component name="ProjectColorInfo"><![CDATA[{
11
+ "associatedIndex": 4
12
+ }]]></component>
13
+ <component name="ProjectId" id="2nnZXMHxRQSIVNpBVHkZIDKrwyL" />
14
+ <component name="ProjectViewState">
15
+ <option name="autoscrollFromSource" value="true" />
16
+ <option name="hideEmptyMiddlePackages" value="true" />
17
+ <option name="showLibraryContents" value="true" />
18
+ </component>
19
+ <component name="PropertiesComponent"><![CDATA[{
20
+ "keyToString": {
21
+ "RunOnceActivity.ShowReadmeOnStart": "true",
22
+ "nodejs_package_manager_path": "npm",
23
+ "vue.rearranger.settings.migration": "true"
24
+ }
25
+ }]]></component>
26
+ <component name="SharedIndexes">
27
+ <attachedChunks>
28
+ <set>
29
+ <option value="bundled-js-predefined-d6986cc7102b-7c0b70fcd90d-JavaScript-PY-242.21829.153" />
30
+ <option value="bundled-python-sdk-464836ebc622-b74155a9e76b-com.jetbrains.pycharm.pro.sharedIndexes.bundled-PY-242.21829.153" />
31
+ </set>
32
+ </attachedChunks>
33
+ </component>
34
+ <component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
35
+ <component name="TaskManager">
36
+ <task active="true" id="Default" summary="Default task">
37
+ <changelist id="af6e5b43-16f7-499d-8047-13f022d0da77" name="Changes" comment="" />
38
+ <created>1729610841342</created>
39
+ <option name="number" value="Default" />
40
+ <option name="presentableId" value="Default" />
41
+ <updated>1729610841342</updated>
42
+ <workItem from="1729610842934" duration="4000" />
43
+ </task>
44
+ <servers />
45
+ </component>
46
+ </project>
website/static/images/bg1.jpg ADDED

Git LFS Details

  • SHA256: 4f6e598ceb3298aa4818be3ffaa5a0c3683dbf78de9239eb27573ff47a1865ce
  • Pointer size: 132 Bytes
  • Size of remote file: 3.27 MB
website/static/images/document.svg ADDED
website/static/images/envelope.svg ADDED
website/static/images/facebook.svg ADDED
website/static/images/globe.svg ADDED
website/static/images/heart.svg ADDED
website/static/images/instagram.svg ADDED
website/static/images/logout.svg ADDED
website/static/images/marker.svg ADDED
website/static/images/menu-dots-vertical.svg ADDED
website/static/images/postoffice.webp ADDED
website/static/images/search.svg ADDED
website/static/images/shipping-timed.svg ADDED
website/static/images/shop.svg ADDED
website/static/images/stamp1.png ADDED
website/static/images/stamp2.png ADDED
website/static/images/stamp3.png ADDED
website/static/images/stamp4.png ADDED
website/static/images/stamp5.png ADDED
website/static/images/truck-check.svg ADDED
website/static/images/twitter-alt.svg ADDED
website/static/images/user-add.svg ADDED
website/static/images/user.svg ADDED
website/static/style.css ADDED
@@ -0,0 +1,592 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @import url("https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap");
2
+ * {
3
+ margin: 0;
4
+ padding: 0;
5
+ box-sizing: border-box;
6
+ /* border: 1px solid red; */
7
+ font-family: "Inter", sans-serif;
8
+ font-optical-sizing: auto;
9
+ font-style: normal;
10
+ -webkit-font-smoothing: antialiased;
11
+ -moz-osx-font-smoothing: grayscale;
12
+ text-rendering: optimizeLegibility;
13
+ }
14
+
15
+ /* Mock Test - jo har site pe h */
16
+ .mock-text {
17
+ position: absolute;
18
+ margin: 300px;
19
+ width: 900px;
20
+ padding: auto;
21
+ font-size: 80px;
22
+ rotate: -30deg;
23
+ opacity: 0.1;
24
+ z-index: -100;
25
+ -webkit-touch-callout: none;
26
+ -webkit-user-select: none;
27
+ -khtml-user-select: none;
28
+ -moz-user-select: none;
29
+ -ms-user-select: none;
30
+ user-select: none;
31
+ }
32
+
33
+ .login-body {
34
+ width: auto;
35
+ height: 700px;
36
+ display: flex;
37
+ align-items: center;
38
+ justify-items: center;
39
+ justify-content: center;
40
+ }
41
+ .register-body {
42
+ width: auto;
43
+ height: 700px;
44
+ display: flex;
45
+ align-items: center;
46
+ justify-items: center;
47
+ justify-content: center;
48
+ }
49
+ .center-contents {
50
+ /* width: 400px; */
51
+ display: flex;
52
+ flex-direction: column;
53
+ padding: 20px;
54
+ border-radius: 25px;
55
+ border: 1px solid #808080;
56
+ border-style: dashed;
57
+ }
58
+ .sign-in-title {
59
+ text-align: center;
60
+ color: #e4003a;
61
+ width: 100%;
62
+ }
63
+
64
+ .sign-in-buttons-container {
65
+ width: 100%;
66
+ display: flex;
67
+ flex-direction: row;
68
+ justify-content: space-evenly;
69
+ align-items: end;
70
+ padding: 10px;
71
+ }
72
+
73
+ .input-containers {
74
+ border: 1px solid #808080;
75
+ border-style: dashed;
76
+ border-radius: 5px;
77
+ margin-top: 20px;
78
+ margin-bottom: 20px;
79
+ padding: 10px;
80
+ width: 100%;
81
+ }
82
+ .input-signup {
83
+ display: flex;
84
+ align-items: center;
85
+ justify-content: space-between;
86
+ width: 100%;
87
+ padding: 10px;
88
+ gap: 10px;
89
+ }
90
+ .input-whole {
91
+ display: flex;
92
+ align-items: center;
93
+ justify-content: space-between;
94
+ width: 100%;
95
+ padding: 10px;
96
+ gap: 10px;
97
+ }
98
+ .btn {
99
+ padding: 15px;
100
+ border: none;
101
+ border-radius: 10px;
102
+ font-size: medium;
103
+ box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 8px;
104
+ }
105
+ .btn:hover {
106
+ cursor: pointer;
107
+ }
108
+
109
+ .sign-in-title {
110
+ padding: 10px;
111
+ }
112
+ .input-section-title {
113
+ font-size: medium;
114
+ display: flex;
115
+ }
116
+
117
+ input {
118
+ padding: 10px;
119
+ border: 1px solid #c9c9c9;
120
+ border-radius: 5px;
121
+ background: none;
122
+ }
123
+
124
+ input:focus {
125
+ border: 1px solid #909090;
126
+ outline: 1px solid #909090;
127
+ }
128
+
129
+ .red-button {
130
+ background: #e4003a;
131
+ color: white;
132
+ }
133
+
134
+ .red-button:hover {
135
+ background: #c60b3a;
136
+ }
137
+
138
+ .input-section-divison {
139
+ display: flex;
140
+ flex-direction: row;
141
+ gap: 20px;
142
+ justify-content: space-around;
143
+ }
144
+
145
+ /* -------------------------------------------------------------------------------------- */
146
+ /* Navbar */
147
+
148
+ .navbar-full {
149
+ display: flex;
150
+ flex-direction: column;
151
+ }
152
+
153
+ .navbar-top {
154
+ display: flex;
155
+ flex-direction: row;
156
+ justify-content: space-between;
157
+ border-bottom: 1px dashed #808080;
158
+ }
159
+
160
+ .top-level-buttons {
161
+ display: flex;
162
+ flex-direction: row;
163
+ }
164
+
165
+ .navbar-bottom {
166
+ display: flex;
167
+ flex-direction: row;
168
+ justify-content: space-between;
169
+ border-bottom: 1px dashed #808080;
170
+ }
171
+ .logo-container {
172
+ display: flex;
173
+ width: 200px;
174
+ background-color: yellow;
175
+ }
176
+ .logo {
177
+ display: flex;
178
+ width: 190px;
179
+ text-align: center;
180
+ justify-items: center;
181
+ align-items: center;
182
+ justify-content: center;
183
+ /* align-self: center; */
184
+ color: yellow;
185
+ text-shadow: 2px 2px rgba(0, 0, 0, 0.2);
186
+ background-color: #e4003a;
187
+ }
188
+
189
+ .quick-links-container {
190
+ display: flex;
191
+ gap: 20px;
192
+ margin: 10px;
193
+ margin-right: 20px;
194
+ }
195
+
196
+ .quick-link {
197
+ padding: 10px;
198
+ width: 100px;
199
+ background: none;
200
+ border: 1px solid #808080;
201
+ border-style: dashed;
202
+ border-radius: 5px;
203
+ }
204
+ .top-level-buttons {
205
+ display: flex;
206
+ gap: 10px;
207
+ }
208
+
209
+ .top-level-button {
210
+ display: flex;
211
+ align-items: center;
212
+ gap: 5px;
213
+ padding: 5px;
214
+ font-size: 12px;
215
+ /* border: none; */
216
+ border-left: 1px dashed #808080;
217
+ /* border-style: dashed; */
218
+ }
219
+
220
+ .search-icon-div {
221
+ display: flex;
222
+ align-items: center;
223
+ padding: 5px;
224
+ margin-left: 10px;
225
+ }
226
+ /* -------------------------------------------------------------------------------------- */
227
+ /* Main Container*/
228
+
229
+ .main-container {
230
+ display: flex;
231
+ flex-direction: row;
232
+ }
233
+
234
+ /* -------------------------------------------------------------------------------------- */
235
+ /* Side Bar */
236
+ .sidebar {
237
+ height: 650px;
238
+ width: 250px;
239
+ padding: 5px;
240
+ background: #eeeeee;
241
+ }
242
+
243
+ .sidebar-container {
244
+ display: flex;
245
+ flex-direction: column;
246
+ height: 100%;
247
+ border: 1px solid #c2c2c2;
248
+ border-radius: 5px;
249
+ }
250
+ .tools-header {
251
+ display: flex;
252
+ align-items: center;
253
+ justify-content: center;
254
+ padding: 5px;
255
+ color: white;
256
+ background: #e4003a;
257
+ border-radius: 5px 5px 0px 0px;
258
+ font-size: 13px;
259
+ }
260
+
261
+ .sidebar-links {
262
+ display: flex;
263
+ flex-direction: column;
264
+ align-items: center;
265
+ justify-content: center;
266
+ padding: 4px;
267
+ }
268
+
269
+ .sidebar-link {
270
+ width: 100%;
271
+ display: flex;
272
+ align-items: center;
273
+ justify-content: center;
274
+ padding: 8px;
275
+ margin: 4px;
276
+ border: 1px solid #c2c2c2;
277
+ border-radius: 5px;
278
+ }
279
+ .sidebar-link-active {
280
+ background: #e4003a;
281
+ color: white;
282
+ border: none;
283
+ }
284
+ .sidebar-link a {
285
+ text-decoration: none;
286
+ color: black;
287
+ }
288
+
289
+ .link-active {
290
+ color: white !important;
291
+ }
292
+
293
+ /*------------------------------*/
294
+ .main-content {
295
+ margin: 10px;
296
+ }
297
+ /*------------------------------*/
298
+
299
+ .input-containers-calc-post {
300
+ border: 1px solid #808080;
301
+ border-style: dashed;
302
+ border-radius: 5px;
303
+ margin-top: 20px;
304
+ margin-bottom: 20px;
305
+ padding: 10px;
306
+ width: 100%;
307
+ display: flex;
308
+ gap: 20px;
309
+ }
310
+
311
+ /*--------------------------*/
312
+ .homepage-container {
313
+ display: flex;
314
+ flex-direction: column;
315
+ width: 100%;
316
+ }
317
+ .banner {
318
+ margin: 0;
319
+ }
320
+ .banner img {
321
+ width: 100%;
322
+ height: 300px;
323
+ }
324
+
325
+ .features-container {
326
+ margin-top: -5px;
327
+ display: flex;
328
+ height: 240px;
329
+ width: 100%;
330
+ background: rgba(0, 0, 0, 0.2);
331
+ }
332
+
333
+ .footer {
334
+ display: flex;
335
+ width: 100%;
336
+ flex-direction: column;
337
+ }
338
+
339
+ .footer-text {
340
+ display: flex;
341
+ width: 100%;
342
+ justify-content: center;
343
+ text-align: center;
344
+ padding: 20px;
345
+ color: gray;
346
+ }
347
+ .footer-top {
348
+ display: flex;
349
+ width: 100%;
350
+ flex-direction: row;
351
+ justify-content: space-between;
352
+ }
353
+
354
+ .internal-links {
355
+ padding: 15px;
356
+ padding-left: 30px;
357
+ display: flex;
358
+ gap: 20px;
359
+ }
360
+ .internal-links a {
361
+ text-decoration: none;
362
+ color: gray;
363
+ }
364
+ .external-links {
365
+ padding: 15px;
366
+ padding-right: 30px;
367
+ display: flex;
368
+ gap: 20px;
369
+ }
370
+
371
+ .text-backdrop {
372
+ position: absolute;
373
+ top: 150px;
374
+ right: 0px;
375
+ background-color: rgba(0, 0, 0, 0.4);
376
+ padding: 30px;
377
+ transform: skew(10);
378
+ backdrop-filter: blur(4px);
379
+ /* transform: skew(-20deg, 0deg);
380
+ padding-right: 30px;
381
+ overflow: hidden; */
382
+ border-radius: 20px 0px 0px 20px;
383
+ }
384
+ .text-backdrop h1 {
385
+ color: white;
386
+ font-size: 80px;
387
+ }
388
+ .text-backdrop h2 {
389
+ color: white;
390
+ font-size: 40px;
391
+ }
392
+
393
+ /* ---------------------------------- */
394
+
395
+ .calculate-postage-container {
396
+ height: 600px;
397
+ overflow: scroll;
398
+ /* box-shadow: 0px -10px 0px 0 black inset; */
399
+ box-shadow: inset 0 -7px 9px -7px white;
400
+ z-index: 10;
401
+ }
402
+
403
+ /* ---------------------------------- */
404
+ .features-container-ext {
405
+ flex-direction: row;
406
+ justify-content: space-around;
407
+ }
408
+
409
+ .indi-feature {
410
+ display: flex;
411
+ flex-direction: column;
412
+ align-items: center;
413
+ align-content: center;
414
+ justify-content: center;
415
+ padding: 10px;
416
+ gap: 20px;
417
+ color: #808080;
418
+ /* border-right: 1px solid #808080; */
419
+ }
420
+
421
+ /* ---------------------------------- */
422
+
423
+ /* ---------------------------------- */
424
+ /*
425
+ .calculate-postage-container {
426
+ height: 600px;
427
+ overflow: scroll;
428
+
429
+ box-shadow: inset 0 -7px 9px -7px white;
430
+ } */
431
+
432
+ .stamp-header {
433
+ height: 250px;
434
+ width: 300px;
435
+ background-color: rgba(0, 0, 0, 0.2);
436
+ border: none;
437
+ border-radius: 5px;
438
+ display: flex;
439
+ flex-direction: column;
440
+ padding: 10px;
441
+ flex-shrink: 0;
442
+ }
443
+
444
+ .stamp-img {
445
+ width: 100%;
446
+ height: 100px;
447
+ /* background: wheat; */
448
+ overflow: hidden;
449
+ border: none;
450
+ border-radius: 5px;
451
+ }
452
+
453
+ .stamp-info {
454
+ margin-top: 20px;
455
+ margin-bottom: 20px;
456
+ display: flex;
457
+ flex-direction: column;
458
+ gap: 10px;
459
+ }
460
+ .stamp-btns {
461
+ width: 100%;
462
+ display: flex;
463
+ justify-content: space-between;
464
+ }
465
+ .stamp-btns img {
466
+ height: 100%;
467
+ }
468
+ .all-stamps {
469
+ max-width: 900px;
470
+ overflow: scroll;
471
+ display: flex;
472
+ /* flex-shrink: none; */
473
+ flex-direction: row;
474
+ padding-bottom: 30px;
475
+ gap: 20px;
476
+ }
477
+ .stamp-info h5 {
478
+ color: #e4003a;
479
+ }
480
+
481
+ .tender-container {
482
+ display: flex;
483
+ flex-direction: column;
484
+ gap: 20px;
485
+ }
486
+
487
+ /* .input-containers-tenders {
488
+ border: 1px solid #808080;
489
+ border-style: dashed;
490
+ border-radius: 5px;
491
+ margin-top: 20px;
492
+ margin-bottom: 20px;
493
+ padding: 10px;
494
+ width: 100%;
495
+ display: flex;
496
+ flex-direction: column;
497
+ } */
498
+
499
+ .input-section-divison-tenders {
500
+ /* margin-top: 500px; */
501
+ display: flex;
502
+ flex-direction: column;
503
+ height: 800px;
504
+ overflow: scroll;
505
+ /* gap: 20px; */
506
+ justify-content: space-around;
507
+ }
508
+
509
+ .center-contents-tenders {
510
+ /* width: 400px; */
511
+ padding: 300px;
512
+ display: flex;
513
+ flex-direction: column;
514
+ padding: 20px;
515
+ border-radius: 25px;
516
+ border: 1px solid #808080;
517
+ border-style: dashed;
518
+ }
519
+
520
+ .main-content-tenders {
521
+ margin: 10px;
522
+ /* padding-top: 200px; */
523
+ display: flex;
524
+ width: 80%;
525
+ justify-content: center;
526
+ /* align-items: center;
527
+ align-content: center; */
528
+ max-height: 600px;
529
+ overflow: scroll;
530
+
531
+ /* margin-top: 50px; */
532
+ }
533
+
534
+ table {
535
+ /*font-family: Arial, Helvetica, sans-serif;*/
536
+ border-collapse: collapse;
537
+ width: 100%;
538
+ max-width: 1000px;
539
+ }
540
+
541
+ table td,
542
+ table th {
543
+ border: 1px solid #ddd;
544
+ padding: 8px;
545
+ }
546
+
547
+ table tr:nth-child(even) {
548
+ background-color: #f2f2f2;
549
+ }
550
+
551
+ table tr:hover {
552
+ background-color: #ddd;
553
+ }
554
+
555
+ table th {
556
+ padding-top: 12px;
557
+ padding-bottom: 12px;
558
+ text-align: left;
559
+ background-color: #e4003a;
560
+ color: white;
561
+ }
562
+
563
+ #service {
564
+ padding: 10px;
565
+ border: 1px solid #c9c9c9;
566
+ border-radius: 5px;
567
+ background: none;
568
+ width: 100%;
569
+ }
570
+ #addhaarbookingtype {
571
+ padding: 10px;
572
+ border: 1px solid #c9c9c9;
573
+ border-radius: 5px;
574
+ background: none;
575
+ width: 100%;
576
+ }
577
+
578
+ #calc-postage-val {
579
+ color: #e4003a;
580
+ width: 100%;
581
+ justify-content: center;
582
+ }
583
+
584
+ .input-section-divison-insurance {
585
+ /* margin-top: 500px; */
586
+ display: flex;
587
+ flex-direction: column;
588
+ /* height: 800px; */
589
+ overflow: scroll;
590
+ gap: 20px;
591
+ justify-content: space-around;
592
+ }
website/templates.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6a5c2d2b0d534ff6d32a5e824fd7928213d3a2d6242a5346532d72c21b6ba123
3
+ size 6295007
website/templates/DOP_BulkCustomerIntegration_v8_1.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f230418e43d5f24d69ab967c4d58906460e0ee9fd901dea8ff0f1ee463c882d2
3
+ size 1062085