0% found this document useful (0 votes)
76 views106 pages

B Tech Project Report 1

Uploaded by

Codzz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
76 views106 pages

B Tech Project Report 1

Uploaded by

Codzz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 106

A report submitted in partial fulfilment

of the requirements for

Report: B. Tech Final Year Project


titled
Social Warrior
in

Computer Science & Engineering

by

Anand Gupta (2003600100019)


Harsh Vishwakarma (2003600100051)
Muskan Maurya (2003600100067)
Raj Chaudhary (2003600100080)

Under the guidance of


Ms. Prachi Yadav

Department of Computer Science and Engineering


Goel Institute Of Technology & Management
June 2024
Department of Computer Science and
Engineering

Goel Institute of Technology & Management

Certificate

This is to certify that the B. Tech final year project report titled “Social
Warrior” being submitted by Anand Gupta (2003600100019),Harsh
Vishwakarma (2003600100051),Muskan Maurya (2003600100067)
&Raj Chaudhary (2003600100080) for the award of B. Tech Final
year Project in Bachelor of Technology in Computer Science &
Engineering is a record of bona fide work carried out by him under my
guidance and supervision at the Department of Computer Science &
Engineering. The work presented in this report has not been submitted
elsewhere either in part or full to the best of my knowledge, for the award of
any other degree or diploma.

(Signature)
Ms. Prachi Yadav
Assistant Professor
Department of Computer Science and Engineering
Goel Institute of Technology & Management
(Affiliated to Dr. A.P.J Abdul Kalam Technical University, Lucknow)
Department of Computer Science and
Engineering

Goel Institute of Technology & Management

DECLARATION
I hereby declare that the project entitled “Social Warrior” submitted in
partial fulfillment of the requirements for the degree of Bachelor of Tech-
nology in Computer Science and Engineering at Goel Institute of
Technology & Management, Lucknow, is an original work carried out
by me under the supervision of Ms. Prachi Yadav, Assistant Professor
.
I further declare that this project has not been submitted earlier for the
award of any other degree or diploma to the best of my knowledge and belief.
I take full responsibility for any plagiarism or unethical practices that
may be found in the project report.
All the references and sources of information used in this project have
been duly acknowledged.

Signature
Anand Gupta (2003600100019)
Signature
Harsh Vishwakarma (2003600100051)
Signature
Muskan Maurya (2003600100067)
Signature
Raj Chaudhary (2003600100080)
3

Abstract

This project introduces a social media web application designed to promote


sustainable development and foster community engagement in social and
environmental initiatives. The platform aims to motivate individuals to par-
ticipate in social work and contribute to positive change within their commu-
nities. Key features include an online job portal and a donation system that
emphasizes the giving of items rather than money, facilitating both economic
empowerment and philanthropy. Furthermore, the application acknowledges
and rewards individuals who demonstrate exceptional social contributions,
fostering a culture of altruism and collective support. Additionally, a com-
plaint system enables users to report environmental issues promptly, aiding
in the maintenance of clean and safe surroundings. By leveraging technology
to inspire and mobilize action, this project seeks to cultivate a more inclusive
and sustainable future for society.
4

Acknowledgments

I would like to express our sincere gratitude and appreciation to all those
who have contributed to the successful completion of this project.
First and foremost, I extend our heartfelt thanks to our supervisor, Ms.
Prachi Yadav , Assistant Professor , for his invaluable guidance, constant
support, and encouragement throughout the project. His expertise, insightful
feedback, and constructive criticism have been instrumental in shaping this
work.
I are also grateful to the faculty members of the Department of Computer
Science and Engineering for their teachings and insights that have enriched
our knowledge and skills.
I would like to acknowledge our friends and classmates for their assistance,
motivation, and cooperation during the project. Their valuable suggestions
and discussions have been a source of inspiration and improvement.
Lastly, I extend our heartfelt thanks to our families for their unwaver-
ing support, understanding, and encouragement throughout our academic
journey.
I are truly grateful to all those who have directly or indirectly contributed
to this project, and I acknowledge their valuable contributions.

Anand Gupta
Roll No : 2003600100019
Harsh Vishwakarma
Roll No : 2003600100051
Muskan Maurya
Roll No : 2003600100067
Raj Chaudhary
Roll No : 2003600100080
Contents

1 Introduction 8
1.1 Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.1.1 Environmental Problems . . . . . . . . . . . . . . . . . 8
1.1.2 Impacts of Environments . . . . . . . . . . . . . . . . . 10
1.1.3 How Social Media helps increasing environmental aware-
ness . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
1.2 Contribution of Social Warrior in Solving Environmental Prob-
lems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
1.3 The Contributions of Individuals to Societal Betterment . . . 18
1.4 Problem Statements . . . . . . . . . . . . . . . . . . . . . . . 20
1.5 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

2 Required tools and utilities 24


2.1 Hardware Required:- . . . . . . . . . . . . . . . . . . . . . . . 25
2.2 Software Required:- . . . . . . . . . . . . . . . . . . . . . . . . 25

3 Design Of the System 26


3.1 Class Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
3.2 Object Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . 27
3.3 Communication Diagram . . . . . . . . . . . . . . . . . . . . . 28
3.4 Sequence Diagram . . . . . . . . . . . . . . . . . . . . . . . . 29
3.5 Activity Diagram . . . . . . . . . . . . . . . . . . . . . . . . . 30
3.6 Usecase Diagram . . . . . . . . . . . . . . . . . . . . . . . . . 31
3.7 Data Flow Diagram . . . . . . . . . . . . . . . . . . . . . . . . 32
3.7.1 0-Level DFD . . . . . . . . . . . . . . . . . . . . . . . 33
3.7.2 1-Level DFD . . . . . . . . . . . . . . . . . . . . . . . 34
3.7.3 2-Level DFD . . . . . . . . . . . . . . . . . . . . . . . 35
3.8 ER Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
CONTENTS 6

4 Implementation 37
4.1 General Zone: . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
4.1.1 Code:- . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
4.1.2 Snapshot:- . . . . . . . . . . . . . . . . . . . . . . . . . 46
4.2 Public Zone: . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
4.2.1 Code:- . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
4.2.2 Snapshot :- . . . . . . . . . . . . . . . . . . . . . . . . 75
4.3 Servant Zone: . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
4.3.1 Code:- . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
4.3.2 Snapshot:- . . . . . . . . . . . . . . . . . . . . . . . . . 90
4.4 Supervisor Zone: . . . . . . . . . . . . . . . . . . . . . . . . . 92
4.4.1 Code:- . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
4.4.2 Snapshot:- . . . . . . . . . . . . . . . . . . . . . . . . . 101

5 Conclusion and Future Work 103

Bibliography 105
List of Figures

1.1 Overview of Social Warrior . . . . . . . . . . . . . . . . . . . . 17

3.1 Class Diagram of Social Warrior . . . . . . . . . . . . . . . . . 26


3.2 Object Diagram of Social Warrior . . . . . . . . . . . . . . . . 27
3.3 Communication Diagram of Social Warrior . . . . . . . . . . . 28
3.4 Sequence Diagram of Social Warrior . . . . . . . . . . . . . . . 29
3.5 Activity Diagram of Social Warrior . . . . . . . . . . . . . . . 30
3.6 Usecase Diagram of Social Warrior . . . . . . . . . . . . . . . 31
3.7 0-Level DFD of Social Warrior . . . . . . . . . . . . . . . . . . 33
3.8 1-Level DFD of Social Warrior . . . . . . . . . . . . . . . . . . 34
3.9 2-Level DFD of Social Warrior . . . . . . . . . . . . . . . . . . 35
3.10 ER Diagram of Social Warrior . . . . . . . . . . . . . . . . . . 36

4.1 Login . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
4.2 Registration . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
4.3 Forget Password . . . . . . . . . . . . . . . . . . . . . . . . . . 47
4.4 Home page . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
4.5 Job . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
4.6 Donation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
4.7 Post Job . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
4.8 Create Post . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
4.9 Post Donation . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
4.10 Profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
4.11 Change Profile . . . . . . . . . . . . . . . . . . . . . . . . . . 78
4.12 Servant Dashboard . . . . . . . . . . . . . . . . . . . . . . . . 90
4.13 Top Social Person . . . . . . . . . . . . . . . . . . . . . . . . 90
4.14 Add Event . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
4.15 Your Event . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
4.16 Supervisor Home page . . . . . . . . . . . . . . . . . . . . . . 101
4.17 View Servent . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
4.18 Complain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
Chapter 1

Introduction

1.1 Environment
The physical, chemical, and biological elements that surround an organism
are all included in the term ”environment.” Ecosystems are formed when
these elements interact with one another and with living things. In addition
to man-made components like highways, buildings, pollution, and garbage,
the environment also consists of natural elements including air, water, soil,
sunlight, and climate. Maintaining biodiversity and enabling life on Earth
depend on our ability to comprehend and safeguard the environment.

1.1.1 Environmental Problems


India’s fast industrialization, population growth, urbanisation, and agricul-
tural methods provide a number of environmental issues. Several of India’s
most pressing environmental issues include:

1. Air Pollution: Air pollution is a major problem in major cities like


Delhi, Mumbai, and Kolkata. The main causes of air pollution include
industrial operations, construction, automobile emissions, and burn-
ing of crop leftovers. In addition to numerous health problems, this
pollution aggravates respiratory conditions.
2. Water Pollution: Untreated garbage disposal, sewage, industrial ef-
fluents, and agricultural runoff frequently damage India’s rivers, lakes,
and groundwater sources. Public health, aquatic ecosystems, and drink-
ing water quality are all impacted by this pollution.
3. Deforestation: India has seen a considerable amount of deforestation
as a result of logging, agriculture, urban growth, and infrastructure de-
velopment. Reduced forest cover exacerbates climate change, damages
habitats, erodes soil, and reduces biodiversity.
4. Waste Management: India produces a huge volume of solid trash,
which includes hazardous items, plastics, and electronic waste. Com-
munities that live close to dumpsites face health risks as well as pollu-
tion of the land, water, and air due to inadequate waste management
infrastructure.
1.1 Environment 9

5. Climate Change: Extreme weather events, increasing sea levels, al-


tered rainfall patterns, and rising temperatures are all consequences of
climate change that India is susceptible to. Public health, biodiversity,
agriculture, and water resources are all impacted by these changes.

6. Land Degradation: Land Degradation: Unsustainable farming meth-


ods, deforestation, and urbanisation are the main causes of soil erosion,
desertification, and degradation of agricultural areas in India.
1.1 Environment 10

1.1.2 Impacts of Environments


1. Humans: It’s possible that humans have influenced plant life more
than any other aspect of the environment [2](Ellis, 2011). A significant
portion of the world’s biomass has been appropriated by humans for our
own use [2](Haberl et al., 2007). Smil (2011) estimated that humans
have reduced the stock of terrestrial plant mass globally by up to [2]45%
in the last 2000 years through harvesting, deforestation, and conversion
of grasslands and wetlands, with a third of this reduction occurring
in the twentieth century. Soils have been altered by the numerous
changes people have made to land usage and land cover (Meyer and Tur
1994).Globally, human activity has had a substantial and frequently
adverse effect on the environment.

