diff --git a/ToolBox/User Manual for Toolbox Web Application.docx b/ToolBox/User Manual for Toolbox Web Application.docx new file mode 100644 index 0000000..871ed1f Binary files /dev/null and b/ToolBox/User Manual for Toolbox Web Application.docx differ diff --git a/ToolBox/__pycache__/app.cpython-311.pyc b/ToolBox/__pycache__/app.cpython-311.pyc new file mode 100644 index 0000000..dea7da0 Binary files /dev/null and b/ToolBox/__pycache__/app.cpython-311.pyc differ diff --git a/ToolBox/__pycache__/test_app.cpython-311.pyc b/ToolBox/__pycache__/test_app.cpython-311.pyc new file mode 100644 index 0000000..4ceeddd Binary files /dev/null and b/ToolBox/__pycache__/test_app.cpython-311.pyc differ diff --git a/ToolBox/__pycache__/test_integration.cpython-311.pyc b/ToolBox/__pycache__/test_integration.cpython-311.pyc new file mode 100644 index 0000000..cf29810 Binary files /dev/null and b/ToolBox/__pycache__/test_integration.cpython-311.pyc differ diff --git a/ToolBox/app.py b/ToolBox/app.py new file mode 100644 index 0000000..3ac320c --- /dev/null +++ b/ToolBox/app.py @@ -0,0 +1,407 @@ +from flask import Flask, render_template, request, redirect, url_for, flash, session +from flask_mysqldb import MySQL +from flask_bcrypt import Bcrypt + +app = Flask(__name__) +app.secret_key = 'eH6BjKbFtJg4yP0Q1rWXu89Zc2aVs7Y3sLhNopkD' + +# MySQL configurations +app.config['MYSQL_HOST'] = 'localhost' +app.config['MYSQL_USER'] = 'root' +app.config['MYSQL_PASSWORD'] = '' +app.config['MYSQL_DB'] = 'toolbox' + +mysql = MySQL(app) +bcrypt = Bcrypt(app) + +# Pagination configuration +PER_PAGE = 12 + +@app.route('/') +def home(): + cur = mysql.connection.cursor() + + + cur.execute("SELECT image_url FROM carousel") + carousel_images = cur.fetchall() + + + cur.execute("SELECT id, title, discount, price, image_url FROM tools") + tools = cur.fetchall() + + + cur.execute("SELECT image_url FROM offers") + offers = cur.fetchall() + + + cur.execute("SELECT id, name FROM categories") + categories = cur.fetchall() + + + cur.execute("SELECT id, name FROM brands") + brands = cur.fetchall() + + cur.close() + + + user_name = session.get('user_name') + + + return render_template('Homepage.html', carousel_images=carousel_images, tools=tools, offers=offers, + categories=categories, brands=brands, user_name=user_name) +@app.route('/search') +def search(): + query = request.args.get('query') + cur = mysql.connection.cursor() + search_query = f"%{query}%" + cur.execute("SELECT id, title, discount, price, image_url FROM tools WHERE title LIKE %s", (search_query,)) + tools = cur.fetchall() + + # Fetch categories and brands for navbar + cur.execute("SELECT id, name FROM categories") + categories = cur.fetchall() + cur.execute("SELECT id, name FROM brands") + brands = cur.fetchall() + + cur.close() + return render_template('list.html', tools=tools, categories=categories, brands=brands) + +@app.route('/category/') +def list_by_category(category_id): + + page = int(request.args.get('page', 1)) + + + start_index = (page - 1) * PER_PAGE + + cur = mysql.connection.cursor() + + + cur.execute("SELECT id, title, discount, price, image_url FROM tools WHERE category_id = %s LIMIT %s, %s", + (category_id, start_index, PER_PAGE)) + tools = cur.fetchall() + + + cur.execute("SELECT COUNT(*) FROM tools WHERE category_id = %s", (category_id,)) + total_tools = cur.fetchone()[0] + + + total_pages = (total_tools + PER_PAGE - 1) // PER_PAGE + + + cur.execute("SELECT id, name FROM categories") + categories = cur.fetchall() + cur.execute("SELECT id, name FROM brands") + brands = cur.fetchall() + + cur.close() + + return render_template('list.html', tools=tools, categories=categories, brands=brands, page=page, + total_pages=total_pages) + +@app.route('/brand/') +def list_by_brand(brand_id): + + page = int(request.args.get('page', 1)) + + + start_index = (page - 1) * PER_PAGE + + cur = mysql.connection.cursor() + + + cur.execute("SELECT id, title, discount, price, image_url FROM tools WHERE brand_id = %s LIMIT %s, %s", + (brand_id, start_index, PER_PAGE)) + tools = cur.fetchall() + + + cur.execute("SELECT COUNT(*) FROM tools WHERE brand_id = %s", (brand_id,)) + total_tools = cur.fetchone()[0] + + + total_pages = (total_tools + PER_PAGE - 1) // PER_PAGE + + + cur.execute("SELECT id, name FROM categories") + categories = cur.fetchall() + cur.execute("SELECT id, name FROM brands") + brands = cur.fetchall() + + cur.close() + + return render_template('list.html', tools=tools, categories=categories, brands=brands, page=page, + total_pages=total_pages) + +@app.route('/item/', methods=['GET', 'POST']) +def item_details(item_id): + if request.method == 'POST': + + review_name = request.form['review_name'] + rating = request.form['rating'] + review_text = request.form['review_text'] + + cur = mysql.connection.cursor() + cur.execute("INSERT INTO reviews (tool_id, r_name, rating, review_text) VALUES (%s, %s, %s, %s)", + (item_id, review_name, rating, review_text)) + mysql.connection.commit() + cur.close() + + flash('Review added successfully!', 'success') + return redirect(url_for('item_details', item_id=item_id)) + + + cur = mysql.connection.cursor() + cur.execute("SELECT id, title, discount, price, image_url, rating, description FROM tools WHERE id = %s", + (item_id,)) + tool = cur.fetchone() + + + cur.execute("SELECT r_name, rating, review_text FROM reviews WHERE tool_id = %s", (item_id,)) + reviews = cur.fetchall() + + + cur.execute("SELECT id, name FROM categories") + categories = cur.fetchall() + cur.execute("SELECT id, name FROM brands") + brands = cur.fetchall() + + cur.close() + + return render_template('item_details.html', tool=tool, reviews=reviews, categories=categories, brands=brands) + +@app.route('/services') +def services(): + cur = mysql.connection.cursor() + cur.execute("SELECT id,name, description, icon FROM services") + services = cur.fetchall() + cur.close() + return render_template('Services.html', services=services) + +@app.route('/service_booking/', methods=['GET', 'POST']) +def service_booking(service_id): + if request.method == 'POST': + + name = request.form['name'] + email = request.form['email'] + phone_number = request.form['phone'] + address = request.form['address'] + problem_description = request.form['problem'] + appointment_date = request.form['appointment-date'] + appointment_time = request.form['appointment-time'] + + cur = mysql.connection.cursor() + cur.execute( + "INSERT INTO bookings (user_id, service_id, name, email_id, address, phone_number, problem_description, appointment_date, appointment_time) " + "VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s)", + (None, service_id, name, email, address, phone_number, problem_description, appointment_date, + appointment_time)) + mysql.connection.commit() + cur.close() + + flash('Appointment booked successfully!', 'success') + return redirect(url_for('services')) + + + cur = mysql.connection.cursor() + cur.execute("SELECT name FROM services WHERE id = %s", (service_id,)) + service = cur.fetchone() + cur.close() + service_name = service[0] + + return render_template('Service_booking.html', service=service_name) + +@app.route('/rent') +def rent(): + cur = mysql.connection.cursor() + + + category_id = request.args.get('category') + brand_id = request.args.get('brand') + rating = request.args.get('rating') + min_price = request.args.get('min_price') + max_price = request.args.get('max_price') + page = request.args.get('page', 1, type=int) + per_page = 12 + + + query = "SELECT * FROM rental_tools WHERE 1=1" + params = [] + + + if category_id: + query += " AND category_id = %s" + params.append(category_id) + if brand_id: + query += " AND brand_id = %s" + params.append(brand_id) + if rating: + query += " AND rating >= %s" + params.append(rating) + if min_price: + query += " AND price >= %s" + params.append(min_price) + if max_price: + query += " AND price <= %s" + params.append(max_price) + + + cur.execute(query, params) + total_items = len(cur.fetchall()) + + + query += " LIMIT %s OFFSET %s" + params.extend([per_page, (page - 1) * per_page]) + + cur.execute(query, params) + rental_tools = cur.fetchall() + + + cur.execute("SELECT id, name FROM categories") + categories = cur.fetchall() + + cur.execute("SELECT id, name FROM brands") + brands = cur.fetchall() + + cur.close() + + + total_pages = (total_items + per_page - 1) // per_page + + return render_template('rent.html', rental_tools=rental_tools, categories=categories, brands=brands, page=page, + total_pages=total_pages) +@app.route('/rent_details/', methods=['GET', 'POST']) +def rent_details(rtool_id): + if request.method == 'POST': + + review_name = request.form['review_name'] + rating = request.form['rating'] + review_text = request.form['review_text'] + + cur = mysql.connection.cursor() + cur.execute("INSERT INTO r_reviews (rtool_id, r_name, rating, review_text) VALUES (%s, %s, %s, %s)", + (rtool_id, review_name, rating, review_text)) + mysql.connection.commit() + cur.close() + + flash('Review added successfully!', 'success') + return redirect(url_for('rent_details', rtool_id=rtool_id)) + + + cur = mysql.connection.cursor() + cur.execute("SELECT id, title, discount, price, image_url, rating, description FROM rental_tools WHERE id = %s", + (rtool_id,)) + rental_tool = cur.fetchone() + + + cur.execute("SELECT r_name, rating, review_text FROM r_reviews WHERE rtool_id = %s", (rtool_id,)) + reviews = cur.fetchall() + + + cur.execute("SELECT id, name FROM categories") + categories = cur.fetchall() + cur.execute("SELECT id, name FROM brands") + brands = cur.fetchall() + + cur.close() + + return render_template('rental_booking.html', rental_tool=rental_tool, reviews=reviews, categories=categories, brands=brands) +@app.route('/book_rental/', methods=['POST']) +def book_rental(rtool_id): + name = request.form['name'] + email = request.form['email'] + phone_number = request.form['phone_number'] + address = request.form['address'] + rental_date = request.form['rental_date'] + return_date = request.form['return_date'] + + cur = mysql.connection.cursor() + cur.execute( + "INSERT INTO rentals (tool_id, user_id, name, email, phone_number, address, rental_date, return_date) " + "VALUES (%s, NULL, %s, %s, %s, %s, %s, %s)", + (rtool_id, name, email, phone_number, address, rental_date, return_date) + ) + mysql.connection.commit() + cur.close() + + flash('Booking successful!', 'success') + return redirect(url_for('rent_details', rtool_id=rtool_id)) + +@app.route('/cart') +def cart(): + user_id = session.get('user_id') + if not user_id: + flash('Please log in to view your cart.', 'danger') + return redirect(url_for('login')) + + cur = mysql.connection.cursor() + + + cur.execute("SELECT * FROM rentals WHERE user_id = %s", (user_id,)) + rentals = cur.fetchall() + + + cur.execute("SELECT * FROM bookings WHERE user_id = %s", (user_id,)) + service_bookings = cur.fetchall() + + + cur.execute("SELECT * FROM purchases WHERE user_id = %s", (user_id,)) + purchases = cur.fetchall() + + cur.close() + + return render_template('cart.html', rentals=rentals, service_bookings=service_bookings, purchases=purchases) + + +@app.route('/register', methods=['GET', 'POST']) +def register(): + if request.method == 'POST': + name = request.form['name'] + email_id = request.form['email'] + dob = request.form['dob'] + address = request.form['address'] + phone_number = request.form['phno'] + password = request.form['password'] + confirm_password = request.form['confirmPassword'] + + if password != confirm_password: + flash('Passwords do not match', 'danger') + return redirect(url_for('register')) + + hashed_password = bcrypt.generate_password_hash(password).decode('utf-8') + cur = mysql.connection.cursor() + cur.execute( + "INSERT INTO users (name, email_id, dob, address, phone_number, password) VALUES (%s, %s, %s, %s, %s, %s)", + (name, email_id, dob, address, phone_number, hashed_password)) + mysql.connection.commit() + cur.close() + flash('You have successfully registered!', 'success') + return redirect(url_for('login')) + + return render_template('Registration.html') +@app.route('/login', methods=['GET', 'POST']) +def login(): + if request.method == 'POST': + email = request.form['email'] + password = request.form['password'] + cur = mysql.connection.cursor() + cur.execute("SELECT user_id, name, password FROM users WHERE email_id = %s", (email,)) + user = cur.fetchone() + cur.close() + # Check if the user exists and if the password is correct + if user and bcrypt.check_password_hash(user[2], password): + session['user_id'] = user[0] + session['user_name'] = user[1] + flash('Login successful!', 'success') + return redirect(url_for('home')) + else: + flash('Invalid email or password', 'danger') + + return render_template('Login.html') +@app.route('/logout') +def logout(): + session.clear() + flash('You have been logged out.', 'success') + return redirect(url_for('home')) + +if __name__ == '__main__': + app.run() diff --git a/ToolBox/app2.py b/ToolBox/app2.py new file mode 100644 index 0000000..0708833 --- /dev/null +++ b/ToolBox/app2.py @@ -0,0 +1,97 @@ +from flask import Flask, render_template, request, redirect, url_for, flash +from flask_mysqldb import MySQL +from flask_bcrypt import Bcrypt + +app = Flask(__name__) +app.secret_key = 'eH6BjKbFtJg4yP0Q1rWXu89Zc2aVs7Y3sLhNopkD' + +# MySQL configurations +app.config['MYSQL_HOST'] = 'localhost' +app.config['MYSQL_USER'] = 'root' +app.config['MYSQL_PASSWORD'] = '' +app.config['MYSQL_DB'] = 'toolbox' + +mysql = MySQL(app) +bcrypt = Bcrypt(app) + +@app.route('/') +def admin_dashboard(): + cur = mysql.connection.cursor() + cur.execute("SELECT id, name FROM brands") + brands = cur.fetchall() + cur.execute("SELECT id, name FROM categories") + categories = cur.fetchall() + cur.execute("SELECT id, image_url FROM carousel") + carousel = cur.fetchall() + cur.execute("SELECT id, image_url FROM offers") + offers = cur.fetchall() + + cur.close() + return render_template('admin.html', brands=brands, categories=categories,carousel=carousel, offers=offers) + + + + +@app.route('/admin/carousel/add', methods=['GET', 'POST']) +def add_carousel(): + cur = mysql.connection.cursor() + + if request.method == 'POST': + image_url = request.form['image_url'] + category_id = request.form['category_id'] + brand_id = request.form['brand_id'] + + cur.execute( + "INSERT INTO carousel (image_url, category_id, brand_id) VALUES (%s, %s, %s)", + (image_url, category_id, brand_id) + ) + mysql.connection.commit() + cur.close() + + flash('Carousel item added successfully!', 'success') + return redirect(url_for('admin_dashboard')) + + # Fetch categories and brands for dropdowns + cur.execute("SELECT id, name FROM categories") + categories = cur.fetchall() + cur.execute("SELECT id, name FROM brands") + brands = cur.fetchall() + cur.close() + + return render_template('Admin_add.html', categories=categories, brands=brands) + +@app.route('/admin/carousel/delete/', methods=['POST']) +def delete_carousel(carousel_id): + cur = mysql.connection.cursor() + cur.execute("DELETE FROM carousel WHERE id = %s", (carousel_id,)) + mysql.connection.commit() + cur.close() + + flash('Carousel item deleted successfully!', 'success') + return redirect(url_for('admin_dashboard')) + + +@app.route('/admin/offer', methods=['POST']) +def add_offer(): + image_url = request.form['offer_image'] + category_id = request.form['category_id'] + brand_id = request.form['brand_id'] + cur = mysql.connection.cursor() + cur.execute("INSERT INTO offers (image_url, category_id, brand_id) VALUES (%s, %s, %s)", (image_url, category_id, brand_id)) + mysql.connection.commit() + cur.close() + flash('Offer added successfully!', 'success') + return redirect(url_for('admin_dashboard')) + +@app.route('/admin/offer/delete/', methods=['POST']) +def delete_offer(id): + cur = mysql.connection.cursor() + cur.execute("DELETE FROM offers WHERE id = %s", (id,)) + mysql.connection.commit() + cur.close() + flash('Offer deleted successfully!', 'success') + return redirect(url_for('admin_dashboard')) + + +if __name__ == '__main__': + app.run(debug=True) diff --git a/ToolBox/databases/toolbox.sql b/ToolBox/databases/toolbox.sql new file mode 100644 index 0000000..ea68501 --- /dev/null +++ b/ToolBox/databases/toolbox.sql @@ -0,0 +1,650 @@ +-- phpMyAdmin SQL Dump +-- version 5.2.1 +-- https://www.phpmyadmin.net/ +-- +-- Host: 127.0.0.1 +-- Generation Time: Aug 01, 2024 at 02:05 PM +-- Server version: 10.4.28-MariaDB +-- PHP Version: 8.2.4 + +SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; +START TRANSACTION; +SET time_zone = "+00:00"; + + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8mb4 */; + +-- +-- Database: `toolbox` +-- + +-- -------------------------------------------------------- + +-- +-- Table structure for table `bookings` +-- + +CREATE TABLE `bookings` ( + `id` int(11) NOT NULL, + `user_id` int(11) DEFAULT NULL, + `service_id` int(11) DEFAULT NULL, + `name` varchar(255) NOT NULL, + `email_id` varchar(255) NOT NULL, + `address` text DEFAULT NULL, + `phone_number` varchar(20) DEFAULT NULL, + `problem_description` text DEFAULT NULL, + `appointment_date` date DEFAULT NULL, + `appointment_time` time DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `brands` +-- + +CREATE TABLE `brands` ( + `id` int(11) NOT NULL, + `name` varchar(255) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; + +-- +-- Dumping data for table `brands` +-- + +INSERT INTO `brands` (`id`, `name`) VALUES +(1, 'Bosch'), +(2, 'DeWalt'), +(3, 'Stanley'), +(4, 'Makita'), +(5, 'Milwaukee'); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `carousel` +-- + +CREATE TABLE `carousel` ( + `id` int(11) NOT NULL, + `image_url` varchar(255) DEFAULT NULL, + `category_id` int(11) DEFAULT NULL, + `brand_id` int(11) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; + +-- +-- Dumping data for table `carousel` +-- + +INSERT INTO `carousel` (`id`, `image_url`, `category_id`, `brand_id`) VALUES +(1, 'https://i0.wp.com/toolguyd.com/blog/wp-content/uploads/2023/11/Home-Depot-Free-Dewalt-Cordless-Power-Tool-Offers-for-Holiday-2023.jpg?resize=600%2C437&ssl=1', 2, 2), +(2, 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcR1fnMBNOGVrpIBRsumdFYZ-CNPXNH0gVzMFg&s', 2, NULL), +(3, 'https://www.cbspowertools.com/Files/102358/Img/21/tooloffers-cat-cbs.jpg', 2, NULL); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `categories` +-- + +CREATE TABLE `categories` ( + `id` int(11) NOT NULL, + `name` varchar(255) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; + +-- +-- Dumping data for table `categories` +-- + +INSERT INTO `categories` (`id`, `name`) VALUES +(1, 'Hand Tools'), +(2, 'Power Tools'), +(3, 'Safety Equipment'), +(4, 'Gardening Tools'); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `offers` +-- + +CREATE TABLE `offers` ( + `id` int(11) NOT NULL, + `image_url` varchar(255) DEFAULT NULL, + `category_id` int(11) DEFAULT NULL, + `brand_id` int(11) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; + +-- +-- Dumping data for table `offers` +-- + +INSERT INTO `offers` (`id`, `image_url`, `category_id`, `brand_id`) VALUES +(1, 'https://i.shgcdn.com/6ea1f1a7-d6da-4f5c-8ef2-6d814e5fbaeb/-/format/auto/-/preview/3000x3000/-/quality/lighter/', 2, 5), +(2, 'https://images.prismic.io/tradetools/ZoHyQR5LeNNTwqTQ_makita600x400-8-.png?auto=format,compress', 1, 4); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `professionals` +-- + +CREATE TABLE `professionals` ( + `id` int(11) NOT NULL, + `name` varchar(255) NOT NULL, + `expertise` varchar(255) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `purchases` +-- + +CREATE TABLE `purchases` ( + `id` int(11) NOT NULL, + `user_id` int(11) NOT NULL, + `tool_id` int(11) NOT NULL, + `purchase_date` datetime DEFAULT current_timestamp() +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `rentals` +-- + +CREATE TABLE `rentals` ( + `id` int(11) NOT NULL, + `tool_id` int(11) DEFAULT NULL, + `user_id` int(11) DEFAULT NULL, + `name` varchar(255) NOT NULL, + `email` varchar(255) NOT NULL, + `phone_number` varchar(255) NOT NULL, + `address` text NOT NULL, + `rental_date` date NOT NULL, + `return_date` date NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `rental_tools` +-- + +CREATE TABLE `rental_tools` ( + `id` int(11) NOT NULL, + `title` varchar(255) NOT NULL, + `discount` decimal(5,2) DEFAULT NULL, + `price` decimal(10,2) NOT NULL, + `image_url` varchar(255) DEFAULT NULL, + `category_id` int(11) DEFAULT NULL, + `brand_id` int(11) DEFAULT NULL, + `rating` decimal(3,2) NOT NULL, + `description` text NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; + +-- +-- Dumping data for table `rental_tools` +-- + +INSERT INTO `rental_tools` (`id`, `title`, `discount`, `price`, `image_url`, `category_id`, `brand_id`, `rating`, `description`) VALUES +(1, 'STANLEY Hammer, Curved, Fiberglass, 16-Oz', 3.00, 20.59, 'https://m.media-amazon.com/images/I/511F4+sVF6L._AC_UF894,1000_QL80_.jpg', 1, 3, 0.00, 'This STANLEY® Curved Claw Hammer has a lightweight design with a long handle for improved performance and less user fatigue. The handle has a fibreglass core that adds strength and helps to reduce vibrations. The polished smooth face has a tempered rim to reduce incidences of chipping'), +(2, 'DEWALT Atomic 20V MAX* Cordless Drill, 1/2-Inch, Tool Only', 10.00, 129.99, 'https://m.media-amazon.com/images/I/51XzwAey9vL._AC_UF894,1000_QL80_.jpg', 2, 2, 0.00, ''), +(3, 'Makita B-36170 Ratchet Screwdriver & Bit Set (47 piece)', 5.00, 20.99, 'https://cdn11.bigcommerce.com/s-320izp4p6a/images/stencil/1280x1280/products/65149/182911/B-36170-1__11184.1698966685.jpg?c=1', 1, 4, 0.00, ''), +(4, 'Bosch Safety Goggles', 2.00, 9.99, 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcR-d66S59gRW1Zi92vQWsqWii-yhJOpBvcvRQ&s', 3, 1, 0.00, ''), +(5, 'Milwaukee M18F2LM53 18V 530mm Self-Propelled Lawn Mower Bare Unit', 25.00, 699.99, 'https://www.imagedelivery.space/ffx/products/m/milwaukee_m18f2lm53v6.jpg?fm=webp', 4, 5, 0.00, ''); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `reviews` +-- + +CREATE TABLE `reviews` ( + `id` int(11) NOT NULL, + `tool_id` int(11) DEFAULT NULL, + `r_name` varchar(50) NOT NULL, + `rating` decimal(3,2) NOT NULL DEFAULT 0.00, + `review_text` text DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; + +-- +-- Dumping data for table `reviews` +-- + +INSERT INTO `reviews` (`id`, `tool_id`, `r_name`, `rating`, `review_text`) VALUES +(5, 1, 'adi', 2.00, 'good'); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `r_reviews` +-- + +CREATE TABLE `r_reviews` ( + `id` int(11) NOT NULL, + `rtool_id` int(11) DEFAULT NULL, + `r_name` varchar(255) DEFAULT NULL, + `review_text` varchar(255) DEFAULT NULL, + `rating` decimal(3,2) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; + +-- +-- Dumping data for table `r_reviews` +-- + +INSERT INTO `r_reviews` (`id`, `rtool_id`, `r_name`, `review_text`, `rating`) VALUES +(1, 1, 'adi', 'Good', 4.00), +(2, 1, 'rohan', 'great product', 5.00); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `services` +-- + +CREATE TABLE `services` ( + `id` int(11) NOT NULL, + `name` varchar(255) NOT NULL, + `description` text DEFAULT NULL, + `icon` varchar(255) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; + +-- +-- Dumping data for table `services` +-- + +INSERT INTO `services` (`id`, `name`, `description`, `icon`) VALUES +(1, 'Cleaning Services', 'Professional cleaning services for your home or office.', 'bi bi-bucket-fill'), +(2, 'Pest Control Services', 'Effective pest control solutions to keep your space pest-free.', 'bi bi-bug-fill'), +(3, 'Plumbing Repair and Services', 'Comprehensive plumbing repair and maintenance services.', 'bi bi-tools'), +(4, 'Electrical Repair and Services', 'Expert electrical repair and maintenance services.', 'bi bi-lightning-charge-fill'), +(5, 'Carpentry Repair and Services', 'Quality carpentry repair and custom furniture services.', 'bi bi-hammer'), +(6, 'Air Conditioner Repair and Services', 'Reliable air conditioner repair and maintenance services.', 'bi bi-snow'), +(7, 'Refrigerator Repair and Services', 'Professional refrigerator repair and maintenance services.', 'bi bi-snow2'), +(8, 'Washing Machine Repair and Services', 'Expert washing machine repair and maintenance services.', 'bi bi-bucket'), +(9, 'Microwave Repair and Services', 'Reliable microwave repair and maintenance services.', 'bi bi-dash-square'), +(10, 'Water Purifier Repair and Services', 'Quality water purifier repair and maintenance services.', 'bi bi-droplet'), +(11, 'Geyser Repair and Services', 'Expert geyser repair and maintenance services.', 'bi bi-thermometer'), +(12, 'Painting Services', 'Professional painting services for your home or office.', 'bi bi-brush'), +(13, 'Disinfection Services', 'Thorough disinfection services to keep your space hygienic.', 'bi bi-shield-fill-check'), +(14, 'Home Repairs', 'General home repair services to fix any issue around your house.', 'bi bi-tools'); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `service_requests` +-- + +CREATE TABLE `service_requests` ( + `id` int(11) NOT NULL, + `professional_id` int(11) DEFAULT NULL, + `booking_id` int(11) DEFAULT NULL, + `details` text DEFAULT NULL, + `status` enum('Pending','Accepted','Rejected') DEFAULT 'Pending' +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tools` +-- + +CREATE TABLE `tools` ( + `id` int(11) NOT NULL, + `title` varchar(255) NOT NULL, + `discount` decimal(5,2) DEFAULT NULL, + `price` decimal(10,2) NOT NULL, + `image_url` varchar(255) DEFAULT NULL, + `category_id` int(11) DEFAULT NULL, + `brand_id` int(11) DEFAULT NULL, + `rating` decimal(3,2) DEFAULT 0.00, + `description` text DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; + +-- +-- Dumping data for table `tools` +-- + +INSERT INTO `tools` (`id`, `title`, `discount`, `price`, `image_url`, `category_id`, `brand_id`, `rating`, `description`) VALUES +(1, 'STANLEY Hammer, Curved, Fiberglass, 16-Oz', 3.00, 20.59, 'https://m.media-amazon.com/images/I/511F4+sVF6L._AC_UF894,1000_QL80_.jpg', 1, 3, 0.00, 'This STANLEY® Curved Claw Hammer has a lightweight design with a long handle for improved performance and less user fatigue. The handle has a fibreglass core that adds strength and helps to reduce vibrations. The polished smooth face has a tempered rim to reduce incidences of chipping'), +(2, 'DEWALT Atomic 20V MAX* Cordless Drill, 1/2-Inch, Tool Only', 10.00, 129.99, 'https://m.media-amazon.com/images/I/51XzwAey9vL._AC_UF894,1000_QL80_.jpg', 2, 2, 0.00, NULL), +(3, 'Makita B-36170 Ratchet Screwdriver & Bit Set (47 piece)', 5.00, 20.99, 'https://cdn11.bigcommerce.com/s-320izp4p6a/images/stencil/1280x1280/products/65149/182911/B-36170-1__11184.1698966685.jpg?c=1', 1, 4, 0.00, NULL), +(4, 'Bosch Safety Goggles', 2.00, 9.99, 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcR-d66S59gRW1Zi92vQWsqWii-yhJOpBvcvRQ&s', 3, 1, 0.00, NULL), +(5, ' Milwaukee M18F2LM53 18V 530mm Self-Propelled Lawn Mower Bare Unit ', 25.00, 699.99, 'https://www.imagedelivery.space/ffx/products/m/milwaukee_m18f2lm53v6.jpg?fm=webp', 4, 5, 0.00, NULL); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `users` +-- + +CREATE TABLE `users` ( + `user_id` int(11) NOT NULL, + `name` varchar(100) NOT NULL, + `email_id` varchar(100) NOT NULL, + `dob` date NOT NULL, + `address` varchar(255) NOT NULL, + `phone_number` varchar(15) NOT NULL, + `password` varchar(255) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; + +-- +-- Dumping data for table `users` +-- + +INSERT INTO `users` (`user_id`, `name`, `email_id`, `dob`, `address`, `phone_number`, `password`) VALUES +(4, 'Adithyan G', 'adithyan28g@gmail.com', '1999-01-27', 'BGA-15B-04, Bishop Gate, Tower St', '25448542', '$2b$12$JguTkeKOnFDtio.u.judkeqMClWJdtMjDqfdtpXoijvgFCs5ZPAz6'), +(11, 'Test User', 'testuser@example.com', '1990-01-01', '123 Test St', '1234567890', '$2b$12$kDcdyiH6AkkRTiFMpIyQJOKE8wyOlGfvmydLb3ee7D36TmkcXL/Ae'); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `vendors` +-- + +CREATE TABLE `vendors` ( + `id` int(11) NOT NULL, + `name` varchar(255) NOT NULL, + `description` text DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; + +-- +-- Indexes for dumped tables +-- + +-- +-- Indexes for table `bookings` +-- +ALTER TABLE `bookings` + ADD PRIMARY KEY (`id`), + ADD KEY `user_id` (`user_id`), + ADD KEY `service_id` (`service_id`); + +-- +-- Indexes for table `brands` +-- +ALTER TABLE `brands` + ADD PRIMARY KEY (`id`); + +-- +-- Indexes for table `carousel` +-- +ALTER TABLE `carousel` + ADD PRIMARY KEY (`id`), + ADD KEY `category_id` (`category_id`), + ADD KEY `brand_id` (`brand_id`); + +-- +-- Indexes for table `categories` +-- +ALTER TABLE `categories` + ADD PRIMARY KEY (`id`); + +-- +-- Indexes for table `offers` +-- +ALTER TABLE `offers` + ADD PRIMARY KEY (`id`), + ADD KEY `category_id` (`category_id`), + ADD KEY `brand_id` (`brand_id`); + +-- +-- Indexes for table `professionals` +-- +ALTER TABLE `professionals` + ADD PRIMARY KEY (`id`); + +-- +-- Indexes for table `purchases` +-- +ALTER TABLE `purchases` + ADD PRIMARY KEY (`id`), + ADD KEY `user_id` (`user_id`), + ADD KEY `tool_id` (`tool_id`); + +-- +-- Indexes for table `rentals` +-- +ALTER TABLE `rentals` + ADD PRIMARY KEY (`id`), + ADD KEY `tool_id` (`tool_id`), + ADD KEY `user_id` (`user_id`); + +-- +-- Indexes for table `rental_tools` +-- +ALTER TABLE `rental_tools` + ADD PRIMARY KEY (`id`), + ADD KEY `category_id` (`category_id`), + ADD KEY `brand_id` (`brand_id`); + +-- +-- Indexes for table `reviews` +-- +ALTER TABLE `reviews` + ADD PRIMARY KEY (`id`), + ADD KEY `tool_id` (`tool_id`); + +-- +-- Indexes for table `r_reviews` +-- +ALTER TABLE `r_reviews` + ADD PRIMARY KEY (`id`), + ADD KEY `rtool_id` (`rtool_id`); + +-- +-- Indexes for table `services` +-- +ALTER TABLE `services` + ADD PRIMARY KEY (`id`); + +-- +-- Indexes for table `service_requests` +-- +ALTER TABLE `service_requests` + ADD PRIMARY KEY (`id`), + ADD KEY `professional_id` (`professional_id`), + ADD KEY `booking_id` (`booking_id`); + +-- +-- Indexes for table `tools` +-- +ALTER TABLE `tools` + ADD PRIMARY KEY (`id`), + ADD KEY `category_id` (`category_id`), + ADD KEY `brand_id` (`brand_id`); + +-- +-- Indexes for table `users` +-- +ALTER TABLE `users` + ADD PRIMARY KEY (`user_id`), + ADD UNIQUE KEY `email_id` (`email_id`); + +-- +-- Indexes for table `vendors` +-- +ALTER TABLE `vendors` + ADD PRIMARY KEY (`id`); + +-- +-- AUTO_INCREMENT for dumped tables +-- + +-- +-- AUTO_INCREMENT for table `bookings` +-- +ALTER TABLE `bookings` + MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; + +-- +-- AUTO_INCREMENT for table `brands` +-- +ALTER TABLE `brands` + MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; + +-- +-- AUTO_INCREMENT for table `carousel` +-- +ALTER TABLE `carousel` + MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8; + +-- +-- AUTO_INCREMENT for table `categories` +-- +ALTER TABLE `categories` + MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; + +-- +-- AUTO_INCREMENT for table `offers` +-- +ALTER TABLE `offers` + MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; + +-- +-- AUTO_INCREMENT for table `professionals` +-- +ALTER TABLE `professionals` + MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; + +-- +-- AUTO_INCREMENT for table `purchases` +-- +ALTER TABLE `purchases` + MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; + +-- +-- AUTO_INCREMENT for table `rentals` +-- +ALTER TABLE `rentals` + MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; + +-- +-- AUTO_INCREMENT for table `rental_tools` +-- +ALTER TABLE `rental_tools` + MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8; + +-- +-- AUTO_INCREMENT for table `reviews` +-- +ALTER TABLE `reviews` + MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; + +-- +-- AUTO_INCREMENT for table `r_reviews` +-- +ALTER TABLE `r_reviews` + MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; + +-- +-- AUTO_INCREMENT for table `services` +-- +ALTER TABLE `services` + MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17; + +-- +-- AUTO_INCREMENT for table `service_requests` +-- +ALTER TABLE `service_requests` + MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; + +-- +-- AUTO_INCREMENT for table `tools` +-- +ALTER TABLE `tools` + MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; + +-- +-- AUTO_INCREMENT for table `users` +-- +ALTER TABLE `users` + MODIFY `user_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12; + +-- +-- AUTO_INCREMENT for table `vendors` +-- +ALTER TABLE `vendors` + MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; + +-- +-- Constraints for dumped tables +-- + +-- +-- Constraints for table `bookings` +-- +ALTER TABLE `bookings` + ADD CONSTRAINT `bookings_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`), + ADD CONSTRAINT `bookings_ibfk_2` FOREIGN KEY (`service_id`) REFERENCES `services` (`id`); + +-- +-- Constraints for table `carousel` +-- +ALTER TABLE `carousel` + ADD CONSTRAINT `carousel_ibfk_1` FOREIGN KEY (`category_id`) REFERENCES `categories` (`id`), + ADD CONSTRAINT `carousel_ibfk_2` FOREIGN KEY (`brand_id`) REFERENCES `brands` (`id`); + +-- +-- Constraints for table `offers` +-- +ALTER TABLE `offers` + ADD CONSTRAINT `offers_ibfk_1` FOREIGN KEY (`category_id`) REFERENCES `categories` (`id`), + ADD CONSTRAINT `offers_ibfk_2` FOREIGN KEY (`brand_id`) REFERENCES `brands` (`id`); + +-- +-- Constraints for table `purchases` +-- +ALTER TABLE `purchases` + ADD CONSTRAINT `purchases_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`), + ADD CONSTRAINT `purchases_ibfk_2` FOREIGN KEY (`tool_id`) REFERENCES `tools` (`id`); + +-- +-- Constraints for table `rentals` +-- +ALTER TABLE `rentals` + ADD CONSTRAINT `rentals_ibfk_1` FOREIGN KEY (`tool_id`) REFERENCES `tools` (`id`), + ADD CONSTRAINT `rentals_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`); + +-- +-- Constraints for table `rental_tools` +-- +ALTER TABLE `rental_tools` + ADD CONSTRAINT `rental_tools_ibfk_1` FOREIGN KEY (`category_id`) REFERENCES `categories` (`id`), + ADD CONSTRAINT `rental_tools_ibfk_2` FOREIGN KEY (`brand_id`) REFERENCES `brands` (`id`); + +-- +-- Constraints for table `reviews` +-- +ALTER TABLE `reviews` + ADD CONSTRAINT `reviews_ibfk_1` FOREIGN KEY (`tool_id`) REFERENCES `tools` (`id`); + +-- +-- Constraints for table `r_reviews` +-- +ALTER TABLE `r_reviews` + ADD CONSTRAINT `r_reviews_ibfk_1` FOREIGN KEY (`rtool_id`) REFERENCES `rental_tools` (`id`); + +-- +-- Constraints for table `service_requests` +-- +ALTER TABLE `service_requests` + ADD CONSTRAINT `service_requests_ibfk_1` FOREIGN KEY (`professional_id`) REFERENCES `professionals` (`id`), + ADD CONSTRAINT `service_requests_ibfk_2` FOREIGN KEY (`booking_id`) REFERENCES `bookings` (`id`); + +-- +-- Constraints for table `tools` +-- +ALTER TABLE `tools` + ADD CONSTRAINT `tools_ibfk_1` FOREIGN KEY (`category_id`) REFERENCES `categories` (`id`), + ADD CONSTRAINT `tools_ibfk_2` FOREIGN KEY (`brand_id`) REFERENCES `brands` (`id`); +COMMIT; + +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; diff --git a/ToolBox/static/Homepage.css b/ToolBox/static/Homepage.css new file mode 100644 index 0000000..710d9df --- /dev/null +++ b/ToolBox/static/Homepage.css @@ -0,0 +1,158 @@ +body { + background-color: #282C35; + color: white; +} + +.navbar-brand { + font-weight: bold; + color: white !important; +} + +.nav-item { + margin-left: 40px; +} + +.navbar-nav .nav-item .nav-link { + padding: 8px 10px; + color: white; + transition: color 0.3s; +} + +.navbar-nav .nav-item .nav-link:hover { + color: #28a745; +} + +.navbar-nav .nav-item .nav-link i { + font-size: 20px; + font-weight: bold; + color: white; + transition: color 0.3s; +} + +.navbar-nav .nav-item .nav-link:hover i { + color: #28a745; +} + +.navbar-nav .nav-item .dropdown-menu { + margin: 0; +} + +.navbar .form-control { + width: 300px; + +} + +.navbar .form-control + .btn { + margin-left: 5px; +} + +.navbar { + background-color: black; + height: 80px; +} + +.navbar .nav-link i { + font-size: 20px; + font-weight: bold; + color: white; +} + +.nav-item.dropdown:hover .dropdown-menu { + display: block; +} + +.dropdown-menu { + margin-top: 0; +} +.navbar-nav .dropdown-menu .dropdown-item { + color: white; + padding: 10px 20px; + transition: background-color 0.3s, color 0.3s; +} + +.navbar-nav .dropdown-menu .dropdown-item:hover { + background-color: #28a745; + color: white; + text-decoration: none; +} + +.navbar .dropdown-menu { + background-color: #282C35; + border: 1px solid #444; +} +.nav-link.logged-in { + color: green !important; + } + +.carousel { + margin-top: 15px; + padding-left: 10px; + padding-right: 10px; +} + +.carousel-item { + height: 400px; +} + +.carousel-control-prev, +.carousel-control-next { + top: 50%; + transform: translateY(-50%); + filter: invert(100%); +} + +.card-img-top { + height: 250px; +} + +.card-img { + height: 450px; + width: 700px; +} + +.card { + margin: 20px; + background-color: #282C35; + height: 550px; +} + +.card-body { + display: flex; + flex-direction: column; + justify-content: space-between; + height: 100%; +} + +.card-title { + color: white; + margin-bottom: auto; +} +.discount { + display: inline-block; + margin-bottom: -5px; + padding: 5px 10px; + max-width: 140px; + background-color: #007bff; + color: white; + font-size: 14px; + font-weight: bold; + border-radius: 5px; + text-transform: uppercase; +} + +.price { + margin-top: 5px; +} + + +.breadcrumb{ + background-color:transparent; + } + + table { + color: white; + } + th, td { + border: 1px solid #ffffff; + } + diff --git a/ToolBox/static/Item_Details.css b/ToolBox/static/Item_Details.css new file mode 100644 index 0000000..999e624 --- /dev/null +++ b/ToolBox/static/Item_Details.css @@ -0,0 +1,145 @@ +body { + background-color: #282C35; + color: white; +} + +.navbar-brand { + font-weight: bold; + color: white !important; +} + +.nav-item { + margin-left: 40px; +} + +.navbar-nav .nav-item .nav-link { + padding: 8px 10px; + color: white; + transition: color 0.3s; +} + +.navbar-nav .nav-item .nav-link:hover { + color: #28a745; +} + +.navbar-nav .nav-item .nav-link i { + font-size: 20px; + font-weight: bold; + color: white; + transition: color 0.3s; +} + +.navbar-nav .nav-item .nav-link:hover i { + color: #28a745; +} + +.navbar-nav .nav-item .dropdown-menu { + margin: 0; +} + +.navbar .form-control { + width: 300px; + +} + +.navbar .form-control + .btn { + margin-left: 5px; +} + +.navbar { + background-color: black; + height: 80px; +} + +.navbar .nav-link i { + font-size: 20px; + font-weight: bold; + color: white; +} + +.nav-item.dropdown:hover .dropdown-menu { + display: block; +} + +.dropdown-menu { + margin-top: 0; +} +.navbar-nav .dropdown-menu .dropdown-item { + color: white; + padding: 10px 20px; + transition: background-color 0.3s, color 0.3s; +} + +.navbar-nav .dropdown-menu .dropdown-item:hover { + background-color: #28a745; + color: white; + text-decoration: none; +} + +.navbar .dropdown-menu { + background-color: #282C35; + border: 1px solid #444; +} + + +.card-img-top { + height: 250px; +} + +.card-img { + height: 450px; + width: 700px; +} + +.card { + margin: 20px; + background-color: #282C35; + height: 550px; +} + +.card-body { + display: flex; + flex-direction: column; + justify-content: space-between; + height: 100%; +} + +.card-title { + color: white; + margin-bottom: auto; +} +.discount { + display: inline-block; + margin-bottom: -5px; + padding: 5px 10px; + max-width: 140px; + background-color: #007bff; + color: white; + font-size: 14px; + font-weight: bold; + border-radius: 5px; + text-transform: uppercase; +} + +.price { + margin-top: 5px; +} + + .stars { + display: inline-block; + font-size: 24px; + cursor: pointer; + } + + .stars .star { + color: #ccc; + } + + .stars .star.rated { + color: #ffcc00; + } + .breadcrumb{ + background-color:transparent; + } + + diff --git a/ToolBox/static/List.css b/ToolBox/static/List.css new file mode 100644 index 0000000..7036c8b --- /dev/null +++ b/ToolBox/static/List.css @@ -0,0 +1,268 @@ +body { + background-color: #282C35; + color: white; +} + +.navbar-brand { + font-weight: bold; + color: white !important; +} + +.nav-item { + margin-left: 40px; +} + +.navbar-nav .nav-item .nav-link { + padding: 8px 10px; + color: white; + transition: color 0.3s; +} + +.navbar-nav .nav-item .nav-link:hover { + color: #28a745; +} + +.navbar-nav .nav-item .nav-link i { + font-size: 20px; + font-weight: bold; + color: white; + transition: color 0.3s; +} + +.navbar-nav .nav-item .nav-link:hover i { + color: #28a745; +} + +.navbar-nav .nav-item .dropdown-menu { + margin: 0; +} + +.navbar .form-control { + width: 300px; + +} + +.navbar .form-control + .btn { + margin-left: 5px; +} + +.navbar { + background-color: black; + height: 80px; +} + +.navbar .nav-link i { + font-size: 20px; + font-weight: bold; + color: white; +} + +.nav-item.dropdown:hover .dropdown-menu { + display: block; +} + +.dropdown-menu { + margin-top: 0; +} +.navbar-nav .dropdown-menu .dropdown-item { + color: white; + padding: 10px 20px; + transition: background-color 0.3s, color 0.3s; +} + +.navbar-nav .dropdown-menu .dropdown-item:hover { + background-color: #28a745; + color: white; + text-decoration: none; +} + +.navbar .dropdown-menu { + background-color: #282C35; + border: 1px solid #444; +} + + +.card-img-top { + height: 250px; +} + +.card-img { + height: 450px; + width: 700px; +} + +.card { + + margin: 20px; + background-color: #282C35; + height: 550px; +} + +.card-body { + display: flex; + flex-direction: column; + justify-content: space-between; + height: 100%; +} + +.card-title { + color: white; + margin-bottom: auto; +} +.discount { + display: inline-block; + margin-bottom: -5px; + padding: 5px 10px; + max-width: 140px; + background-color: #007bff; + color: white; + font-size: 14px; + font-weight: bold; + border-radius: 5px; + text-transform: uppercase; +} + +.price { + margin-top: 5px; +} + + + + +body { + background-color: #282C35; + color: white; +} + +.navbar-brand { + font-weight: bold; + color: white !important; +} + +.nav-item { + margin-left: 40px; +} + +.navbar-nav .nav-item .nav-link { + padding: 8px 10px; + color: white; + transition: color 0.3s; +} + +.navbar-nav .nav-item .nav-link:hover { + color: #28a745; +} + +.navbar-nav .nav-item .nav-link i { + font-size: 20px; + font-weight: bold; + color: white; + transition: color 0.3s; +} + +.navbar-nav .nav-item .nav-link:hover i { + color: #28a745; +} + +.navbar-nav .nav-item .dropdown-menu { + margin: 0; +} + +.navbar .form-control { + width: 300px; + +} + +.navbar .form-control + .btn { + margin-left: 5px; +} + +.navbar { + background-color: black; + height: 80px; +} + +.navbar .nav-link i { + font-size: 20px; + font-weight: bold; + color: white; +} + +.nav-item.dropdown:hover .dropdown-menu { + display: block; +} + +.dropdown-menu { + margin-top: 0; +} +.navbar-nav .dropdown-menu .dropdown-item { + color: white; + padding: 10px 20px; + transition: background-color 0.3s, color 0.3s; +} + +.navbar-nav .dropdown-menu .dropdown-item:hover { + background-color: #28a745; + color: white; + text-decoration: none; +} + +.navbar .dropdown-menu { + background-color: #282C35; + border: 1px solid #444; +} + + +.card-img-top { + height: 250px; +} + +.card-img { + height: 450px; + width: 700px; +} + +.card { + + margin: 20px; + background-color: #282C35; + height: 550px; +} + +.card-body { + display: flex; + flex-direction: column; + justify-content: space-between; + height: 100%; +} + +.card-title { + color: white; + margin-bottom: auto; +} +.discount { + display: inline-block; + margin-bottom: -5px; + padding: 5px 10px; + max-width: 140px; + background-color: #007bff; + color: white; + font-size: 14px; + font-weight: bold; + border-radius: 5px; + text-transform: uppercase; +} + +.price { + margin-top: 5px; +} + +.col +{ +margin-right:60px; +} + + +.breadcrumb{ +background-color: transparent; +} \ No newline at end of file diff --git a/ToolBox/static/Login.css b/ToolBox/static/Login.css new file mode 100644 index 0000000..98a89a8 --- /dev/null +++ b/ToolBox/static/Login.css @@ -0,0 +1,182 @@ +body { + margin: 0; + padding: 0; + background-color:#282C35; + + background-size: cover; + background-repeat: no-repeat; + background-position: center; + color: white; +} + +.container { + display: flex; + justify-content: center; + align-items: center; + height: 100vh; +} + +body { + background-color: #282C35; + color: white; +} + + + +.form-inline { + display: flex; + align-items: center; +} + +.form-control { + + background-color: transparent; + color: white; + border-radius: 20px; + border: 1px solid white; + padding: 5px 10px; + margin-top:19px; +} + +.form-control::placeholder { + color: white; +} + +.form-control:focus { + background-color: rgba(255, 255, 255, 0.1); + color: white; + outline: none; + border-color: rgba(255, 255, 255, 0.5); +} + + +.input-group-append { + margin-left: -40px; +} + +.btn { + color: white; + background-color: transparent; + border: none; + cursor: pointer; +} + +.btn:hover { + opacity: 0.8; +} +.transparent-box { + background-color: rgba(0, 0, 0, 0.8); + padding: 30px; + border-radius: 10px; + max-width: 400px; + width: 100%; +} + + +.form-control { + background-color: rgba(255, 255, 255, 0.1); + color: white; + border: none; + border-radius: 5px; + padding: 10px; + box-shadow: 0 0 5px rgba(255, 255, 255, 0.5); + margin-bottom: 20px; +} + + +.form-control:focus { + background-color: rgba(255, 255, 255, 0.2); + border-color: rgba(255, 255, 255, 0.2); +} + + +.form-control::placeholder { + color: white; +} + + +.form-control:focus, +.form-control:not(:placeholder-shown) { + color: white; +} + + +.btn-primary { + background-color: black; + border-color: black; +} + + +.btn-primary:hover { + background-color: #282C35; + border-color: #282C35; +} + + +.btn-below-message { + background-color: black; + border-color: black; + margin-top: auto; +} + +.btn-below-message:hover { + background-color: #282C35; + border-color: #282C35; + +} + + +.btn-block { + margin-left: auto; + margin-right: auto; + display: block; +} +.header { + position: absolute; + top: 0; + left: 0; + padding: 20px; + color: #282C35; + font-size: 18px; + font-weight: bold; +} + +.logo { + margin: 0; + padding: 0; +} + +.blue { + color: blue; +} +.gradient-text { + background:linear-gradient(147deg, #000000 0%, #04619f 74%); + + + + + +} + + +.navbar-brand { + font-weight: bold; + color: white; +} + + +.navbar { + background-color:Black; + height: 80px; +} + +.navbar .nav-link i { + font-size: 20px; + font-weight: bold; +} +.nav-item.dropdown:hover .dropdown-menu { + display: block; +} +.dropdown-menu { + margin-top: 0; +} \ No newline at end of file diff --git a/ToolBox/static/Registration.css b/ToolBox/static/Registration.css new file mode 100644 index 0000000..eabe343 --- /dev/null +++ b/ToolBox/static/Registration.css @@ -0,0 +1,120 @@ +body { + margin: 0; /* Remove default body margin */ + padding: 0; /* Remove default body padding */ + background-color: #282C35; /* Fallback color in case the background image doesn't load */ + /* Replace 'background-image.jpg' with the path to your desired image */ + background-size: cover; + background-repeat: no-repeat; + background-position: center; + color: white; /* Text color for better contrast with the background image */ +} + +.container { + display: flex; + justify-content: center; + align-items: center; + height: 105vh; + +} +.transparent-box { + background-color: rgba(0, 0, 0, 0.8); /* Darker transparent box */ + padding: 30px; + border-radius: 10px; + width: 500px; +} + + +.input-group-append { + margin-left: -40px; +} + +.btn { + color: white; + background-color: transparent; + border: none; + cursor: pointer; +} + +.btn:hover { + opacity: 0.8; +} + +/* Adjust the textbox styles */ +.form-control { + background-color: rgba(255, 255, 255, 0.1); /* Lighter black for the text box */ + color: white; /* Text color */ + border: none; /* Remove border */ + border-radius: 5px; /* Add border-radius */ + padding: 10px; /* Add padding */ + box-shadow: 0 0 5px rgba(255, 255, 255, 0.5); /* Add shadow */ +} + +/* Change text box color when clicked */ +.form-control:focus { + background-color: rgba(255, 255, 255, 0.2); /* Lighter black when clicked */ + border-color: rgba(255, 255, 255, 0.2); /* Matching border color */ +} + +/* Placeholder color */ +.form-control::placeholder { + color: white; /* White placeholder color */ +} + +/* Change the color of text entered by the user */ +.form-control:focus, +.form-control:not(:placeholder-shown) { + color: white; /* White text color */ +} + + + +/* Change the button color to black */ +.btn-primary { + background-color: black; + border-color: black; +} + +/* Change button hover color */ +.btn-primary:hover { + background-color: #282C35; + border-color: #282C35; /* Matching border color */ +} + + +.form-check-input:checked { + background-color: black; +} +.header { + position: absolute; + top: 0; + left: 0; + padding: 20px; + color: #282C35; + font-size: 18px; + font-weight: bold; +} + +.navbar-brand { + font-weight: bold; + color: white; +} + + +.navbar { + background-color:Black; + height: 80px; +} + +.navbar .nav-link i { + font-size: 20px; + font-weight: bold; +} +.nav-item.dropdown:hover .dropdown-menu { + display: block; +} +.dropdown-menu { + margin-top: 0; +} + + + diff --git a/ToolBox/static/Service_booking.css b/ToolBox/static/Service_booking.css new file mode 100644 index 0000000..47e114b --- /dev/null +++ b/ToolBox/static/Service_booking.css @@ -0,0 +1,112 @@ +body { + background-color: #282C35; + color: white; +} + +.navbar-brand { + font-weight: bold; + color: white !important; +} + +.nav-item { + margin-left: 40px; +} + +.navbar-nav .nav-item .nav-link { + padding: 8px 10px; + color: white; + transition: color 0.3s; +} + +.navbar-nav .nav-item .nav-link:hover { + color: #28a745; +} + +.navbar-nav .nav-item .nav-link i { + font-size: 20px; + font-weight: bold; + color: white; + transition: color 0.3s; +} + +.navbar-nav .nav-item .nav-link:hover i { + color: #28a745; +} + +.navbar-nav .nav-item .dropdown-menu { + margin: 0; +} + +.navbar .form-control { + width: 300px; + +} + +.navbar .form-control + .btn { + margin-left: 5px; +} + +.navbar { + background-color: black; + height: 80px; +} + +.navbar .nav-link i { + font-size: 20px; + font-weight: bold; + color: white; +} + +.nav-item.dropdown:hover .dropdown-menu { + display: block; +} + +.dropdown-menu { + margin-top: 0; +} +.navbar-nav .dropdown-menu .dropdown-item { + color: white; + padding: 10px 20px; + transition: background-color 0.3s, color 0.3s; +} + +.navbar-nav .dropdown-menu .dropdown-item:hover { + background-color: #28a745; + color: white; + text-decoration: none; +} + +.navbar .dropdown-menu { + background-color: #282C35; + border: 1px solid #444; +} + + + .book-body { + max-width: 500px; + margin-top: 30px; + margin-bottom: 30px; + background-color:transparent; + padding: 30px; + border-radius: 8px; + box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); + } + .form-group{ + padding-left: 30px; + margin: 20px; + } + .form-control{ + width: 350px; + } + .form-group label { + font-weight: bold; + } + .book-btn{ + + width: 250px; + margin-left: 85px; + + } + + .breadcrumb{ + background-color:transparent; \ No newline at end of file diff --git a/ToolBox/static/Services.css b/ToolBox/static/Services.css new file mode 100644 index 0000000..660d13a --- /dev/null +++ b/ToolBox/static/Services.css @@ -0,0 +1,139 @@ +body { + background-color: #282C35; + color: white; +} + +.navbar-brand { + font-weight: bold; + color: white !important; +} + +.nav-item { + margin-left: 40px; +} + +.navbar-nav .nav-item .nav-link { + padding: 8px 10px; + color: white; + transition: color 0.3s; +} + +.navbar-nav .nav-item .nav-link:hover { + color: #28a745; +} + +.navbar-nav .nav-item .nav-link i { + font-size: 20px; + font-weight: bold; + color: white; + transition: color 0.3s; +} + +.navbar-nav .nav-item .nav-link:hover i { + color: #28a745; +} + +.navbar-nav .nav-item .dropdown-menu { + margin: 0; +} + +.navbar .form-control { + width: 300px; + +} + +.navbar .form-control + .btn { + margin-left: 5px; +} + +.navbar { + background-color: black; + height: 80px; +} + +.navbar .nav-link i { + font-size: 20px; + font-weight: bold; + color: white; +} + +.nav-item.dropdown:hover .dropdown-menu { + display: block; +} + +.dropdown-menu { + margin-top: 0; +} +.navbar-nav .dropdown-menu .dropdown-item { + color: white; + padding: 10px 20px; + transition: background-color 0.3s, color 0.3s; +} + +.navbar-nav .dropdown-menu .dropdown-item:hover { + background-color: #28a745; + color: white; + text-decoration: none; +} + +.navbar .dropdown-menu { + background-color: #282C35; + border: 1px solid #444; +} + + + + + + + + + + +.card { + position: relative; + overflow: hidden; + border: 1px solid #ddd; + border-radius: 0.5rem; + transition: box-shadow 0.3s ease; + background-color:transparent; + } + + .card:hover { + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); + } + + .card-body { + position: relative; + z-index: 1; + text-align: center; + color:white; + } + + .description { + display: none; + position: absolute; + bottom: 0; + left: 0; + width: 100%; + background-color: rgba(0, 0, 0, 0.7); + + text-align: center; + padding: 1rem; + box-sizing: border-box; + transition: opacity 0.3s ease; + opacity: 0; + } + + .card:hover .description { + display: block; + opacity: 1; + } + + .card-icon { + font-size: 3rem; + margin-bottom: 1rem; + + } + .breadcrumb{ + background-color:transparent; \ No newline at end of file diff --git a/ToolBox/static/admin.css b/ToolBox/static/admin.css new file mode 100644 index 0000000..3b32aeb --- /dev/null +++ b/ToolBox/static/admin.css @@ -0,0 +1,8 @@ + body { + background-color: #282C35; + color: #ffffff; + } + .card { + background-color: #343a40; + } + \ No newline at end of file diff --git a/ToolBox/static/cart.css b/ToolBox/static/cart.css new file mode 100644 index 0000000..9ecf647 --- /dev/null +++ b/ToolBox/static/cart.css @@ -0,0 +1,71 @@ +body { + background-color: #282C35; + color: white; +} +.breadcrumb{ + background-color:transparent; + } + + table { + color: white; + } + th, td { + border: 1px solid #ffffff; + } + .navbar-brand { + font-weight: bold; + color: white !important; +} + +.nav-item { + margin-left: 40px; +} + +.navbar-nav .nav-item .nav-link { + padding: 8px 10px; + color: white; + transition: color 0.3s; +} + +.navbar-nav .nav-item .nav-link:hover { + color: #28a745; +} + +.navbar-nav .nav-item .nav-link i { + font-size: 20px; + font-weight: bold; + color: white; + transition: color 0.3s; +} + +.navbar-nav .nav-item .nav-link:hover i { + color: #28a745; +} + +.navbar-nav .nav-item .dropdown-menu { + margin: 0; +} + +.navbar .form-control { + width: 300px; + +} + +.navbar .form-control + .btn { + margin-left: 5px; +} + +.navbar { + background-color: black; + height: 80px; +} + th, td { + color: white; + border: 1px solid #ffffff; + } + th { + background-color: #495057; + } + tr:nth-child(even) { + background-color: #495057; + } \ No newline at end of file diff --git a/ToolBox/static/rent.css b/ToolBox/static/rent.css new file mode 100644 index 0000000..0be77ff --- /dev/null +++ b/ToolBox/static/rent.css @@ -0,0 +1,271 @@ +body { + background-color: #282C35; + color: white; +} + +.navbar-brand { + font-weight: bold; + color: white !important; +} + +.nav-item { + margin-left: 40px; +} + +.navbar-nav .nav-item .nav-link { + padding: 8px 10px; + color: white; + transition: color 0.3s; +} + +.navbar-nav .nav-item .nav-link:hover { + color: #28a745; +} + +.navbar-nav .nav-item .nav-link i { + font-size: 20px; + font-weight: bold; + color: white; + transition: color 0.3s; +} + +.navbar-nav .nav-item .nav-link:hover i { + color: #28a745; +} + +.navbar-nav .nav-item .dropdown-menu { + margin: 0; +} + +.navbar .form-control { + width: 300px; + +} + +.navbar .form-control + .btn { + margin-left: 5px; +} + +.navbar { + background-color: black; + height: 80px; +} + +.navbar .nav-link i { + font-size: 20px; + font-weight: bold; + color: white; +} + +.nav-item.dropdown:hover .dropdown-menu { + display: block; +} + +.dropdown-menu { + margin-top: 0; +} +.navbar-nav .dropdown-menu .dropdown-item { + color: white; + padding: 10px 20px; + transition: background-color 0.3s, color 0.3s; +} + +.navbar-nav .dropdown-menu .dropdown-item:hover { + background-color: #28a745; + color: white; + text-decoration: none; +} + +.navbar .dropdown-menu { + background-color: #282C35; + border: 1px solid #444; +} + + +.card-img-top { + height: 250px; +} + +.card-img { + height: 450px; + width: 700px; +} + +.card { + + margin: 20px; + background-color: #282C35; + height: 550px; +} + +.card-body { + display: flex; + flex-direction: column; + justify-content: space-between; + height: 100%; +} + +.card-title { + color: white; + margin-bottom: auto; +} +.discount { + display: inline-block; + margin-bottom: -5px; + padding: 5px 10px; + max-width: 140px; + background-color: #007bff; + color: white; + font-size: 14px; + font-weight: bold; + border-radius: 5px; + text-transform: uppercase; +} + +.price { + margin-top: 5px; +} + + + + +body { + background-color: #282C35; + color: white; +} + +.navbar-brand { + font-weight: bold; + color: white !important; +} + +.nav-item { + margin-left: 40px; +} + +.navbar-nav .nav-item .nav-link { + padding: 8px 10px; + color: white; + transition: color 0.3s; +} + +.navbar-nav .nav-item .nav-link:hover { + color: #28a745; +} + +.navbar-nav .nav-item .nav-link i { + font-size: 20px; + font-weight: bold; + color: white; + transition: color 0.3s; +} + +.navbar-nav .nav-item .nav-link:hover i { + color: #28a745; +} + +.navbar-nav .nav-item .dropdown-menu { + margin: 0; +} + +.navbar .form-control { + width: 300px; + +} + +.navbar .form-control + .btn { + margin-left: 5px; +} + +.navbar { + background-color: black; + height: 80px; +} + +.navbar .nav-link i { + font-size: 20px; + font-weight: bold; + color: white; +} + +.nav-item.dropdown:hover .dropdown-menu { + display: block; +} + +.dropdown-menu { + margin-top: 0; +} +.navbar-nav .dropdown-menu .dropdown-item { + color: white; + padding: 10px 20px; + transition: background-color 0.3s, color 0.3s; +} + +.navbar-nav .dropdown-menu .dropdown-item:hover { + background-color: #28a745; + color: white; + text-decoration: none; +} + +.navbar .dropdown-menu { + background-color: #282C35; + border: 1px solid #444; +} + + +.card-img-top { + height: 250px; +} + +.card-img { + height: 450px; + width: 700px; +} + +.card { + + margin: 20px; + background-color: #282C35; + height: 550px; +} + +.card-body { + display: flex; + flex-direction: column; + justify-content: space-between; + height: 100%; +} + +.card-title { + color: white; + margin-bottom: auto; +} +.discount { + display: inline-block; + margin-bottom: -5px; + padding: 5px 10px; + max-width: 140px; + background-color: #007bff; + color: white; + font-size: 14px; + font-weight: bold; + border-radius: 5px; + text-transform: uppercase; +} + +.price { + margin-top: 5px; +} + +.col +{ +margin-right:60px; +} + + + + + +.breadcrumb{ +background-color: transparent; +} \ No newline at end of file diff --git a/ToolBox/static/rent_booking.css b/ToolBox/static/rent_booking.css new file mode 100644 index 0000000..31daa99 --- /dev/null +++ b/ToolBox/static/rent_booking.css @@ -0,0 +1,157 @@ +body { + background-color: #282C35; + color: white; +} + +.navbar-brand { + font-weight: bold; + color: white !important; +} + +.nav-item { + margin-left: 40px; +} + +.navbar-nav .nav-item .nav-link { + padding: 8px 10px; + color: white; + transition: color 0.3s; +} + +.navbar-nav .nav-item .nav-link:hover { + color: #28a745; +} + +.navbar-nav .nav-item .nav-link i { + font-size: 20px; + font-weight: bold; + color: white; + transition: color 0.3s; +} + +.navbar-nav .nav-item .nav-link:hover i { + color: #28a745; +} + +.navbar-nav .nav-item .dropdown-menu { + margin: 0; +} + +.navbar .form-control { + width: 300px; + +} + +.navbar .form-control + .btn { + margin-left: 5px; +} + +.navbar { + background-color: black; + height: 80px; +} + +.navbar .nav-link i { + font-size: 20px; + font-weight: bold; + color: white; +} + +.nav-item.dropdown:hover .dropdown-menu { + display: block; +} + +.dropdown-menu { + margin-top: 0; +} +.navbar-nav .dropdown-menu .dropdown-item { + color: white; + padding: 10px 20px; + transition: background-color 0.3s, color 0.3s; +} + +.navbar-nav .dropdown-menu .dropdown-item:hover { + background-color: #28a745; + color: white; + text-decoration: none; +} + +.navbar .dropdown-menu { + background-color: #282C35; + border: 1px solid #444; +} + + +.card-img-top { + height: 250px; +} + +.card-img { + height: 450px; + width: 700px; +} + +.card { + margin: 20px; + background-color: #282C35; + height: 550px; +} + +.card-body { + display: flex; + flex-direction: column; + justify-content: space-between; + height: 100%; +} + +.card-title { + color: white; + margin-bottom: auto; +} +.discount { + display: inline-block; + margin-bottom: -5px; + padding: 5px 10px; + max-width: 140px; + background-color: #007bff; + color: white; + font-size: 14px; + font-weight: bold; + border-radius: 5px; + text-transform: uppercase; +} + +.price { + margin-top: 5px; + margin-bottom: 20px; +} + + .stars { + display: flex; + direction: row; + font-size: 25px; +} + +.star { + cursor: pointer; + color: #ccc; +} + +.star.selected { + color: #ffc107; +} + + .breadcrumb{ + background-color:transparent; + } + .modal-content { + background-color: #282C35; + color: #FFFFFF; + } + .modal-header { + border-bottom: 1px solid #444; + } + .modal-footer { + border-top: 1px solid #444; + } + diff --git a/ToolBox/templates/Admin.html b/ToolBox/templates/Admin.html new file mode 100644 index 0000000..7c18669 --- /dev/null +++ b/ToolBox/templates/Admin.html @@ -0,0 +1,59 @@ + + + + + + Admin Dashboard + + + + + +
+

