0% found this document useful (0 votes)
13 views22 pages

WBP Part B-1

The document outlines a microproject proposal for a Cricket Ground Booking System developed by students of Pimpri Chinchwad Polytechnic as part of their Web Based Application Development course. It details the project's aim, methodology, and intended outcomes, emphasizing the system's user-friendly features for booking cricket grounds. Additionally, it includes the project structure, resources used, and sample code for various functionalities such as user registration, login, and booking management.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views22 pages

WBP Part B-1

The document outlines a microproject proposal for a Cricket Ground Booking System developed by students of Pimpri Chinchwad Polytechnic as part of their Web Based Application Development course. It details the project's aim, methodology, and intended outcomes, emphasizing the system's user-friendly features for booking cricket grounds. Additionally, it includes the project structure, resources used, and sample code for various functionalities such as user registration, login, and booking management.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 22

Pimpri-Chinchwad Education Trust’s Record No.

IF-TY

Pimpri Chinchwad Polytechnic Date:


(An ISO 9001:2015 Certified Institute) Revision: 00
Sector No. 26, Pradhikaran, Nigdi, Pune
– 411044.
Page: 01/01
Phone: 27658797/27654156
Email: [email protected]
Department of Information Technology (Academic Year 2024-25)
Microproject Proposal Report (Part B)

Subject: Web Based Application Development with PHP (22619) Class: TY IF B

Group No : 06

Microproject Topic :

Cricket Ground Booking System

Roll. No. Name of Student Enrollment Number


26 Dhanashree Dhindale 2200560379
27 Ankita Shid 2200560381
28 Vaishnavi Nanekar 2200560382
29 Sheefa Pathan 2200560383
30 Kirtan Patel 2200560384
Maharashtra State Board of Technical Education Mumbai
(Autonomous) (ISO-9001-2015) (ISO/IEC 27001:2013)
CERTIFICATE
This Is to Certify That Mr/Mrs,
1.Dhanashree Dhindale, 2.Ankita Shid, 3.Vaishnavi Nanekar, 4.Sheefa Pathan
5.Kirtan Patel of Diploma in Information Technology. Pimpri Chinchwad
Polytechnic (Code: 0056) has Completed Microproject of the course Web
Based Application Development with PHP [WPD] (22619) as prescribed in the
curriculum for the academic Year 2024-2025.

Place: Nigdi, Akurdi

Date:

Course In charge Head Of Department


Mrs.M.M.Mali Ms.S.L.Mortale
0.1 Introduction:

Managing sports facilities properly is important for easy ground bookings and well-
organized events. This project creates a Cricket Ground Booking System where users can
search, view, and book cricket grounds quickly. The system makes the booking process
simple by removing paperwork, avoiding scheduling issues, and making it easy for players,
teams, and event organizers to find available grounds. With features like real-time
availability, easy booking, and a user-friendly design, this system makes the process
smooth and stress-free. It helps users focus on playing the game while handling all booking
tasks efficiently.

0.2 Aim:

Prepare a Report on a detailed study of how to create a website for Cricket Ground Booking
System.

0.3 Intended course outcome:


The theoretical concepts, practical experience, and technical skills gained from this project
will help students develop industry-relevant competencies. After successfully implementing
this project, students will be able to:
a. Design and develop interactive web pages using HTML, CSS, and PHP.
b. Implement form handling for user registration, login, and booking management.
c. Enhance user experience through a structured and visually appealing interface.
d. Understand real-world web development by integrating multiple web technologies.

0.4 Actual Methodology Used:

• We finalize the topic with the help of micro project guide.


• We distribute sub topic between the members.
• Everyone did their work accurately.
• All the information submitted to the leader.
• Discussion on all error take place and all error were removed.
• All the sub-topic were arranged in specific order.
• Final project was given to respected In charged.

0.5 Resources Used :-


Sr.No Name of Resources Specification Quantity

1. Computer system Windows 10 Pro Intel® Core


(TM) i3-3210 RAM – 8:00 GB 1

2. Links Referred • www.geeksforgeeks.org


• www.w3schools.com
3. Other Resources used • Google Chrome
• Notepad
• XAMPP
• Internet

0.6 Code:-