2. Animals: All around the world, the environment has a profound im-
pact on how animals live and behave. The loss and deterioration of
habitat brought on by human activities like urbanisation, agriculture,
and deforestation is one major effect. It becomes more difficult for
animals to obtain food, shelter, and appropriate reproductive grounds
when their natural environments get smaller. In addition to isolating
populations and decreasing genetic diversity, habitat loss causes frag-
mentation, which increases a species’ susceptibility to extinction.
There have been both long- and short-term cycles of climate change,
many of which have been abrupt and intense. The average global air
temperature has increased by [4] 1.1 ºF during the past 30 years, and
it is currently 1.4 ºF higher than it was at the beginning of the 20th
century. By 2100, average world temperatures are projected to have
increased by an additional [4] 2 to 11.5 ºF (Intergovernmental Panel on
Climate Change (IPCC), (2007). The main cause for concern is that
greenhouse gases produced by burning fossil fuels, which releases CO2
and methane into the atmosphere, are anthropogenic, or created by
humans.The ability of forests to store carbon is diminished by defor-
estation, resulting in the atmospheric release of carbon. Global warm-
ing is the effect of the gases, particularly CO2, acting as a blanket to
slow down the rate at which the Earth’s surface can radiate heat into
space. Because of this, there is currently more carbon dioxide in the
atmosphere than there has been in the previous 6,50,000 years.

3. Economy: The environment affects many different areas of the econ-


omy and human livelihoods in a significant way. Dependency on natural
resources has a major effect. Numerous economic endeavours, including
mining, forestry, fishing, tourism, and agriculture, significantly depend
1.1 Environment 11

on the environment’s ecosystem services and natural resources. For in-


stance, while tourism depends on intact ecosystems and picturesque
landscapes to draw tourists, agriculture needs on fertile soil, water
availability, and favourable weather conditions for crop growth. The
sustainability of these sectors may be threatened by any deterioration
or depletion of these natural resources, which would result in financial
losses and less prospects for livelihood for the communities who depend
on them.
A location’s economy and ecology are inextricably linked to one another
and are consequently interconnected in many ways. The environment
provides the economy with resources for survival, such as raw materi-
als for manufacturing, while also serving as a reservoir for waste and
discharges from these activities. Typically, improper handling of the
waste leads to pollution and further degrades the environment. The
best resources cannot be provided for economic activity in a poor and
unhealthy environment, which has an impact on economic develop-
ment. India is endowed with the most biodiverse eco zones on earth,
and [8]Uttarakhand is just as blessed as any other state. The state has
a stunning natural setting at its disposal.home to numerous hallowed
pilgrimage sites, including [8]Kedarnath Temple, Badrinath, Rishikesh,
and Haridwar; powerful mountain ranges, such as Nanda Devi; perpet-
ual rivers, such as Ganga, Bhagirath, Alaknanda, etc.; and stunning
flora and fauna Uttarakhand possesses the potential for expansion and
advancement via tourism, farming, and hydroelectric initiatives.Some
common impact of economy on public is in different forms . Some of
them are as follows:-

• Zero Hunger:- Out of the 17 Sustainable Goals, India embraced


the [6]second goal, ”Zero hunger by 2030,” with the intention of
ensuring that everyone has access to enough food. The nation’s
economic growth rates are not keeping pace with the rapidly shift-
ing demographics. India has a significant task ahead of them to
achieve zero hunger.
India’s economy has grown significantly in recent years and the
country produces enough food to feed its population, but [6]14.5%
of its 194.4 million people are undernourished (FAO). The 2019
Mortality etc. Global Nutrition Report states that[6] 51.4% of
women are anaemic and [6]20.8% of children are underweight.
This issue is also revealed by the [6]NFHS-4 analysis.
• Poverty:- After gaining independence 70 years ago, India has
seen a number of economic policies, initiatives, and changes that
have transformed a closed market economy into a free market
1.1 Environment 12

economy that was globalised throughout this time. But the deep,
persistent, and widespread poverty that exists in our nation has
always been a cause for concern. In actuality, a sizable portion of
the nation’s population lacks access to basic services like financial
services, food, clean water to drink, medical care, and sanitation,
making the minimum standard of living unachievable for them.
This is primarily because of years of centralised development and
unequal income distribution.
The Socio- Economic Caste Census, [7]2011 released several worry-
ing details on India’s poverty. The important points of the SECC
were as below:
(a) In India, there were [7]24.39 crore (243.9 million) households,
of which 17.91 crore (179.1 million) were village dwellers.
Among those,10.69 crore families were deemed to be impov-
erished.
(b) .37 crore (29.97%) of rural households were ”landless, with
manual labour accounting for a major portion of their in-
come.”
(c) [7]3.86 crore, or 21.53% of the families residing in villages, are
classified as SC/ST.
(d) 56% of rural homes in India were devoid offarmland
(e) 74.5% (13.34 crore) of rural households used to survive on a
monthly income of Rs 5,000 for their highest earner.
• Unemployment:- It makes sense that giving everyone access to
a basic income would be emphasised heavily in talks on economic
measures designed to promote social fairness. The unemployed,
who are assumed to have no source of support, are given special
attention in this situation. The topic of how many people are un-
employed in the nation emerges. The Planning Commission used
to provide unemployment figures until recently.
One significant problem that still plagues India’s economy is un-
employment. Being one of the most populated countries in the
world with a diverse labour force, changes in the unemployment
rate have a significant impact on the expansion and advancement
of the nation. What is India’s current unemployment rate, then?
In January 2024, there was a significant decline in the unemploy-
ment rate. The Centre for Monitoring Indian Economy (CMIE),
an independent research tank, released its most recent data, which
shows that [3]6.8% of Indian workers were unemployed in January.
India’s jobless rate dropped by 1.9 percent in a single month from
8.7 percent in December of the previous year.In the preceding six-
1.1 Environment 13

teen months, January 2024 saw the lowest unemployment rate.


However, the Oct.–Dec. 2023 quarter saw a rise in the unemploy-
ment rate for young people between the ages of 20 and 30. Youth
unemployment in the 20–24 age group rose to [3]44.49 percent
from 43.65 percent in the July–September quarter. In a similar
vein, youth unemployment in the 25–29 age group rose from 13.35
percent in the prior quarter to 14.33 percent in the Oct.–Dec. 2023
period.
1.1 Environment 14

1.1.3 How Social Media helps increasing environmen-


tal awareness
Social networking is become an integral element of modern living. Numerous
environmental problems are occurring both locally and worldwide as a result
of the advancements in globalisation, science, technology, and industry. So-
cial media can be used as a technique to quickly raise public awareness of a
number of current environmental issues and to reach a huge number of peo-
ple. Environmental educators and students or the general public can interact
to assess the utility of social media and the importance of environmental ed-
ucation. These days, people use social media to engage locally and globally
on small- to large-scale environmental issues and to support environmental
causes.
These days, a lot of people are familiar with the terms Facebook, QQ,
WhatApp, QZone, WeChat, LinkedIn, Skype, Google+, Instagram, Twitter,
and Snapchat. These are the most popular social media platforms that are
fostering worldwide relationships. Every social networking site has a unique
layout, aesthetic, draw, and set of uses. All in all, these social media sites
are doing a fantastic job of encouraging people to take action on a variety
of environmental issues. Many individuals, particularly the younger genera-
tion, participate in these social media platforms, which are highly active and
cover a wide range of topics, including solid waste management, renewable
energy news, and climate change and global warming [5](Robelia, Greenhow
& Burton, 2011).People can now conduct clean and green business and mod-
ify parts of their behaviour thanks to technology, but because of the careless
use of natural resources, people are still unable to keep up with the rate at
which the environment is changing both locally and worldwide. Social media
has developed into a vital instrument for giving the public a voice and a way
to engage in influencing or blocking decisions about the environment that
governments and businesses make that have an impact on everyone. This
has led to the development of a way for individuals to connect with regional
environmental issues and understand global stories that have an impact on
the entire community [5](Warner, Eames & Irving, 2014).
In order to promote their organisational goal, vision, action, publications,
events, and projects, government, commercial, public, and non-governmental
organisations, institutes, and autonomous bodies worldwide have quickly
come to rely heavily on social media as a marketing and communication
tool. Ordinary individuals publish or share real-time images on social media
about a range of environmental issues, including pollution of the air, water,
soil, solid waste, forest fires, chemical or oil spills in waterways, illegal dump-
ing, the threat of plastic, and harmed flora or animals. This straightforward
1.1 Environment 15

yet efficient measure can lead to early detection of an environmental inci-


dent and prompt action from different environmental bodies [5](Roshandel
Arbatani, Labafi & Robati, 2016).
We want to emphasise in our discussion that social media, as you may
already be aware, is a powerful tool for educating people about environmental
issues. We can use it to for the development of the society and nature.
1.2 Contribution of Social Warrior in Solving Environmental
Problems 16

1.2 Contribution of Social Warrior in Solving


Environmental Problems
The application “Social Warrior” is developed to solve some of the societal
problems by using technology instead of using traditional methods . We all
know that in today’s era technology and internet is on boon , so we are here
to utilize these technologies in our project and try to help people through it.
Throughout society, many people engage in selfless activities, but their
contributions are sometimes overlooked. Unfortunately, our inability to recog-
nise their achievements undermines the possibility for increased motivation
and eventual advancement of their humanitarian objectives.To solve this
problem we come up with the idea of giving people mark of recognition
as a rank holder in the application.
To close this gap, there is an urgent need for an online job portal that is
specifically designed to meet the demands of people who are less educated or
seek rapid employment. This platform will offer a user-friendly interface that
streamlines the job search process and links job searchers with opportunities
that match their skills and preferences.

1. This Job Portal website is providing to the online job portal system.

2. This website can be also providing information about online job

3. The customer can get the online registration.

4. The Job Portal web application can be used by any employee to apply
job and any employer are post to job.

5. Anyone looking for work can be included in this, regardless of their


level of education.

To tackle the problem of waste management and simultaneously provide


for people’s fundamental needs, we developed a website that enables users
to share or donate extra or leftover products that they no longer need but
might still be valuable to others. As technology develops in this atomic age,
we might find a lot of uses that are advantageous to the community. In
today’s technology environment, people use a smartphone and the internet
to accomplish daily tasks like shopping, paying bills, managing work, and so
forth. In today’s internet-driven world, there isn’t a platform like that that
can sufficiently address the basic needs of the impoverished or those who
can’t take care of themselves. In light of this, we were motivated to develop
a platform that makes it easier to donate supplies like food, clothes, and
1.2 Contribution of Social Warrior in Solving Environmental
Problems 17
books. An online application that lets users choose how many items they
want to donate or gather from nearby residents. The user is always welcome
to donate any essential items they feel they are no longer in need of.

Figure 1.1: Overview of Social Warrior


1.3 The Contributions of Individuals to Societal Betterment 18

1.3 The Contributions of Individuals to So-


cietal Betterment
Many of us take societal change for granted and don’t even fully comprehend
it. Any community has undergone periodic change; nothing stays the same
forever. Social reform in human interactions and relationships that changes
cultural and social structures is what sociologists refer to as social change.
These alterations take place gradually and benefit society in the long
run. Education has been crucial in moulding a person’s personality. All
that constitutes social change is a modification of a society’s social structure.
Global education, urbanisation, and industrialization have all caused societies
to shift gradually in order to adapt.

• Be Aware: Being aware of the problems is the most fundamental and


essential knowledge that someone may have in order to change things.
In this situation, it is imperative that the students understand the
breadth and depth of the difficulties and concerns that exist in society.
Not only do all the important things need to be considered, but every
little thing, from the elements to a nationwide uprising, counts.

• Start With Small Efforts: Making a difference doesn’t always re-


quire big gestures; even little actions can have a positive impact on
society. Small actions that people can take on a daily basis include
planting a tree, giving blood, feeding the hungry, or donating some
winter blankets. These will all instill a greater sense of responsibility
in students.

• Take Part In Activities Arranged For Helping Others: To as-


sist causes and communities, the group organises a variety of drives,
marathons, rallies, and other events. Participation in all of these should
be encouraged in students from a young age as it will only heighten their
concern for societal issues. The school has the ability to plan events
such as these.

• Spread Awareness: It’s critical to voice your views and ideas about
social issues that you find bothersome because doing so may help you
influence someone else’s viewpoint. discussing topics that are generally
seen as taboo, as these are the ones that receive insufficient attention.

• Help People Around You Out: The first lesson that every pupil
learns is the importance of being grateful and helping others. One of
the most important things students should learn early on is this. The
1.3 The Contributions of Individuals to Societal Betterment 19

most popular saying we have heard is ”Sharing is Caring,” and it’s


time to put it into practice. Early demonstrations of compassion have
a great impact and shape a child’s personality.

• Encourage Education: Having an education gives one more oppor-


tunities, which is a show of empowerment. Increasing the literacy rate
can contribute to the development of a society that is better informed,
capable, and conscious. This could potentially aid in ending the never-
ending cycle of poverty perpetuation. Anyone can reorganise their lives
and learn what is right and bad with the aid of education.

• Volunteer: It is essential to volunteer and put up initiative and effort


in matters that are significant. Requiring students to volunteer at
organisations that support our society, such as food banks, orphanages,
nursing homes, and other establishments.
1.4 Problem Statements 20

1.4 Problem Statements


• Within society, numerous individuals engage in altruistic endeavors,
yet their contributions often elude our recognition. Regrettably, our
failure to acknowledge their efforts hampers the potential for heightened
motivation and subsequent enhancement of their altruistic pursuits.
• The rise in wastage of essential resources such as medicines, food,
books, and clothes highlights the urgent need for organized donation
systems. Currently, many individuals donate these items manually, vis-
iting different locations independently, to address the crisis of wastage
in our country. However, the lack of proper organization and manage-
ment limits the effectiveness of these efforts in alleviating the suffering
of the impoverished.
• There is an urgent need for accessible work options given the rising
rates of unemployment and the frequency of job insecurity, especially
for people with minimal education or those in immediate need of a job.
Conventional job portals tend to target highly qualified individuals,
under serving a sizable section of the populace.
An online job platform that is especially designed to meet the demands
of people with less education or who need work right away is desperately
needed to close this gap.
• The extensive use of social media platforms has resulted in a notable
change in user behaviour, as many people now primarily utilise these
platforms for amusement instead of taking advantage of their potential
to address societal concerns and improve the environment. Even with
social media’s enormous reach and power, a sizable percentage of users
continue to only consume content passively, missing opportunities to
raise awareness of important social issues and carry out worthwhile
charitable deeds.
In the digital age, this trend poses a serious threat to the development
of a socially and environmentally conscious culture. Social media’s
pervasive passive consumption feeds a vicious circle of inaction and
apathy, impeding attempts to address pressing societal issues including
poverty, inequality, climate change, and environmental degradation.

1.5 Motivation
1. Green Credit Program: Recently, the government introduced a
novel voluntary Green Credit programme intended to recognise and
1.5 Motivation 21

encourage people and organisations for their beneficial contributions


to the environment.Green Credits are awarded to participants for a
variety of actions that support environmental sustainability.

• A “green credit” is a type of reward given to people or organisa-


tions who carry out environmentally beneficial activities.
• The government launched this voluntary programme to encourage
different stakeholders to support sustainable practices and envi-
ronmental preservation.
• This initiative promotes and rewards voluntarily taking ecologi-
cally friendly acts and is a component of the larger ’LiFE’ cam-
paign (Lifestyle for Environment).

Covered Activities: To improve environmental sustainability, the


Green Credit programme includes eight main categories of activities:

(a) Tree Plantation:planting trees to counteract deforestation and


boost green cover
(b) Water Management:putting plans into action to effectively man-
age and preserve water resources.
(c) Sustainable Agriculture:Encouraging environmentally friendly
and sustainable farming methods is known as sustainable agricul-
ture.
(d) Waste Management:Reducing environmental contamination through
the use of efficient waste management systems.
(e) Air Pollution Reduction: Measures taken to enhance air
quality and lessen air pollution.
(f) Mangrove Conservation and Restoration:Maintaining and
rehabilitating mangrove ecosystems is essential for maintaining
ecological balance.

Green Credit Earning and Calculation: Using a specific website,


individuals must register their environmental efforts in order to earn
Green Credits. An authorised agency will then have to verify the activ-
ity.The administrator will issue a Green Credit certificate to the appli-
cant based on the agency’s report.The determination of Green Credit
is contingent upon various elements, including but not limited to re-
source requirements, scale, scope, size, and other pertinent parameters
that are essential to attain the intended environmental results.

2. Donational Study: The goal of the Donation Management System


may be to end world hunger by eliminating food waste and other
1.5 Motivation 22

poverty-stricken items. In the current operational state of affairs, a


number of NGOs are facing challenges, chiefly related to contact with
members and volunteers, while other NGOs are making donations. This
project’s primary goal is to reduce the amount of items destined for
poverty and employed by those in poverty being wasted. This applica-
tion is intended to help those who are impoverished. We are moving
towards giving away food scraps, medications, clothing, books, and
other items from middle-class and wealthy people to the less fortunate
who need the food to fill their void in their stomachs and the clothes
to go with it.We will work with a few non-governmental organisations
to gather the donation and give it to the underprivileged people.
The WHO estimates that[1] 469 million Indians lack regular access to
basic necessities. Merely [1] 20% of the entire populace is able to afford
the essential medical care and medications. It is essential to find a
remedy during these situations.On the other hand, it is vital to guar-
antee that those in need of supplies and medication can obtain them.
An improved and appropriate. Donating unused medications is one
method.

3. MGNREGA:The Indian government implemented the historic Ma-


hatma Gandhi National Rural Employment Guarantee Act (MGN-
REGA) in 2005 as a social welfare programme. Its goal is to give rural
households access to work by ensuring that every qualified home has at
least one adult member who works 100 days a year at a pay. The act
intends to lower poverty, promote rural development, and strengthen
the security of rural households’ means of subsistence.

4. PMNRF:A public charitable trust called the Prime Minister’s Na-


tional Relief Fund (PMNRF) was founded in India to help people and
families impacted by accidents, natural disasters, and other misfor-
tunes. It was founded soon after India attained independence in 1947,
and Jawaharlal Nehru, the country’s first prime minister, served as its
first chairman.

5. GIM:One of the eight missions listed in the National Action Plan on


Climate Change (NAPCC) is the National Mission for Green India
(GIM). The objective is to safeguard, replenish, and improve India’s
declining forest cover while addressing climate change through a blend
of adaptation and mitigation strategies. It takes a comprehensive ap-
proach to greening and concentrates on a variety of ecosystem services,
including carbon sequestration as a co-benefit and biodiversity, water,
biomass, preservation of mangroves, wetlands, and important habitats.
Due to the fact that this mission will be carried out on both public and
1.5 Motivation 23

private lands and that local communities will play a significant part
in planning, decision-making, implementation, and monitoring, it has
chosen an integrated cross-sectoral strategy.
Chapter 2

Required tools and utilities


In the web application “Social Warrior” we have used different tools and
utilities to fulfill the project need.These tools are mentioned below:-

1. Hypertext Markup Language: The common markup language used


to build and design content on the World Wide Web is called HTML,
or Hypertext Markup Language. It defines elements including text,
photos, links, forms, and multimedia content using a variety of tags and
attributes, giving web pages their structure and layout. Web browsers
read HTML pages so they may display content visually and allow users
to interact with it. Together with JavaScript for interactivity and CSS
(Cascading Style Sheets) for styling, it serves as the foundation for web
development.

2. Cascading Style Sheets : The stylesheet language known as CSS,


or Cascading Style Sheets, is used to specify how HTML texts are
presented and organised. It gives web developers the ability to style
different HTML elements, giving them control over how web sites look.
By using CSS, you may define attributes like fonts, colours, spacing,
alignment, and placement to produce aesthetically pleasing and unified
designs throughout a website. The way CSS operates is by applying
stylistic rules to individual HTML elements or groups of components. It
improves the way that presentation and content are separated, making
web design more effective and adaptable.

3. JavaScript: High-level, interpreted programming languages like JavaScript


are mostly employed to create dynamic, interactive content for web-
sites. Together with HTML and CSS, it was first created by Netscape
and has since grown to be one of the foundational technologies of the
World Wide Web. Web developers can add functionality to pages us-
ing JavaScript. This includes handling events, verifying form inputs,
responding to user actions, interacting with servers to fetch or deliver
data asynchronously (AJAX), and creating animations.
All contemporary web browsers support JavaScript, which can be used
both client-side—that is, within the user’s browser—and server-side—that
is, with tools like Node.js. It is a vital tool for web development and
is frequently used to create server-side, mobile, and web applications.
JavaScript is renowned for its adaptability since it can be used for a
2.1 Hardware Required:- 25

wide range of tasks, from basic scripting to the creation of intricate


applications.

4. Python: Python is a popular high-level interpreted programming lan-


guage that is easy to learn and has a lot of adaptability. Python was
developed by Guido van Rossum and initially made available in 1991.
Since then, it has grown significantly in popularity, ranking among the
most widely used programming languages globally.

5. Django Framework: Django is a high-level Python web framework


that offers a simple and straightforward architecture to make develop-
ing online applications easier. It adheres to the ”Don’t Repeat Your-
self” (DRY) philosophy, which aims to facilitate clean, maintainable
code and quick development.
By utilizing these tools and utilities, the proposed method can be ef-
fectively implemented.

2.1 Hardware Required:-


1. Operating System: Dual Core

2. Hard Disk: 40 GB

3. Monitor: 15 VGA Color

4. RAM: 2 GB

2.2 Software Required:-


1. Operating System: Windows OS

2. Front-End: HTML, CSS and JS

3. Back-End: Python

4. Framework: Bootstrap and Django

5. IDE: Visual Studio


Chapter 3

Design Of the System

3.1 Class Diagram


Software engineers use class diagrams, a sort of UML (Unified Modelling
Language) diagram, to visually express the relationships and organisation
of classes in a system. A standardised modelling language called UML is
useful for software system design and documentation. They assist with both
the design and documentation stages of the software development process,
making them a crucial component.

Figure 3.1: Class Diagram of Social Warrior


3.2 Object Diagram 27

3.2 Object Diagram


A UML (Unified Modelling Language) visual representation that shows the
instances of classes and their interactions within a system at a particular
point in time is called an object diagram. They offer a glimpse into the
structure of the system while it is being executed by displaying objects, their
characteristics, and the connections between them. We may examine the sys-
tem’s behaviour at a certain moment since object diagrams show behaviour
when objects have been instantiated.

Figure 3.2: Object Diagram of Social Warrior


3.3 Communication Diagram 28

3.3 Communication Diagram


A communication diagram in UML illustrates how objects or roles connected
to lifelines communicate with each other and with the messages that flow be-
tween them. This design was known as a cooperation diagram and used a
different notation in earlier iterations of the UML. One kind of interaction
diagram that you may use to examine the dynamic behaviour of a software
programme or system is the communication diagram. They offer a differ-
ent perspective on the same data as sequence diagrams. The structure of the
messages that are passed between the objects in an interaction is the main fo-
cus of communication diagrams, whereas the ordering of the messages across
time is the main focus of sequence diagrams. The inferred relationships be-
tween classes and the messages that travel between objects are depicted in
these diagrams.

Figure 3.3: Communication Diagram of Social Warrior


3.4 Sequence Diagram 29

3.4 Sequence Diagram


A system sequence diagram (SSD), also known as a sequence diagram in
software engineering, displays process interactions ordered in a temporal se-
quence. The objects, procedures, and messages that are exchanged in order
to perform the functionality are all shown in the diagram. Sequence diagrams
are commonly linked to the realisations of use cases in the 4+1 architectural
perspective model of the system that is being developed. Event diagrams or
event scenarios are other names for sequence diagrams.

Figure 3.4: Sequence Diagram of Social Warrior


3.5 Activity Diagram 30

3.5 Activity Diagram


Activity Diagrams are used to refer to the stages involved in carrying out
a use case and to show how control flows through a system. An activity
diagram, which focuses on the state of flow and the order in which it occurs,
is a sort of behavioural diagram that we may use to show both sequential
processing and concurrent processing of activities.

Figure 3.5: Activity Diagram of Social Warrior


3.6 Usecase Diagram 31

3.6 Usecase Diagram


An essential tool for system design is the use case diagram, which shows users’
interactions with a system visually. It acts as a road map for comprehending
a system’s functional requirements from the viewpoint of its users, facilitating
stakeholder communication and directing the development process.

Figure 3.6: Usecase Diagram of Social Warrior


3.7 Data Flow Diagram 32

3.7 Data Flow Diagram


DFD is an abbreviation for Data Flow Diagram. DFD represents the flow
of data within a system or process. It also provides information about each
entity’s inputs and outputs, as well as the overall process. DFD lacks con-
trol flow and contains no loops or decision rules. A flowchart can illustrate
certain operations based on data type. It is a graphical application used to
communicate with users, supervisors, and other professionals. It is useful for
analysing both current and new systems.
It provides an overview of

1. data is system processes.

2. What transformation are performed.

3. What data are stored.

4. What results are produced , etc.

Data flow diagrams can be depicted in a variety of ways. The DFD is


a structural analytical modelling tool. Data flow diagrams are widely used
because they allow us to visualise the essential phases and data involved in
software system processes.
Components of DFD

1. Process The transformation of input to output in a system occurs


as a result of process function. Process symbols are rectangular with
rounded corners, ovals, rectangles, or circles. The process is known as
a brief sentence, in one word or phrase to explain its essence.

2. Data FlowData flow outlines how information is transferred between


different elements of a system. The arrow is a symbol for data trans-
mission. To identify the information being transported, give the flow
a relatable name. Data flow represents both material and information
that is being transferred. Material shifts are modelled in systems that
are more than simply instructive. A particular flow should only trans-
fer one sort of information. The flow direction is represented by the
arrow which can also be bi-directional.

3. Warehouse Storage For subsequent usage, the data is kept in the


warehouse. The store’s symbol is represented by two horizontal lines.
The warehouse is simply not limited to being a data file; instead, it
can be anything, such as a filing cabinet, an optical disc, or a folder
3.7 Data Flow Diagram 33

containing documents. It is possible to see the data warehouse without


regard to how it is implemented. Data reading refers to data flowing
out of the warehouse, and data entry or updating refers to data flowing
into the warehouse.

4. Terminator The Terminator An outside force that converses with the


system while existing outside of it is called the Terminator. For in-
stance, it might be departments within the same organisation, client
groups, or organisations like banks .

3.7.1 0-Level DFD

Figure 3.7: 0-Level DFD of Social Warrior


3.7 Data Flow Diagram 34

3.7.2 1-Level DFD

Figure 3.8: 1-Level DFD of Social Warrior


3.7 Data Flow Diagram 35

3.7.3 2-Level DFD

Figure 3.9: 2-Level DFD of Social Warrior


3.8 ER Diagram 36

3.8 ER Diagram
ER diagrams form the basis of a relational database by defining business pro-
cesses through the use of data modelling techniques. They can describe the
entities, their characteristics, and the connections between them to demon-
strate the logical structure of databases. When designing databases and
working on projects that demand a clear data structure, ER diagrams are
crucial. Cardinality is another tool that ER diagrams employ to assist ex-
plain the relationship in a numerical context, especially when it comes to
minimums and maximums. Some examples of cardinalities that can appear
in an ERD include one, many, one, or zero, or one, many, and zero, or many.

Figure 3.10: ER Diagram of Social Warrior


Chapter 4

Implementation
The platform consists of four distinct zones catering to different user roles
and functionalities. The General Zone primarily handles user authentication
and registration processes. In contrast, the Public Zone serves as the main
interface for general users, providing access to features like rewards, dona-
tion platforms, and job listings. The Servant Zone is dedicated to NGO’s,
organizations, or individuals engaged in social work, offering tools for view-
ing top contributors and managing complaints. Lastly, the Supervisor Zone
is reserved for administrators overseeing the platform, enabling tasks such
as monitoring service providers, adding events/news, and managing overall
operations. Each zone plays a crucial role in facilitating user engagement
and maintaining platform functionality.

1. General Zone:-The General Zone serves as the foundational gateway


for users entering the platform. Here, users engage in essential activi-
ties such as logging in with existing credentials or registering for new
accounts. Through the login process, existing users gain secure ac-
cess to their personalized profiles and previous interactions, ensuring
a seamless experience across visits. On the other hand, registration
enables new users to create accounts by providing requisite informa-
tion such as usernames, email addresses, and passwords. This zone
establishes the fundamental framework for user interaction, laying the
groundwork for subsequent engagement with the platform’s features
and functionalities.

2. Public zone:- In the Public Zone, users encounter a diverse array of


features and services aimed at fostering community engagement and
social impact. One prominent aspect is the rewards system, where
users can both give and receive recognition for their contributions to
social causes. This incentivizes active participation and encourages a
culture of generosity within the community. Additionally, the donation
platform provides users with a channel to support those in need by con-
tributing items such as books, clothes, and accessories. Furthermore,
job listings offer opportunities for employment and economic empow-
erment, facilitating personal and professional growth. These features
collectively empower users to make meaningful contributions to society
while fostering a sense of belonging and collective responsibility.
4.1 General Zone: 38

3. Servant zone:- The Servant Zone is dedicated to NGOs, organizations,


or individuals actively involved in social work and community service.
Here, users can access specialized tools and functionalities tailored to
their roles as service providers. For instance, the ability to view top
socialized individuals allows servants to identify and acknowledge users
who have made significant contributions to social causes. Additionally,
the feature for viewing complaints enables servants to address commu-
nity concerns promptly and effectively. By providing a dedicated space
for social service-related activities, the Servant Zone facilitates collab-
oration, problem-solving, and the delivery of impactful interventions to
address societal challenges.

4. Supervisor zone:- The Supervisor Zone serves as the administrative


hub for overseeing the operations and management of the platform.
Here, supervisors or administrators have access to a suite of tools and
functionalities designed to streamline administrative tasks and ensure
the smooth functioning of the platform. For example, the ability to
view all servants allows supervisors to maintain an overview of service
providers and allocate resources effectively. Moreover, the feature for
adding events/news enables supervisors to disseminate important in-
formation and foster community engagement. Through administrative
capabilities such as managing user permissions and reviewing activity
logs, supervisors uphold platform integrity and facilitate a safe and
inclusive environment for users to connect, collaborate, and create pos-
itive social change.

The working and functions of each Zone are explained below:-

4.1 General Zone:


The modules of general zone are as follows

• Registration Page This module facilitates user registration on the


web application. To register, users must input essential details such
as email, contact number, city, state, and password. Registration is
mandatory for accessing the application; users cannot utilize its fea-
tures without completing the registration process.

• Login Page Through this module, users are able to sign in and gain
entry to the web application. By entering key details such as their
email and password, users can obtain access to the application.
4.1 General Zone: 39

4.1.1 Code:-
generalappurls.py :-

from django . urls import path


from . import views

urlpatterns = [
path ( ’ ’ , views . login , name = ’ login ’) ,
path ( ’ registation / ’ , views . registration , name = ’ registration ’) ,
path ( ’ forget_password / ’ , views . forget_password ,
name = ’ forgetpassword ’) ,
path ( ’ get_otp / ’ , views . get_otp , name = ’ get_otp ’) ,
path ( ’ verify_otp / ’ , views . verify_otp , name = ’ verify_otp ’) ,
path ( ’ change_password / ’ , views . change_password ,
name = ’ change_password ’) ,
]

views.py :-

from django . shortcuts import render , redirect , reverse


from . models import User
from django . contrib import messages
from publicapp . models import Profile , TopEnvorior
from django . contrib . auth . hashers import make_password ,
check_password
import random
from django . core . mail import send_mail
from django . conf import settings

# Create your views here .


def registration ( request ):
if request . method == ’ POST ’:
email = request . POST [ ’ email ’]
password = request . POST [ ’ password ’]
contact_no = request . POST [ ’ contact_no ’]
full_name = request . POST [ ’ full_name ’]
dob = request . POST [ ’ dob ’]
state = request . POST [ ’ state ’]
city = request . POST [ ’ city ’]
pin_code = request . POST [ ’ pin_code ’]

try :
check_email = User . objects . get ( email = email )
4.1 General Zone: 40

if check_email :
print ( ’ Already registered ’)
messages . success ( request , ’ Email Already Registered ’)
return render ( request , ’ registration . html ’ , locals ())
except :
user = User ( email = email , password = password )
user . save ()
# password encryption
current_user = User . objects . get ( email = email )
en cr yp te d_ pa ss wo rd =
make_password ( current_user . password )
print ( en cr yp te d_ pa ss wo rd )
User . objects . filter ( email = email )
. update ( password = en cr yp te d_ pa ss wo rd )
profile = Profile ( user = user , contact_no = contact_no ,
full_name = full_name , dob = dob , city = city ,
state = state , pin_code = pin_code )
profile . save ()
top = TopEnvorior ( profile = profile , reward =0). save ()
return render ( request , ’ login . html ’)
return render ( request , ’ registration . html ’)

def login ( request ):


if request . method == ’ POST ’:
email = request . POST [ ’ email ’]
raw_password = request . POST [ ’ password ’]

try :
user = User . objects . get ( email = email )
hashed_password = user . password
# password decrypt
is_correct = check_password ( raw_password ,

hashed_password )

if user . email == email and is_correct and


user . user_type == ’ general ’:
request . session [ ’ email ’] = email
return redirect ( reverse ( ’ publicapp : publichome ’ ))

elif user . email == email and raw_password == hashed_password


request . session [ ’ email ’] = email
return redirect ( reverse ( ’ serventapp : dashboard ’ ))
4.1 General Zone: 41

elif user . email == email and raw_password == hashed_password


and user . user_type == ’ supervisor ’:
request . session [ ’ email ’] = email
return redirect ( reverse ( ’ supervisorapp :
s u pe r v is o r da s h bo a r d ’ ))
except :
messages . error ( request , ’ Incorrect Email ID or Password ’)
return render ( request , ’ login . html ’ , locals ())
return render ( request , ’ login . html ’)

def forget_password ( request ):


return render ( request , ’ forgetpassword . html ’)

def get_otp ( request ):


if request . method == ’ POST ’:
email = request . POST [ ’ email ’]
print ( email )
# get user details
try :
user = User . objects . get ( email = email )
user_profile = Profile . objects . get ( user = user )
random_number = random . randint (1111 ,9999)
request . session [ ’ otp ’] = random_number
request . session [ ’ email ’] = email
subject = ’ Forget Your password ’
msg = f ’ Hello , { user_profile . full_name } your
OTP for Forget Password is { random_number }. ’
email_from = settings . EMAIL_HOST_USER
send_mail ( subject , msg , email_from , [ email ])
return render ( request , ’ fill_otp . html ’)
except :
messages . error ( request , ’ Incorrect Email ID
or Email Id not registered ’)
return render ( request , ’ forgetpassword . html ’ , locals ())
return render ( request , ’ fill_otp . html ’)

def verify_otp ( request ):


if request . method == ’ POST ’:
user_otp = request . POST [ ’ otp ’]
if int ( user_otp ) == request . session [ ’ otp ’ ]:
return render ( request , ’ change_password . html ’)
else :
messages . error ( request , ’ Incorrect OTP ’)
return render ( request , ’ fill_otp . html ’ , locals ())
4.1 General Zone: 42

return render ( request , ’ forgetpassword . html ’)

def change_password ( request ):


if request . method == ’ POST ’:
pass1 = request . POST [ ’ pass1 ’]
pass2 = request . POST [ ’ pass2 ’]
if pass1 == pass2 :
current_user = request . session [ ’ email ’]
User . objects . filter ( email = current_user )
. update ( password = pass2 )
# password encryption
user = User . objects . get ( email = current_user )
en cr yp te d_ pa ss wo rd = make_password ( user . password )
print ( en cr yp te d_ pa ss wo rd )
User . objects . filter ( email = current_user )
. update ( password = en cr yp te d_ pa ss wo rd )
return render ( request , ’ login . html ’)

return render ( request , ’ forgetpassword . html ’)

Tamplets:-

generalparent.html:-

<! DOCTYPE html >


< html lang = " en " >
< head >
< meta charset = " UTF -8 " >
< meta name = " viewport " content = " width = device width
, initial - scale =1.0 " >
{% load static %}
< title >
{% block title %} Document {% endblock title %}
</ title >
<! - - FONT AWESOME CDN -->
< link rel = " stylesheet " href = " https :// cdnjs . cloudflare . com /
ajax / libs / font - awesome /6.4.0/ css / all . min . css " integrity =
" s h a 5 1 2 i e c d L m a s k l 7 C V k q k X N Q / ZH / X L l v W Z O J y j 7 Y y 7 t c e n m p D 1 y p A S o z p m T /
E 0 i P t m F I B 4 6 Z m d t A c 9 e N B v H 0 H / Zpi
Bw == " crossorigin = " anonymous " referrerpolicy = " no - referrer " / >
<! - - BOOTSTRAP CDN -->
< link href = " https :// cdn . jsdelivr . net / npm / bootstrap@5 .3.1/ dist /
css / bootstrap . min . css " rel = " stylesheet "
integrity = " sha3844bw +/ aepP / Y C94 hE pV NV gi Zd gI C5 +
4.1 General Zone: 43

VKNBQNGCHeKRN + P t m o H D E X u p p v n D J z Q I u 9 " crossorigin = " anonymous " >


<! - - JS FILE -->
< script src = " {% static ’ js / style . js ’ %} " > </ script >
< script src = " {% static ’ js / validation . js ’ %} " > </ script >
<! - - CSS FILE -->
< link rel = " stylesheet " href = " {% static ’ css / generalstyle . css ’ %} " >
</ head >
< body >
< div class = " background - image " > </ div >
{% block body %}

{% endblock body %}
</ body >
</ html >

login.html:-

{% extends ’ generalparent . html ’ %}


{% load static %}
{% block title %} Login {% endblock title %}
{% block body %}
< div class = " wrapper " >
< form id = " loginform " onsubmit = " event . preventDefault (); login ();
" action = " {% url ’ generalapp : login ’ %} " method = " POST " >
{% csrf_token %}
<h1 > Login </ h1 >
<! - - validation messsage -->
< h5 style = " color : red ; " id = " validationresult " > </ h5 >
< div class = " input - box " >
< input type = " text " placeholder = " Email id " id = " email " name = " email " >
<i class = ’ bx bxs - user ’ > </i >
</ div >
< div class = " input - box " >
< input type = " password " placeholder = " Password " id = " password "
name = " password " >
<i class = ’ bx bxs - lock - alt ’ > </i >
</ div >
< div class = " remember - forgot " >
< label > < input type = " checkbox " > Remember Me </ label >
<a href = " {% url ’ generalapp : forgetpassword ’ %} " > Forgot Password </ a >
</ div >
< button type = " submit " class = " btn " > Login </ button >
< div class = " register - link " >
<p > Dont have an account ? <a href = "
{% url ’ generalapp : registration ’ %} " > Register </ a > </p >
4.1 General Zone: 44

</ div >


{% if messages %}
{% for m in messages %}
< h5 style = " color : red ; text - align : center ; " >{{ m }} </ h5 >
{% endfor %}
{% endif %}
</ form >
</ div >
{% endblock body %}

registration.html:-

{% extends ’ generalparent . html ’ %}


{% load static %}

{% block title %} Registration {% endblock title %}

{% block body %}
<! - - container -->
< div class = " wrapper " >
<! - - left box -->
< div class = " regleftbox " >
<! - - registration form -->
< form id = " registrationform " onsubmit = " event . preventDefault ();
registration (); " action = " {% url ’ generalapp : registration ’ %} "
method = " POST " class = " form w -75 mx - auto " >
{% csrf_token %}
<! - - validation message -->
<p style = " color : red ; " id = " validationresult " > </p >
< h1 style = " font - size : 36 px ;
text - align : center ; " > Registration </ h1 >
< div class = " row mt -3 " >
< div class = " col - sm -6 " >
< input type = " text " name = " email " id = " email " placeholder =
" Email address " class = " form - control " / >
</ div >
< div class = " col - sm -6 " >
< input type = " text " name = " contact_no "
id = " contact " placeholder = " Contact no . " class = " form - control " / >
</ div >
</ div >
< div class = " row mt -2 " >
< div class = " col - sm -12 " >
< input type = " text " name = " full_name " id = " name "
class = " form - control " placeholder = " Enter Full Name name " >
4.1 General Zone: 45

</ div >


</ div >
< div class = " row mt -2 fs -6 " >
< div class = " col - sm -12 " >
< input type = " date " id = " dob " required name = " dob " class = " form - control "
</ div >
</ div >
< div class = " row mt -2 fs -6 " >
< div class = " col - sm -12 " >
< select name = " state " required id = " state " class = " form - control " id = " " >
< option selected >--- Your State - - - </ option >
< option value = " UP " >UP </ option >
< option value = " MP " >MP </ option >
< option value = " Delhi " > Delhi </ option >
</ select >
</ div >
</ div >
< div class = " row mt -2 fs -6 " >
< div class = " col - sm -6 " >
< select name = " city " required id = " city " class = " form - control " >
< option selected >--- Your City - - - </ option >
< option value = " Lucknow " > Lucknow </ option >
< option value = " Kanpur " > Kanpur </ option >
< option value = " Gorakhpur " > Gorakhpur </ option >
</ select >
</ div >
< div class = " col - sm -6 " >
< input type = " text " required id = " pin " name = " pin_code " placeholder =
" Pin Code " class = " form - control " / > </ div >
</ div >
< div class = " row mt -2 fs -6 " >
< div class = " col - sm -6 " >
< input type = " password " required id = " password1 " name = " password "
placeholder = " Password " class = " form - control " / > </ div >
< div class = " col - sm -6 " >
< input type = " password " required id = " password2 " name =
" confirmpassword "
placeholder = " Confirm password " class = " form - control " / > </ div >
</ div >

< div class = " row my -4 " >


< div class = " col - sm -12 " style = " text - align : center ; " >
< Button type = " submit " class = " btn btn - warning w -80 " >
Create an account </ Button >
</ div >
4.1 General Zone: 46

</ div >


</ form >

<! - - already have an account -->


< div class = " row text - center fs -5 mb -4 " >
<a href = " {% url ’ generalapp : login ’ %} " style = " text - decoration : none ;
color : # fff ; " > Already a Social Warrior / Login . </a >
</ div >
< h5 style = " color : red ; text - align : center ; " >{{ msg } </ h5 >
</ div >
</ div >
{% endblock body %}

4.1.2 Snapshot:-

Figure 4.1: Login


4.1 General Zone: 47

Figure 4.2: Registration

Figure 4.3: Forget Password


4.2 Public Zone: 48

4.2 Public Zone:


The public zone contains the several modules of the user which are as follows

• Dashboard Upon logging in, users are directed to the landing page
where they can access various features including posts, notifications,
job listings, profiles, and a donation page. Users have the ability to
interact with posts by giving rewards, and they can also view top social
individuals on the dashboard.

• Add/Remove social work image Users can upload and remove im-
ages showcasing their social work on the application. They can also
receive rewards for their posts and have the option to delete them if
needed.

• Digital Rewards System Users can give rewards to other users’


posts and receive rewards on their own posts from fellow users.

• Donate something This feature enables users to donate items such


as books, clothes, and other accessories to those in need within the
community. Users can upload images of the items they wish to donate.

• Add/remove job This module offers a user-friendly interface for adding


or removing job listings, ensuring smooth interaction for both job providers
and seekers.

• Job Opportunities Users can view all available job opportunities


within their city through the application and apply for them seamlessly.

• Add/Remove Complain Users can report various societal issues such


as cleanliness, garbage disposal, waste management, and water wastage
by uploading images and providing descriptions of the problems.

• Notification Users receive notifications for various activities, such as


receiving rewards for their posts or updates on job applications.

• Profile This feature allows users to display basic information about


themselves. Users can easily change their profile picture and view all
their posts, job applications, and complaints.
Additionally, users can track the status of their complaints and delete
any posts, job listings, or complaints as needed.
4.2 Public Zone: 49

4.2.1 Code:-
publicappurls.py :-

fromdjango . urlsimportpath
from . importviews

urlpatterns =[
path ( ’ publichome / ’ , views . publichome , name = ’ publichome ’) ,
path ( ’ uploadpost ’ , views . uploadpost , name = ’ uploadpost ’) ,
path ( ’ like / < int : id >/ ’ , views . like_post , name = ’ like ’) ,
path ( ’ jobs / ’ , views . jobs , name = ’ jobs ’) ,
path ( ’ uploadjob / ’ , views . uploadjob , name = ’ uploadjob ’) ,
path ( ’ jobform / ’ , views . jobform , name = ’ jobform ’) ,
path ( ’ apply_job / < int : id >/ ’ , views . apply_job ,
name = ’ apply_job ’) ,
path ( ’ notifications / ’ , views . notifications ,
name = ’ notifications ’) ,
path ( ’ donation / ’ , views . donation , name = ’ donation ’) ,
path ( ’ postdonation / ’ , views . postdonation ,
name = ’ postdonation ’) ,
path ( ’ get_donation / < int : id >/ ’ , views . get_donation ,
name = ’ get_donation ’) ,
path ( ’ rewardondonate / < int : id >/ ’ , views . reward_donate ,
name = ’ rewardondonate ’) ,
path ( ’ cha ngeuse rprofi le / ’ , views . changeuserprofile ,
name = ’ cha ngeuse rprofi le ’) ,
path ( ’ logout / ’ , views . logout , name = ’ logout ’) ,
path ( ’ about / ’ , views . about , name = ’ about ’) ,
path ( ’ complain / ’ , views . complain , name = ’ complain ’) ,
path ( ’ contact / ’ , views . contact , name = ’ contact ’) ,
path ( ’ followers / ’ , views . followers , name = ’ followers ’) ,
path ( ’ followings / ’ , views . followings , name = ’ followings ’) ,
path ( ’ policy / ’ , views . policy , name = ’ policy ’) ,
path ( ’ profile / ’ , views . profile , name = ’ profile ’) ,
path ( ’ deletepost / < int : id >/ ’ , views . deletepost ,
name = ’ deletepost ’) ,
path ( ’ deletecomplain / < int : id >/ ’ , views . deletecomplain ,
name = ’ deletecomplain ’) ,
path ( ’ deletejob / < int : id >/ ’ , views . deletejob ,
name = ’ deletejob ’) ,
path ( ’ deletedonation / < int : id >/ ’ , views . deletedonation ,
name = ’ deletedonation ’) ,
path ( ’ scam / ’ , views . scam , name = ’ scam ’) ,
4.2 Public Zone: 50

path ( ’ terms / ’ , views . terms , name = ’ terms ’) ,


]

views.py :-

from django . shortcuts import render , redirect


from generalapp . models import User
from publicapp . models import Profile , Post , Job , Notification , Donation ,
Complain , TopEnvorior
from datetime import date
from django . views . decorators . cache import
cache_control # validate thourgh server
instead of browser
from django . http import JsonResponse

# Create your views here .


@cache_control ( no_cache = True , must_revalidate = True , no_store = True )
def publichome ( request ):
try :
if request . session [ ’ email ’ ]!= None :
# common code for user details
current_user = request . session [ ’ email ’]
c u r r e n t _ u s e r _ d e t a i l s = Profile . objects . get
( user = current_user )
top = TopEnvorior . objects . get
( profile = c u r r e n t _ u s e r _ d e t a i l s )
total_reward = top . reward
# top three envorior
top_envorior = TopEnvorior . objects . order_by
( ’ - reward ’ )[:8]

# code for publichome


post = Post . objects . all (). order_by ( ’ - pid ’)
return render ( request , ’ publichome . html ’ , locals ())

except KeyError :
return redirect ( ’ generalapp : login ’)

@cache_control ( no_cache = True , must_revalidate = True , no_store = True )


def uploadpost ( request ):
try :
if request . session [ ’ email ’ ]!= None :
# common code for user details
current_user = request . session [ ’ email ’]
c u r r e n t _ u s e r _ d e t a i l s = Profile . objects . get
4.2 Public Zone: 51

( user = current_user )
top = TopEnvorior . objects . get
( profile = c u r r e n t _ u s e r _ d e t a i l s )
total_reward = top . reward
# top three envorior
top_ four_e nvorio r = TopEnvorior . objects . order_by
( ’ - reward ’ )[:4]

# code for uploadpost


if request . method == ’ POST ’:
caption = request . POST [ ’ caption ’]
p_image = request . FILES [ ’ pimg ’]
Post . objects . create ( postcaption = caption ,
postimage = p_image ,
postby = current_user_details ,
posteddate = date . today ())
return redirect ( ’ publicapp : publichome ’)
except KeyError :
return redirect ( ’ generalapp : login ’)

def like_post ( request , id ):


current_user = request . session [ ’ email ’]
c u r r e n t _ u s e r _ d e t a i l s = Profile . objects . get ( user = current_user )
user_instance = User . objects . get ( email = current_user )
post = Post . objects . filter ( pid = id )
if user_instance in post [0]. likes . all ():
post [0]. likes . remove ( user_instance )
else :
post [0]. likes . add ( user_instance )

# getting all rewards on donation


c u r r e n t _ u s e r _ d o n a t i o n = Donation . objects . filter ( d o n a t e d _ b y _ _ f u l l _
c u r r e n t _ u s e r _ d e t a i l s . full_name )
total_reward_on_donation = 0
for i in c u r r e n t _ u s e r _ d o n a t i o n :
a = i . rewards . count ()
total_reward_on_donation = total_reward_on_donation + a
# getting total reward onpost
cur rent_u ser_po st = Post . objects . filter ( pos tby__f ull_na me =
c u r r e n t _ u s e r _ d e t a i l s . full_name )
total_reward_on_post = 0
for i in c urrent _user_ post :
a = i . likes . count ()
total_reward_on_post = total_reward_on_post + a
4.2 Public Zone: 52

# update total reward


top = TopEnvorior . objects . get ( profile = c u r r e n t _ u s e r _ d e t a i l s )
top . reward = t o t a l _ r e w a r d _ o n _ p o s t + t o t a l _ r e w a r d _ o n _ d o n a t i o n
top . save ()

return redirect ( " publicapp : publichome " )

def jobs ( request ):


# common code for user details
current_user = request . session [ ’ email ’]
c u r r e n t _ u s e r _ d e t a i l s = Profile . objects . get ( user = current_user )
top = TopEnvorior . objects . get ( profile = c u r r e n t _ u s e r_ d e t a i l s )
total_reward = top . reward
# code for job
jobs = Job . objects . all ()
# top envorior
top_envorior = TopEnvorior . objects . order_by ( ’ - reward ’ )[:8]
return render ( request , ’ jobs . html ’ , locals ())

def uploadjob ( request ):


# common code for user details
current_user = request . session [ ’ email ’]
c u r r e n t _ u s e r _ d e t a i l s = Profile . objects . get ( user = current_user )
top = TopEnvorior . objects . get ( profile = c u r r e n t _ u s e r_ d e t a i l s )
total_reward = top . reward
# top envorior
top_envorior = TopEnvorior . objects . order_by ( ’ - reward ’ )[:8]

# code for upload job


if request . method == ’ POST ’:
skill_required = request . POST [ ’ skill ’]
job_description = request . POST [ ’ description ’]
job_type = request . POST [ ’ job_type ’]
salary = request . POST [ ’ salary ’]
job_location = request . POST [ ’ location ’]
new_job = Job ( skill_required = skill_required ,
job_description = job_description ,
job_type = job_type , salary = salary ,
job_location = job_location ,
job_by = current_user_details ,
job_post_date = date . today ())
new_job . save ()
return redirect ( " publicapp : jobs " )

def jobform ( request ):


4.2 Public Zone: 53

# common code for user details


current_user = request . session [ ’ email ’]
c u r r e n t _ u s e r _ d e t a i l s = Profile . objects . get ( user = current_user )
top = TopEnvorior . objects . get ( profile = c u r r e n t _ u s e r _ d e t a i l s )
total_reward = top . reward
# top envorior
top_envorior = TopEnvorior . objects . order_by ( ’ - reward ’ )[:8]
return render ( request , ’ postjob . html ’ , locals ())

def apply_job ( request , id ):


# common code for user details
current_user = request . session [ ’ email ’]
c u r r e n t _ u s e r _ d e t a i l s = Profile . objects . get ( user = current_user )
top = TopEnvorior . objects . get ( profile = c u r r e n t _ u s e r _ d e t a i l s )
total_reward = top . reward
# top envorior
top_envorior = TopEnvorior . objects . order_by ( ’ - reward ’ )[:8]

# apply job code


# getting details of job by
job = Job . objects . get ( j_id = id )
job_by_name = job . job_by . full_name
job_by_profile = Profile . objects . get ( full_name = job_by_name )
job_by_email = job_by_profile . user . email

# getting the details of user who apply for job


applicant = Profile . objects . get ( user__email = current_user )
applicant_name = applicant . full_name
app licant _conta ct = applicant . contact_no
msg = " Hii ,{} apply for a job that you posted
for {}. The details of applicant are as
follows - Name = {} , contact_no = {} " . format
( applicant_name , job . job_type ,
applicant_name , a pplica nt_con tact )
notification = Notification ( n_msg = msg , notification_by =
current_user , notification_to = job_by_email ,
not ificat ion_da te = date . today ())
notification . save ()
return redirect ( " publicapp : jobs " )

def notifications ( request ):


# common code for user details
current_user = request . session [ ’ email ’]
c u r r e n t _ u s e r _ d e t a i l s = Profile . objects . get ( user = current_user )
top = TopEnvorior . objects . get ( profile = c u r r e n t _ u s e r _ d e t a i l s )
4.2 Public Zone: 54

total_reward = top . reward


# top three envorior
top_envorior = TopEnvorior . objects . order_by ( ’ - reward ’ )[:8]

# notification code
notifications = Notification . objects . filter ( notification_to =
current_user )
return render ( request , ’ notifications . html ’ , locals ())

def donation ( request ):


# common code for user details
current_user = request . session [ ’ email ’]
c u r r e n t _ u s e r _ d e t a i l s = Profile . objects . get ( user = current_user )
top = TopEnvorior . objects . get ( profile = c u r r e n t _ u s e r_ d e t a i l s )
total_reward = top . reward
# top envorior
top_envorior = TopEnvorior . objects . order_by ( ’ - reward ’ )[:8]
# donation code
donation = Donation . objects . all ()
return render ( request , ’ donate . html ’ , locals ())

def postdonation ( request ):


# common code for user details
current_user = request . session [ ’ email ’]
c u r r e n t _ u s e r _ d e t a i l s = Profile . objects . get ( user = current_user )
top = TopEnvorior . objects . get ( profile = c u r r e n t _ u s e r_ d e t a i l s )
total_reward = top . reward
# top envorior
top_envorior = TopEnvorior . objects . order_by ( ’ - reward ’ )[:8]
# post donation code
if request . method == ’ POST ’:
donation_type = request . POST [ ’ donation_type ’]
description = request . POST [ ’ description ’]
product_image = request . FILES [ ’ p_image ’]
donar_location = request . POST [ ’ location ’]
donate = Donation ( donation_type = donation_type ,
description = description ,
product_image = product_image ,
donar_location = donar_location ,
donated_by = c u r r e n t _ u s e r _ d e t a i l s )
donate . save ()
# get all donation
donation = Donation . objects . all ()
return render ( request , ’ donate . html ’ , locals ())
4.2 Public Zone: 55

def reward_donate ( request , id ):


current_user = request . session [ ’ email ’]
c u r r e n t _ u s e r _ d e t a i l s = Profile . objects . get ( user = current_user )
user_instance = User . objects . get ( email = current_user )

donate = Donation . objects . filter ( d_id = id )


if user_instance in donate [0]. rewards . all ():
donate [0]. rewards . remove ( user_instance )
else :
donate [0]. rewards . add ( user_instance )

# getting all rewards on donation


c u r r e n t _ u s e r _ d o n a t i o n = Donation . objects . filter ( d o n a t e d _ b y _ _ f u l l _
total_reward_on_donation = 0
for i in c u r r e n t _ u s e r _ d o n a t i o n :
a = i . rewards . count ()
total_reward_on_donation = total_reward_on_donation + a
# getting total reward onpost
cur rent_u ser_po st = Post . objects . filter ( pos tby__f ull_na me = c u r r e n t
total_reward_on_post = 0
for i in c urrent _user_ post :
a = i . likes . count ()
total_reward_on_post = total_reward_on_post + a
# update total reward
top = TopEnvorior . objects . get ( profile = c u r r e n t _ u s e r _ d e t a i l s )
top . reward = t o t a l _ r e w a r d _ o n _ p o s t + t o t a l _ r e w a r d _ o n _ d o n a t i o n
top . save ()

# common code for user details


current_user = request . session [ ’ email ’]
c u r r e n t _ u s e r _ d e t a i l s = Profile . objects . get ( user = current_user )
top = TopEnvorior . objects . get ( profile = c u r r e n t _ u s e r _ d e t a i l s )
total_reward = top . reward
# top envorior
top_envorior = TopEnvorior . objects . order_by ( ’ - reward ’ )[:8]
# donation code
donation = Donation . objects . all ()

return render ( request , ’ donate . html ’ , locals ())

def get_donation ( request , id ):


# common code for user details
current_user = request . session [ ’ email ’]
c u r r e n t _ u s e r _ d e t a i l s = Profile . objects . get ( user = current_user )
top = TopEnvorior . objects . get ( profile = c u r r e n t _ u s e r _ d e t a i l s )
4.2 Public Zone: 56

total_reward = top . reward


# top envorior
top_envorior = TopEnvorior . objects . order_by ( ’ - reward ’ )[:8]
# donation code
donation = Donation . objects . all ()

# getting details of donar


donar = Donation . objects . get ( d_id = id )
donar_name = donar . donated_by . full_name
donar_profile = Profile . objects . get ( full_name = donar_name )
donar_email = donar_profile . user . email

# getting the details of user who want donation


applicant = Profile . objects . get ( user__email = current_user )
applicant_name = applicant . full_name
app licant _conta ct = applicant . contact_no
msg = " Hii ,{} want the product ({}) that you donated .
The product description is {}.
The details of reciver are as follows - Name ={} , contact_no ={} " .
format ( applicant_name ,
donar . donation_type ,
donar . description , applicant_name , appli cant_c ontact )
notification = Notification ( n_msg = msg
, notification_by = current_user ,
notification_to = donar_email ,
not ificat ion_da te = date . today ())
notification . save ()

return render ( request , ’ donate . html ’ , locals ())

def complain ( request ):


# common code for user details
current_user = request . session [ ’ email ’]
c u r r e n t _ u s e r _ d e t a i l s = Profile . objects . get ( user = current_user )
top = TopEnvorior . objects . get ( profile = c u r r e n t _ u s e r_ d e t a i l s )
total_reward = top . reward
# top envorior
top_envorior = TopEnvorior . objects . order_by ( ’ - reward ’ )[:8]
# complain code
if request . method == ’ POST ’:
complain_type = request . POST [ ’ complain_type ’]
description = request . POST [ ’ description ’]
complain_image = request . FILES [ ’ complain_image ’]
4.2 Public Zone: 57

comp lain_l ocati on = request . POST [ ’ location ’]


new_complain = Complain ( complain_by = current_user_details ,
complain_type = complain_type , description =
description ,
complain_image = complain_image ,
comp lain_l ocati on =
comp lain_l ocati on )
new_complain . save ()
return render ( request , ’ complain . html ’ , locals ())

def logout ( request ):


try :
del request . session [ ’ email ’]
except KeyError :
return redirect ( ’ generalapp : login ’)
return redirect ( ’ generalapp : login ’)

def about ( request ):


return render ( request , ’ about . html ’)

def contact ( request ):


return render ( request , ’ contact . html ’)

def followers ( request ):


return render ( request , ’ followers . html ’)
def followings ( request ):
return render ( request , ’ followings . html ’)
def policy ( request ):
return render ( request , ’ policy . html ’)

def profile ( request ):


# common code for user details
current_user = request . session [ ’ email ’]
c u r r e n t _ u s e r _ d e t a i l s = Profile . objects . get ( user = current_user )
top = TopEnvorior . objects . get ( profile = c u r r e n t _ u s e r_ d e t a i l s )
total_reward = top . reward
# top envorior
top_envorior = TopEnvorior . objects . order_by ( ’ - reward ’ )[:8]

post = Post . objects . filter ( postby = c u r r e n t _ u s e r _ d e ta i l s ).


order_by ( ’ - posteddate ’)
complain = Complain . objects . filter ( complain_by =
4.2 Public Zone: 58

current_user_details )
donation = Donation . objects . filter ( donated_by =
current_user_details )
jobs = Job . objects . filter ( job_by =
current_user_details )
return render ( request , ’ profile . html ’ , locals ())

def c hangeu serpro file ( request ):


# common code for user details
current_user = request . session [ ’ email ’]
c u r r e n t _ u s e r _ d e t a i l s = Profile . objects . get ( user = current_user )
top = TopEnvorior . objects . get ( profile = c u r r e n t _ u s e r_ d e t a i l s )
total_reward = top . reward
# top envorior
top_envorior = TopEnvorior . objects . order_by ( ’ - reward ’ )[:8]

# change_profile
if request . method == ’ POST ’:
profile_image = request . FILES [ ’ pic ’]
c u r r e n t _ u s e r _ d e t a i l s . profile_picture = profile_image
c u r r e n t _ u s e r _ d e t a i l s . save ()
return redirect ( ’ publicapp : profile ’)

def deletepost ( request , id ):


# common code for user details
current_user = request . session [ ’ email ’]
c u r r e n t _ u s e r _ d e t a i l s = Profile . objects . get ( user = current_user )
top = TopEnvorior . objects . get ( profile = c u r r e n t _ u s e r_ d e t a i l s )
total_reward = top . reward
# top envorior
top_envorior = TopEnvorior . objects . order_by ( ’ - reward ’ )[:8]

# deletepost code
post_for_delete = Post . objects . filter ( pid = id )
post_for_delete . delete ()
# getting post of user
post = Post . objects . filter ( postby = c u r r e n t _ u s e r _ d e ta i l s ).
order_by ( ’ - posteddate ’)
return render ( request , ’ user_post . html ’ , locals ())

def deletecomplain ( request , id ):


# common code for user details
current_user = request . session [ ’ email ’]
4.2 Public Zone: 59

c u r r e n t _ u s e r _ d e t a i l s = Profile . objects . get ( user = current_user )


top = TopEnvorior . objects . get ( profile = c u r r e n t _ u s e r _ d e t a i l s )
total_reward = top . reward
# top envorior
top_envorior = TopEnvorior . objects . order_by ( ’ - reward ’ )[:8]

# deletecomplain code
c o mp l a in _ f or _ d el e t e = Complain . objects . filter ( c_id = id )
c o mp l a in _ f or _ d el e t e . delete ()

# getting complain of user


complain = Complain . objects . filter ( complain_by =
current_user_details )
return render ( request , ’ user_complain . html ’ , locals ())

def deletejob ( request , id ):


# common code for user details
current_user = request . session [ ’ email ’]
c u r r e n t _ u s e r _ d e t a i l s = Profile . objects . get ( user = current_user )
top = TopEnvorior . objects . get ( profile = c u r r e n t _ u s e r_ d e t a i l s )
total_reward = top . reward
# top envorior
top_envorior = TopEnvorior . objects . order_by ( ’ - reward ’ )[:8]

# delete job code


job_for_delete = Job . objects . filter ( j_id = id )
job_for_delete . delete ()

# getting job of user


jobs = Job . objects . filter ( job_by = c u r r e n t _ u s e r _ d e t a i l s )
return render ( request , ’ user_job . html ’ , locals ())

def deletedonation ( request , id ):


# common code for user details
current_user = request . session [ ’ email ’]
c u r r e n t _ u s e r _ d e t a i l s = Profile . objects . get ( user = current_user )
top = TopEnvorior . objects . get ( profile = c u r r e n t _ u s e r_ d e t a i l s )
total_reward = top . reward
# top envorior
top_envorior = TopEnvorior . objects . order_by ( ’ - reward ’ )[:8]

# delete donation code


d o na t i on _ f or _ d el e t e = Donation . objects . filter ( d_id = id )
d o na t i on _ f or _ d el e t e . delete ()
4.2 Public Zone: 60

# getting donation of user


donation = Donation . objects . filter ( donated_by =
current_user_details )
return render ( request , ’ user_donation . html ’ , locals ())

def scam ( request ):


return render ( request , ’ scam . html ’)
def terms ( request ):
return render ( request , ’ terms . html ’)

Tamplets :-

publicparent.html :-

<! DOCTYPE html >


< html lang = " en " >
< head >
< meta charset = " UTF -8 " />
< meta name = " viewport " content = " width = device - width ,
initial - scale =1.0 " / >
{% load static %}
< title >{% block title %} My Title {% endblock %} </ title >
<! - - FONT AWESOME CDN -->

< link
rel = " stylesheet "
href = " https :// cdnjs . cloudflare . com / ajax / libs / font - awesome /6.4.0/ css /
all . min . css " integrity = " sha512 - i e cd L m as k l 7C V k qk X N Q / ZH / XLlvWZOJyj7Yy7
tce nmpD1y pASozp mT / E 0 i P t m F I B 4 6 Z m d t A c 9 e N B v H 0 H / ZpiBw
== " crossorigin = " anonymous "
referrerpolicy = " no - referrer " / >
<! - - BOOTSTRAP CDN -->
< link href = " https :// cdn . jsdelivr . net / npm / bootstrap@5 .3.3/
dist / css / bootstrap . min . css " rel = " stylesheet " integrity = " sha384 - Q W T K Z y
RjXh0JMhjY6hW + ALEwIH " crossorigin = " anonymous " >
< script src = " https :// cdn . jsdelivr . net / npm / bootstrap@5 .3.3
/ dist / js / bootstrap . bundle . min . js "
integrity = " s h a 3 8 4 Y v p c r Y f 0 t Y 3 l H B 6 0 N N k m X c 5 s 9 f D V Z L E S a A A 5 5 N D z O x h y 9 G k c I d s l
</ script >
<! - - JS FILE -->
< script src = " {% static ’ js / publicscript . js ’ %} " > </ script >
< link rel = " icon " type = " image /x - icon "
4.2 Public Zone: 61

href = " {% static ’ img / favicon . png ’ %} " >


<! - - CSS FILE - - >
< link rel = " stylesheet " href = " {% static ’ css / publicstyle . css ’ %} " / >
</ head >
< body class = " body " >
<! - - header -->
< header >
<! - - logo and search - - >
< div class = " left " >
< div class = " logo " >
<! - - navbar logo -->
< img class = " logo - img " src = " {% static ’ img / slogo . png ’ %} " alt = " " / >
</ div >
<! - - this is for responsive -->
< div class = " right - responsive " >
< div class = " user - profile " >
<a href = " {% url ’ publicapp : profile ’%} " >< img
class = " profile - img "
src = " {% static ’ img / profile . png ’ %} "
alt = " " / >
</a >
</ div >
</ div >
</ div >
<! - - navbar search -->
< div class = " middle " >
< form >
< div class = " search nav - search " >
<i class = " fa fa - search " style = " font - size : 18 px ; margin - left : 1 rem " >
</i >
< input type = " text " placeholder = " Search " / >
</ div >
</ form >
</ div >

< div class = " right " >


< div class = " user - profile " >
<! - - get profile picture of user -->
{% if c u r r e n t _ u s e r _ d e t a i l s . profile_picture %}
<a href = " {% url ’ publicapp : profile ’%} " >
< img class = " profile - img "
src = " {{ c u r r e n t _ u s e r _ d e t a i l s . profile_picture . url }} " alt = " " / >
</a >
{% else %}
<a href = " {% url ’ publicapp : profile ’%} " >
4.2 Public Zone: 62

< img class = " profile - img "


src = " {% static ’ img / profile . png ’ %} " alt = " " / >
</a >
{% endif %}
< div class = " profile - txt " >
<a href = " {% url ’ publicapp : profile ’%} "
class = " txt -3 " ><p >{{ c u r r e n t _ u s e r _ d e t a i l s . full_name }}
</p > </a >
</ div >
</ div >

</ div >


<! - - my profile - - >

< div class = " nav - responsive " >


<div >
<a href = " {% url ’ publicapp : publichome ’%} "
class = " text - decoration - none " >
< span class = " txt -2 " ><i class = " fa - solid fa - house " > </i > </ span >
</a >
</ div >
<div >
<a href = " {% url ’ publicapp : postdonation ’%} "
class = " text - decoration - none " >
< span class = " txt -2 "
><i class = " fa - solid fa - hand - holding - dollar " > </ i
> </ span >
</a >
</ div >

<div >
<a href = " {% url ’ publicapp : jobs ’%} " class = " text - decoration - none " >
< span class = " txt -2 " ><i class = " fa - solid fa - briefcase " > </i > </ span >
</a >
</ div >

<div >
<a href = " # " class = " text - decoration - none " >
< span class = " txt -2 " ><i class = " fa - solid fa - headset " > </i > </ span >
</a >
</ div >

<div >
<a href = " {% url ’ publicapp : about ’%} " class = " text - decoration - none " >
< span class = " txt -2 " ><i class = " fa - solid fa - circle - info " > </i > </ span >
4.2 Public Zone: 63

</a >
</ div >
</ div >

</ header >

< main >


<! - - left bar -->

< div class = " publicleft " >


<! - - left top - - >
< div class = " navlefttop logo " >
< img class = " logo - img " src = " {% static ’ img / trophy . png ’ %} " / >

< div class = " logo - txt " >


<p class = " txt -1 " style = " color : #000000; " > Reward </ p >
<p class = " txt -3 " style = " color : green ;
margin - top : -5 px ; " >{{ total_reward }} </ p >
</ div >
</ div >
<! - - left middle -->
< div class = " navleftmiddle " >
< div class = " navleftmiddles " >
<a
href = " {% url ’ publicapp : publichome ’%} "
class = " text - decoration - none "
>
< span class = " txt -2 " ><i class = " fa - solid fa - house " > </i > </ span >
< span class = " txt -2 " > Home </ span >
</a >
</ div >

< div class = " navleftmiddles " >


<a
href = " {% url ’ publicapp : notifications ’ %} "
class = " text - decoration - none "
>
< span class = " txt -2 " ><i class = " fa - solid fa - bell " > </i > </ span >
< span class = " txt -2 " > Notifications </ span >
</a >
</ div >

< div class = " navleftmiddles " >


<a href = " {% url ’ publicapp : jobs ’%} " class = " text - decoration - none " >
4.2 Public Zone: 64

< span class = " txt -2 " ><i class = " fa - solid fa - briefcase " > </i > </ span >
< span class = " txt -2 " > Jobs </ span >
</a >
</ div >

< div class = " navleftmiddles " >


<a href = " {% url ’ publicapp : donation ’%} " class = " text - decoration - none " >
< span class = " txt -2 "
><i class = " fa - solid fa - hand - holding - dollar " > </ i
> </ span >
< span class = " txt -2 " > Donation </ span >
</a >
</ div >

< div class = " navleftmiddles " >


<a href = " {% url ’ publicapp : complain ’%} " class = " text - decoration - none " >
< span class = " txt -2 "
><i class = " fa - solid fa - comments " > </ i
> </ span >
< span class = " txt -2 " > Complain </ span >
</a >
</ div >
< div class = " navleftmiddles " >
<a
href = " {% url ’ publicapp : profile ’%} "
class = " text - decoration - none "
>
< span class = " txt -2 " ><i class = " fa - solid fa - user " > </i > </ span >
< span class = " txt -2 " > Profile </ span >
</a >
</ div >

</ div >


<! - - left bottom -->
< div class = " navleftbottom navleftmiddles " >

< div style = " margin - top : 13 px ; " >


<! - - logout code -->
<a href = " # " class = " txt -2 "
data - bs - toggle = " modal "
data - bs - target = " # logoutModal " >
<i class = " fa - solid fa - sign - out mx -2 " > </i > Logout
4.2 Public Zone: 65

</a >
</ div >
</ div >
</ div >
<! - - right -->
< div class = " publicmiddle " >{% block content %} {% endblock %} </ div >

<! - - message and Top Social worior section -->

< div class = " publicright " >


< div class = " box " >
< div class = " box - header " >
<p class = " txt -1 " > Topworior </ p >
</ div >
< div class = " box - main " >
< div style = " border - bottom : 1 px solid black ;
opacity : 8%; margin - bottom : 2 px ;
margin - left : 18 px ; margin - right : 18 px ; " > </ div >
{% for top in top_envorior %}
< div class = " user - profile navrightmiddles " >
<a href = " " >
{% if top . profile . profile_picture %}
< img class = " profile - img " src = " {{ top . profile . profile_picture . url }} " / >
{% else %}
< img class = " profile - img " src = " {% static ’ img / profile . png ’ %} " / >
{% endif %}
</a >
< div class = " profile - txt " >
<a href = " {% url ’ publicapp : profile ’%} " class = " txt -2 " >
<p >{{ top . profile . full_name }} </ p > </a >
<a href = " {% url ’ publicapp : profile ’%} " class = " txt -3 " >
<p >{{ top . reward }} </ p > </a >
</ div >
</ div >
{% endfor %}
< div style = " border - bottom : 1 px solid black ;
opacity : 8%; margin - bottom : 2 px ;
margin - left : 18 px ; margin - right : 18 px ; " > </ div >
</ div >
</ div >
< div class = " box box - bottom " style = "
display : flex ;
flex - wrap : wrap ;
background : none ;
flex : none ;
4.2 Public Zone: 66

padding : 2 rem 0 rem ;


">
<a href = " / about / " class = " txt -3 " > About us </ a >
<a href = " / contact / " class = " txt -3 " > Contact us </ a >
<a href = " / terms / " class = " txt -3 " > Terms & amp ; Conditions </ a >
<a href = " / policy / " class = " txt -3 " > Privacy Policy </ a >
<a href = " / scam / " class = " txt -3 " > Reporting Scams </ a >
<a href = " / donation / " class = " txt -3 " > Donations </ a >
<a href = " / jobs / " class = " txt -3 " > Jobs </ a >
<a href = " " class = " txt -3 " > help </ a >
<a href = " / about / " class = " txt -3 " > About </ a >
</ div >
</ div >
</ main >
< div class = " modal fade " id = "v - dotModal "
tabindex = " -1 " aria - labelledby = "v - dotModalLabel "
aria - hidden = " true " >
< div class = " modal - dialog modal - xl
position - absolute bottom -50 " >
< div class = " modal - content " style = " height :
15 rem ; width : 20 rem ; transform : translateX (50 rem ); " >
< div class = " modal - header " >
< h1 class = " modal - title fs -5 " id = "v - dotModallLabel " >
Are you sure to v - dot ? </ h1 >
< button type = " button " class = " btn - close "
data - bs - dismiss = " modal " aria - label = " Close " >
</ button >
</ div >
< div class = " row mb -3 " >
< div class = " col - sm -4 " >
< button type = " button "
class = " btn btn - secondary "
data - bs - dismiss = " modal "
style = " position : absolute ;
bottom :3 rem ; left :3 rem ; width :5 rem ; " >
Close </ button >
</ div >
< div class = " col - sm -4 " >
<a href = " {% url ’ publicapp : logout ’%} " style = " text - decoration : none ; " >
< button type = " button "
class = " btn btn - primary "
style = " position : absolute ;
bottom :3 rem ; right :3 rem ; width :5 rem ; " >
Yes </ button >
</a >
4.2 Public Zone: 67

</ div >


</ div >
</ div >
</ div >
</ div >
< div class = " modal fade " id = "v - dotModal "
tabindex = " -1 " aria - labelledby = "v - dotModalLabel "
aria - hidden = " true " >
< div class = " modal - dialog modal - xl
position - absolute bottom -50 " >
< div class = " modal - content " style = " height :
15 rem ; width : 20 rem ; transform :
translateX (50 rem ); " >
< div class = " modal - header " >
< h1 class = " modal - title fs -5 " id = "v - dotModallLabel "
> Are you sure to v - dot ? </ h1 >
< button type = " button " class = " btn - close "
data - bs - dismiss = " modal " aria - label = " Close " >
</ button >
</ div >
< div class = " row mb -3 " >
< div class = " col - sm -4 " >
< button type = " button " class = " btn btn - secondary "
data - bs - dismiss = " modal " style = " position : absolute ; bottom :3 rem ;
left :3 rem ; width :5 rem ; " > Close </ button >
</ div >
< div class = " col - sm -4 " >
<a href = " {% url ’ publicapp : logout ’%} "
style = " text - decoration : none ; " >
< button type = " button " class = " btn btn - primary " style = " position : absolute
; bottom :3 rem ; right :3 rem ; width :5 rem ; " >Yes </ button >
</a >
</ div >
</ div >
</ div >
</ div >
</ div >
</ body >
<! - - < svg viewBox = " 0 0 500 200 " >
< path d = " M 0 ,100 C 150 ,200 350 ,0 500 ,100 L
500 ,00 L 0 ,0 " style = " fill :# F15F1F ; " > </ path >
</ svg > -->
</ html >

jobs.html :-
4.2 Public Zone: 68

{% extends ’ publicparent . html ’ %}


{% load static %}
{% block title %} Jobs {% endblock title %}
{% block content %}
< div class = " feed " >
< div class = " search feed - search " >
< div class = " user - profile " >
{% if c u r r e n t _ u s e r _ d e t a i l s . profile_picture %}
<a > < img class = " profile - img "
src = " {{ c u r r e n t _ u s e r _ d e t a i l s . profile_picture . url }} "
alt = " " > </a >
{% else %}
<a > < img class = " profile - img "
src = " {% static ’ img / profile . png ’ %} "
alt = " " > </a >
{% endif %}
</ div >
< div class = " search " >
< input style = " cursor : pointer ; "
data - bs - toggle = " modal " required readonly
data - bs - target = " # postModal " type = " text "
placeholder = " post new jobs here ... " >
</ div >
<! - - <a href = " {% url ’ publicapp : jobform ’%} " >< button type = " submit "
class = " btn btn - primary " > Post Job </ button > </a > -->
<! - - post pop - up -->
< div class = " modal fade " id = " postModal " tabindex = " -1 "
aria - labelledby = " postModalLabel " aria - hidden = " true " >
< div class = " modal - dialog
modal - dialog - centered modal - dialog - scrollable
modal - fullscreen - sm - down " >
< div class = " modal - content " >
< div class = " modal - header " >
< h1 class = " modal - title fs -5 " id = " postModalLabel " > Post a New Job </ h1 >
< button type = " button " class = " btn - close " data - bs - dismiss = " modal "
aria - label = " Close " > </ button >
</ div >
< div class = " " >
<! - - form for add post -->
< form action = " {% url ’ publicapp : jobform ’%} " method = ’ POST ’ >
{% csrf_token %}
< div class = " container " >
< div class = " row mt -3 " >
4.2 Public Zone: 69

< div class = " col " >


< select class = " form - select "
style = " color : #000000 b7 ; " name = " job_type " >
< option selected disabled > Select Job Type </ option >
< option value = " Security Guard " > Security Guard </ option >
< option value = " Sweeper " > Sweeper </ option >
< option value = " Cook " > Cook </ option >
</ select >
</ div >
</ div >
< div class = " row mt -3 " >
< div class = " col " >
< input style = " border : 1 px solid # e2e6e9
! important ; " class = " form - control " type = " text " name = " skill "
placeholder = " Required Skill " >
</ div >
</ div >
< div class = " row mt -3 " >
< div class = " col " >
< input style = " border : 1 px solid # e2e6e9
! important ; " class = " form - control "
type = " number " name = " salary "
placeholder = " Salary " >
</ div >
</ div >
< div class = " row mt -3 " >
< div class = " col " >
< textareaclass = " form - control " name = " description "
rows = " 8 " placeholder = " Job Description " > </ textarea >
</ div >
</ div >
< div class = " row mt -3 " >
< div class = " col " >
< input style = " border : 1 px solid # e2e6e9 !
important ; " class = " form - control "
type = " text " name = " location " placeholder = " Job
Location " >
</ div >
</ div >
< div class = " row mt -3 " >
< div class = " col " >
< button type = " submit " class = " btn btn - primary
mb -4 " style = " width : 100%; margin - left : 1 px ; " > Post Job </ button >
</ div >
</ div >
4.2 Public Zone: 70

</ div >


</ form >
</ div >
</ div >
</ div >
</ div >
</ div >
{% for job in jobs %}
< div class = " feed - post " >
< div class = " feed - header " style = " padding - right : 1 rem ; " >
< div class = " user - profile " >
{% if job . job_by . profile_picture %}
<a > < img class = " profile - img " src {{ job . job_by . profile_picture . url }} "
alt = " " > </a >
{% else %}
<a > < img class = " profile - img " src = " " alt = " " > </a >
{% endif %}
< div class = " profile - txt " >
<a href = " " class = " txt -2 " ><p >{{ job . job_by . full_name }} </p > </a >
<a href = " " class = " txt -3 " ><p > Location :
{{ job . job_location }} & middot ; {{ job . job_post_date }}
</p > </a >
</ div >
</ div >
</ div >
< div class = " feed - content " >
<div >
< table class = " table " style = " font - size : 12 px ; " >
< tbody >
<tr >
<th > Job Type </ th >
<td >{{ job . job_type }} </ td >
</ tr >
</ tbody >
< tbody >
<tr >
<th > Required Skills </ th >
<td >{{ job . skill_required }} </ td >
</ tr >
</ tbody >
< tbody >
<tr >
<th > Salary </ th >
<td >{{ job . salary }} </ td >
</ tr >
4.2 Public Zone: 71

</ tbody >


< tbody >
<tr >
<th > JJob Description </ th >
<td >{{ job . job_description }} </ td >
</ tr >
</ tbody >
</ table >
</ div >
</ div >
< div class = " job - button " >
<a href = " / apply_job /{{ job . j_id }} " >
< button type = " submit " > Apply Now </ button >
</a >
</ div >
</ div >
{% endfor %}
</ div >
{% endblock %}

donation.html:-

{% extends ’ publicparent . html ’ %}


{% load static %}
{% block title %} Donations {% endblock title %}
{% block content %}
< div class = " feed " >
< div class = " search feed - search " >
< div class = " user - profile " >
{% if c u r r e n t _ u s e r _ d e t a i l s . profile_picture %}
<a > < img class = " profile - img "
src = " {{ c u r r e n t _ u s e r _ d e t a i l s . profile_picture . url }} " >
</a >
{% else %}
<a > < img class = " profile - img " src = " {% static ’ img / profile . png ’ %} " >
</a >
{% endif %}
</ div >
< div class = " search " >
< input style = " cursor : pointer ; " data - bs - toggle =
" modal " required readonly data - bs - target = " # postModal " type = " text " pla
</ div >
</ div >
< div class = " modal fade " id = " postModal "
tabindex = " -1 " aria - labelledby = " postModalLabel "
4.2 Public Zone: 72

aria - hidden = " true " >


< div class = " modal - dialog
modal - dialog - centered modal - dialog - scrollable
modal - fullscreen - sm - down " >
< div class = " modal - content " >
< div class = " modal - header " >
< h1 class = " modal - title fs -5 " id = " postModalLabel " >
Post a New Donation </ h1 >
< button type = " button " class = " btn - close "
data - bs - dismiss = " modal " aria - label = " Close " >
</ button >
</ div >
< div class = " " >
<! - - form for add DONATE -->
< div class = " img " style = " text - align : center ; " >
< img src = " {% static ’ img / donation . png ’ %} "
height = " 40% " width = " 40% " / >
</ div >
< form action = " {% url ’ publicapp :
postdonation ’ %} " method = ’ POST ’
enctype = " multipart / form - data " >
{% csrf_token %}
< div class = " container " >
< div class = " row mt -3 " >
< div class = " col " >
< select class = " form - select " style = " color :
#000000 b7 ; " name = " donation_type " id = " " >
< option selected > Select Donation Type </ option >
< option value = " books " > Books </ option >
< option value = " cloths " > Cloths </ option >
< option value = " food " > Food </ option >
</ select >
</ div >
</ div >
< div class = " row mt -3 " >
< div class = " col " >
< input class = " form - control w -100 "
type = " file " name = " p_image " accept = " . png ,. jpg " placeholder = " Upload Me
</ div >
</ div >
< div class = " row mt -3 " >
< div class = " col " >
< textarea class = " form - control "
type = " text " name = " description " rows = " 3 "
placeholder = " Donation descripton " >
4.2 Public Zone: 73

</ textarea >


</ div >
</ div >
< div class = " row mt -3 " >
< div class = " col " >
< input style = " border : 1 px solid # e2e6e9 !
important ; " class = " form - control " type = " text " name = " location "
placeholder = " Donar location " >
</ div >
</ div >
< div class = " row mt -3 " >
< div class = " col " >
< button type = " submit " class = " btn btn - primary
mb -4 " style = " width : 100%; margin - left : 1 px ; " >
Donate Now </ button >
</ div >
</ div >
</ div >
</ form >
</ div >
</ div >
</ div >
</ div >
{% for d in donation %}
< div class = " feed - post " >
< div class = " feed - header " style = " padding - right : 1 rem ; " >
< div class = " user - profile " >
{% if d . donated_by . profile_picture %}
<a > < img class = " profile - img " src = " {{ d . donated_by . profile_picture . url }}
{% else %}
<a > < img class = " profile - img " src = " " alt = " " > </a >
{% endif %}
< div class = " profile - txt " >
<a href = " " class = " txt -2 " ><p >{{ d . donated_by . full_name }} </ p
</a >
<a href = " " class = " txt -3 " ><p > Location :
{{ d . donar_location }} </ p > </a >
</ div >
</ div >
</ div >
< div class = " feed - content " >
<div >
< table class = " table " style = " font - size : 12 px ; " >
< tbody >
<tr >
4.2 Public Zone: 74

<th > Donation Type </ th >


<td >{{ d . donation_type }} </ td >
</ tr >
</ tbody >
< tbody >
<tr >
< td colspan = " 2 " >{{ d . description }} </ td >
</ tr >
</ tbody >
</ table >
</ div >
< div >
{% if d . product_image %}
< img style = " object - fit : cover ; height : 350 px ;
margin - top : -20 px ; " src = " {{ d . product_image . url }} "
height = " 100% "
width = " 100% " >
{% endif %}
</ div >
</ div >
< div class = " feed - footer " style = " justify - content : space - between ;
padding : 0 rem 2 rem ; " >
<a href = " / rewardondonate /{{ d . d_id }} " class = " text - decoration - none " >
<! - - < span class = " txt -2 " >
<i class = " fa - solid fa - house " > </i > </ span > -->
< img class = " logo - img " src = " {% static ’ img / trophy . png ’ %} " / >
< span class = " txt -2 " > reward ({{ d . rewards . count }}) </ span >
</a >
<a href = " / get_donation /{{ d . d_id }} "
class = " txt -2 " style = " color : # ffffff ; " >
Get Donation
</a >
</ div >
</ div >
{% endfor %}
</ div >
{% endblock %}
4.2 Public Zone: 75

4.2.2 Snapshot :-

Figure 4.4: Home page

Figure 4.5: Job


4.2 Public Zone: 76

Figure 4.6: Donation

Figure 4.7: Post Job


4.2 Public Zone: 77

Figure 4.8: Create Post

Figure 4.9: Post Donation


4.2 Public Zone: 78

Figure 4.10: Profile

Figure 4.11: Change Profile


4.3 Servant Zone: 79

4.3 Servant Zone:


The Servant Zone caters to NGOs, organizations, or individuals aiming to
serve as social workers and address various societal issues. The key compo-
nents of this zone include:

• Explore Top Social Influencers Servants can view individuals who


are highly active in social work, determined by the number of rewards
they’ve received. Those with the highest rewards may receive special
incentives.

• Review Complaints Servants have access to all user-submitted com-


plaints on the platform. Upon resolving an issue, servants can mark it
as resolved

• Notification Servants receive notifications whenever a new complaint


is posted.

• Add Events/News Servants can contribute by adding events or news


relevant to societal concerns, such as blood donation drives or health
camps.

• View Events/News Servants can browse through all posted events


or news, including information on blood donation drives and health
camps.

• Profile This module allows servants to display their basic details and
easily update their profile picture through a user-friendly interface.

4.3.1 Code:-
serventappurls :-
from django . urls import path
from . import views
urlpatterns = [
path ( ’ servent - dashboard / ’ , views . dashboard , name = ’ dashboard ’) ,
path ( ’ servent - complain / ’ , views . complain , name = ’ complain ’) ,
path ( ’ solvecomplain / < int : id >/ ’ , views . solve_complain ,
name = ’ solvecomplain ’) ,
path ( ’ servent - rank / ’ , views . rank , name = ’ rank ’) ,
path ( ’ servent / ’ , views . servent , name = ’ servent ’) ,
path ( ’ servent - event / ’ , views . event , name = ’ event ’) ,
path ( ’ your_event / ’ , views . your_event , name = ’ your_event ’) ,
4.3 Servant Zone: 80

path ( ’ delete_event / < int : id >/ ’ , views . delete_event ,


name = ’ delete_event ’) ,
path ( ’ servent - post / ’ , views . post , name = ’ post ’) ,
path ( ’ servent - serventprofile / ’ , views . serventprofile ,
name = ’ serventprofile ’) ,
]

views.py :-

from django . shortcuts import render , redirect


from publicapp . models import Profile , Complain , TopEnvorior
from serventapp . models import Event
from datetime import date
from django . views . decorators . cache import cache_control

# Create your views here .


@cache_control ( no_cache = True , must_revalidate = True , no_store = True )
def dashboard ( request ):
try :
if request . session [ ’ email ’ ]!= None :
# common to all servent view
current_user = request . session [ ’ email ’]
c u r r e n t _ u s e r _ d e t a i l s = Profile . objects .
get ( user = current_user )
return redirect ( ’ serventapp : complain ’)
except KeyError :
return redirect ( ’ generalapp : login ’)

def complain ( request ):


# common to all servent view
current_user = request . session [ ’ email ’]
c u r r e n t _ u s e r _ d e t a i l s = Profile . objects . get ( user = current_user )
# complain code
complain = Complain . objects . all ()
return render ( request , ’ servent / pages / complain . html ’ , locals ())

def solve_complain ( request , id ):


# common to all servent view
current_user = request . session [ ’ email ’]
c u r r e n t _ u s e r _ d e t a i l s = Profile . objects . get ( user = current_user )
# solve_complain code
current_complain = Complain . objects . get ( c_id = id )
if current_complain . complain_status == ’ solved ’:
current_complain . complain_status = ’ unsolved ’
4.3 Servant Zone: 81

current_complain . save ()
elif current_complain . complain_status == ’ unsolved ’:
current_complain . complain_status = ’ solved ’
current_complain . save ()
# getting all complain
complain = Complain . objects . all ()
return render ( request , ’ servent / pages / complain . html ’ , locals ())

def rank ( request ):


# common to all servent view
current_user = request . session [ ’ email ’]
c u r r e n t _ u s e r _ d e t a i l s = Profile . objects . get ( user = current_user )
# top envorior code
top_envorior = TopEnvorior . objects . order_by ( ’ - reward ’)
return render ( request , ’ servent / pages / rank . html ’ , locals ())

def servent ( request ):


# common to all servent view
current_user = request . session [ ’ email ’]
c u r r e n t _ u s e r _ d e t a i l s = Profile . objects . get ( user = current_user )
return render ( request , ’ servent / pages / servent . html ’ , locals ())

def event ( request ):


# common to all servent view
current_user = request . session [ ’ email ’]
c u r r e n t _ u s e r _ d e t a i l s = Profile . objects . get ( user = current_user )
# event
event = Event . objects . all (). order_by ( ’ - date ’)
return render ( request , ’ servent / pages / event . html ’ , locals ())

def your_event ( request ):


# common to all servent view
current_user = request . session [ ’ email ’]
c u r r e n t _ u s e r _ d e t a i l s = Profile . objects . get ( user = current_user )
# event
event = Event . objects . filter ( department__user = current_user ).
order_by ( ’ - date ’)
return render ( request , ’ servent / pages / your_event . html ’ , locals ())

def delete_event ( request , id ):


# common to all servent view
current_user = request . session [ ’ email ’]
4.3 Servant Zone: 82

c u r r e n t _ u s e r _ d e t a i l s = Profile . objects . get ( user = current_user )

# deleteevent code
event_for_delete = Event . objects . filter ( e_id = id )
event_for_delete . delete ()
# getting event of user
event = Event . objects . filter ( department = c u r r e n t _ u se r _ d e t a i l s ).
order_by ( ’ - date ’)
return render ( request , ’ servent / pages / your_event . html ’ , locals ())

# view to post an event or news


def post ( request ):
# common to all servent view
current_user = request . session [ ’ email ’]
c u r r e n t _ u s e r _ d e t a i l s = Profile . objects . get ( user = current_user )
# post code
if request . method == ’ POST ’:
description = request . POST [ ’ description ’]
image = request . FILES [ ’ image ’]
event = Event ( department = current_user_details , image = image ,
description = description , date = date . today ())
event . save ()
return render ( request , ’ servent / pages / post . html ’ , locals ())

def serventprofile ( request ):


# common to all servent view
current_user = request . session [ ’ email ’]
c u r r e n t _ u s e r _ d e t a i l s = Profile . objects . get ( user = current_user )
return render ( request , ’ servent / pages / serventprofile . html ’ ,
locals ())

Tamplets:-

serventparent.html:-

<! DOCTYPE html >


< html lang = " en " >
< head >
< meta charset = " UTF -8 " / >
< meta name = " viewport " content = " width = device - width ,
initial scale =1.0 " / >
{% load static %}
4.3 Servant Zone: 83

< title >{% block title %} My Title {% endblock %} </ title >
<! - - FONT AWESOME CDN -->
< link rel = " stylesheet " href = " https :// cdnjs . cloudflare . com
/ ajax / libs / fontawesome /6.4.0/ css /
all . min . css "
integrity = " s h a 5 1 2 i e c d L m a s k l 7 C V k q k X N Q / ZH / XL
l v W Z O J y j 7 Y y 7 t c e n m p D 1 y p A S o z p m T / E 0 iP t m F IB 4 6 Zm d t Ac 9 e
NBvH0H / ZpiBw == " crossorigin = " anonymous "
referrerpolicy = " no - referrer " / >
<! - - BOOTSTRAP CDN -->
< link href = " https :// cdn . jsdelivr . net / npm /
bootstrap@5 .3.3/ dist / css / bootstrap . min . css "
rel = " stylesheet " integrity = " s h a 3 8 4 Q W T K Z y j p P E j I S v 5 W a R U 9 O F e R p o k 6 Y c t n
Y m D r 5 p N l y T 2 b R j X h 0 J M h j Y 6 h W + ALEwIH " crossorigin = " anonymous " >
< script src = " https :// cdn . jsdelivr . net / npm / bootstrap
@5 .3.3/ dist / js / bootstrap . bundle . min . js "
integrity = " s h a 3 8 4 Y v p c r Y f 0 t Y 3 l H B 6 0 N N k m X c 5 s 9 f D V Z L E S a A A 5
5 NDzOxhy9GkcIdslK1eN7N6jIeHz "
crossorigin = " anonymous " > </ script >
<! - - JS FILE -->
< link rel = " icon " type = " image /x - icon "
href = " {% static ’ img / favicon . png ’ %} " >
< script src = " {% static ’ js / publicscript . js ’ %} " > </ script >
<! - - CSS FILE - - >
< link rel = " stylesheet " href = " {% static ’ css / serventstyle . css ’ %} " / >
</ head >
< body class = " body " >
<! - - header -->
< header >
<! - - logo and search - - >
< div class = " left " >
< div class = " logo " >
<! - - navbar logo -->
< img class = " logo - img " src = " {% static ’ img / slogo . png ’ %} " alt = " " / >
</ div >
<! - - this is for responsive -->
< div class = " right - responsive " >
< div class = " user - profile " >
{% if c u r r e n t _ u s e r _ d e t a i l s .
profile . profile_picture %}
<a href = " " >< img class = " profile - img " src = " {{ c u r r e n t _ u s e r _ d e t a i l s .
profile . profile_picture . url }} " alt = " " / > </a >
{% else %}
<a href = " " >< img class = " profile - img " src = "
{% static ’ img / profile . png ’ %} " alt = " " / > </a >
4.3 Servant Zone: 84

{% endif %}
</ div >
</ div >
</ div >
<! - - navbar search -->
< div class = " middle " >
</ div >
< div class = " right " >
< div class = " user - profile " >{% if c u r r e n t _ u s e r _ d e t a i l s .
profile_picture %}
<a href = " " >< img class = " profile - img " src {{
c u r r e n t _ u s e r _ d e t a i l s . profile_
picture . url }} " </a >
{% else %}
<a href = " " >< img class = " profile - img "
src = " {% static ’ img / profile . png ’ %} " </a >
{% endif %}
< div class = " profile - txt " >
<a href = " " class = " txt -3 " >
<p style = " margin - top : 18 px ; " >{{ c u r r e n t _ u s e r _ d e t a i l s . full_name }} </ p >
<p style = " margin - top : -15 px ; " > Department of
< cite title = " Source Title " >{{ c u r r e n t _ u s e r _ d e t a i l s .
full_name }} </ cite > </p >
</a >
</ div >
</ div >
</ div >
<! - - my profile - - >
< div class = " nav - responsive " >
<div >
<a href = " {% url ’ publicapp : publichome ’ %} "
class = " text - decoration - none " >
< span class = " txt -2 " ><i class = " fa - solid fa - house " > </i > </ span >
</a >
</ div >
<div >
<a href = " # " class =" text - decoration - none " >
< span class = " txt -2 " ><i class = " fa - solid fa - headset " > </i > </ span >
</a >
</ div >
</ div >
</ header >
< main >
<! - - left bar -->
< div class = " publicleft " >
4.3 Servant Zone: 85

< div class = " navleftmiddle " >


< div class = " mt -2 navleftmiddles navdiver " >
<a href = " {% url ’ serventapp : complain ’%} "
class = " text - decoration - none " >
< span class = " txt -2 " >
<i class = " fa - solid fa - house - user " > </i >
& nbsp ; </ span >
< span class = " txt -2 " > Dashboard </ span >
</a >
</ div >
< div class = " navleftmiddles navdiver " >
<a href = " {% url ’ serventapp : post ’%} "
class = " text - decoration - none " >
< span class = " txt -2 " ><i class = " fa - solid
fa - circle - plus " > </i >& nbsp ; </ span >
< span class = " txt -2 " > Add Event / News </ span >
</a >
</ div >
< div class = " navleftmiddles navdiver " >
<a href = " {% url ’ serventapp : rank ’%} "
class = " text - decoration - none " >
< span class = " txt -2 " ><i class = " fa - solid fa - users " >
</i >& nbsp ;
</ span >
< span class = " txt -2 " > Top Social Person </ span >
</a >
</ div >
< div class = " navleftmiddles navdiver " >
<a href = " {% url ’ serventapp : event ’%} "
class = " text - decoration - none " >
< span class = " txt -2 " ><i class = " fa - solid
fa - calendar - days " > </i >& nbsp ; </ span >
< span class = " txt -2 " > View Event / News </ span >
</a >
</ div >
< div class = " navleftmiddles navdiver " >
<a href = " {% url ’ serventapp : your_event ’%} "
class = " text - decoration - none " >
< span class = " txt -2 " ><i class = " fa - solid fa - chalkboard - user " > </i >
& nbsp ; </ span >
< span class = " txt -2 " > Your event </ span >
</a >
</ div >
</ div >
<! - - left bottom -->
4.3 Servant Zone: 86

< div class = " navleftbottom navleftmiddles " >


< div style = " margin - top : 13 px ; " >
<! - - logout code -->
<a href = " # " class = " txt -2 " data - bs - toggle = " modal "
data - bs - target = " # logoutModal " >
<i class = " fa - solid fa - sign - out mx -2 " > </i > Logout
</a >
< div class = " modal fade " id = " logoutModal "
tabindex = " -1 " aria - labelledby = " logoutModalLabel "
aria - hidden = " true " >
< div class = " modal - dialog modal - xl position - absolute bottom -50 " >
< div class = " modal - content " >
< div class = " modal - header " >
< h1 class = " modal - title fs -5 " id = " lo goutMo dallLa bel " > Are you sure
to logout ? </ h1 > < button type = " button "
class = " btn - close " data - bs - dismiss = " modal "
aria - label = " Close " > </ button >
</ div >
< div class = " row mb -3 " >
< div class = " col - sm -4 " >
< button type = " button " class = " btn btn - secondary "
data - bs - dismiss = " modal " > Close </ button >
</ div >
< div class = " col - sm -4 " >
<a href = " {% url ’ publicapp : logout ’%} " style = " text - decoration : none ; " >
< button type = " button " class = " btn btn - primary " >Yes </ button >
</a >
</ div > </ div > </ div >
</ div > </ div > </ div > </ div >
</ div >
<! - - right -->
< div class = " publicmiddle " >{% block content %} {% endblock %} </ div >
</ main >
</ body >
</ html >

servent.html

{% extends ’ serventparent . html ’ %}


{% load static %}

{% block title %} Dashboard {% endblock title %}

{% block content %}
4.3 Servant Zone: 87

< div class = " card " style = " width :100%; " >
< div class = " card - body " >
<div >
< inputtype = " search " placeholder = " Search Here " / >
< button class = " btn btn - primary " style = " float : right ; " >
Add Servent </ button >
</ div >
<hr >
< table class = " table table - striped table - hover " >
< thead >
<tr >
< th scope = " col " > Serial No . </ th >
< th scope = " col " > Name </ th >
< th scope = " col " > Email </ th >
< th scope = " col " > Contact No . </ th >
< th scope = " col " > Action </ th >
</ tr >
</ thead >
< tbody >
<tr >
< th scope = " row " >1 </ th >
<td > Muskan </ td >
<td > xyz@gmail . com </ td >
<td >1234567890 </ td >
<td > < i class = " fa - solid fa - pen - to - square " > </i > <i class =
" fa - solid fa - trash - can " > </i > </ td >
</ tr >
<tr >
< th scope = " row " >1 </ th >
<td > Muskan </ td >
<td > xyz@gmail . com </ td >
<td >1234567890 </ td >
<td > < i class = " fa - solid fa - pen - to - square " > </i > <i class =
" fa - solid fa - trash - can " > </i > </ td >
</ tr >
<tr >
< th scope = " row " >1 </ th >
<td > Muskan </ td >
<td > xyz@gmail . com </ td >
<td >1234567890 </ td >
<td > < i class = " fa - solid fa - pen - to - square " > </i > <i class =
" fa - solid fa - trash - can " > </i > </ td >
</ tr >
</ tbody >
</ table >
4.3 Servant Zone: 88

</ div >


</ div >
{% endblock %}

complain.html

{% extends ’ serventparent . html ’ %}


{% load static %}

{% block title %} Dashboard {% endblock title %}

{% block content %}
< div class = " new - card " >
{% for c in complain %}
< div class = " card - main " >
< div class = " card - top " >
< div class = " card - img " >
{% if c . complain_by . profile_picture %}
<a href = " " >< img class = " profile - img "
src = " {{ c . complain_by . profile_picture . url }} " / > </a >
{% else %}
<a href = " " >< img class = " profile - img "
src = " {% static ’ img / profile . png ’ %} " / > </a >
{% endif %}
</ div >
< div class = " card - title " >
<p > < span style = " font - weight : bold ; " > Complaints Type : </ span >
{{ c . complain_type }} </ p >
<p >{{ c . complain_by . full_name }} & middot ; {{ c . co mplain _locat ion }} </ p >
</ div >
</ div >
< div class = " card - img - main " >
{% if c . complain_image %}
< img src = " {{ c . complain_image . url }} " alt = " " / >
{% else %}
< img src = " {% static ’ img / profile . png ’ %} " alt = " " / >
{% endif %}
</ div >
< div class = " complain - status " >
<a href = " / solvecomplain /{{ c . c_id }} "
class = " text - decoration - none w -100 " >
{% if c . complain_status == ’ solved ’ %}
< span class = " complain - status - true " > Solved </ span >
{% else %}
< span class = " complain - status - false " > Unsolved </ span >
4.3 Servant Zone: 89

{% endif %}
</a >
</ div >
</ div >
{% endfor %}
</ div >
{% endblock %}

event.html :-

{% extends ’ serventparent . html ’ %}


{% load static %}

{% block title %} Your Event {% endblock title %}

{% block content %}
< div class = " new - card " >
{% for e in event %}
< div class = " card - main " >
< div class = " card - top " >
< div class = " card - title " >
<p > < span style = " font - weight : bold ; " > News / Event by :
</ span > {{ e . department . full_name }} </ p >
<p > Date : {{ e . date }} </ p >
<p > Description : {{ e . description }} </ p >
</ div >
</ div >
< div class = " card - img - main " >
{% if e . image %}
< img src = " {{ e . image . url }} " alt = " " / >
{% else %}
< img src = " {% static ’ img / post . jpg ’ %} " alt = " " / >
{% endif %}
</ div >
< div class = " complain - status " >
<a href = " / delete_event /{{ e . e_id }} "
class = " text - decoration - none w -100 " >
< span class = " complain - status - false " > Delete </ span >
</a >
</ div >
</ div >
{% endfor %}
</ div >
{% endblock %}
4.3 Servant Zone: 90

4.3.2 Snapshot:-

Figure 4.12: Servant Dashboard

Figure 4.13: Top Social Person


4.3 Servant Zone: 91

Figure 4.14: Add Event

Figure 4.15: Your Event


4.4 Supervisor Zone: 92

4.4 Supervisor Zone:


The supervisor zone is for admin. The modules of this zone are as follow:

• Add Service Providers Supervisors have the ability to enlist service


providers for social work. The Servant Zone caters to NGOs, orga-
nizations, or individuals interested in serving as social workers and
addressing various societal issues.
• View all servants Supervisors can access a comprehensive list of all
service providers within the society.
• View Complain Supervisors can monitor all complaints lodged by
users on the platform. They can also track which service provider
resolved each complaint
• Add Events/News Supervisors are empowered to publish events
or news items pertaining to societal concerns, such as blood donation
drives, health camps, and sanitation initiatives.
• View Top Socialized People Supervisors have the privilege of iden-
tifying the most impactful individuals in social work. These top con-
tributors, determined by the number of rewards they’ve earned, may
receive special acknowledgments or prizes.

4.4.1 Code:-
supervisorappurls.py :-

from django . urls import path


from . import views

urlpatterns = [
path ( ’ supervisor - dashboard / ’ , views . dashboard ,
name = ’ su p e rv i s or d a sh b o ar d ’) ,
path ( ’ supervisor - complain / ’ , views . complain , name = ’ complain ’) ,
path ( ’ supervisor - view - servent / ’ , views . view_servent ,
name = ’ viewservent ’) ,
path ( ’ supervisor - addservent / ’ , views . addservent , name = ’ addservent ’) ,
path ( ’ supervisor - rank / ’ , views . rank , name = ’ rank ’) ,
]

views.py :-
4.4 Supervisor Zone: 93

from django . shortcuts import render , redirect


from generalapp . models import User
from publicapp . models import Profile , Complain , TopEnvorior

def dashboard ( request ):


try :
if request . session [ ’ email ’ ]!= None :
# common to all servent view
current_user = request . session [ ’ email ’]
c u r r e n t _ u s e r _ d e t a i l s = Profile .
objects . get ( user = current_user )
return render ( request , ’ supervisor / pages /
dashboard . html ’ , locals ())
except KeyError :
return redirect ( ’ generalapp : login ’)

def complain ( request ):


# common to all servent view
current_user = request . session [ ’ email ’]
c u r r e n t _ u s e r _ d e t a i l s = Profile . objects . get ( user = current_user )
# complain code
complain = Complain . objects . filter ( complain_status = ’ unsolved ’)
return render ( request , ’ supervisor / pages / complain . html ’ , locals ())

def addservent ( request ):


# common to all servent view
current_user = request . session [ ’ email ’]
c u r r e n t _ u s e r _ d e t a i l s = Profile . objects . get ( user = current_user )
# add servent code
if request . method == ’ POST ’:
email = request . POST [ ’ email ’]
password = request . POST [ ’ password ’]
contact_no = request . POST [ ’ number ’]
full_name = request . POST [ ’ department_type ’]
state = request . POST [ ’ state ’]
city = request . POST [ ’ city ’]
pin_code = request . POST [ ’ pin_code ’]
print ( pin_code )
p_img = request . FILES [ ’ pimg ’]
try :
check_email = User . objects . get ( email = email )
if check_email :
4.4 Supervisor Zone: 94

print ( ’ Already registered ’)


msg = ’ Email already registered ’
return render ( request , ’ supervisor / pages /
addservent . html ’ , locals ())
except :
user = User ( email = email , password = password ,
user_type = ’ servent ’)
user . save ()
profile = Profile ( user = user ,
contact_no = contact_no , full_name = full_name ,
city = city , state = state , pin_code = pin_code
, profile_picture = p_img )
profile . save ()
msg = ’ Registration Successfully ’
return render ( request , ’ supervisor / pages /
addservent . html ’ , locals ())

return render ( request , ’ supervisor / pages / addservent . html ’ ,


locals ())

# this is for top social person


def rank ( request ):
# common to all servent view
current_user = request . session [ ’ email ’]
c u r r e n t _ u s e r _ d e t a i l s = Profile . objects . get ( user = current_user )
# top envorior code
top_envorior = TopEnvorior . objects . order_by ( ’ - reward ’)
return render ( request , ’ supervisor / pages / rank . html ’ , locals ())

def view_servent ( request ):


# common to all servent view
current_user = request . session [ ’ email ’]
c u r r e n t _ u s e r _ d e t a i l s = Profile . objects . get ( user = current_user )
# view ervent details
servent = Profile . objects . filter ( user__user_type = ’ servent ’)
return render ( request , ’ supervisor / pages / viewservent . html ’ ,
locals ())

Templates :-
supervisorparent.html
<! DOCTYPE html >
< html lang = " en " >
< head >
4.4 Supervisor Zone: 95

< meta charset = " UTF -8 " / >


< meta name = " viewport "
content = " width = device - width , initial - scale =1.0 " / >
{% load static %}
< title >{% block title %} My Title {% endblock %} </ title >
<! - - FONT AWESOME CDN -->
< link
rel = " stylesheet "
href = " https :// cdnjs . cloudflare . com / ajax / libs / font - awesome /6.4.0/
css / all . min . css " integrity = " s h a 5 1 2 i e c d L m a s k l 7 C V k q k X N Q /
ZH / X L v W Z O J y j 7 Y y 7 t c e n m p D 1 y p A S o z p m T / E0 iPtmFI B46Zmd tAc
9 eNBvH0H / ZpiBw == " crossorigin = " anonymous "
referrerpolicy = " no - referrer " / >
<! - - BOOTSTRAP CDN -->
< link href = " https :// cdn . jsdelivr . net / npm / bootstrap@5 .3.3/
dist / css / bootstrap . min . css " rel = " stylesheet "
integrity = " s h a 3 8 4 Q W T K Z y j p P E j I S v 5 W a R U 9 O F e R p o k 6 Y c t n
Y m D r 5 p N l y T 2 b R j X h 0 J M h j Y 6 h W + ALEwIH "
crossorigin = " anonymous " >
< script src = " https :// cdn . jsdelivr . net / npm / bootstrap@5 .
3.3/ dist / js / bootstrap . bundle . min . js "
integrity = " s h a 3 8 4 Y v p c r Y f 0 t Y 3 l H B 6 0 N N k m X c 5 s 9 f D V Z L E S a A A 5 5 N D z O h
y 9 G k c I d s l K 1 e N 7 N 6 j I e H z " crossorigin = " anonymous " >
</ script >
<! - - JS FILE -->
< script src = " {% static ’ js / publicscript . js ’ %} " > </ script >
<! - - CSS FILE - - >
< link rel = " icon " type = " image /x - icon " href =
" {% static ’ img / favicon . png ’ %} " >
< link rel = " stylesheet " href =
" {% static ’ css / supervisorstyle . css ’ %} " / >
</ head >
< body class = " body " >
<! - - header -->
< header >
<! - - logo and search - - >
< div class = " left " >
< div class = " logo " >
<! - - navbar logo -->
< img class = " logo - img " src = " {% static ’ img / slogo . png ’ %} " / >
</ div >
<! - - this is for responsive -->
< div class = " right - responsive " >
< div class = " user - profile " >
{% if c u r r e n t _ u s e r _ d e t a i l s . profile_picture %}
4.4 Supervisor Zone: 96

<a href = " " >


< img class = " profile - img " src = " {{ c u r r e n t _ u s e r _ d e t a i l s .
profile_picture . url }} " alt = " " / > </a >
{% else %}
<a href = " " >< img class = " profile - img " src = " {%
static ’ img / profile . png ’ %} " alt = " " / > </a >
{% endif %}
</ div >
< div class = " other - settings " onclick = " other_settings () " >
< img class = " " src = " {% static ’ img / grid . png ’ %} " alt = " " / >
</ div >
</ div >
</ div >
<! - - navbar search -->
< div class = " middle " >
</ div >
< div class = " right " >
< div class = " user - profile " >
<a href = " " >
{% if c u r r e n t _ u s e r _ d e t a i l s . profile_picture %}
<a href = " " >< img class = " profile - img " src = " {{ c u r r e n t _ u s er _ d e t a i l s .
profile_picture . url }} " alt = " " / > </a >
{% else %}
<a href = " " >< img class = " profile - img "
src = " {% static ’ img / profile . png ’ %} " alt = " " / > </a >
{% endif %}
</a >
< div class = " profile - txt " >
<p style = " margin - top : 17 px ;
font - size : 14 px ; " >{{ c u r r e n t _ u s e r _ d e t a i l s . full_name }} </ p >
<p style = " margin - top : -16 px ;
font - size : 14 px ; " >< span style = " font - weight : bold ; " >
Welcome to </ span >
< cite title = " Source Title " > Admin Dashboard </ cite > </p >
</ div >
</ div >
</ div >
<! - - my profile - - >
< div class = " nav - responsive " >
<div >
<a href = " {% url ’ publicapp : publichome ’%} "
class = " text - decoration - none " >
< span class = " txt -2 " ><i class = " fa - solid fa - house " > </i > </ span >
</a >
</ div >
4.4 Supervisor Zone: 97

