Skip to content
Open
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
927422c
Freshcery : completed with the sign and login system along with the u…
HrishikeshThakkar-github Mar 28, 2025
0adba2f
Freshcery : completed with the sign and login system along with the u…
HrishikeshThakkar-github Mar 28, 2025
72837e1
Freshcery : completed with product category crud and dynamic genratio…
HrishikeshThakkar-github Mar 31, 2025
86360bd
Freshcery : started with the cart and implemented it in product page
HrishikeshThakkar-github Mar 31, 2025
2591a3d
Freshcery : added the sql file
HrishikeshThakkar-github Mar 31, 2025
4ead58d
Freshcery : completed with cart feature which displays quantity of pr…
HrishikeshThakkar-github Apr 1, 2025
baf4d18
Freshcery : completed with checkout page
HrishikeshThakkar-github Apr 1, 2025
f35a783
Freshcery : completed the integration of stripe payment system
HrishikeshThakkar-github Apr 2, 2025
fd8f677
Freshcery : completed the integration of stripe payment system(update…
HrishikeshThakkar-github Apr 2, 2025
7d7cf46
Freshcery : completed with checkout page (removal page)
HrishikeshThakkar-github Apr 2, 2025
5effc97
Freshcery : completed with checkout page (updated it with the additio…
HrishikeshThakkar-github Apr 2, 2025
bca826b
Freshcery : completed with checkout page (updated it with the remove …
HrishikeshThakkar-github Apr 2, 2025
6adb614
Freshcery : completed with transaction page and removal of cart items…
HrishikeshThakkar-github Apr 3, 2025
d8dce8f
Freshcery : started with the development of the admin panel - complet…
HrishikeshThakkar-github Apr 3, 2025
4e02b64
Freshcery : added the functionality of adding products and adding cat…
HrishikeshThakkar-github Apr 4, 2025
5cb01e2
Freshcery : complted with the full admin panel and the project is rea…
HrishikeshThakkar-github Apr 4, 2025
8c24cd6
Freshcery : complted with the full admin panel and the project is rea…
HrishikeshThakkar-github Apr 4, 2025
9145dc3
Freshcery: made changes in the admin panel css
HrishikeshThakkar-github Apr 7, 2025
c5a2f22
Merge branch 'main' of github.com:HrishikeshThakkar-github/freshcery …
HrishikeshThakkar-github Apr 7, 2025
8d9fe5b
Stop tracking .vscode/launch.json
HrishikeshThakkar-github Apr 7, 2025
ff0a7b5
Freshcery: added some assets and made some minor changes and also add…
HrishikeshThakkar-github Apr 7, 2025
0a9329a
Freshcery : added the functionality of how a normal user cannot acces…
HrishikeshThakkar-github Apr 8, 2025
76c8014
Freshcery : added the validations almost everywhere made changes in t…
HrishikeshThakkar-github Apr 10, 2025
69965ef
Freshcery : made changes in the admin panel,made payment method work …
HrishikeshThakkar-github Apr 11, 2025
7ba2e0f
Freshcery : made changes in the admin panel,made payment method work …
HrishikeshThakkar-github Apr 11, 2025
88722e1
Freshcery : made changes in the admin panel,made payment method work …
HrishikeshThakkar-github Apr 10, 2025
6253508
Freshcery : made changes in the admin panel,made payment method work …
HrishikeshThakkar-github Apr 11, 2025
9232650
Merge branch 'development' of github.com:HrishikeshThakkar-github/fre…
HrishikeshThakkar-github Apr 14, 2025
462f27e
Freshcery : made a small change in the shop page
HrishikeshThakkar-github Apr 14, 2025
759359d
Freshcery: Remove ignored files from repository
HrishikeshThakkar-github Apr 16, 2025
d45ae30
added a Readme .md for better installation
HrishikeshThakkar-github Apr 16, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 88 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [

{
"name": "Listen for Xdebug",
"type": "php",
"request": "launch",
"port": 9003
},
{
"name": "Launch currently open script",
"type": "php",
"request": "launch",
"program": "${file}",
"cwd": "${fileDirname}",
"port": 0,
"runtimeArgs": [
"-dxdebug.start_with_request=yes"
],
"env": {
"XDEBUG_MODE": "debug,develop",
"XDEBUG_CONFIG": "client_port=${port}"
}
},
{
"name": "Launch Built-in web server",
"type": "php",
"request": "launch",
"runtimeArgs": [
"-dxdebug.mode=debug",
"-dxdebug.start_with_request=yes",
"-S",
"localhost:0"
],
"program": "",
"cwd": "${workspaceRoot}",
"port": 9003,
"serverReadyAction": {
"pattern": "Development Server \\(http://localhost:([0-9]+)\\) started",
"uriFormat": "http://localhost:%s",
"action": "openExternally"
}
},
{
"name": "Launch built-in server and Debug",
"type": "php",
"request": "launch",
"noDebug": false,
"runtimeArgs": [
"-S",
"localhost:8000",
"-t",
"."
],
"cwd": "${workspaceRoot}/.",
"serverReadyAction": {
"action": "openExternally"
}
},
{
"name": "Launch built-in server and Profile",
"type": "php",
"request": "launch",
"noDebug": true,
"runtimeArgs": [
"-S",
"localhost:8000",
"-t",
"."
],
"cwd": "${workspaceRoot}/.",
"serverReadyAction": {
"action": "openExternally"
},
"profile": true,
"openProfile": true
},
{
"name": "Listen for Xdebug",
"type": "php",
"request": "launch"
}
]
}
94 changes: 94 additions & 0 deletions about.php
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

format this file and all other files.

Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
<?php include 'include/header.php'?>
<div id="page-content" class="page-content">
<div class="banner">
<div class="jumbotron jumbotron-bg text-center rounded-0" style="background-image: url('assets/img/bg-header.jpg');">
<div class="container">
<h1 class="pt-5">
About Us
</h1>
<p class="lead">
Save time and leave the groceries to us.
</p>
</div>
</div>
</div>

<section class="bg-leaf">
<div class="container">
<div class="row justify-content-center">
<div class="col-md-8 text-center mb-3">
<h1 class="title text-uppercase mb-2">Freshcery</h1>
<h5>
Groceries Organic Store
</h5>
</div>
<div class="col-md-10">
<p class="text-justify">
Occaecat sunt id anim officia laborum incididunt dolore sit consequat consectetur enim fugiat aute culpa consequat cillum incididunt officia sed esse laborum anim aliqua et duis reprehenderit commodo do dolor dolor deserunt esse in aute anim adipisicing deserunt eu tempor veniam magna magna nulla in ea nulla elit est do veniam dolor pariatur in ut deserunt adipisicing est anim proident occaecat aliquip sunt enim occaecat cillum commodo in duis fugiat pariatur officia aliquip anim in dolore id id pariatur pariatur enim quis excepteur proident incididunt dolor consequat nisi et veniam occaecat sed exercitation dolore eiusmod elit sed voluptate adipisicing ut irure ad ut ex deserunt exercitation amet in eu quis ut occaecat non sunt labore reprehenderit elit commodo aute ea occaecat tempor dolor sed ut cillum aute et pariatur sit consequat commodo sunt sit amet nulla commodo aute laborum non ullamco ea laboris do adipisicing quis consequat adipisicing ea cupidatat et minim pariatur sed amet cillum commodo pariatur fugiat duis id amet ut exercitation voluptate culpa fugiat nostrud aute.
</p>
</div>
</div>

<div class="row justify-content-center align-items-center mt-3">
<div class="col-md-4">
<img src="assets/img/fruits.jpg" class="img-fluid">
</div>
<div class="col-md-6">
<h5>
Straight from the Farm
</h5>
<p>
Our farm-to-table concept emphasizes on getting the fresh produce directly from local farms to your tables within one day, hence you know you get the freshest produce straight from harvest.
</p>
<p>
Our farm-to-table concept emphasizes on getting the fresh produce directly from local farms to your tables within one day, hence you know you get the freshest produce straight from harvest.
</p>
<p>
Our farm-to-table concept emphasizes on getting the fresh produce directly from local farms to your tables within one day, hence you know you get the freshest produce straight from harvest.
</p>
</div>
</div>

<div class="row justify-content-center align-items-center text-right mt-3">
<div class="col-md-6">
<h5>
Know Your Farmers
</h5>
<p>
We want you to know exactly who is growing your food by having the farmers profile on each item and farmers page. You’re welcome to visit the farms and see the love they put into growing your food.
</p>
<p>
We want you to know exactly who is growing your food by having the farmers profile on each item and farmers page. You’re welcome to visit the farms and see the love they put into growing your food.
</p>
<p>
We want you to know exactly who is growing your food by having the farmers profile on each item and farmers page. You’re welcome to visit the farms and see the love they put into growing your food.
</p>
</div>
<div class="col-md-4">
<img src="assets/img/vegetables.jpg" class="img-fluid">
</div>
</div>

<div class="row justify-content-center align-items-center mt-3">
<div class="col-md-4">
<img src="assets/img/fish.jpg" class="img-fluid">
</div>
<div class="col-md-6">
<h5>
Improving Farmers’ Livelihood
</h5>
<p>
Slowly but sure, by cutting the complex supply chain and food system, we hope to improve the welfare of farmers by giving them the returns they deserve for their hard work.
</p>
<p>
Slowly but sure, by cutting the complex supply chain and food system, we hope to improve the welfare of farmers by giving them the returns they deserve for their hard work.
</p>
<p>
Slowly but sure, by cutting the complex supply chain and food system, we hope to improve the welfare of farmers by giving them the returns they deserve for their hard work.
</p>
</div>
</div>
</div>
</section>
</div>
<?php include 'include/footer.php'?>
190 changes: 190 additions & 0 deletions admin-panel/admin.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,190 @@
<?php
session_start();
define("freshcery", "http://freshcery");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use proper naming conventions. Constants must be uppercase.
https://www.php.net/manual/en/language.constants.php

?>
<?php include '../configration/db.config.php' ?>
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="utf-8">
<!-- This file has been downloaded from Bootsnipp.com. Enjoy! -->
<title>Admin Panel</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="http://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet">
<link href="styles/style.css" rel="stylesheet">
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>
<link href="http://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet">
<link href="styles/style.css" rel="stylesheet">
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
</head>

<body>


<div id="wrapper">
<!-- <nav class="navbar header-top fixed-top navbar-expand-lg navbar-dark bg-dark">
<div class="container">
<a class="navbar-brand" href="#" style="font-style: italic;"><img src="../assets/img/logo/logo-white.png" alt=" Freschcery admin-panel" height="30px" width="114px">Admin panel</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarText" aria-controls="navbarText"
aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>

<div class="collapse navbar-collapse" id="navbarText">
<ul class="navbar-nav side-nav">
<li class="nav-item">
<a class="nav-link text-white" style="margin-left: 20px;" href="<?php echo freshcery; ?>/admin-panel/admin.php">Home
<span class="sr-only">(current)</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="<?php echo freshcery; ?>/admin-panel/categories.php" style="margin-left: 20px;">Categories</a>
</li>
<li class="nav-item">
<a class="nav-link" href="<?php echo freshcery; ?>/admin-panel/products.php" style="margin-left: 20px;">Products</a>
</li>

<li class="nav-item">
<a class="nav-link" href="<?php echo freshcery; ?>/admin-panel/orders.php" style="margin-left: 20px;">Orders</a>
</li>

</ul>
<ul class="navbar-nav ml-md-auto d-md-flex">
<li class="nav-item">
<a class="nav-link" href="admin.php">Home
<span class="sr-only">(current)</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="<?php echo freshcery; ?>/auth/admin-logout.php"">logout
<span class="sr-only">(current)</span>
</a>
</li>
<li class="nav-item dropdown">

<a class="nav-link" id="navbarDropdown" role="button" aria-haspopup="true" aria-expanded="false" style="color:white">
<?php echo $_SESSION['username']?>
</a>
</li>


</ul>
</div>
</div>
</nav> -->
<?php include 'nav.php'?>
<div class="container-fluid">

<div class="row">
<div class="col-md-4">
<div class="card">
<div class="card-body">
<h5 class="card-title">Products</h5>
<!-- <h6 class="card-subtitle mb-2 text-muted">Bootstrap 4.0.0 Snippet by pradeep330</h6> -->
<p class="card-text">number of products: <?php echo $_SESSION['product_count']?></p>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


</div>
</div>
</div>
<div class="col-md-4">
<div class="card">
<div class="card-body">
<h5 class="card-title">Orders</h5>
<!-- <h6 class="card-subtitle mb-2 text-muted">Bootstrap 4.0.0 Snippet by pradeep330</h6> -->
<p class="card-text">number of orders: <?php echo $_SESSION['orders_count']?></p>

</div>
</div>
</div>
<div class="col-md-4">
<div class="card">
<div class="card-body">
<h5 class="card-title">Categories</h5>

<p class="card-text">number of categories: <?php echo $_SESSION['categories_count']?></p>

</div>
</div>
</div>
</div>
<div class="row ">
<div class="col-md-6">
<div class="card">
<div class="card-body">
<h5 class="card-title">Products per Category</h5>
<canvas id="productsByCategory"></canvas>
</div>
</div>
</div>
<div class="col-md-6">
<div class="card">
<div class="card-body">
<h5 class="card-title">Top 5 Ordered Products</h5>
<canvas id="topOrderedProducts"></canvas>
</div>
</div>
</div>
</div>

</div>
</div>
<script>
// Bar Chart: Products per Category
const categoryData = {
labels: ['Electronics', 'Fashion', 'Home Decor', 'Sports', 'Books'],
datasets: [{
label: 'Products per Category',
data: [120, 95, 78, 50, 40],
backgroundColor: ['#3498db', '#e74c3c', '#2ecc71', '#f1c40f', '#9b59b6'],
borderColor: ['#2980b9', '#c0392b', '#27ae60', '#f39c12', '#8e44ad'],
borderWidth: 1
}]
};
new Chart(document.getElementById('productsByCategory'), {
type: 'bar',
data: categoryData,
options: {
responsive: true,
scales: {
y: {
beginAtZero: true
}
}
}
});

// Line Chart: Top 5 Ordered Products
const topProductsData = {
labels: ['Laptop', 'Shoes', 'Smartphone', 'Watch', 'Backpack'],
datasets: [{
label: 'Orders',
data: [250, 180, 150, 130, 100],
borderColor: '#e67e22',
backgroundColor: 'rgba(230, 126, 34, 0.2)',
fill: true,
tension: 0.3
}]
};
new Chart(document.getElementById('topOrderedProducts'), {
type: 'line',
data: topProductsData,
options: {
responsive: true,
scales: {
y: {
beginAtZero: true
}
}
}
});
</script>
<script type="text/javascript">

</script>
</body>

</html>
Loading