Cricket-Ground-Booking/
│── index.php
│── bookings.txt
│── assets/
│ ├── images/
│ │ ├── cricket-ground.jpg
│ │ ├── login.jpg
│ │ ├── book.jpg
│ │ ├── show.jpg
│ ├── style.css
│── book.php
│── cricket.php
│── home.php
│── login.php
│── logout.php
│── register.php
│── show.php

Login.php
<html>
<head>
<style>
body { font-family: Arial, sans-serif; text-align: center; }
nav { background: #333; padding: 10px; }
nav a { color: white; text-decoration: none; padding: 15px; font-size: 16px; }
nav a:hover { background: #555; border-radius: 5px; }
form { margin: 20px auto; width: 300px; }
table { margin: auto; border-collapse: collapse; }
th, td { padding: 10px; border: 1px solid black; }
.booked { background-color: red; color: white; }
</style>

<link rel="stylesheet" href="style.css">


</head>
<body>
<nav>
<a href="home.php">Home</a>
<a href="register.php">Register</a>
<a href="login.php">Login</a>
<a href="logout.php">Logout</a>
<a href="book.php">Book Ground</a>
<a href="show.php">Show Bookings</a>
</nav>
</body>

<link rel="stylesheet" href="style.css">


</head>
<?php
session_start();
$usersFile = "users.txt";

if ($_SERVER['REQUEST_METHOD'] === 'POST') {


$username = trim($_POST['username']);
$password = trim($_POST['password']);

$users = file_exists($usersFile) ? file($usersFile, FILE_IGNORE_NEW_LINES) : [];

foreach ($users as $user) {


list($storedUser, $storedPass) = explode('|', $user);
if ($storedUser === $username && $storedPass === $password) {
$_SESSION['user'] = $username;
header("Location: home.php");
exit;
}
}
echo "<script>alert('Invalid credentials! Try again.');</script>";
}
?>
<form method="post">
<input type="text" name="username" placeholder="Enter Username" required><br><br>
<input type="password" name="password" placeholder="Enter Password" required><br><br>
<button type="submit">Login</button>
</form>
</html>

Book.php

<html>
<head>
<style>
body { font-family: Arial, sans-serif; text-align: center; }
nav { background: #333; padding: 10px; }
nav a { color: white; text-decoration: none; padding: 15px; font-size: 16px; }
nav a:hover { background: #555; border-radius: 5px; }
form { margin: 20px auto; width: 300px; }
table { margin: auto; border-collapse: collapse; }
th, td { padding: 10px; border: 1px solid black; }
.booked { background-color: red; color: white; }
</style>

<link rel="stylesheet" href="style.css">


</head>
<body>
<nav>
<a href="home.php">Home</a>
<a href="register.php">Register</a>
<a href="login.php">Login</a>
<a href="logout.php">Logout</a>
<a href="book.php">Book Ground</a>
<a href="show.php">Show Bookings</a>
</nav>
</body>

<link rel="stylesheet" href="style.css">


</head>
<?php
session_start();
if (!isset($_SESSION['user'])) {
echo "<script>alert('Please login to book a slot.'); window.location='login.php';</script>";
exit;
}

$filename = "bookings.txt";

if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['book'])) {


$name = $_SESSION['user'];
$date = $_POST['date'];
$time = $_POST['time'];
$newBooking = "$date|$time|$name\n";

$bookings = file_exists($filename) ? file($filename, FILE_IGNORE_NEW_LINES) : [];

foreach ($bookings as $booking) {


list($bookedDate, $bookedTime) = explode('|', $booking);
if ($bookedDate === $date && $bookedTime === $time) {
echo "<script>alert('Slot already booked! Choose another time.');</script>";
exit;
}
}

file_put_contents($filename, $newBooking, FILE_APPEND);


echo "<script>alert('Booking successful!');</script>";
}
?>
<form method="post">
<input type="date" name="date" required min="<?php echo date('Y-m-d'); ?>">
<input type="time" name="time" required><br><br>
<button type="submit" name="book">Book Now</button>
</form>
</html>

Show.php

<html>
<head>
<style>
body { font-family: Arial, sans-serif; text-align: center; }
nav { background: #333; padding: 10px; }
nav a { color: white; text-decoration: none; padding: 15px; font-size: 16px; }
nav a:hover { background: #555; border-radius: 5px; }
form { margin: 20px auto; width: 300px; }
table { margin: auto; border-collapse: collapse; }
th, td { padding: 10px; border: 1px solid black; }
.booked { background-color: red; color: white; }
</style>

<link rel="stylesheet" href="style.css">


</head>
<body>
<nav>
<a href="home.php">Home</a>
<a href="register.php">Register</a>
<a href="login.php">Login</a>
<a href="logout.php">Logout</a>
<a href="book.php">Book Ground</a>
<a href="show.php">Show Bookings</a>
</nav>
</body>

<link rel="stylesheet" href="style.css">


</head>
<?php
session_start();
$filename = "bookings.txt";
$bookings = file_exists($filename) ? file($filename, FILE_IGNORE_NEW_LINES) : [];
?>
<h2>Booked Slots</h2>
<table border="1">
<tr><th>Date</th><th>Time</th><th>Name</th></tr>
<?php
foreach ($bookings as $booking) {
list($bookedDate, $bookedTime, $bookedName) = explode('|', $booking);
echo "<tr><td>$bookedDate</td><td>$bookedTime</td><td>$bookedName</td></tr>";
}
?>
</table>
</html>

Register.php

<html>
<head>
<style>
body { font-family: Arial, sans-serif; text-align: center; }
nav { background: #333; padding: 10px; }
nav a { color: white; text-decoration: none; padding: 15px; font-size: 16px; }
nav a:hover { background: #555; border-radius: 5px; }
form { margin: 20px auto; width: 300px; }
table { margin: auto; border-collapse: collapse; }
th, td { padding: 10px; border: 1px solid black; }
.booked { background-color: red; color: white; }
</style>

<link rel="stylesheet" href="style.css">


</head>
<body>
<nav>
<a href="home.php">Home</a>
<a href="register.php">Register</a>
<a href="login.php">Login</a>
<a href="logout.php">Logout</a>
<a href="book.php">Book Ground</a>
<a href="show.php">Show Bookings</a>
</nav>
</body>

<link rel="stylesheet" href="style.css">


</head>
<?php
session_start();
$usersFile = "users.txt";

if ($_SERVER['REQUEST_METHOD'] === 'POST') {


$username = trim($_POST['username']);
$password = trim($_POST['password']);

if (!empty($username) && !empty($password)) {


$users = file_exists($usersFile) ? file($usersFile, FILE_IGNORE_NEW_LINES) : [];
foreach ($users as $user) {
list($existingUser) = explode('|', $user);
if ($existingUser === $username) {
echo "<script>alert('Username already exists. Try another.');</script>";
exit;
}
}
file_put_contents($usersFile, "$username|$password\n", FILE_APPEND);
echo "<script>alert('Registration successful! Please log in.');
window.location='login.php';</script>";
}
}
?>
<form method="post">
<input type="text" name="username" placeholder="Enter Username" required><br><br>
<input type="password" name="password" placeholder="Enter Password"
required><br><br>
<button type="submit">Register</button>
</form>
</html>

Logout.php
<html>
<head>
<link rel="stylesheet" href="style.css">
</head>
<?php
session_start();
session_destroy();
header("Location: home.php");
exit;
?>
</html>

Home.php

<?php
session_start();
?>

<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="style.css">

<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Welcome to Cricket Ground Booking</title>
<link rel="stylesheet" href="style.css">
<style>
body { font-family: Arial, sans-serif; text-align: center; background-color: #f8f9fa; margin: 0; }
h1 { color: #008000; margin-top: 20px; }
.container { width: 80%; margin: auto; padding: 20px; }
.cards { display: flex; justify-content: center; gap: 20px; margin-top: 20px; flex-wrap: wrap; }
.card {
background: white;
border-radius: 10px;
box-shadow: 0 4px 8px rgba(0,0,0,0.1);
padding: 20px;
width: 250px;
text-align: center;
transition: 0.3s;
}
.card:hover { transform: scale(1.05); }
.card img { width: 100%; border-radius: 10px; }
.card a { display: block; margin-top: 10px; text-decoration: none; color: white; background:
#28a745; padding: 8px; border-radius: 5px; }
.card a:hover { background: #218838; }
</style>
</head>
<body>

<h1>Welcome to the Cricket Ground Booking System</h1>

<?php
if (isset($_SESSION['user'])) {
echo "<h2>Hello, " . htmlspecialchars($_SESSION['user']) . "!</h2>";
} else {
echo "<h2>Please <a href='login.php'>Login</a> or <a href='register.php'>Register</a> to
continue.</h2>";
}
?>

<div class="container">
<p>
Our online Cricket Ground Booking System makes it easy to schedule your game slots
effortlessly.
Whether you're a casual player or a serious team, we offer a seamless booking experience.
Join us and enjoy hassle-free cricket ground reservations!
</p>

<div class="cards">
<div class="card">
<img src="images/book.jpg" alt="Book Ground">
<h3>Book a Ground</h3>
<p>Reserve your slot instantly with our online booking system.</p>
<a href="book.php">Book Now</a>
</div>

<div class="card">
<img src="images/login.jpg" alt="Login">
<h3>User Login</h3>
<p>Access your account and manage bookings with ease.</p>
<a href="login.php">Login</a>
</div>

<div class="card">
<img src="images/show.jpg" alt="Show Bookings">
<h3>View Bookings</h3>
<p>Check your booked slots and upcoming matches.</p>
<a href="show.php">View Bookings</a>
</div>
</div>
</div>

</body>
</html>

Index.php

<?php
session_start();

// File to store booking data


$filename = "bookings.txt";

// Handle form submission


if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['book'])) {
$name = $_POST['name'];
$date = $_POST['date'];
$time = $_POST['time'];

$newBooking = "$date|$time|$name\n";

// Read existing bookings


$bookings = file_exists($filename) ? file($filename, FILE_IGNORE_NEW_LINES) : [];

// Check for conflicts


foreach ($bookings as $booking) {
list($bookedDate, $bookedTime) = explode('|', $booking);
if ($bookedDate === $date && $bookedTime === $time) {
echo "<script>alert('Slot already booked! Choose another time.');</script>";
exit;
}
}

// Save booking
file_put_contents($filename, $newBooking, FILE_APPEND);
echo "<script>alert('Booking successful!');</script>";
}

// Load existing bookings


$bookings = file_exists($filename) ? file($filename, FILE_IGNORE_NEW_LINES) : [];
?>

<html>
<head>
<title>Cricket Ground Booking</title>
<style>
body { font-family: Arial, sans-serif; text-align: center; }
nav { background: #333; padding: 10px; }
nav a { color: white; text-decoration: none; padding: 10px; }
form { margin: 20px auto; width: 300px; }
table { margin: auto; border-collapse: collapse; }
th, td { padding: 10px; border: 1px solid black; }
.booked { background-color: red; color: white; }
</style>

<link rel="stylesheet" href="style.css">


</head>
<body>

<nav>
<a href="home.php">Home</a>
<a href="login.php">Login</a>
<a href="logout.php">Logout</a>
<a href="book.php">Book Ground</a>
<a href="show.php">Show Bookings</a>
</nav>

<h2>Welcome to the Cricket Ground Booking System</h2>


<p>Select an option from the menu.</p>
</body>
</html>

0.7 Final Output:-


0.8 Skill Developed / learning out of this Micro-Project:

SR. TECHNICAL/NON-TECHNICAL SKILLS TICK MARK (√) FOR


NO. DEVELOPED SKILLS
1 Skill of Information Collection ✔
2 Skill of Information Analysis ✔
3 Skill of Design of Project ✔
4 Skill of Programming ✔
5 Skill of Leadership ✔
6 Skill of Team Management ✔
7 Skill of Planning ✔
8 Skill of Critical Thinking ✔
9 Skill of Task Management ✔
10 Skill of Creativity ✔
11 Skill of Develop Project in deadline driven ✔
environment
12 Skill of Familiar with subject Knowledge ✔
CSS/OSY/AJP/EST/EDE
13 Any other skill developed ✔

Mrs. M.M.Mali
(Course Co-ordinator)

You might also like