<div >
<a href = " # " class = " text - decoration - none " >
< span class = " txt -2 " ><i class = " fa - solid fa - headset " > </i > </ span >
</a >
</ div >
</ div >
</ header >
< main >
<! - - left bar -->
< div class = " publicleft " >
<! - - left middle -->
< div class = " navleftmiddle " >
< div class = " navleftmiddles navdiver mt -2 " >
<a
href = " {% url ’ supervisorapp :
s up e r vi s o rd a s hb o a rd ’ %} "
class = " text - decoration - none " >
< span class = " txt -2 " ><i class = " fa - solid
fa - house - user " > </i >& nbsp ; </ span >
< span class = " txt -2 " > Home </ span >
</a >
</ div >
< div class = " navleftmiddles navdiver " >
<a href = " {% url ’ supervisorapp : complain ’%} "
class = " text - decoration - none " >
< span class = " txt -2 "
><i class = " fa - solid fa - envelope - open - text " >
</i >& nbsp ; </ span >
< span class = " txt -2 " > Complain </ span >
</a >
</ div >
< div class = " navleftmiddles navdiver " >
<a href = " {% url ’ supervisorapp : addservent ’%} "
class = " text - decoration - none " >
< span class = " txt -2 "
><i class = " fa - solid fa - user - plus " > </i >& nbsp ; </ span >
< span class = " txt -2 " > Add Servant </ span >
</a >
</ div >
< div class = " navleftmiddles navdiver " >
<a href = " {% url ’ supervisorapp : rank ’%} "
class = " text - decoration - none " >
< span class = " txt -2 " >
<i class = " fa - solid fa - ranking - star " > </i >& nbsp ; </ span >
< span class = " txt -2 " > Top Social Person </ span >
4.4 Supervisor Zone: 98

