├── README.md ├── add_custA.php ├── add_custE.php ├── add_customerA.php ├── add_customerE.php ├── add_emp.php ├── add_employee.php ├── add_med.php ├── add_medicine.php ├── add_supp.php ├── add_supplier.php ├── admin.php ├── all.css ├── calculate.php ├── delete_cust.php ├── delete_customer.php ├── delete_emp.php ├── delete_employee.php ├── delete_med.php ├── delete_medicine.php ├── delete_sup.php ├── delete_supplier.php ├── employee.php ├── index.html ├── js └── jquery-3.3.1.js ├── load_customer_details.php ├── load_med_details.php ├── logout.php ├── modify_cust.php ├── modify_customer.php ├── modify_emp.php ├── modify_employee.php ├── modify_med.php ├── modify_medicine.php ├── modify_supp.php ├── modify_supplier.php ├── pharmacy.sql ├── retail_saleA.php ├── retail_saleE.php ├── userverify.php ├── view_customer.php ├── view_employee.php └── view_medicineE.php /README.md: -------------------------------------------------------------------------------- 1 | # Pharmacy-Management-System 2 | Using HTML5, CSS3, PHP and MySQL 3 | Collaborative project work done by Team - Vijay Pratap Singh, Bhavuk Sharma, Mohit Turakhia 4 | -------------------------------------------------------------------------------- /add_custA.php: -------------------------------------------------------------------------------- 1 | query($sql)){ 11 | echo "New record is inserted sucessfully"; 12 | header("location: add_customerA.php"); 13 | } 14 | else{ 15 | echo "Error: ". $sql ."
". $mysqli->error; 16 | } 17 | $mysqli->close(); 18 | ?> -------------------------------------------------------------------------------- /add_custE.php: -------------------------------------------------------------------------------- 1 | query($sql)){ 13 | echo "New record is inserted sucessfully"; 14 | header("location: add_customerE.php"); 15 | } 16 | else{ 17 | echo "Error: ". $sql ."
". $mysqli->error; 18 | } 19 | $mysqli->close(); 20 | ?> -------------------------------------------------------------------------------- /add_customerA.php: -------------------------------------------------------------------------------- 1 | 6 | alert('Please use Admin login to access this page'); 7 | location='index.html'; 8 | "; 9 | } 10 | } 11 | else { 12 | echo ""; 16 | } 17 | ?> 18 | 19 | 20 | 21 | Add Customer 22 | 23 | 24 | 25 |

Add Customer

26 |
27 |
28 | 29 | 30 |

31 | 32 | 33 |

34 |
35 |
36 | Male
37 | Female
38 | Others 39 |

40 |
41 | 42 | 43 |

44 | 45 | 46 |

47 | 48 | 49 |

50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /add_customerE.php: -------------------------------------------------------------------------------- 1 | 7 | alert('Please login'); 8 | location='index.html'; 9 | "; 10 | } 11 | } 12 | else { 13 | echo ""; 17 | } 18 | ?> 19 | 20 | 21 | 22 | Add Customer 23 | 24 | 25 | 26 |

Add Customer

27 |
28 | 29 | 30 | 31 |

32 | 33 | 34 |

35 |
36 |
37 | Male
38 | Female
39 | Others 40 |

41 |
42 | 43 | 44 |

45 | 46 | 47 |

48 | 49 | 50 |

51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /add_emp.php: -------------------------------------------------------------------------------- 1 | query($sql)){ 22 | echo "New record is inserted sucessfully"; 23 | $sql="INSERT employee values ('$Emp_ID','$DOB','$role','$Age','$User_name','$Salary')"; 24 | if ($mysqli->query($sql)){ 25 | echo "New record is inserted sucessfully"; 26 | header("location: add_employee.php"); 27 | } 28 | else{ 29 | echo "Error: ". $sql ."
". $mysqli->error; 30 | } 31 | } 32 | else{ 33 | echo "Error: ". $sql ."
". $mysqli->error; 34 | } 35 | $mysqli->close(); 36 | ?> -------------------------------------------------------------------------------- /add_employee.php: -------------------------------------------------------------------------------- 1 | 7 | alert('Please use Admin login to access this page'); 8 | location='index.html'; 9 | "; 10 | } 11 | } 12 | else { 13 | echo ""; 17 | } 18 | ?> 19 | 20 | 21 | 22 | Add Employee 23 | 24 | 25 | 26 |

Add Employee

27 |
28 | 29 | 30 | 31 |

32 | 33 | 34 |

35 | 36 | 37 |

38 | 39 | 40 |

41 | 42 | 43 |

44 | 45 | 46 |

47 |
48 | Worker
49 | Admin
50 |

51 | 52 | 53 |

54 | 57 | 58 | 59 |

60 | 61 | 62 |
63 | 64 | 65 | -------------------------------------------------------------------------------- /add_med.php: -------------------------------------------------------------------------------- 1 | $today){ 16 | echo ""; 20 | } 21 | else{ 22 | $sql="INSERT med_details values ('$Med_ID','$Batch_no','$Mfg_Date','$Entry_date','$Buying_Price','$Manufacturer')"; 23 | if ($mysqli->query($sql)){ 24 | echo "New record is inserted sucessfully"; 25 | $sql="INSERT stock values ('$Med_Name','$Med_ID','$Quantity','$Exp_Date','$category','$Selling_Price','$Batch_no')"; 26 | if ($mysqli->query($sql)){ 27 | echo "New record is inserted sucessfully"; 28 | header("location: add_medicine.php"); 29 | } 30 | else{ 31 | echo "Error: ". $sql ."
". $mysqli->error; 32 | } 33 | } 34 | else{ 35 | echo "Error: ". $sql ."
". $mysqli->error; 36 | } 37 | $mysqli->close(); 38 | } 39 | ?> -------------------------------------------------------------------------------- /add_medicine.php: -------------------------------------------------------------------------------- 1 | 7 | alert('Please use Admin login to access this page'); 8 | location='index.html'; 9 | "; 10 | } 11 | } 12 | else { 13 | echo ""; 17 | } 18 | ?> 19 | 20 | 21 | 22 | Add Medicine 23 | 24 | 25 | 26 |

Add Medicine

27 |
28 |
29 | 30 | 31 |

32 | 33 | 34 |

35 | 36 | 37 |

38 |
39 | Tablet
40 | Capsule
41 | Syrup
42 | Cream
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 | -------------------------------------------------------------------------------- /add_supp.php: -------------------------------------------------------------------------------- 1 | query($sql)){ 12 | echo "New record is inserted sucessfully"; 13 | header("location: add_supplier.php"); 14 | } 15 | else{ 16 | echo "Error: ". $sql ."
". $mysqli->error; 17 | } 18 | $mysqli->close(); 19 | ?> -------------------------------------------------------------------------------- /add_supplier.php: -------------------------------------------------------------------------------- 1 | 7 | alert('Please use Admin login to access this page'); 8 | location='index.html'; 9 | "; 10 | } 11 | } 12 | else { 13 | echo ""; 17 | } 18 | ?> 19 | 20 | 21 | 22 | Add Supplier 23 | 24 | 25 | 26 |