Admin Dashboard

+ + +
+

Carousel Items

+ Add Carousel Item +
+ {% for item in carousel %} +
+
+ Carousel Image +
+
+ +
+
+
+
+ {% endfor %} +
+
+ + +
+

Offers

+ Add Offer +
+ {% for offer in offers %} +
+
+ Offer Image +
+
+ +
+
+
+
+ {% endfor %} +
+
+
+ + + + + diff --git a/ToolBox/templates/Admin_add.html b/ToolBox/templates/Admin_add.html new file mode 100644 index 0000000..987d86e --- /dev/null +++ b/ToolBox/templates/Admin_add.html @@ -0,0 +1,73 @@ + + + + + + Add Carousel Item / Offer + + + + + +
+

Add Carousel Item

+
+
+ + +
+
+ + +
+
+ + +
+ +
+ +
+ +

Add Offer

+
+
+ + +
+
+ + +
+
+ + +
+ +
+
+ + + + + diff --git a/ToolBox/templates/Homepage.html b/ToolBox/templates/Homepage.html new file mode 100644 index 0000000..8ae3f33 --- /dev/null +++ b/ToolBox/templates/Homepage.html @@ -0,0 +1,164 @@ + + + + + + ToolBox | Home + + + + + + + + + + +
+ +
+ + + +
+ {% for tool in tools %} +
+
+ ... +
+
{{ tool[1] }}
+ {{ tool[2] }} % off +
£ {{ tool[3] }}
+ Add to Basket +
+
+
+ {% endfor %} +
+ + +
+ {% for offer in offers %} +
+
+ ... +
+
+ {% endfor %} +
+ + +
+
+
+ + + + + + +
+
+ +
+ © 2023 Copyright: + toolbox.com +
+
+ + + + + + diff --git a/ToolBox/templates/Item_details.html b/ToolBox/templates/Item_details.html new file mode 100644 index 0000000..89cd642 --- /dev/null +++ b/ToolBox/templates/Item_details.html @@ -0,0 +1,200 @@ + + + + + + ToolBox | Item Details + + + + + + + + +
+
+ +
+ Tool Image +
+
+