</a >
</ div >
< div class = " navleftmiddles navdiver " >
<a href = " {% url ’ supervisorapp : viewservent ’%} "
class = " text - decoration - none " >
< span class = " txt -2 "
><i class = " fa - solid fa - users " > </ i
>& nbsp ; </ span >
< span class = " txt -2 " > View Servant </ span >
</a >
</ div >
</ div >
<! - - left bottom -->
< div class = " navleftbottom navleftmiddles " >

< div style = " margin - top : 13 px ; " >


<! - - logout code -->
<a href = " # " class = " txt -2 " data - bs - toggle = " modal "
data - bs - target = " # logoutModal " >
<i class = " fa - solid fa - sign - out mx -2 " > </i > Logout
</a >
< div class = " modal fade " id = " logoutModal "
tabindex = " -1 " aria - labelledby = " logoutModalLabel "
aria - hidden = " true " >
< div class = " modal - dialog modal - xl position - absolute bottom -50 " >
< div class = " modal - content " >
< div class = " modal - header " >
< h1 class = " modal - title fs -5 " id = " lo goutMo dallLa bel " >
Are you sure to logout ? </ h1 >
< button type = " button "
class = " btn - close " data - bs - dismiss = " modal " aria - label = " Close " >
</ button >
</ div >
< div class = " row mb -3 " >
< div class = " col - sm -4 " >
< button type = " button " class = " btn btn - secondary "
data - bs - dismiss = " modal " > Close </ button >
</ div >
< div class = " col - sm -4 " >
<a href = " {% url ’ publicapp : logout ’%} "
style = " text - decoration : none ; " >
< button type = " button " class = " btn btn - primary " >Yes </ button >
</a >
</ div > </ div > </ div >
</ div > </ div > </ div > </ div > </ div >
4.4 Supervisor Zone: 99