Add Supplier

27 |
28 |
29 | 30 | 31 |

32 | 33 | 34 |

35 | 36 | 37 |

38 | 39 | 40 |

41 | 42 | 43 |

44 | 45 | 46 | 47 |
48 | 49 | -------------------------------------------------------------------------------- /admin.php: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 10 | Admin 11 | 12 | 13 | 14 | 15 |

Welcome Admin

16 | 17 |
18 |
19 |

Medicine

20 | 21 | 22 | 23 |
24 |
25 |

Employee

26 | 27 | 28 | 29 |
30 |
31 |

Supplier

32 | 33 | 34 | 35 |
36 |
37 |

Customer

38 | 39 | 40 | 41 |
42 |
43 |

Retail Sale

44 | 45 | 46 |
47 | 48 | -------------------------------------------------------------------------------- /all.css: -------------------------------------------------------------------------------- 1 | * { 2 | color:darkgreen; 3 | background-color: azure; 4 | padding: 10px; 5 | margin: 10px; 6 | 7 | } 8 | input{ 9 | border: 1px solid lightgreen; 10 | border-radius: 6px; 11 | } 12 | hr{ 13 | height: 2px; 14 | color: darkgreen; 15 | background-color: darkgreen; 16 | padding: 0; 17 | } 18 | table{ 19 | border:2px; 20 | } 21 | .login{ 22 | text-align: center; 23 | border: 100px; 24 | border-style: solid; 25 | } 26 | 27 | form label{ 28 | font-weight: bold !important; 29 | /*font-size: 2in;*/ 30 | 31 | } 32 | input[type="submit"]:hover,input[type="button"]:hover,input[type="reset"]:hover,button:hover{ 33 | background-color: darkgreen; 34 | color: azure; 35 | cursor: pointer; 36 | } 37 | input:disabled{ 38 | background-color: #ded; 39 | } 40 | a{ 41 | text-decoration: none; 42 | } 43 | -------------------------------------------------------------------------------- /calculate.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /delete_cust.php: -------------------------------------------------------------------------------- 1 | query($sql)){ 22 | echo "record was deleted sucessfully"; 23 | } 24 | else{ 25 | echo "Error: ". $sql ."
". $con->error; 26 | } 27 | // $sql="delete from employee where Emp_ID='$Emp_ID';"; 28 | // if ($con->query($sql)){ 29 | // echo "record was deleted sucessfully"; 30 | // } 31 | // else{ 32 | // echo "Error: ". $sql ."
". $con->error; 33 | // } 34 | header("location:delete_employee.php"); 35 | ?> -------------------------------------------------------------------------------- /delete_customer.php: -------------------------------------------------------------------------------- 1 | 7 | alert('Please use Admin login to access this page'); 8 | location='index.html'; 9 | "; 10 | } 11 | } 12 | else { 13 | echo ""; 17 | } 18 | ?> 19 | 20 | 21 | 22 | Delete Customer 23 | 24 | 25 | 26 | 27 |

Customer List

28 |
29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | "; 51 | echo ""; 52 | echo ""; 53 | echo ""; 54 | echo ""; 55 | echo ""; 56 | echo ""; 57 | } 58 | ?> 59 |
Customer IDNameAgeContactAddress
" . $row['Cust_ID'] ."" . $row['Name'] . "" . $row['Age'] . "" . $row['Phone_no'] . "" . $row['Address'] . "
60 |
61 | 62 | 63 |
64 | 65 | 66 | -------------------------------------------------------------------------------- /delete_emp.php: -------------------------------------------------------------------------------- 1 | query($sql)){ 22 | echo "record was deleted sucessfully"; 23 | } 24 | else{ 25 | echo "Error: ". $sql ."
". $con->error; 26 | } 27 | $sql="delete from employee where Emp_ID='$Emp_ID';"; 28 | if ($con->query($sql)){ 29 | echo "record was deleted sucessfully"; 30 | } 31 | else{ 32 | echo "Error: ". $sql ."
". $con->error; 33 | } 34 | header("location:delete_employee.php"); 35 | ?> -------------------------------------------------------------------------------- /delete_employee.php: -------------------------------------------------------------------------------- 1 | 7 | alert('Please use Admin login to access this page'); 8 | location='index.html'; 9 | "; 10 | } 11 | } 12 | else { 13 | echo ""; 17 | } 18 | ?> 19 | 20 | 21 | Delete Medicine 22 | 23 | 24 | 25 | 26 |

Employee List

27 |
28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | "; 51 | echo ""; 52 | echo ""; 53 | echo ""; 54 | // echo ""; 55 | echo ""; 56 | echo ""; 57 | echo ""; 58 | } 59 | ?> 60 |
Employee IDUsernameEmployee NameContact No.Role
" . $row['Emp_ID'] ."" . $row['User_name'] . "" . $row['Name'] . "" . $row['password'] . "" . $row['Phone_no'] . "" . $row['Role'] . "
61 |


62 |
63 | 64 | 65 |

66 | 68 | 69 |
70 | 71 | 72 | -------------------------------------------------------------------------------- /delete_med.php: -------------------------------------------------------------------------------- 1 | query($sql)){ 12 | echo "record was deleted sucessfully"; 13 | } 14 | else{ 15 | echo "Error: ". $sql ."
". $mysqli->error; 16 | } 17 | $sql="delete from stock where $med_category='$search1' and Exp_Date='$search2';"; 18 | if ($con->query($sql)){ 19 | echo "record was deleted sucessfully"; 20 | } 21 | else{ 22 | echo "Error: ". $sql ."
". $mysqli->error; 23 | } 24 | header("location:delete_medicine.php"); 25 | ?> -------------------------------------------------------------------------------- /delete_medicine.php: -------------------------------------------------------------------------------- 1 | 7 | alert('Please use Admin login to access this page'); 8 | location='index.html'; 9 | "; 10 | } 11 | } 12 | else { 13 | echo ""; 17 | } 18 | ?> 19 | 20 | 21 | 22 | Delete Medicine 23 | 24 | 25 | 26 | 27 |