{{ tool[1] }}

+

Rating: {{ tool[5] }}/5

+

{{ tool[2] }}% off

+

£ {{ tool[3] }}

+ +
+
+ +
+ + +
+
+

Specifications

+

{{ tool[6] }}

+
+
+ +
+ + + +
+
+

Customer Reviews

+ + {% for review in reviews %} +
+

{{ review[0] }}

+

Rating: {{ review[1] }}/5

+

{{ review[2] }}

+
+ {% endfor %} + + +
+
+
+ + +
+
+ + + +
+ + + + + +
+
+
+ + +
+ +
+
+
+ +
+ +
+
+
+ + + + + + +
+
+ +
+ © 2023 Copyright: + toolbox.com +
+
+ + + + + + + diff --git a/ToolBox/templates/List.html b/ToolBox/templates/List.html new file mode 100644 index 0000000..fac59c3 --- /dev/null +++ b/ToolBox/templates/List.html @@ -0,0 +1,156 @@ + + + + + + ToolBox | List + + + + + + + + +
+
+ {% for tool in tools %} +
+
+ + ... + +
+
+ {{ tool[1] }} +
+ {{ tool[2] }} % off +
£ {{ tool[3] }}
+ View Details +
+
+
+ {% endfor %} +
+ + + +
+ + +
+
+
+ + + + + + +
+
+ +
+ © 2023 Copyright: + toolbox.com +
+
+ + + + + + diff --git a/ToolBox/templates/Login.html b/ToolBox/templates/Login.html new file mode 100644 index 0000000..8315ea9 --- /dev/null +++ b/ToolBox/templates/Login.html @@ -0,0 +1,36 @@ + + + + + + ToolBox | Login + + + + + +
+
+

