You are on page 1of 22

Micro Project Proposal

Aims/Benefits of the Micro-Project:

An art gallery exhibits the works of many artists. Each artist is given a specified space
on the online webpage. The artists are charged for the space allotted to them on daily
basis. The charges vary in different months. Jan to April and August to December the
charges are Rs 200 per day per exhibit, from May to July charges are Rs 300 per day
per exhibit. Each exhibit has a name and style of painting. The exhibits can be bought
by the online customers who need to register with the art gallery. The painting is sent
to the customer, when customer orders painting. The system keeps track of the status
of delivery of the painting to the customer. This status can also be seen by the
customer.

1.0 Rationale
The restaurant management system is a java project developed for taking and
managing the restaurant orders. It assists the waiters to take the order of food
digitally and more easily than before. This whole project is developed in Java
programming language using Netbeans IDE 8.2. Here in this project, you can add
your employee and also can add the menu items to make your restaurant look
fancier. This project comes along with MySQL database as backend.

2.0 Aim /Benefits of Micro-Project:


1. To make art gallery available virtually
2. Helps to make user order creative art online.

3.0 Course Outcomes Addressed:


1. Develop program using control statement. (CO605.1)
2. Perform operations based on arrays and graphics. (CO605.2)
3. Use form controls with validation to collect user’s input. (CO605.4) 4. Perform
database operations in PHP. (CO605.5)
4.0 Literature Review:
In today’s world where mankind is moving towards automation to increase the
efficiency of their work, there should be system to motivate artists to make better art.
People nowadays hardly want to move from their places for shopping and not even
for eating this is because of their hectic schedule. In such circumstances, we have
decided to create a system for online purchase of arts.
The existing traditional system of art gallery has large number of drawbacks such as
time consuming procedure, formation of crowd in malls, problem of bargaining, etc.
This problems waste time of customers and manpower of artist and also de-motivates
them. Hence to overcome this problem the decided to introduce Online Art Gallery.

Methodology followed
5.0 Step wise work done:
1. In this micro project, first of all we have focused on selection of appropriate topic
for the micro-project.
2. We have decided our topic i.e. “Art Gallery”
3. Then we did literature survey on our topic and gained knowledge about existing
and proposed system.
4. Then we gathered all information based on the topic of micro-project.
5. We executed our code.
6. We have done analysis and study of our topic in detail.
7. By doing all the above methodologies we have successfully done our micro project

5.0 Actual Resources Used .

Resources
Hardware
Software
Any other resources

6.0 Skill Developed / learning out of this Micro-Project


• Good Listening
• Good Speaking
• Critical Thinking
• Any Problem solves in Group
• Time management
• Complete work in time
Action plan

Sr.no. Week Topic Date

1. 1st Discussion and finalization of topic

2. 2nd Preparation and submission of Abstract

3. 3rd Collection of Data

4. 4th Discussion and outline of Content

5. 5th Formulation of Content

6. 6th Editing and proof Reading of Content

7. 7th Compilation of Report and Presentation

8. 8th Seminar / Viva voce

9. 9th Final submission of Micro Project

1. Login Page

<html>

<head>

<title>Login</title>

<style> body{

Margin-top: 100px; margin-bottom: 100px; margin-right: 150px; margin-left:


80px; background-color: azure ; color: palevioletred; font-family: verdana;
Font-size: 100%

} h1 { color: indigo; font-family: verdana;

Font-size: 100%; }

H3 { color: indigo; font-family: verdana; font-size: 100%;

} </style>

</head>

<body>

<center><h1>WELCOME TO ONLINE ART GALLERY</h1></center>

<p><a href=”register.php”>Register</a> | <a href=”login.php”>Login</a></p>

<center><h3>Login Form</h3> </center>

<form action=”” method=”POST”>

<legend><fieldset><center>

Username: <input type=”text” name=”user”><br><br>

Password: <input type=”password” name=”pass”><br><br>

<input type=”submit” value=”Login” name=”submit” onclick=”cart.php” style=”background-


color: lightblue; color: darkblue” >

</center></fieldset></legend></form>

<?php

If(isset($_POST[“submit”])){

If(!empty($_POST[‘user’]) && !empty($_POST[‘pass’])) {


$user=$_POST[‘user’];

$pass=$_POST[‘pass’];

$con=mysqli_connect(‘localhost’,’root’,’’,’product2’) or die(mysql_error());

//mysqli_select_db(‘product2’,$con) or die(“cannot select DB”);

$query=mysqli_query($con,”SELECT * FROM user WHERE name=’”.


$user.”’ AND password=’”.$pass.”’”);

$numrows=mysqli_num_rows($query);

If($numrows!=0)

While($row=mysqli_fetch_assoc($query))

$dbusername=$row[‘name’];

$dbpassword=$row[‘password’];

If($user == $dbusername && $pass == $dbpassword)

Session_start();

$_SESSION[‘sess_user’]=$user;
/* Redirect browser */

Header(“Location: cart.php”);

} else {

} } else {

Echo “All fields are required!”; }

} ?>