Delete Medicine

28 |
29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | "; 58 | echo ""; 59 | echo ""; 60 | echo ""; 61 | echo ""; 62 | echo ""; 63 | echo ""; 64 | echo ""; 65 | echo ""; 66 | echo ""; 67 | echo ""; 68 | echo ""; 69 | echo ""; 70 | } 71 | ?> 72 |
Medicine IDMedicine NameExpiry dateAvailableCategoryManufacturerBuying priceSelling priceEntry dateManufacturing DateBatch No.
" . $row['Med_ID'] ."" . $row['Med_Name'] . "" . $row['Exp_Date'] . "" . $row['Quantity'] . "" . $row['Category'] . "" . $row['Manufacturer'] . "" . $row['Buying_Price'] . "" . $row['Selling_Price'] . "" . $row['Entry_Date'] . "" . $row['Mfg_Date'] . "" . $row['Batch_no'] . "
73 |
74 |
75 | Medicine ID
76 | Batch Number
77 |
78 | 79 | 80 | 81 | 82 | 83 |
84 | 85 | 86 | -------------------------------------------------------------------------------- /delete_sup.php: -------------------------------------------------------------------------------- 1 | query($sql)){ 10 | echo "record was deleted sucessfully"; 11 | } 12 | else{ 13 | echo "Error: ". $sql ."
". $mysqli->error; 14 | } 15 | header("location:delete_supplier.php"); 16 | ?> 17 | -------------------------------------------------------------------------------- /delete_supplier.php: -------------------------------------------------------------------------------- 1 | 7 | alert('Please use Admin login to access this page'); 8 | location='index.html'; 9 | "; 10 | } 11 | } 12 | else { 13 | echo ""; 17 | } 18 | ?> 19 | 20 | 21 | 22 | Delete Supplier 23 | 24 | 25 | 26 | 27 |

Supplier List

28 |
29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | "; 51 | echo ""; 52 | echo ""; 53 | echo ""; 54 | echo ""; 55 | echo ""; 56 | echo ""; 57 | } 58 | ?> 59 |
Supplier IDCompany NameEmailContactAddress
" . $row['Supplier_ID'] ."" . $row['Company_Name'] . "" . $row['Email'] . "" . $row['Phone_no'] . "" . $row['Address'] . "
60 |
61 | 62 | 63 |
64 | 65 | 66 | -------------------------------------------------------------------------------- /employee.php: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 10 | Employee 11 | 12 | 13 | 14 | 15 |

Welcome

16 | 17 |
18 |
19 | 20 | 21 |

22 | 23 |

24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Pharmacy Store Management 5 | 6 | 7 | 8 | 9 |

Pharmacy Store Management

10 |
11 |

Login

12 |
13 | 14 | 15 |

16 | 17 | 18 |

19 |
20 |
21 | 22 | 23 | -------------------------------------------------------------------------------- /load_customer_details.php: -------------------------------------------------------------------------------- 1 | 12 | alert('Please enter some data'); 13 | location='modify_customer.php'; 14 | "; 15 | } 16 | else{ 17 | while ($row = mysql_fetch_array($result)){ 18 | echo $row['Name']."and".$row['Age']; 19 | } 20 | } 21 | ?> 22 | -------------------------------------------------------------------------------- /load_med_details.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /logout.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /modify_cust.php: -------------------------------------------------------------------------------- 1 | 13 | alert('Please enter some data'); 14 | location='modify_customer.php'; 15 | "; 16 | //header("location:modify_customer.php"); 17 | // echo ""; 19 | 20 | } 21 | elseif(!$Phone_no){ 22 | $sql="update customers set Address='$Address' where Cust_ID='$Cust_ID';"; 23 | if ($con->query($sql)){ 24 | echo "record was updated sucessfully"; 25 | header("location:modify_customer.php"); 26 | } 27 | else{ 28 | echo "Error: ". $sql ."
". $mysqli->error; 29 | } 30 | } 31 | elseif(!Address) { 32 | $sql="update customers set Phone_no='$Phone_no' where Cust_ID='$Cust_ID';"; 33 | if ($con->query($sql)){ 34 | echo "record was updated sucessfully"; 35 | header("location:modify_customer.php"); 36 | } 37 | else{ 38 | echo "Error: ". $sql ."
". $mysqli->error; 39 | } 40 | } 41 | else{ 42 | $sql="update customers set Phone_no='$Phone_no',Address='$Address' where Cust_ID='$Cust_ID';"; 43 | if ($con->query($sql)){ 44 | echo "record was updated sucessfully"; 45 | header("location:modify_customer.php"); 46 | } 47 | else{ 48 | echo "Error: ". $sql ."
". $mysqli->error; 49 | } 50 | } 51 | ?> 52 | -------------------------------------------------------------------------------- /modify_customer.php: -------------------------------------------------------------------------------- 1 | 7 | alert('Please use Admin login to access this page'); 8 | location='index.html'; 9 | "; 10 | } 11 | } 12 | else { 13 | echo ""; 17 | } 18 | ?> 19 | 20 | 21 | 22 | Modify Customer 23 | 24 | 25 | 26 | 27 |

Customer List