Login

+

Please Enter Your Login Details

+
+
+ +
+
+ +
+ + +
+

Don't have an account yet? Register Account.

+
+
+ + diff --git a/ToolBox/templates/Professional.html b/ToolBox/templates/Professional.html new file mode 100644 index 0000000..45ac3ae --- /dev/null +++ b/ToolBox/templates/Professional.html @@ -0,0 +1,57 @@ + + + + + + Professional Dashboard + + + + + +
+

Professional Dashboard

+ + +
+
Service Requests
+
+ +
+
+ + + + +
+ + + + + diff --git a/ToolBox/templates/Registration.html b/ToolBox/templates/Registration.html new file mode 100644 index 0000000..963174a --- /dev/null +++ b/ToolBox/templates/Registration.html @@ -0,0 +1,87 @@ + + + + + + ToolBox|Registration + + + + + +
+ +
+

Register

+

Hello Customer, Enter your details here.

+
+
+ +
+
+ +
+ +
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ + +
+

or Have an Account? Login

+
+ +
+
+ + + + + + + diff --git a/ToolBox/templates/Service_booking.html b/ToolBox/templates/Service_booking.html new file mode 100644 index 0000000..04c70a8 --- /dev/null +++ b/ToolBox/templates/Service_booking.html @@ -0,0 +1,131 @@ + + + + + + ToolBox | Book Appointment + + + + + + + + + +
+

