diff --git a/admin/login.php b/admin/login.php new file mode 100644 index 0000000..297fcc3 --- /dev/null +++ b/admin/login.php @@ -0,0 +1,71 @@ +prepare('SELECT * FROM users WHERE username = ?'); + $stmt->execute([$username]); + $user = $stmt->fetch(); + + if ($user && password_verify($password, $user['password'])) { + $_SESSION['user_id'] = $user['id']; + header('Location: orders.php'); + exit; + } else { + $error_message = 'Invalid username or password.'; + } + } catch (PDOException $e) { + $error_message = 'Database error: ' . $e->getMessage(); + } + } +} +?> + + + + + + Admin - Login + + + +
+
+
+
+
+

Admin Login

+
+
+ +
+ +
+
+ + +
+
+ + +
+
+ +
+
+
+
+
+
+
+ + diff --git a/admin/logout.php b/admin/logout.php new file mode 100644 index 0000000..95db42c --- /dev/null +++ b/admin/logout.php @@ -0,0 +1,6 @@ +query('SELECT * FROM orders ORDER BY order_date DESC'); + $orders = $stmt->fetchAll(PDO::FETCH_ASSOC); +} catch (PDOException $e) { + die("Could not fetch orders: " . $e->getMessage()); +} +?> + + + + + + Admin - Orders + + + +
+
+

Orders