<! - - right -->


< div class = " publicmiddle " >{% block content %} {% endblock %} </ div >
</ body >
</ html >

viewservent.html :-
{% extends ’ supervisorparent . html ’ %}
{% load static %}
{% block title %} Event {% endblock title %}
{% block content %}
< div class = " feed - search " >
<! - - < div class = " user - profile " >
<a >
< img class = " profile - img " src = " {% static ’ img / user . jpeg ’ %} " > </a >
</ div > - - >
< form >
< div class = " search " style = " margin - right : 10 px ; " >
< input type = " text " placeholder = " write here to search something " >
</ div >

<a href = " # " >


< button class = " btn btn - primary " type = " submit " > Search </ button >
</a >
</ form >
</ div >
<hr >
< table >
< thead >
<tr >
<th > Serial No . </ th >
<th > Profile </ th >
<th > Department </ th >
<th > Phone </ th >
<th > City </ th >
<th > Pin </ th >
</ tr >
</ thead >
< tbody >
{% for s in servent %}
<tr >
<td >{{ forloop . counter }} </ td >
<td >
< div class = " user - profile " >
{% if s . profile_picture %}
<a href = " " >< img class = " profile - img "
4.4 Supervisor Zone: 100

src = " {{ s . profile_picture . url }} " alt = " " / > </a >
{% else %}
<a href = " " >< img class = " profile - img "
src = " {% static ’ img / profile . png ’ %} " alt = " " / > </a >
{% endif %}
</ div >
</ td >
<td >{{ s . full_name }} </ td >
<td >{{ s . contact_no }} </ td >
<td >{{ s . city }} </ td >
<td >{{ s . pin_code }} </ td >
</ tr >
{% endfor %}