Book an Appointment for {{ service }}

+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+ +
+
+ +
+
+
+ + + + + + +
+
+ +
+ © 2023 Copyright: + toolbox.com +
+
+ + + + + diff --git a/ToolBox/templates/Services.html b/ToolBox/templates/Services.html new file mode 100644 index 0000000..3396d56 --- /dev/null +++ b/ToolBox/templates/Services.html @@ -0,0 +1,117 @@ + + + + + + ToolBox | Services + + + + + + + + + +
+ {% for service in services %} + + {% endfor %} +
+ + + + +
+
+
+ + + + + + +
+
+ +
+ © 2023 Copyright: + toolbox.com +
+
+ + + + + + diff --git a/ToolBox/templates/Vendor.html b/ToolBox/templates/Vendor.html new file mode 100644 index 0000000..c7b14df --- /dev/null +++ b/ToolBox/templates/Vendor.html @@ -0,0 +1,68 @@ + + + + + + Vendor Dashboard + + + + + +
+

Vendor Dashboard

+ + +
+
Manage Items
+
+ + +
+
+
+ + + + + + + + diff --git a/ToolBox/templates/cart.html b/ToolBox/templates/cart.html new file mode 100644 index 0000000..f6e9d68 --- /dev/null +++ b/ToolBox/templates/cart.html @@ -0,0 +1,107 @@ + + + + + + Your Cart | ToolBox + + + + + + + +
+ + +