28 |
29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | "; 51 | echo ""; 52 | echo ""; 53 | echo ""; 54 | echo ""; 55 | echo ""; 56 | echo ""; 57 | echo ""; 58 | } 59 | ?> 60 |
Customer IDCustomer NameGenderPhone No.AddressAge
" . $row['Cust_ID'] ."" . $row['Name'] . "" . $row['Gender'] . "" . $row['Phone_no'] . "" . $row['Address'] . "" . $row['Age'] . "
61 |
62 | 63 | 64 | 65 | 66 |
67 | 68 | 69 | -------------------------------------------------------------------------------- /modify_emp.php: -------------------------------------------------------------------------------- 1 | 17 | alert('Please enter some data'); 18 | location='modify_employee.php'; 19 | "; 20 | } 21 | elseif(!$address){ 22 | if(!$phone_no){ 23 | $sql="update employee set Salary='$Salary' where Emp_ID='$Emp_ID';"; 24 | if ($con->query($sql)){ 25 | echo "record was updated sucessfully"; 26 | header("location:modify_employee.php"); 27 | } 28 | else{ 29 | echo "Error: ". $sql ."
". $con->error; 30 | } 31 | } 32 | elseif(!$Salary){ 33 | $sql="update users set Phone_no='$phone_no' where User_name='$username';"; 34 | if ($con->query($sql)){ 35 | echo "record was updated sucessfully"; 36 | header("location:modify_employee.php"); 37 | } 38 | else{ 39 | echo "Error: ". $sql ."
". $con->error; 40 | } 41 | } 42 | else{ 43 | $sql="update users set Address='$address',Phone_no='$phone_no' where User_name='$username';"; 44 | if ($con->query($sql)){ 45 | echo "record was updated sucessfully"; 46 | } 47 | else{ 48 | echo "Error: ". $sql ."
". $con->error; 49 | } 50 | $sql="update employee set Role='$role', Salary='$Salary' where Emp_ID='$Emp_ID';"; 51 | if ($con->query($sql)){ 52 | echo "record was updated sucessfully"; 53 | header("location:modify_employee.php"); 54 | } 55 | else{ 56 | echo "Error: ". $sql ."
". $con->error; 57 | } 58 | } 59 | } 60 | elseif(!$phone_no){ 61 | if(!$address){ 62 | $sql="update employee set Salary='$Salary' where Emp_ID='$Emp_ID';"; 63 | if ($con->query($sql)){ 64 | echo "record was updated sucessfully"; 65 | header("location:modify_employee.php"); 66 | } 67 | else{ 68 | echo "Error: ". $sql ."
". $con->error; 69 | } 70 | } 71 | elseif(!$Salary){ 72 | $sql="update users set Address='$address' where User_name='$username';"; 73 | if ($con->query($sql)){ 74 | echo "record was updated sucessfully"; 75 | header("location:modify_employee.php"); 76 | } 77 | else{ 78 | echo "Error: ". $sql ."
". $con->error; 79 | } 80 | } 81 | else{ 82 | $sql="update users set Address='$address',Phone_no='$phone_no' where User_name='$username';"; 83 | if ($con->query($sql)){ 84 | echo "record was updated sucessfully"; 85 | } 86 | else{ 87 | echo "Error: ". $sql ."
". $con->error; 88 | } 89 | $sql="update employee set Role='$role', Salary='$Salary' where Emp_ID='$Emp_ID';"; 90 | if ($con->query($sql)){ 91 | echo "record was updated sucessfully"; 92 | header("location:modify_employee.php"); 93 | } 94 | else{ 95 | echo "Error: ". $sql ."
". $con->error; 96 | } 97 | } 98 | } 99 | elseif(!$Salary){ 100 | if(!$address){ 101 | $sql="update users set Phone_no='$phone_no' where User_name='$username';"; 102 | if ($con->query($sql)){ 103 | echo "record was updated sucessfully"; 104 | header("location:modify_employee.php"); 105 | } 106 | else{ 107 | echo "Error: ". $sql ."
". $con->error; 108 | } 109 | } 110 | elseif(!$phone_no){ 111 | $sql="update users set Address='$address' where User_name='$username';"; 112 | if ($con->query($sql)){ 113 | echo "record was updated sucessfully"; 114 | header("location:modify_employee.php"); 115 | } 116 | else{ 117 | echo "Error: ". $sql ."
". $con->error; 118 | } 119 | } 120 | else{ 121 | $sql="update users set Address='$address',Phone_no='$phone_no' where User_name='$username';"; 122 | if ($con->query($sql)){ 123 | echo "record was updated sucessfully"; 124 | } 125 | else{ 126 | echo "Error: ". $sql ."
". $con->error; 127 | } 128 | $sql="update employee set Role='$role', Salary='$Salary' where Emp_ID='$Emp_ID';"; 129 | if ($con->query($sql)){ 130 | echo "record was updated sucessfully"; 131 | header("location:modify_employee.php"); 132 | } 133 | else{ 134 | echo "Error: ". $sql ."
". $con->error; 135 | } 136 | } 137 | } 138 | ?> -------------------------------------------------------------------------------- /modify_employee.php: -------------------------------------------------------------------------------- 1 | 7 | alert('Please use Admin login to access this page'); 8 | location='index.html'; 9 | "; 10 | } 11 | } 12 | else { 13 | echo ""; 17 | } 18 | ?> 19 | 20 | 21 | 22 | Modify Employee 23 | 24 | 25 | 26 | 27 |

Employee List

28 |
29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | "; 51 | echo ""; 52 | echo ""; 53 | echo ""; 54 | echo ""; 55 | echo ""; 56 | echo ""; 57 | echo ""; 58 | } 59 | ?> 60 |
Employee IDUsernameEmployee NameContact No.RoleAddress
" . $row['Emp_ID'] ."" . $row['User_name'] . "" . $row['Name'] . "" . $row['Phone_no'] . "" . $row['Role'] . "" . $row['Address'] . "
61 |

62 |
63 | 64 | 65 |

66 | 67 | 68 |

69 | 70 | 71 |

72 | 73 | 74 |