</body>

</html>

2. Registration Page

<html>

<head>

<title>Register</title> <style> body{ margin-top: 100px; margin-bottom:


100px; margin-right: 150px; margin-left: 80px; background-color: azure ; color:
palevioletred; font-family: verdana;

Font-size: 100%

H1 { color: indigo; font-family: verdana; font-size: 100%;

} h2 { color: indigo; font-family: verdana; font-size: 100%;

}</style>
</head>

<body>

<p><a href=”register.php”>Register</a> | <a href=”login.php”>Login</a></p>

<center><h2>Registration Form</h2></center>

<form action=”” method=”POST”>

<legend>

<fieldset>

<table border=”1px” cellpadding=”5px” align=”center” style=”color: black; text-align:


center; backgroundcolor: lightgrey”><br/>

<tr>

<td>NAME:</td>

<td><input type=text name=user size=30></td>

</tr>

<tr>

<td>CONTACT:</td>

Name=”submit”

: white; color: darkblue”></td>


</fieldset>

</legend>

</form> <?php

If(isset($_POST[“submit”])){

If(!empty($_POST[‘user’]) && !empty($_POST[‘contact’]) && !


empty($_POST[‘email’]) && !empty($_POST[‘city’]) && !empty($_POST[‘pass’]) ) {

$user=$_POST[‘user’];

$num=$_POST[‘contact’];

$email=$_POST[‘email’];

$city=$_POST[‘city’];

$pass=$_POST[‘pass’];

$con=mysqli_connect(‘localhost’,’root’,’’,’product2’) or die(mysql_error());
//mysqli_select_db(‘user_registration’) or die(“cannot select DB”);

$query=mysqli_query($con,”SELECT * FROM user WHERE name=’”.$user.”’”);

$numrows=mysqli_num_rows($query); if($numrows==0)

$sql=”INSERT INTO user(name,contact,email,city,password)

VALUES(‘$user’,’$num’,’$email’,’$city’,’$pass’)”;

$result=mysqli_query($con,$sql);
If($result){

Echo “Account Successfully Created”;

} else {

Echo “Failure!”;

} else {

} else {

Echo “All fields are required!”;

} }

?>

</body>

</html>

3. Cart Page
<?php session_start();

$tot=0;
If(isset($_POST[“add_to_cart”]))

$item_array_id = array_column($_SESSION[“shopping_cart”], “item_id”);


if(!in_array($_GET[“id”], $item_array_id))

$count = count($_SESSION[“shopping_cart”]);

$item_array = array(

‘item_id’ => $_GET[“id”],

‘item_name’ =>
$_POST[“hidden_name”],

‘item_price’ => $_POST[“hidden_price”],

‘item_quantity’ => $_POST[“quantity”]

);

$_SESSION[“shopping_cart”][$count] = $item_array;

}else{

Echo ‘<script>alert(“Item Already Added”)</script>’;}

}else{

$item_array = array(

‘item_id’ => $_GET[“id”],

‘item_name’ => $_POST[“hidden_name”],


‘item_price’ => $_POST[“hidden_price”],

‘item_quantity’ => $_POST[“quantity”]

);

$_SESSION[“shopping_cart”][0] = $item_array;}}

If(isset($_GET[“action”]))

{if($_GET[“action”] == “delete”) {

Foreach($_SESSION[“shopping_cart”] as $keys => $values)

{if($values[“item_id”] == $_GET[“id”])

Unset($_SESSION[“shopping_cart”][$keys]);
echo ‘<script>alert(“Item Removed”)</script>’; //echo
‘<script>window.location=”cart.php”</script>’;

}} }}

If(isset($_POST[“submit”]))

Header(“Location:bill.php”);

?>

<html><head> </head><body>
<h2>Welcome, <?=$_SESSION[‘sess_user’];?>! <a href=”logout.php”>Logout</a></h2>
<br/><br/><br/><br/>

<h3 align=”center”><title=”Online Art Gallery”>Online Art Gallery</h3><br /><br/><br />

<?php

$query = “SELECT * FROM tbl_product ORDER BY id ASC”;

$result = mysqli_query($connect, $query);

If(mysqli_num_rows($result) > 0)

While($row = mysqli_fetch_array($result))

?>

<div class=”col-md-4”>

<form method=”post” action=”cart.php?action=add&id=<?php echo $row[“id”]; ?>”>

<div style=”border:1px solid #555; background-color:#f2f2f2; border-radius:5px;


padding:16px;” align=”center”>

<img src=”images/<?php echo $row[“image”]; ?>” class=”img-responsive”


width=”200” height=”200”/><br />

<h4><?php echo $row[“name”]; ?></h4>

<h4><?php echo $row[“price”]; ?></h4>

<input type=”text” name=”quantity” value=”1” class=”formcontrol” />

<input type=”hidden” name=”hidden_name” value=”<?php echo $row[“name”]; ?>” />