Rental History

+ {% if rentals %} + + + + + + + + + + + {% for rental in rentals %} + + + + + + + {% endfor %} + +
Tool IDNameRental DateReturn Date
{{ rental[1] }}{{ rental[3] }}{{ rental[7] }}{{ rental[8] }}
+ {% else %} +

No rental history found.

+ {% endif %} + +

Service Bookings

+ {% if service_bookings %} + + + + + + + + + + + {% for booking in service_bookings %} + + + + + + + {% endfor %} + +
Service IDNameAppointment DateAppointment Time
{{ booking[1] }}{{ booking[3] }}{{ booking[8] }}{{ booking[9] }}
+ {% else %} +

No service bookings found.

+ {% endif %} + +

Purchase History

+ {% if purchases %} + + + + + + + + + + {% for purchase in purchases %} + + + + + + {% endfor %} + +
Purchase IDTool IDPurchase Date
{{ purchase[0] }}{{ purchase[1] }}{{ purchase[3] }}
+ {% else %} +

No purchase history found.

+ {% endif %} +
+ + + + + diff --git a/ToolBox/templates/rent.html b/ToolBox/templates/rent.html new file mode 100644 index 0000000..789cf13 --- /dev/null +++ b/ToolBox/templates/rent.html @@ -0,0 +1,184 @@ + + + + + + ToolBox | Rent + + + + + + + + +
+ +
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+
+ +
+ {% for rental_tool in rental_tools %} +
+
+ + Tool image + +
+
+ {{ rental_tool[1] }} +
+ {{ rental_tool[2] }}% off +
£{{ rental_tool[3] }} per day
+ Rent Now +
+
+
+ {% endfor %} +
+ + + +
+ +
+
+
+ + + + + + +
+
+ +
+ © 2023 ToolBox. All rights reserved. +
+
+ + + + + + diff --git a/ToolBox/templates/rental_booking.html b/ToolBox/templates/rental_booking.html new file mode 100644 index 0000000..0523042 --- /dev/null +++ b/ToolBox/templates/rental_booking.html @@ -0,0 +1,220 @@ + + + + + + ToolBox | Rent Details + + + + + + + + +
+
+
+ Tool Image +
+
+

{{ rental_tool[1] }}

+

Rating: {{ rental_tool[5] }}/5

+

{{ rental_tool[2] }}% off

+

£ {{ rental_tool[3] }} per day

+ +
+
+ +
+ +
+
+

Specifications

+

{{ rental_tool[6] }}

+
+
+ +
+ +
+
+

Customer Reviews

+ {% for review in reviews %} +
+

{{ review[0] }}

+

Rating: {{ review[1] }}/5

+

{{ review[2] }}

+
+ {% endfor %} +
+
+
+ + +
+
+ + +
+ + + + + +
+
+
+ + +
+ +
+
+
+
+ + + + +
+
+
+ + + + + + +
+
+

ToolBox - A One-Stop Shop for All Your Tool Needs.

+
+
+
+ © 2024 ToolBox +
+
+ + + + + +