</ tbody >


</ table >
</ div >
{% endblock %}
4.4 Supervisor Zone: 101

4.4.2 Snapshot:-

Figure 4.16: Supervisor Home page

Figure 4.17: View Servent


4.4 Supervisor Zone: 102

Figure 4.18: Complain


Chapter 5

Conclusion and Future Work


In conclusion, the development of our social media web application “Social
Warrior” represents a significant step towards fostering sustainable develop-
ment and positive social change. By harnessing the power of technology, we
aim to inspire individuals to actively engage in social work and environmen-
tal conservation efforts. Through features such as the online job portal and
donation system focusing on items rather than money, we provide avenues
for both economic empowerment and philanthropy. Moreover, our platform
recognizes and celebrates the contributions of individuals who strive to make
a difference, thus encouraging a culture of altruism and community support.
Additionally, the inclusion of a complaint system allows users to address en-
vironmental issues promptly, facilitating the maintenance of clean and safe
surroundings. As we continue to refine and expand our application, we re-
main committed to promoting a more inclusive and sustainable future for
all. Together, we can leverage technology to create meaningful impact and
build a better world for generations to come.

Moving forward, the project aims to expand its scope by integrating Non-
Governmental Organizations (NGOs) into the platform. This enhancement
will provide a structured framework for collaboration between individuals,
businesses, and established charitable organizations, thereby amplifying the
impact of social and environmental initiatives. Additionally, the project in-
tends to implement a certification system to formally recognize and validate
the contributions of individuals and organizations engaged in exemplary so-
cial and environmental work. These certificates, authorized by the govern-
ment, will serve as a testament to their dedication and impact. Moreover,
recipients of these certificates may become eligible for subsidies or other forms
of governmental support, incentivizing further engagement and facilitating
sustainable development efforts. Furthermore, in line with our commitment
to continuous improvement, the future iterations of the project will prioritize
enhancing user experience and accessibility. This will involve implementing
user-friendly interfaces, streamlining navigation, and optimizing functionali-
ties to ensure seamless interaction for all users, including those with varying
levels of digital literacy. Additionally, efforts will be made to incorporate
multi-lingual support and accessibility features to cater to diverse popula-
tions. By prioritizing user-centric design principles, we aim to maximize
engagement and participation, empowering individuals from all backgrounds
104