+ Logout +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
IDCompany NameContact PersonEmailPhoneQuantityDelivery AddressOrder DateStatus
No orders found.
+
+ + + +
+
+
+ + diff --git a/admin/update_order_status.php b/admin/update_order_status.php new file mode 100644 index 0000000..93c7be3 --- /dev/null +++ b/admin/update_order_status.php @@ -0,0 +1,24 @@ +prepare('UPDATE orders SET status = ? WHERE id = ?'); + $stmt->execute([$status, $order_id]); + } catch (PDOException $e) { + die("Could not update order status: " . $e->getMessage()); + } + } + } +} + +header('Location: orders.php'); +exit; diff --git a/assets/css/custom.css b/assets/css/custom.css new file mode 100644 index 0000000..45c686f --- /dev/null +++ b/assets/css/custom.css @@ -0,0 +1,147 @@ +body { + font-family: 'Poppins', sans-serif; +} + +h1, h2, h3, h4, h5, h6 { + font-family: 'Montserrat', sans-serif; + font-weight: 700; +} + +.hero-section { + min-height: 90vh; + background-size: cover; + background-position: center; + position: relative; + color: #ffffff; +} + +.hero-section::before { + content: ''; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + background: rgba(0, 0, 0, 0.5); + z-index: 1; +} + +.hero-section .container { + position: relative; + z-index: 2; +} + +.hero-section h1 { + color: #f8f9fa; +} + +.hero-section p { + color: #e9ecef; +} + +.hero-section .display-4 { + animation: fadeInDown 1s ease-in-out; +} + +.btn-primary { + transition: all 0.3s ease; +} + +.btn-primary:hover { + transform: scale(1.05); +} + +.navbar { + transition: background-color 0.3s ease-in-out; +} + + + +.nav-link { + transition: color 0.3s; +} + + +.navbar-brand, +.nav-link { + color: #ffffff !important; /* White for the brand and nav links */ +} + +.nav-link:hover, +.nav-link:focus { + color: #cccccc !important; /* Lighter grey for hover/focus */ +} + + +footer a { + transition: color 0.3s; +} + +footer a:hover { + text-decoration: none; +} + +section { + padding: 80px 0; + opacity: 0; + transform: translateY(20px); + transition: opacity 0.6s ease-out, transform 0.6s ease-out; +} + +section.visible { + opacity: 1; + transform: translateY(0); +} + +.card { + border: none; + border-radius: 15px; + box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); + transition: all 0.3s ease; +} + +.card:hover { + transform: translateY(-10px); + box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2); +} + +#products .card img { + transition: transform 0.3s ease; +} + +#products .card:hover img { + transform: scale(1.05); +} + +#scroll-to-top { + position: fixed; + bottom: 20px; + right: 20px; + display: none; + width: 40px; + height: 40px; + border-radius: 50%; + background-color: #007bff; + color: white; + text-align: center; + line-height: 40px; + font-size: 20px; + transition: all 0.3s; + z-index: 1000; +} + +#scroll-to-top:hover { + background-color: #0056b3; + transform: scale(1.1); +} + +@keyframes fadeInDown { + from { + opacity: 0; + transform: translateY(-20px); + } + to { + opacity: 1; + transform: translateY(0); + } +} \ No newline at end of file diff --git a/assets/images/hero-background.jpg b/assets/images/hero-background.jpg new file mode 100644 index 0000000..4434aac Binary files /dev/null and b/assets/images/hero-background.jpg differ diff --git a/assets/images/product1.jpg b/assets/images/product1.jpg new file mode 100644 index 0000000..9f5a541 Binary files /dev/null and b/assets/images/product1.jpg differ diff --git a/assets/images/product2.jpg b/assets/images/product2.jpg new file mode 100644 index 0000000..a56c2e4 Binary files /dev/null and b/assets/images/product2.jpg differ diff --git a/assets/images/product3.jpg b/assets/images/product3.jpg new file mode 100644 index 0000000..d84f034 Binary files /dev/null and b/assets/images/product3.jpg differ diff --git a/assets/images/product4.jpg b/assets/images/product4.jpg new file mode 100644 index 0000000..e3b6ed5 Binary files /dev/null and b/assets/images/product4.jpg differ diff --git a/assets/js/main.js b/assets/js/main.js new file mode 100644 index 0000000..e57fb63 --- /dev/null +++ b/assets/js/main.js @@ -0,0 +1,95 @@ + +// Custom JavaScript for TPS Petroleums LLP + +document.addEventListener('DOMContentLoaded', function () { + // Smooth scrolling for anchor links + document.querySelectorAll('a[href^="#"]').forEach(anchor => { + anchor.addEventListener('click', function (e) { + e.preventDefault(); + const target = document.querySelector(this.getAttribute('href')); + if (target) { + target.scrollIntoView({ + behavior: 'smooth' + }); + } + }); + }); + + // Order Form Submission + const orderForm = document.getElementById('orderForm'); + if (orderForm) { + orderForm.addEventListener('submit', function(e) { + e.preventDefault(); + + const orderData = { + companyName: document.getElementById('companyName').value, + contactPerson: document.getElementById('contactPerson').value, + email: document.getElementById('email').value, + phone: document.getElementById('phone').value, + quantity: document.getElementById('quantity').value, + deliveryAddress: document.getElementById('deliveryAddress').value + }; + + fetch('order_handler.php', { + method: 'POST', + headers: { + 'Content-Type': 'application/json' + }, + body: JSON.stringify(orderData) + }) + .then(response => response.json()) + .then(data => { + alert(data.message); + if (data.status === 'success') { + orderForm.reset(); + const orderModal = bootstrap.Modal.getInstance(document.getElementById('orderModal')); + if(orderModal) { + orderModal.hide(); + } + } + }) + .catch(error => { + console.error('Error:', error); + alert('An error occurred while placing your order. Please try again.'); + }); + }); + } + + // Scroll-to-top button + const scrollToTopBtn = document.getElementById('scroll-to-top'); + if (scrollToTopBtn) { + window.addEventListener('scroll', () => { + if (window.scrollY > 300) { + scrollToTopBtn.classList.remove('d-none'); + } else { + scrollToTopBtn.classList.add('d-none'); + } + }); + + scrollToTopBtn.addEventListener('click', (e) => { + e.preventDefault(); + window.scrollTo({ + top: 0, + behavior: 'smooth' + }); + }); + } + + + + // Fade-in sections on scroll + const sections = document.querySelectorAll('section'); + const observer = new IntersectionObserver((entries) => { + entries.forEach(entry => { + if (entry.isIntersecting) { + entry.target.classList.add('visible'); + } + }); + }, { + threshold: 0.1 + }); + + sections.forEach(section => { + observer.observe(section); + }); +}); diff --git a/contact_handler.php b/contact_handler.php new file mode 100644 index 0000000..2f0b181 --- /dev/null +++ b/contact_handler.php @@ -0,0 +1,40 @@ +exec($sql); + echo "Migrated: " . basename($file) . "\n"; + } + + echo "All migrations successful!\n"; +} catch (PDOException $e) { + die("Migration failed: " . $e->getMessage() . "\n"); +} + diff --git a/db/migrations/001_create_orders_table.sql b/db/migrations/001_create_orders_table.sql new file mode 100644 index 0000000..d9f9d98 --- /dev/null +++ b/db/migrations/001_create_orders_table.sql @@ -0,0 +1,11 @@ +CREATE TABLE IF NOT EXISTS orders ( + id INT AUTO_INCREMENT PRIMARY KEY, + company_name VARCHAR(255) NOT NULL, + contact_person VARCHAR(255) NOT NULL, + email VARCHAR(255) NOT NULL, + phone VARCHAR(255) NOT NULL, + quantity INT NOT NULL, + delivery_address TEXT NOT NULL, + order_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + status VARCHAR(255) DEFAULT 'pending' +); \ No newline at end of file diff --git a/db/migrations/002_create_users_table.sql b/db/migrations/002_create_users_table.sql new file mode 100644 index 0000000..6490c8a --- /dev/null +++ b/db/migrations/002_create_users_table.sql @@ -0,0 +1,5 @@ +CREATE TABLE IF NOT EXISTS users ( + id INT AUTO_INCREMENT PRIMARY KEY, + username VARCHAR(255) NOT NULL UNIQUE, + password VARCHAR(255) NOT NULL +); \ No newline at end of file diff --git a/db/seed_admin.php b/db/seed_admin.php new file mode 100644 index 0000000..fae1a7e --- /dev/null +++ b/db/seed_admin.php @@ -0,0 +1,29 @@ +prepare('SELECT * FROM users WHERE username = ?'); + $stmt->execute(['admin']); + $user = $stmt->fetch(); + + if ($user) { + echo "Admin user already exists.\n"; + } else { + $username = 'admin'; + $password = 'password'; + $hashed_password = password_hash($password, PASSWORD_DEFAULT); + + $stmt = $pdo->prepare('INSERT INTO users (username, password) VALUES (?, ?)'); + $stmt->execute([$username, $hashed_password]); + + echo "Admin user created successfully.\n"; + echo "Username: admin\n"; + echo "Password: password\n"; + } +} catch (PDOException $e) { + die("Could not create admin user: " . $e->getMessage() . "\n"); +} + diff --git a/index.php b/index.php index 7205f3d..30cf126 100644 --- a/index.php +++ b/index.php @@ -1,150 +1,303 @@ - - + + - - - New Style - - - - - - - - - - - - - - - - - - - + + + TPS Petroleums LLP - Advanced RDF Biofuel Solutions + + + + + + + + + + + + + + + + -
-
-

Analyzing your requirements and generating your website…

-
- Loading… -
-

AI is collecting your requirements and applying the first changes.

-

This page will update automatically as the plan is implemented.

-

Runtime: PHP — UTC

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

Advanced RDF Biofuel Solutions for a Cleaner Industrial Future

+

High-performance, environmentally responsible biofuel with secure logistics and strict quality control.

+ Explore Our Product + Contact Us +
+
+ +
+
+
+

Company Focus

+

TPS Petroleums LLP delivers advanced RDF Biofuel solutions with a strong emphasis on quality control, secure logistics, and environmental sustainability. The company uses innovative processing technology to ensure reliable, high-performance biofuel for industrial applications.

+
+
+
+
+

Quality Control

+
+
+
+

Secure Logistics

+
+
+
+

Sustainability

+
+
+
+
+ +
+
+
+

Multi-Stage Quality Assurance

+
+
+
Raw Material Testing

Feedstock analysis before unloading.

+
In-Process Monitoring

Continuous quality checks.

+
Final Product Verification

Comprehensive testing before dispatch.

+
Documentation & Sampling

Test reports and counter samples with every delivery.

+
+
+
+ +
+
+
+

Our Product: RDF Biofuel

+

Manufactured from non-edible vegetable oil for clean and efficient industrial combustion.

+
+
+
+
+ Zero Sludge +
+
Zero Sludge
+
+
+
+
+
+ Low Sulfur +
+
Low Sulfur
+

max 0.0034%

+
+
+
+
+
+ High Calorific Value +
+
High Calorific Value
+

10,200 kcal/kg

+
+
+
+
+
+ Optimal Density +
+
Optimal Density
+

0.88–0.92 kg/ltr

+
+
+
+
+
+

Environmental Impact vs. LDO

+

99.8%

SOx Reduction

40%

Particulate Matter Reduction

93%

Hydrocarbon Reduction

50%

CO Reduction

+
+
+
Operational & Safety Advantages
  • 3–4% higher burning efficiency than LDO
  • Flash point >70°C for safer storage
  • Comparable viscosity to LDO
+
Economic & Strategic Benefits
  • Cost-competitive alternative
  • Renewable and sustainable
  • Uses domestic agricultural feedstock
+
Lower Toxicity
  • Better workplace safety
  • Non-toxic and biodegradable
+
+

Technical Specifications

+
ParameterRDF BiofuelLDO
Sulfur %< 0.0034%~0.5 - 1.8%
Calorific Value (kcal/kg)10,200~10,300
SOx EmissionsDramatically LowerHigh
Safety (Flash Point)>70°C (Safer)~66°C
Efficiency3-4% HigherStandard
+
+
+ +
+
+
+

Logistics & Traceability

+

Our integrated logistics network ensures that your biofuel supply is secure, timely, and fully traceable from our plant to your facility.

+
+
+
+ Logistics and Traceability +
+
+
    +
  • Detailed Test Reports: Every shipment includes comprehensive test reports, so you have full visibility into the fuel's specifications.
  • +
  • Counter Samples: For quality assurance, we store counter samples of every delivery for one month.
  • +
  • Sealed Invoices: All invoices and challans are dispatched with a unique seal number to ensure tamper-proof documentation.
  • +
+
+
+
+
+ +
+
+

A Complete Biofuel Solution

+

TPS Petroleums LLP provides a complete biofuel solution combining quality assurance, secure logistics, and environmentally responsible RDF Biofuel technology—offering cost savings, improved efficiency, and major emission reductions.

+
+
+ +
+
+
+

Contact Us

+

Get in touch for inquiries or to place an order.

+ +
+ + + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+ + +
+
+
+
+
TPS Petroleums LLP
+

Your partner in sustainable energy solutions.

+
+
+
Quick Links
+ +
+
+
Contact Us
+

+ Email: info@tpspetroleums.com
+ Phone: +91 123 456 7890 +

+
+
+
+

© TPS Petroleums LLP. All Rights Reserved.

+
+
+
+ + + + + + + + + -
- - + \ No newline at end of file diff --git a/order_handler.php b/order_handler.php new file mode 100644 index 0000000..59ec3b8 --- /dev/null +++ b/order_handler.php @@ -0,0 +1,38 @@ + 'error', 'message' => 'An unknown error occurred.']; + +if ($_SERVER['REQUEST_METHOD'] === 'POST') { + $data = json_decode(file_get_contents('php://input'), true); + + if (isset($data['companyName'], $data['contactPerson'], $data['email'], $data['phone'], $data['quantity'], $data['deliveryAddress'])) { + try { + $pdo = db(); + $stmt = $pdo->prepare( + 'INSERT INTO orders (company_name, contact_person, email, phone, quantity, delivery_address) VALUES (?, ?, ?, ?, ?, ?)' + ); + $stmt->execute([ + $data['companyName'], + $data['contactPerson'], + $data['email'], + $data['phone'], + $data['quantity'], + $data['deliveryAddress'] + ]); + + $response['status'] = 'success'; + $response['message'] = 'Your order has been placed successfully!'; + } catch (PDOException $e) { + $response['message'] = 'Database error: ' . $e->getMessage(); + } + } else { + $response['message'] = 'Invalid input. Please fill out all fields.'; + } +} else { + $response['message'] = 'Invalid request method.'; +} + +echo json_encode($response);