Lab Session No.-11: Object

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 15

Lab Session No.

- 11

Object: Design & Implement Frontend of Medical Shop Management System .

Introduction :

The “front-end languages” live in the browser. After you type an address into the address
bar at the top and hit the enter/return key, your browser will receive at least an HTML file
from the web server. That file will likely tell the browser to request a CSS file and a
JavaScript file as well (probably many more than one, but we’ll keep it simple).

Each of these languages performs a separate but very important function and they work
harmoniously together to determine how the web page is STRUCTURED (HTML), how it
LOOKS (CSS), and how it FUNCTIONS (JavaScript). And keep in mind that
your browser handles figuring out how to make these files into a functioning web page
(not the server).

Front-end web development is NOT design (you won’t be playing around in Photoshop or
anything), but a front-end developer does apply the work of designers to the web page by
translating their well-designed layouts into real code. The front-end developer stands
between the designer on one end and the back-end developer on the other, translating the
design into code and plugging the data from the back-end developer into the right spots.
They must also handle all the possible interactions that the user may need to make with the
page.

On the front end, you will need to be highly conscious of who your user is and how they
will be interacting with your web page, because you are building their gateway to your
page or product. This may mean gaining a strong understanding of accessibility and things
like responsive development down the line, but first you need to build up your toolkit and
pick up the fundamentals of the front-end languages.

Result : The figures represent the front end of Medical Shop Management System.
MAIN PAGE

MEDICINE INVENTORY
POINT OF SALE

EMPLOYEE LIST
TRANSACTION REPORT

MEDICINE STOCK
ADD EMPLOYEE
CODE OF HOME PAGE
<!DOCTYPE html>
<html>

<link rel="stylesheet" type="text/css" href="login1.css">


<head>
<div class="header">
<h1>Medical Store Management System</h1>
<p style="margin-top:-20px;line-height:1;font-size:30px;">A Database Management
Systems Project</p>
<p style="margin-top:-20px;line-height:1;font-size:20px;">Department of Computer Science
and Engineering</p>
</div>
<title>
Medical Store Management System
</title>
</head>

<body>

<br><br><br><br>
<div class="container">
<form method="post" action="">
<div id="div_login">
<h1>Admin Login</h1>
<center>
<div>
<input type="text" class="textbox" id="uname"
name="uname" placeholder="Username" />
</div>
<div>
<input type="password" class="textbox"
id="pwd" name="pwd" placeholder="Password"/>
</div>
<div>

<input type="submit" value="Submit" name="submit"


id="submit" />
<input type="submit" value="Click here for Pharmacist
Login" name="psubmit" id="submit" />

<?php

include "config.php";

if(isset($_POST['submit'])){

$uname = mysqli_real_escape_string($conn,
$_POST['uname']);
$password = mysqli_real_escape_string($conn,
$_POST['pwd']);

if ($uname != "" && $password != ""){

$sql="SELECT * FROM admin WHERE


a_username='$uname' AND a_password='$password'";
$result = $conn->query($sql);
$row = $result->fetch_row();
if(!$row) {
echo "<p style='color:red;'>Invalid
username or password!</p>";
}
else {
session_start();
$_SESSION['user']=$uname;
header('location:adminmainpage.php');
}
}
}
if(isset($_POST['psubmit']))
{
header("location:mainpage1.php");
}
?>

</div>
</center>
</div>
</form>
</div>

<div class=footer>
<br>
Developed by, Afreen Khan CSE, 2021
<br><br>
</div>

</body>

</html>
Lab Session No.- 12

Object: Design & Implement Backend of Medical Shop Management System .

Introduction :
Back end development refers to the server side of an application and everything that
communicates between the database and the browser.

Back end Development refers to the server side of development where you are primarily
focused on how the site works. Making updates and changes in addition to monitoring
functionality of the site will be your primary responsibility. This type of web development
usually consists of three parts: a server, an application, and a database. Code written by back
end developers is what communicates the database information to the browser. Anything you
can’t see easily with the eye such as databases and servers is the work of a back end
developer.  Back end developer positions are often called programmers or web developers.

BACK END PROGRAMMING LANGUAGES

Many back end developers know front end languages such as HTML and CSS but need to use
languages such as Java, PHP, Ruby on Rails, Python, and .Net to get the back end job done.
Back end developers are most focused on a site’s responsiveness and speed. These languages
are used to create dynamic sites which are different from static sites in that these types of
websites store database information. Content on the site is constantly changing and updating.
Examples of dynamic sites include Facebook, Twitter, and Google Maps.

The built-in admin (the "backend"), provides an easy way to manage your data and you build
apps within Django to present that data in various ways. However, if you were so inclined,
you could also create your own "backend" in Django. You're not forced to use the default
admin

Backend Design :

Create se_db databse and create these tables:

Admin(username,password)

customer(c_id,c_fname,c_lname,c_age,c_sex,c_phno,c_mail)

emplogin(e_id,e_username,e_pass)

med(med_id,med_name,med_qty,category,med_price,location)
sales(sail_id,c_id,s_date,s_time,total_amt,e_id)

Tables and Attributes

Admin Id Name Compan Batch_no Cost Selling_price Qty Mfg


y
customer Id Name
emplogin Id Name Phone Emails details
med Id Item Amount Name Phone time
Sales` Id Name Email phone

Result :

The figure represents the backend of medical shop management system

All Tables and attributes of medicine table

TABLE OF ADMIN PAGE


TABLE OF SALES

TABLE OF MEDICINE
TABLE OF EMPLOYEE

TABLE OF CUSTOMER
TABLE OF ADMIN

TABLE OF SALES ITEM


CODE OF DATABSE

<?php

echo "Welcome to the stage where we are ready to get connected to a database <br>";

/*

Ways to connect to a MySQL Database

1. MySQLi extension

2. PDO

*/

// Connecting to the Database

$servername = "localhost";

$username = "root";

$password = "";

// Create a connection

$conn = mysqli_connect($servername, $username, $password);

// Die if connection was not successful

if (!$conn){

die("Sorry we failed to connect: ". mysqli_connect_error());

else{

echo "Connection was successful";

?>

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy