-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
199 lines (185 loc) · 8.75 KB
/
index.php
File metadata and controls
199 lines (185 loc) · 8.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
<?php
$servername = "localhost";
$username = "root"; // Replace with your database username
$password = ""; // Replace with your database password
$dbname = "vehicle_auction";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Vehicle Auction System</title>
<link rel="stylesheet" href="css/styles.css">
<script src="js/scripts.js" defer></script>
<script src="https://unpkg.com/scrollreveal"></script> <!-- Include ScrollReveal.js -->
</head>
<body>
<header>
<nav>
<div class="logo">AuctionPro</div>
<ul>
<li><a href="#home" style="
display: inline-block;
padding: 10px 15px;
margin: 5px;
font-size: 16px;
color: white;
text-decoration: none;
transition: color 0.3s ease, transform 0.3s ease;
" onmouseover="this.style.color='white'; this.style.transform='scale(1.05)';"
onmouseout="this.style.color='white'; this.style.transform='scale(1)';">Home</a></li>
<li><a href="http://localhost/Auction_System/search.php?query=" style="
display: inline-block;
padding: 10px 15px;
margin: 5px;
font-size: 16px;
color: white;
text-decoration: none;
transition: color 0.3s ease, transform 0.3s ease;
" onmouseover="this.style.color='white'; this.style.transform='scale(1.05)';"
onmouseout="this.style.color='white'; this.style.transform='scale(1)';">Auctions</a></li>
<li><a href="#how-it-works" style="
display: inline-block;
padding: 10px 15px;
margin: 5px;
font-size: 16px;
color: white;
text-decoration: none;
transition: color 0.3s ease, transform 0.3s ease;
" onmouseover="this.style.color='white'; this.style.transform='scale(1.05)';"
onmouseout="this.style.color='white'; this.style.transform='scale(1)';">How It Works</a></li>
<li><a href="aboutus.php" style="
display: inline-block;
padding: 10px 15px;
margin: 5px;
font-size: 16px;
color: white;
text-decoration: none;
transition: color 0.3s ease, transform 0.3s ease;
" onmouseover="this.style.color='white'; this.style.transform='scale(1.05)';"
onmouseout="this.style.color='white'; this.style.transform='scale(1)';">About</a></li>
<li><a href="contactus.php" style="
display: inline-block;
padding: 10px 15px;
margin: 5px;
font-size: 16px;
color: white;
text-decoration: none;
transition: color 0.3s ease, transform 0.3s ease;
" onmouseover="this.style.color='white'; this.style.transform='scale(1.05)';"
onmouseout="this.style.color='white'; this.style.transform='scale(1)';">Contact</a></li>
<li>
<a href="login.php" style="
display: inline-block;
padding: 10px 20px;
margin: 10px;
font-size: 16px;
font-weight: bold;
color: white;
background-color: #007BFF;
border: none;
border-radius: 5px;
text-decoration: none;
transition: background-color 0.3s ease, transform 0.3s ease;
" onmouseover="this.style.backgroundColor='#0056b3'; this.style.transform='scale(1.05)';"
onmouseout="this.style.backgroundColor='#007BFF'; this.style.transform='scale(1)';">
Login/Register
</a>
</li>
</ul>
</nav>
</header>
<section id="hero">
<div class="hero-content">
<h1>Find Your Dream Vehicle</h1>
<p>Bid on the best vehicles from the comfort of your home</p>
<form id="search-form" method="GET" action="search.php">
<input type="text" name="query" placeholder="Search for vehicles...">
<button type="submit">Search</button>
</form>
</div>
</section>
<!-- Post Auction Button -->
<div class="post-auction-container">
<a href="login.php" class="post-auction-btn">Post Auction</a>
</div>
<section id="featured-auctions">
<h2>Featured Auctions</h2>
<div class="carousel">
<?php
// Assuming a connection to the database is already established
$query = "SELECT * FROM auctions WHERE featured = 1";
$result = mysqli_query($conn, $query);
while ($row = mysqli_fetch_assoc($result)) {
echo "<div class='auction-item' data-title='" . $row['title'] . "'>";
echo "<img src='" . $row['image_url'] . "' alt='Vehicle Image'>";
echo "<h3>" . $row['title'] . "</h3>";
echo "<p>Current Bid: $" . $row['current_bid'] . "</p>";
echo "</div>";
}
?>
</div>
</section>
<section id="how-it-works">
<h2>How It Works</h2>
<div class="steps">
<div class="step">
<h3>Step 1</h3>
<p>Register an account</p>
</div>
<div class="step">
<h3>Step 2</h3>
<p>Browse auctions</p>
</div>
<div class="step">
<h3>Step 3</h3>
<p>Place your bid</p>
</div>
<div class="step">
<h3>Step 4</h3>
<p>Win and collect your vehicle</p>
</div>
</div>
</section>
<section id="testimonials">
<h2>Testimonials</h2>
<div class="testimonials-container">
<div class="testimonial">
<p>"Great experience! I found my dream car at a great price."</p>
<h4>- John Doe</h4>
</div>
<div class="testimonial">
<p>"Easy to use and excellent customer service."</p>
<h4>- Jane Smith</h4>
</div>
</div>
</section>
<script>
// Initialize ScrollReveal
ScrollReveal().reveal('.logo', { duration: 1000, origin: 'left', distance: '50px' });
ScrollReveal().reveal('nav ul li', { duration: 1000, origin: 'bottom', distance: '50px', interval: 200 });
ScrollReveal().reveal('.hero-content h1', { duration: 1000, origin: 'top', distance: '50px' });
ScrollReveal().reveal('.hero-content p', { duration: 1000, origin: 'top', distance: '50px', delay: 200 });
ScrollReveal().reveal('.search-form', { duration: 1000, origin: 'top', distance: '50px', delay: 400 });
ScrollReveal().reveal('.post-auction-container', { duration: 1000, origin: 'bottom', distance: '50px' });
ScrollReveal().reveal('.featured-auctions h2', { duration: 1000, origin: 'top', distance: '50px' });
ScrollReveal().reveal('.carousel', { duration: 1000, origin: 'bottom', distance: '50px', delay: 200 });
ScrollReveal().reveal('.hero', { duration: 1000, origin: 'top', distance: '50px' });
ScrollReveal().reveal('.post-auction-container', { duration: 1000, origin: 'bottom', distance: '50px' });
ScrollReveal().reveal('.featured-auctions', { duration: 1000, origin: 'top', distance: '50px' });
ScrollReveal().reveal('#testimonials h2', { duration: 1000, origin: 'top', distance: '50px' });
ScrollReveal().reveal('.testimonials-container .testimonial', { duration: 1000, origin: 'bottom', distance: '50px', interval: 200 });
ScrollReveal().reveal('footer p', { duration: 1000, origin: 'bottom', distance: '50px' });
</script>
<footer>
<p>© 2024 AuctionPro. All rights reserved.</p>
</footer>
</body>
</html>