to contribute meaningfully to social and environmental causes.By incorpo-


rating NGOs and formalizing recognition mechanisms, the project seeks to
strengthen its role as a catalyst for positive change and community empow-
erment.
Bibliography
[1] Prachi Mundharikar Dhanshree Pande Achal Zalke Roshani Tal-
male Tony Jagyasi Anjali Bhoyar, Aman Sharma. A Web Ap-
plication for Medicine, Food, Books Cloth Collection and Do-
nation. https://www.ijraset.com/research-paper/web-application-for-
medicine-food-books-and-clothabstract, 2023-04-03. [Online; accessed 10
April 2024].

[2] Andrew S Goudie. Human impact on the natural environment. John


Wiley & Sons, 2018.

[3] FORBES INDIA. Unemployment in India (2008-2024).


https://www.forbesindia.com/article/explainers/unemployment-rate-in-
india/87441/1, 2024. [Online; accessed 4 April 2024].

[4] RJ Padodara and Ninan Jacob. Climate change: Effect on growth of


animals. Basic Research Journal of Agricultural Science and Review,
2(4):80–90, 2013.

[5] Shri Prakash Bajpai Rwitabrata Mallick. https://www.igi-


global.com/gateway/chapter/208914. [Online; accessed 14 April
2024].

[6] Ms. Reena Sahota. Status of India in Global


Hunger Index SDGs: Challenges and Initiatives.
https://www.redalyc.org/journal/7039/703973446002/html/, 2022.
[Online; accessed 4 April 2024].

[7] Swastik S Satapathy and Krishna K Jaiswal. A study on poverty esti-


mation and current state of poverty in india. International Journal of
Advanced Scientific Research and Management, 3(6):1–8, 2018.

[8] Suman Vij. ENVIRONMENTAL IMPACT ON THE ECONOMIC


GROWTH. 03 2021.

You might also like