75 | 76 |
77 |
78 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /modify_med.php: -------------------------------------------------------------------------------- 1 | 13 | alert('Please enter some data'); 14 | location='modify_medicine.php'; 15 | "; 16 | } 17 | elseif(!$Med_Name){ 18 | if(!$Selling_Price){ 19 | $sql="Update stock set Quantity=$Quantity where Batch_no=$Batch_no;"; 20 | if ($con->query($sql)){ 21 | echo "record was updated sucessfully"; 22 | header("location: modify_medicine.php"); 23 | } 24 | else{ 25 | echo "Error: ". $sql ."
". $con->error; 26 | } 27 | } 28 | elseif(!$Quantity){ 29 | $sql="Update stock set Selling_Price=$Selling_Price where Batch_no=$Batch_no;"; 30 | if ($con->query($sql)){ 31 | echo "record was updated sucessfully"; 32 | header("location: modify_medicine.php"); 33 | } 34 | else{ 35 | echo "Error: ". $sql ."
". $con->error; 36 | } 37 | } 38 | else{ 39 | $sql="Update stock set Selling_Price=$Selling_Price,Quantity=$Quantity where Batch_no=$Batch_no;"; 40 | if ($con->query($sql)){ 41 | echo "record was updated sucessfully"; 42 | header("location: modify_medicine.php"); 43 | } 44 | else{ 45 | echo "Error: ". $sql ."
". $con->error; 46 | } 47 | } 48 | } 49 | elseif(!$Selling_Price){ 50 | if(!$Med_Name){ 51 | $sql="Update stock set Quantity=$Quantity where Batch_no=$Batch_no;"; 52 | if ($con->query($sql)){ 53 | echo "record was updated sucessfully"; 54 | header("location: modify_medicine.php"); 55 | } 56 | else{ 57 | echo "Error: ". $sql ."
". $con->error; 58 | } 59 | } 60 | elseif(!$Quantity){ 61 | $sql="Update stock set Med_Name='$Med_Name' where Batch_no=$Batch_no;"; 62 | if ($con->query($sql)){ 63 | echo "record was updated sucessfully"; 64 | header("location: modify_medicine.php"); 65 | } 66 | else{ 67 | echo "Error: ". $sql ."
". $con->error; 68 | } 69 | } 70 | else{ 71 | $sql="Update stock set Med_Name='$Med_Name',Quantity=$Quantity where Batch_no=$Batch_no;"; 72 | if ($con->query($sql)){ 73 | echo "record was deleted sucessfully"; 74 | header("location: modify_medicine.php"); 75 | } 76 | else{ 77 | echo "Error: ". $sql ."
". $con->error; 78 | } 79 | } 80 | } 81 | elseif(!$Quantity){ 82 | if(!$Med_Name){ 83 | $sql="Update stock set Quantity=$Quantity where Batch_no=$Batch_no;"; 84 | if ($con->query($sql)){ 85 | echo "record was deleted sucessfully"; 86 | header("location: modify_medicine.php"); 87 | } 88 | else{ 89 | echo "Error: ". $sql ."
". $con->error; 90 | } 91 | } 92 | elseif(!$Selling_Price){ 93 | $sql="Update stock set Med_Name='$Med_Name' where Batch_no=$Batch_no;"; 94 | if ($con->query($sql)){ 95 | echo "record was deleted sucessfully"; 96 | header("location: modify_medicine.php"); 97 | } 98 | else{ 99 | echo "Error: ". $sql ."
". $con->error; 100 | } 101 | } 102 | else{ 103 | $sql="Update stock set Med_Name='$Med_Name',Selling_Price=$Selling_Price where Batch_no=$Batch_no;"; 104 | if ($con->query($sql)){ 105 | echo "record was deleted sucessfully"; 106 | header("location: modify_medicine.php"); 107 | } 108 | else{ 109 | echo "Error: ". $sql ."
". $con->error; 110 | } 111 | } 112 | } 113 | ?> -------------------------------------------------------------------------------- /modify_medicine.php: -------------------------------------------------------------------------------- 1 | 7 | alert('Please use Admin login to access this page'); 8 | location='index.html'; 9 | "; 10 | } 11 | } 12 | else { 13 | echo ""; 17 | } 18 | ?> 19 | 20 | 21 | 22 | 23 | 24 | Modify Medicine 25 | 26 | 27 |

Modify Medicine

28 |
29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | "; 56 | echo ""; 57 | echo ""; 58 | echo ""; 59 | echo ""; 60 | echo ""; 61 | echo ""; 62 | echo ""; 63 | echo ""; 64 | echo ""; 65 | echo ""; 66 | echo ""; 67 | echo ""; 68 | } 69 | $statement="call GetMedbyName()"; 70 | ?> 71 |
Medicine IDMedicine NameExpiry dateAvailableCategoryManufacturerBuying priceSelling priceEntry dateManufacturing DateBatch No.
" . $row['Med_ID'] ."" . $row['Med_Name'] . "" . $row['Exp_Date'] . "" . $row['Quantity'] . "" . $row['Category'] . "" . $row['Manufacturer'] . "" . $row['Buying_Price'] . "" . $row['Selling_Price'] . "" . $row['Entry_Date'] . "" . $row['Mfg_Date'] . "" . $row['Batch_no'] . "


72 |
73 |

74 |

75 |

76 |
77 | 78 |
79 | 80 | 81 | 82 | 83 | -------------------------------------------------------------------------------- /modify_supp.php: -------------------------------------------------------------------------------- 1 | 13 | alert('Please enter some data'); 14 | location='modify_supplier.php'; 15 | "; 16 | //header("location:modify_customer.php"); 17 | // echo ""; 19 | 20 | } 21 | elseif(!$Phone_no){ 22 | $sql="update customers set Address='$Address' where Supplier_ID='$Supplier_ID';"; 23 | if ($con->query($sql)){ 24 | echo "record was updated sucessfully"; 25 | header("location:modify_customer.php"); 26 | } 27 | else{ 28 | echo "Error: ". $sql ."
". $mysqli->error; 29 | } 30 | } 31 | elseif(!Address) { 32 | $sql="update customers set Phone_no='$Phone_no' where Supplier_ID='$Supplier_ID';"; 33 | if ($con->query($sql)){ 34 | echo "record was updated sucessfully"; 35 | header("location:modify_customer.php"); 36 | } 37 | else{ 38 | echo "Error: ". $sql ."
". $mysqli->error; 39 | } 40 | } 41 | else{ 42 | $sql="update customers set Phone_no='$Phone_no',Address='$Address' where Supplier_ID='$Supplier_ID';"; 43 | if ($con->query($sql)){ 44 | echo "record was updated sucessfully"; 45 | header("location:modify_customer.php"); 46 | } 47 | else{ 48 | echo "Error: ". $sql ."
". $mysqli->error; 49 | } 50 | } 51 | ?> 52 | -------------------------------------------------------------------------------- /modify_supplier.php: -------------------------------------------------------------------------------- 1 | 7 | alert('Please use Admin login to access this page'); 8 | location='index.html'; 9 | "; 10 | }} 11 | else { 12 | echo ""; 16 | } 17 | ?> 18 | 19 | 20 | 21 | 22 | 23 | Modify Supplier 24 | 25 | 26 |

Supplier List