<input type=”hidden” name=”hidden_price” value=”<?php echo $row[“price”]; ?>”
/<input type=”submit” name=”add_to_cart” style=”margin-top:5px;” class=”btn btn-
success” value=”Add to Cart” />

</div></form></div><?php }}

?>

<div style=”clear:both”></div> <br />

<h3>Order Details</h3>

<div class=”table-responsive”>

<div style=”border:1px solid #555; background-color:#f2f2f2; border-radius:5px;


padding:16px;” align=”center”>

<table class=”table table-bordered”>

<tr>

<th>Item Name</th>

<th>Quantity</th>

<th>Price</th>
<th>Total</th>

<th>Action</th>

</tr> <?php

If(!empty($_SESSION[“shopping_cart”]))

{
$total = 0;

Foreach($_SESSION[“shopping_cart”] as $keys => $values)

?>

<tr>

<td><?php echo $values[“item_name”];


?></td>

<td><?php echo $values[“item_quantity”]; ?


></td>

<td><?php echo $values[“item_price”]; ?></td>

<td><?php echo number_format($values[“item_quantity”] * $values[“item_price”],


2);?></td> <td><a href=”cart.php?action=delete&id=<?php echo $values[“item_id”]; ?
>”><span class=”textdanger”>Remove</span></a></td></tr>

<?php

$total = $total + ($values[“item_quantity”] * $values[“item_price”]);

$_SESSION[“tot”]=$total;

?>

<tr>

<td colspan=”3” align=”right”>Total</td>

<td align=”right”> <?php echo number_format($total, 2); ?></td>


</tr>

<?php

?>

</table><form method=”post”><input type=”submit” value=”Proceed to


Checkout” name=”submit”></form></div></div></div></body></html>

4. Billing page
<?php

Session_start();

$connect = mysqli_connect(“localhost”, “root”, “”, “product2”);

$query=mysqli_query($connect,”SELECT * FROM user WHERE name=’”.


$_SESSION[‘sess_user’].”’”); $numrows=mysqli_num_rows($query);

$name=$num=$em=$city=” “;

If($numrows!=0)

While($row=mysqli_fetch_assoc($query)) {

$name=$row[‘name’];

$num=$row[‘contact’];

$em=$row[‘email’];

$city=$row[‘city’];

} }
H1 {

Color: indigo;

Font-family: verdana; font-size: 100%;

} h2 { color: indigo; font-family: verdana; font-size: 100%;

}</style>

</head>

<body>

<form action=”” method=”POST”>

Background-color: lightgrey”><br/>

<td><input type=text name=contact size=30 value=<?php echo $num;?>></td>

</tr>

<tr>

<td>E-MAIL:</td>

<td><input type=email name=email size=30 value=<?php echo $em;?>></td>

</tr>

<tr>

<td>CITY:</td>

<td><input type=text name=city size=30 value=<?php echo $city;?>></td>


</tr>

<tr>

<td>Total Amount:</td>

<td><?php echo “Rs.”.$_SESSION[‘tot’];?></td>

</tr>

<tr>

<td colspan=”2”><input type=”submit” value=”Confirm Order”


name=”submit”></td>

</tr></table></form></body></html>

<?php

If(isset($_POST[“submit”]))

$n=$_POST[“user”];

$c=$_POST[“contact”];

$e=$_POST[“email”];

$ci=$_POST[“city”];

Require_once(‘C:\xampp\lib\class.phpmailer.php’); require_once(‘C:\xampp\lib\
class.smtp.php’);

$mail = new PHPMailer(); $mail->IsSMTP();

$mail->SMTPAuth = true;
$mail->Host = “smtp.gmail.com”;

$mail->Port = 25;

$mail->IsHTML(true);

$mail->Body = “

<html>

<body>

<tr>

</tr> <tr>

</tr> <tr>

<td style=’width:150px’><strong>Mobile No: </strong></td>

<td style=’width:400px’>$c</td>

</tr> <tr>

<td style=’width:150px’><strong>Address: </strong></td>

<td style=’width:400px’>$ci</td>

</tr> <tr>

<td style=’width:150px’><strong>Total Bill: </strong></td>

<td style=’width:400px’>$total</td>

</tr> <tr>
<td style=’width:150px’><strong>Arrival Date: </strong></td>

<td style=’width:400px’><strong>It will arrive in 2 to 3 days</strong></td>

</tr>

</tbody>

</table>

</body>

</html>

“;

If(!$mail->send())

Echo “ERROR: “.$mail->ErrorInfo;

Else

$connect = mysqli_connect(“localhost”, “root”, “”, “product2”);

$sql = “INSERT INTO


order_place(name,contact,email,city,total)VALUES(‘$n’,’$c’,’$e’,’$ci’,’$total’)”;

$retval = mysqli_query($connect, $sql); if($retval ) {

//echo “New Record Inserted”;


Echo “Order Successfully Placed”;}

}}

?>
Fig 1: Login Page
Fig 3: Online Art Gallery

You might also like