27 |
28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | "; 49 | echo ""; 50 | echo ""; 51 | echo ""; 52 | echo ""; 53 | echo ""; 54 | echo ""; 55 | } 56 | ?> 57 |
Supplier IDCompany NameEmailPhone No.Address
" . $row['Supplier_ID'] ."" . $row['Company_Name'] . "" . $row['Email'] . "" . $row['Phone_no'] . "" . $row['Address'] . "
58 |
59 | 60 | 61 | 62 | 63 |
64 | 65 | 66 | -------------------------------------------------------------------------------- /pharmacy.sql: -------------------------------------------------------------------------------- 1 | -- phpMyAdmin SQL Dump 2 | -- version 4.7.9 3 | -- https://www.phpmyadmin.net/ 4 | -- 5 | -- Host: 127.0.0.1 6 | -- Generation Time: Oct 25, 2018 at 09:13 PM 7 | -- Server version: 10.1.31-MariaDB 8 | -- PHP Version: 5.6.34 9 | 10 | SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; 11 | SET AUTOCOMMIT = 0; 12 | START TRANSACTION; 13 | SET time_zone = "+00:00"; 14 | 15 | 16 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; 17 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; 18 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; 19 | /*!40101 SET NAMES utf8mb4 */; 20 | 21 | -- 22 | -- Database: `pharmacy` 23 | -- 24 | 25 | DELIMITER $$ 26 | -- 27 | -- Procedures 28 | -- 29 | CREATE DEFINER=`root`@`localhost` PROCEDURE `GetMedByName` (IN `Name` VARCHAR(50)) BEGIN 30 | SELECT * 31 | FROM stock 32 | WHERE Med_Name = Name; 33 | END$$ 34 | 35 | DELIMITER ; 36 | 37 | -- -------------------------------------------------------- 38 | 39 | -- 40 | -- Table structure for table `customers` 41 | -- 42 | 43 | CREATE TABLE `customers` ( 44 | `Cust_ID` int(11) NOT NULL, 45 | `Gender` varchar(6) DEFAULT NULL, 46 | `Address` varchar(50) DEFAULT NULL, 47 | `Age` int(11) DEFAULT NULL, 48 | `Name` varchar(50) DEFAULT NULL, 49 | `Phone_no` bigint(20) DEFAULT NULL 50 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 51 | 52 | -- 53 | -- Dumping data for table `customers` 54 | -- 55 | 56 | INSERT INTO `customers` (`Cust_ID`, `Gender`, `Address`, `Age`, `Name`, `Phone_no`) VALUES 57 | (49, 'Others', 'kandivali', 52, 'sidddd', 4565123278), 58 | (156, 'Male', 'Ghatkopar', 21, 'Varun', 9845327812), 59 | (210, 'Female', 'Gopalmath', 30, 'Kuku', 123456789); 60 | 61 | -- -------------------------------------------------------- 62 | 63 | -- 64 | -- Table structure for table `employee` 65 | -- 66 | 67 | CREATE TABLE `employee` ( 68 | `Emp_ID` int(6) NOT NULL, 69 | `DOB` date NOT NULL, 70 | `Role` varchar(10) NOT NULL DEFAULT 'worker', 71 | `Age` int(11) DEFAULT NULL, 72 | `User_name` varchar(50) DEFAULT NULL, 73 | `Salary` decimal(10,2) DEFAULT NULL 74 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 75 | 76 | -- 77 | -- Dumping data for table `employee` 78 | -- 79 | 80 | INSERT INTO `employee` (`Emp_ID`, `DOB`, `Role`, `Age`, `User_name`, `Salary`) VALUES 81 | (5, '1997-08-18', 'Worker', 21, 'BS', '10000.00'), 82 | (8, '1998-06-07', 'Admin', 20, 'mohit_15', '10101.00'), 83 | (15, '2000-09-07', 'Admin', 18, 'mohit_30', '5000.00'), 84 | (100, '1999-05-15', 'Worker', 24, 'sid_25', '15000.00'); 85 | 86 | -- -------------------------------------------------------- 87 | 88 | -- 89 | -- Table structure for table `employees_audit` 90 | -- 91 | 92 | CREATE TABLE `employees_audit` ( 93 | `id` int(11) NOT NULL, 94 | `Username` varchar(50) DEFAULT NULL, 95 | `name` varchar(50) DEFAULT NULL, 96 | `changedat` datetime DEFAULT NULL, 97 | `action` varchar(50) DEFAULT NULL 98 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 99 | 100 | -- 101 | -- Dumping data for table `employees_audit` 102 | -- 103 | 104 | INSERT INTO `employees_audit` (`id`, `Username`, `name`, `changedat`, `action`) VALUES 105 | (1, 'BS', 'bhavuk', '2018-10-22 10:55:58', 'update'), 106 | (2, 'sid_25', 'Siddhant', '2018-10-22 11:23:36', 'update'); 107 | 108 | -- -------------------------------------------------------- 109 | 110 | -- 111 | -- Table structure for table `med_details` 112 | -- 113 | 114 | CREATE TABLE `med_details` ( 115 | `Med_ID` varchar(15) NOT NULL, 116 | `Batch_no` varchar(10) NOT NULL, 117 | `Mfg_Date` date DEFAULT NULL, 118 | `Entry_Date` date DEFAULT NULL, 119 | `Buying_Price` int(11) DEFAULT NULL, 120 | `Manufacturer` varchar(50) DEFAULT NULL 121 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 122 | 123 | -- 124 | -- Dumping data for table `med_details` 125 | -- 126 | 127 | INSERT INTO `med_details` (`Med_ID`, `Batch_no`, `Mfg_Date`, `Entry_Date`, `Buying_Price`, `Manufacturer`) VALUES 128 | ('3', '12', '2017-08-29', '2017-06-29', 10, 'company'), 129 | ('2', '123', '2016-07-25', '2016-05-25', 20, 'gsk'), 130 | ('5', '145', '2017-09-04', '2018-10-06', 15, 'expired company'), 131 | ('4', '165', '2017-12-06', '2018-10-04', 15, 'Not a comp'), 132 | ('48', '457', '2015-05-08', '2018-05-15', 48, 'FDC'); 133 | 134 | -- -------------------------------------------------------- 135 | 136 | -- 137 | -- Table structure for table `owners` 138 | -- 139 | 140 | CREATE TABLE `owners` ( 141 | `ID` int(11) NOT NULL, 142 | `Equity` varchar(5) DEFAULT NULL 143 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 144 | 145 | -- -------------------------------------------------------- 146 | 147 | -- 148 | -- Table structure for table `stock` 149 | -- 150 | 151 | CREATE TABLE `stock` ( 152 | `Med_Name` varchar(50) DEFAULT NULL, 153 | `Med_ID` int(11) NOT NULL, 154 | `Quantity` int(11) DEFAULT NULL, 155 | `Exp_Date` date DEFAULT NULL, 156 | `Category` varchar(10) DEFAULT NULL, 157 | `Selling_Price` int(11) DEFAULT NULL, 158 | `Batch_no` varchar(10) DEFAULT NULL 159 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 160 | 161 | -- 162 | -- Dumping data for table `stock` 163 | -- 164 | 165 | INSERT INTO `stock` (`Med_Name`, `Med_ID`, `Quantity`, `Exp_Date`, `Category`, `Selling_Price`, `Batch_no`) VALUES 166 | ('soframycin', 2, 5, '2019-11-01', 'cream', 27, '123'), 167 | ('citizen', 3, 10, '2019-10-29', 'tablet', 40, '12'), 168 | ('expired med', 5, 15, '2018-09-03', 'syrup', 18, '145'), 169 | ('Not a med', 4, 0, '2019-11-06', 'capsule', 20, '165'); 170 | 171 | -- -------------------------------------------------------- 172 | 173 | -- 174 | -- Table structure for table `supplier` 175 | -- 176 | 177 | CREATE TABLE `supplier` ( 178 | `Supplier_ID` int(11) NOT NULL, 179 | `Address` varchar(50) DEFAULT NULL, 180 | `Phone_no` bigint(20) DEFAULT NULL, 181 | `Company_Name` varchar(30) DEFAULT NULL, 182 | `Email` varchar(30) DEFAULT NULL 183 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 184 | 185 | -- 186 | -- Dumping data for table `supplier` 187 | -- 188 | 189 | INSERT INTO `supplier` (`Supplier_ID`, `Address`, `Phone_no`, `Company_Name`, `Email`) VALUES 190 | (1, 'neril', 9878456513, 'new', 'newcom@com.com'); 191 | 192 | -- -------------------------------------------------------- 193 | 194 | -- 195 | -- Table structure for table `users` 196 | -- 197 | 198 | CREATE TABLE `users` ( 199 | `User_name` varchar(50) NOT NULL, 200 | `password` varchar(255) DEFAULT NULL, 201 | `Address` varchar(50) DEFAULT NULL, 202 | `Phone_no` bigint(20) DEFAULT NULL, 203 | `Name` varchar(50) DEFAULT NULL, 204 | `Usertype` varchar(30) NOT NULL 205 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 206 | 207 | -- 208 | -- Dumping data for table `users` 209 | -- 210 | 211 | INSERT INTO `users` (`User_name`, `password`, `Address`, `Phone_no`, `Name`, `Usertype`) VALUES 212 | ('BS', '$2y$10$XsnLoKA07mNjy7spz2pWbeY70r4jZFBuAG6Sb/D6SO3PWwfgL8q7e', 'Vashi', 7898546512, 'bhavuk', 'Employee'), 213 | ('mohit_15', '$2y$10$P6gxhwb.XaUd8Sj3cMkCSuHpI0d.lfRtxlmI66scckBVLCi1GtoTa', 'kandivali', 9878456556, 'mohit', 'Admin'), 214 | ('mohit_30', '$2y$10$ViMNDmXY8bxQ6G91.lQDTefQazz/YDTmhW.MUiIWTps3Dmiv0t8I6', 'kandivali', 4565879814, 'mohit', 'Admin'), 215 | ('sid_25', '$2y$10$RNzm5RRB/k88EW0y0rJJOeYwJ9MUiY4U3f3.tNAB6lF1IdjwIkiiK', 'borivali', 7896541336, 'Siddhant', 'Employee'); 216 | 217 | -- 218 | -- Triggers `users` 219 | -- 220 | DELIMITER $$ 221 | CREATE TRIGGER `before_employee_update` AFTER UPDATE ON `users` FOR EACH ROW BEGIN 222 | INSERT INTO employees_audit 223 | SET action = 'update', 224 | Username = OLD.User_name, 225 | name = OLD.Name, 226 | changedat = NOW(); 227 | END 228 | $$ 229 | DELIMITER ; 230 | 231 | -- -------------------------------------------------------- 232 | 233 | -- 234 | -- Stand-in structure for view `v_medicines` 235 | -- (See below for the actual view) 236 | -- 237 | CREATE TABLE `v_medicines` ( 238 | `Med_ID` int(11) 239 | ,`Batch_no` varchar(10) 240 | ,`Med_Name` varchar(50) 241 | ,`Quantity` int(11) 242 | ,`Exp_Date` date 243 | ,`Category` varchar(10) 244 | ,`Selling_Price` int(11) 245 | ,`Mfg_Date` date 246 | ,`Entry_Date` date 247 | ,`Buying_Price` int(11) 248 | ,`Manufacturer` varchar(50) 249 | ); 250 | 251 | -- -------------------------------------------------------- 252 | 253 | -- 254 | -- Structure for view `v_medicines` 255 | -- 256 | DROP TABLE IF EXISTS `v_medicines`; 257 | 258 | CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v_medicines` AS select `stock`.`Med_ID` AS `Med_ID`,`stock`.`Batch_no` AS `Batch_no`,`stock`.`Med_Name` AS `Med_Name`,`stock`.`Quantity` AS `Quantity`,`stock`.`Exp_Date` AS `Exp_Date`,`stock`.`Category` AS `Category`,`stock`.`Selling_Price` AS `Selling_Price`,`med_details`.`Mfg_Date` AS `Mfg_Date`,`med_details`.`Entry_Date` AS `Entry_Date`,`med_details`.`Buying_Price` AS `Buying_Price`,`med_details`.`Manufacturer` AS `Manufacturer` from (`stock` join `med_details` on(((`stock`.`Med_ID` = `med_details`.`Med_ID`) and (`stock`.`Batch_no` = `med_details`.`Batch_no`)))) ; 259 | 260 | -- 261 | -- Indexes for dumped tables 262 | -- 263 | 264 | -- 265 | -- Indexes for table `customers` 266 | -- 267 | ALTER TABLE `customers` 268 | ADD PRIMARY KEY (`Cust_ID`); 269 | 270 | -- 271 | -- Indexes for table `employee` 272 | -- 273 | ALTER TABLE `employee` 274 | ADD PRIMARY KEY (`Emp_ID`), 275 | ADD KEY `empfk` (`User_name`); 276 | 277 | -- 278 | -- Indexes for table `employees_audit` 279 | -- 280 | ALTER TABLE `employees_audit` 281 | ADD PRIMARY KEY (`id`); 282 | 283 | -- 284 | -- Indexes for table `med_details` 285 | -- 286 | ALTER TABLE `med_details` 287 | ADD PRIMARY KEY (`Batch_no`); 288 | 289 | -- 290 | -- Indexes for table `owners` 291 | -- 292 | ALTER TABLE `owners` 293 | ADD PRIMARY KEY (`ID`); 294 | 295 | -- 296 | -- Indexes for table `supplier` 297 | -- 298 | ALTER TABLE `supplier` 299 | ADD PRIMARY KEY (`Supplier_ID`); 300 | 301 | -- 302 | -- Indexes for table `users` 303 | -- 304 | ALTER TABLE `users` 305 | ADD PRIMARY KEY (`User_name`); 306 | 307 | -- 308 | -- AUTO_INCREMENT for dumped tables 309 | -- 310 | 311 | -- 312 | -- AUTO_INCREMENT for table `employees_audit` 313 | -- 314 | ALTER TABLE `employees_audit` 315 | MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; 316 | 317 | -- 318 | -- Constraints for dumped tables 319 | -- 320 | 321 | -- 322 | -- Constraints for table `employee` 323 | -- 324 | ALTER TABLE `employee` 325 | ADD CONSTRAINT `empfk` FOREIGN KEY (`User_name`) REFERENCES `users` (`User_name`) ON DELETE CASCADE ON UPDATE CASCADE; 326 | COMMIT; 327 | 328 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; 329 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; 330 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; 331 | -------------------------------------------------------------------------------- /retail_saleA.php: -------------------------------------------------------------------------------- 1 | 7 | alert('Please use Admin login to access this page'); 8 | location='index.html'; 9 | "; 10 | } 11 | } 12 | else { 13 | echo ""; 17 | } 18 | ?> 19 | 20 | 21 | 22 | Retail Sale 23 | 24 | 25 | 26 | 138 | 139 | 140 |
141 |

Retail Sale

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 |
Medicine NameQuantityUnit PriceAmountAction
185 |

186 | 187 | 188 | 189 | 190 |

191 | 192 |
193 |
194 | 195 | 196 | -------------------------------------------------------------------------------- /retail_saleE.php: -------------------------------------------------------------------------------- 1 | 7 | alert('Please login'); 8 | location='index.html'; 9 | "; 10 | } 11 | } 12 | else { 13 | echo ""; 17 | } 18 | ?> 19 | 20 | 21 | 22 | 23 | 24 | Retail Sale 25 | 26 | 141 | 142 | 143 |

Retail Sale

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 |
Medicine NameQuantityUnit PriceAmountAction
188 |

189 | 190 | 191 | 192 | 193 | 194 |
195 | 196 | 197 | -------------------------------------------------------------------------------- /userverify.php: -------------------------------------------------------------------------------- 1 | query("SELECT * FROM users WHERE User_name='$User_name'"); 6 | //echo $result_pass; 7 | 8 | if ( $result_pass->num_rows == 0 ){ // User doesn't exist 9 | echo ""; 13 | } 14 | else { // User exists*/ 15 | $user = $result_pass->fetch_assoc(); 16 | if (password_verify($password, $user['password'])) { 17 | // if ( $password== $user['password']) { 18 | if($user['Usertype']=="Admin"){ 19 | header("location: admin.php"); 20 | //echo"successful login"; 21 | } 22 | else{ 23 | header("location:employee.php"); 24 | } 25 | } 26 | // else{ 27 | // echo"Not verified"; 28 | // } 29 | // if ( $password== $user['password']) { 30 | // if($user['Usertype']=="Admin"){ 31 | // header("location: admin.php"); 32 | // //echo"successful login"; 33 | // } 34 | // else{ 35 | // header("location:employee.php"); 36 | // } 37 | // } 38 | else { 39 | echo ""; 43 | } 44 | } 45 | 46 | ?> -------------------------------------------------------------------------------- /view_customer.php: -------------------------------------------------------------------------------- 1 | 7 | alert('Please login'); 8 | location='index.html'; 9 | "; 10 | } 11 | } 12 | else { 13 | echo ""; 17 | } 18 | ?> 19 | 20 | 21 | 22 | 23 | 24 | View Customer 25 | 26 | 27 |

Customer List

28 |
29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | "; 51 | echo ""; 52 | echo ""; 53 | echo ""; 54 | echo ""; 55 | echo ""; 56 | echo ""; 57 | echo ""; 58 | } 59 | ?> 60 |
Customer IDCustomer NameGenderPhone No.AddressAge
" . $row['Cust_ID'] ."" . $row['Name'] . "" . $row['Gender'] . "" . $row['Phone_no'] . "" . $row['Address'] . "" . $row['Age'] . "
61 | 62 | 63 | -------------------------------------------------------------------------------- /view_employee.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Employee List 5 | 6 | 7 | 8 | 9 |

Employee List

10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | "; 35 | echo ""; 36 | echo ""; 37 | echo ""; 38 | echo ""; 39 | echo ""; 40 | echo ""; 41 | echo ""; 42 | } 43 | ?> 44 |
Employee IDUsernameEmployee NamePasswordContact No.Role
" . $row['Emp_ID'] ."" . $row['User_name'] . "" . $row['Name'] . "" . $row['password'] . "" . $row['Phone_no'] . "" . $row['Role'] . "
45 | 46 | 48 | -------------------------------------------------------------------------------- /view_medicineE.php: -------------------------------------------------------------------------------- 1 | 7 | alert('Please login'); 8 | location='index.html'; 9 | "; 10 | } 11 | } 12 | else { 13 | echo ""; 17 | } 18 | ?> 19 | 20 | 21 | 22 | 23 | 24 | View Stock 25 | 26 | 27 |

Stock of Medicines

28 |
29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | "; 59 | echo ""; 60 | echo ""; 61 | echo ""; 62 | echo ""; 63 | echo ""; 64 | echo ""; 65 | echo ""; 66 | echo ""; 67 | echo ""; 68 | echo ""; 69 | echo ""; 70 | echo ""; 71 | } 72 | // } 73 | // else{ 74 | // $result = mysql_query("select * from stock natural join med_details where $med_category='$search';"); 75 | // while ($row = mysql_fetch_array($result)) 76 | // { 77 | // echo ""; 78 | // echo ""; 79 | // echo ""; 80 | // echo ""; 81 | // echo ""; 82 | // echo ""; 83 | // echo ""; 84 | // echo ""; 85 | // echo ""; 86 | // echo ""; 87 | // echo ""; 88 | // echo ""; 89 | // echo ""; 90 | // } 91 | // } 92 | ?> 93 |
Medicine IDMedicine NameExpiry dateAvailableCategoryManufacturerBuying priceSelling priceEntry dateManufacturing DateBatch No.
" . $row['Med_ID'] ."" . $row['Med_Name'] . "" . $row['Exp_Date'] . "" . $row['Quantity'] . "" . $row['Category'] . "" . $row['Manufacturer'] . "" . $row['Buying_Price'] . "" . $row['Selling_Price'] . "" . $row['Entry_Date'] . "" . $row['Mfg_Date'] . "" . $row['Batch_no'] . "
" . $row['Med_ID'] ."" . $row['Med_Name'] . "" . $row['Exp_Date'] . "" . $row['Quantity'] . "" . $row['Category'] . "" . $row['Manufacturer'] . "" . $row['Buying_Price'] . "" . $row['Selling_Price'] . "" . $row['Entry_Date'] . "" . $row['Mfg_Date'] . "" . $row['Batch_no'] . "
94 |
95 | 96 | 97 | --------------------------------------------------------------------------------