Professional Documents
Culture Documents
SRM Institute of Science & Technology: B.Tech
SRM Institute of Science & Technology: B.Tech
ON
PHP
B.TECH
in
Submitted By
Name: NAVEEN KUMAR R Reg. No: RA1611003040005
I hereby declare that the report “ONLINE NOTES SHARING SYSTEM USING
PHP” is the authentic work done by NAVEEN KUMAR R
(RA1611003040005), as requirements of 15SE203 – OBJECT ORIENTED
ANALYSIS AND DESIGN during the seventh semester period from July 2019
to November 2019 for the award of B.Tech Computer Science And
Engineering degree under my supervision during the academic year 2018- 2019.
PGDHRM.,PDF(IISc)
Engineering Engineering
SRM Institute of Science & Technology SRM Institute of Science & Technology
As the world is being developed with the new technologies, discovering and manipulating
new ideas and concepts of taking everything online are rapidly changing. It is difficult for
teacher’s to circulate their notes to each and every student whom is he/she teaching. Online
Notes Sharing provide an easy approach for both students and teachers to circulate the notes
whether of any kind like lecture notes, assignment questions, question papers and all the
important documents. The teachers and students can upload the documents from anywhere
and students can download it. Overall it is managed by the admin. Online notes sharing is a
web based notes sharing and management system which helps students and teachers to share
their notes online effectively. It reduces the wasting of time in manually distributing notes to
each individual. It greatly overcomes the lack of availability and converts the manual old
school paperwork to a fully automated and managed online system. This project intends to
provide the students with an environment where they can upload their notes online. By doing
this, it will allow them to gain the basic knowledge about using any kind of project
management system. This project has only a single agenda, that is, to allow students to
upload their study materials online like Google classroom. Here you have to sign up in order
to upload any kind of files. When you sign up then you can view the uploading dashboard.
From there you can upload your files and later on you can download them. Features such as
Editing site content, user management, and site settings are the most essential feature of a
site. And these all features have made management of site easier as the user can change the
content and setting any time he/she want rather than opening the whole source code and
changing each line of codes. A clean and responsive dashboard is provided in the admin
panel for the easy management of this project.
0
CHAPTER 1
INTRODUCTION
1
CHAPTER 2
It is difficult for teacher’s to circulate their notes to each and every student whom is he/she
teaching. Online Notes Sharing system provide an easy approach for both students and
teachers to circulate the notes whether of any kind like lecture notes, assignment questions,
question papers and all the important documents. The teachers and students can upload the
documents from anywhere and students can download it. Overall it is managed by the
admin.Mostly the notes are circulated on WhatsApp or any kind so it gets very difficult to
manage the important notes at the time of need. Online notes sharing is a web based notes
sharing and management system which helps students and teachers to share their notes online
effectively. It reduces the wasting of time in manually distributing notes to each individual. It
greatly overcomes the lack of availability and converts the manual old school paperwork to a
fully automated and managed online system.
There are many students who face problem in studying at the exam time because either they
don’t have the notes provided by teachers or they must have not been in the college. This
System will provide a platform to easily access the notes. The Objective of Online notes
sharing system is to provide better facility to the students and teachers to bring out the easy
circulation of documents within healthy environment. It will reduce the manual paperwork,
reduced the sharing and distribution time. My system will provide an easy approach to share
the documents for studying purpose. Multiple users can work simultaneously on the system.
It will be easy for the teachers to circulate the notes to each and every student.
DRAWBACKS:
The system is designed to provide an easy approach for both teachers and students to share
notes between each other. But still there are some drawbacks in the proposed system.
The system does not have any criteria to check whether the student or teacher is of
particular college or not.
Anyone can register on the system and can access the data.
2
CHAPTER 3
3
CHAPTER 4
SYSTEM DESIGN
4.1 STATIC DIAGRAM
4
4.1.2 Class Diagram
Class diagram is a static diagram. It represents the static view of an application. Class
diagram is not only used for visualizing, describing, and documenting different aspects of a
system but also for constructing executable code of the software application. Class diagram
describes the attributes and operations of a class and also the constraints imposed on the
system. The class diagrams are widely used in the modelling of object oriented systems
because they are the only UML diagrams, which can be mapped directly with object-oriented
languages. Class diagram shows a collection of classes, interfaces, associations,
collaborations, and constraints. It is also known as a structural diagram.
5
4.2 DYNAMIC DIAGRAM
4.2.1 INTERACTION DIAGRAM
The purpose of interaction diagrams is to visualize the interactive behaviour of the system.
Visualizing the interaction is a difficult task. Hence, the solution is to use different types of
models to capture the different aspects of the interaction. Sequence and collaboration
diagrams are used to capture the dynamic nature but from a different angle.
A sequence diagram simply depicts interaction between objects in a sequential order i.e. the
order in which these interactions take place. We can also use the terms event diagrams or
event scenarios to refer to a sequence diagram. Sequence diagrams describe how and in what
order the objects in a system function.
6
4.2.1.2 COLLABRATION DIAGRAM
A collaboration diagram is required to identify how various objects make up the entire
system. They are used to understand the object architecture within a system rather than the
flow of a message in a sequence diagram. An object an entity that has various attributes
associated with it. It is a concept of object-oriented programming. There are multiple objects
present inside an object-oriented system where each object can be associated with any other
object inside the system. Collaboration or communication diagrams are used to explore the
architecture of objects inside the system. The message flow between the objects can be
represented using a collaboration diagram
7
4.2.2 ACTIVITY DIAGRAM
Activity diagram is another important diagram in UML to describe the dynamic aspects of
the system. Activity diagram is basically a flowchart to represent the flow from one activity
to another activity. It captures the dynamic behaviour of the system. The activity can be
described as an operation of the system. The control flow is drawn from one operation to
another. This flow can be sequential, branched, or concurrent. Activity diagrams deal with
all type of flow control by using different elements such as fork, join, etc. Activity is a
particular operation of the system. Activity diagrams are not only used for visualizing the
dynamic nature of a system, but they are also used to construct the executable system by
using forward and reverse engineering techniques. The only missing thing in the activity
diagram is the message part.
8
4.2.3 STATECHART DIAGRAM
State chart diagram describes the flow of control from one state to another state. States are
defined as a condition in which an object exists and it changes when some event is triggered.
The most important purpose of State chart diagram is to model lifetime of an object from
creation to termination. State chart diagrams provide us an efficient way to model the
interactions or communication that occurs within the external entities and a system. These
diagrams are used to model the event-based system. A state of an object is controlled with the
help of an event.
9
4.2.4 IMPLEMENTATION DIAGRAM
State chart diagrams provide us an efficient way to model the interactions or communication
that occurs within the external entities and a system. These diagrams are used to model the
event-based system. A state of an object is controlled with the help of an event There are two
types of implementation diagrams, component diagrams show the structure of the code itself,
And deployment diagrams show the structure of the runtime system.
10
4.2.4.2 DEPLOYMENT DIAGRAM
Deployment diagrams are used to visualize the topology of the physical components of a
system, where the software components are deployed. The term Deployment itself describes
the purpose of the diagram. Deployment diagrams are used for describing the hardware
components, where software components are deployed. Component diagrams and
deployment diagrams are closely related.
11
CHAPTER 5
MODULE DESCRITION
STUDENT
TEACHER
ADMIN
NOTES
STUDENT:
Students register on the website and login to access the notes uploaded by teachers
and view them or download it.
TEACHER:
The teacher has to first register on the website and then login to upload the note.
Teacher can even delete the notes by logging in.
ADMIN:
The notes are managed by admin. He has rights to approve or disapprove the notes
uploaded by particular user.
NOTES:
Notes can be uploaded and deleted by teacher and student. It can be downloaded by
every student and teacher.
12
CHAPTER 6
SAMPLE CODE
Index.php
echo "<td><a onClick=\"javascript: return confirm('Are you sure you want to delete this
post?')\" href='?del=$file_id'><i class='fa fa-times' style='color: red;'></i>delete</a></td>";
echo "</tr>";
}
}
?>
</tbody>
</table>
</form>
</div>
</div>
</div>
<?php
if (isset($_GET['del'])) {
$note_del = mysqli_real_escape_string($conn, $_GET['del']);
$file_uploader = $_SESSION['username'];
$del_query = "DELETE FROM uploads WHERE file_id='$note_del'";
$run_del_query = mysqli_query($conn, $del_query) or die (mysqli_error($conn));
if (mysqli_affected_rows($conn) > 0) {
echo "<script>alert('note deleted successfully');
window.location.href='index.php';</script>";
}
else {
echo "<script>alert('error occured.try again!');</script>";
}
}
if (isset($_GET['approve'])) {
$note_approve = mysqli_real_escape_string($conn,$_GET['approve']);
$approve_query = "UPDATE uploads SET status='approved' WHERE
file_id='$note_approve'";
14
$run_approve_query = mysqli_query($conn, $approve_query) or die (mysqli_error($conn));
if (mysqli_affected_rows($conn) > 0) {
echo "<script>alert('note approved successfully');
window.location.href='index.php';</script>";
}
else {
echo "<script>alert('error occured.try again!');</script>";
}
}
?>
<?php
}
else {
?>
<h3 class="page-header">
<center> <marquee width = 70% ><font color="green" ><?php echo $_SESSION['course'];
?> Engineering </font><font color="brown"> notes uploaded by various
users</font></marquee></center>
</h3>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<div class="table-responsive">
<form action="" method="post">
<table class="table table-bordered table-striped table-hover">
<thead>
<tr>
<th>Name</th>
<th>Description</th>
<th>Type </th>
<th>Uploaded by</th>
<th>Uploaded on</th>
<th>Download</th>
</tr>
</thead>
<tbody>
<?php
$currentusercourse = $_SESSION['course'];
$query = "SELECT * FROM uploads WHERE file_uploaded_to = '$currentusercourse' AND
status = 'approved' ORDER BY file_uploaded_on DESC";
$run_query = mysqli_query($conn, $query) or die(mysqli_error($conn));
if (mysqli_num_rows($run_query) > 0) {
while ($row = mysqli_fetch_array($run_query)) {
$file_id = $row['file_id'];
$file_name = $row['file_name'];
$file_description = $row['file_description'];
$file_type = $row['file_type'];
$file_date = $row['file_uploaded_on'];
15
$file = $row['file'];
$file_uploader = $row['file_uploader'];
echo "<tr>";
echo "<td>$file_name</td>";
echo "<td>$file_description</td>";
echo "<td>$file_type</td>";
echo "<td><a href='viewprofile.php?name=$file_uploader' target='_blank'> $file_uploader
</a></td>";
echo "<td>$file_date</td>";
echo "<td><a href='allfiles/$file' target='_blank' style='color:green'>Download </a></td>";
echo "</tr>";
}
}
?>
</tbody>
</table>
</form>
</div>
</div>
</div>
<?php }
?>
<script src="js/jquery.js"></script>
<script src="js/bootstrap.min.js"></script>
</body>
</html>
Login.php
Signup.php
18
$query = "INSERT INTO
users(username,name,email,password,role,course,gender,joindate,token) VALUES
('$username' , '$name' , '$email', '$password' , '$role', '$course', '$gender' , '$joindate' , '' )";
$result = mysqli_query($conn , $query) or die(mysqli_error($conn));
if (mysqli_affected_rows($conn) > 0) {
echo "<script>alert('SUCCESSFULLY REGISTERED');
window.location.href='login.php';</script>";
}
else {
echo "<script>alert('Error Occured');</script>";
}
?>
<br>
<div class="container">
<div class="form">
<form id="contactform" method="POST">
<p class="contact"><label for="name">Name</label></p>
<p class="contact"><label for="email">Email</label></p>
<input id="email" name="email" placeholder="example@domain.com" required=""
type="email" value="<?php if(isset($_POST['signup'])) { echo $_POST['email']; } ?>">
<p class="contact"><label for="username">Create a username</label></p>
<input id="username" name="username" placeholder="username" required="" tabindex="2"
type="text" value="<?php if(isset($_POST['signup'])) { echo $_POST['username']; } ?>">
<p class="contact"><label for="password">Create a password</label></p>
<input type="password" id="password" name="password" required="">
<p class="contact"><label for="repassword">Confirm your password</label></p>
<input type="password" id="repassword" name="repassword" required="">
<p class="contact"><label for="gender">Gender </label></p>
<select class="select-style gender" name="gender">
<option value="Male">Male</option>
<option value="Female">Female</option>
</select><br><br>
<p class="contact"><label for="role">I am a..</label></p>
<select class="select-style gender" name="role">
<option value="teacher">Teacher</option>
<option value="student">Student</option>
</select><br><br>
<p class="contact"><label for="course">I teach/study..</label></p>
<select class="select-style gender" name="course">
<option value="Computer Science">Computer Sc Engineering</option>
<option value="Electrical">Electrical Engineering</option>
<option value="Mechanical">Mechanical Engineering</option>
</select><br><br>
<input class="buttom" name="signup" id="submit" tabindex="5" value="Sign me up!"
type="submit">
</div>
</div>
</body>
</html>
19
CHAPTER 8
SCREENSHOTS
Homepage:
20
User Signup Page
21
Upload Note Page
22
View Profile Page
23
Admin Dashboard Page
24
CHAPTER 7
7.1 CONCLUSION
It has been a matter of immense pleasure, honour and challenge to have this opportunity to
take up this project and complete it successfully. It was a nice experience working with the
professors. This will be helpful when we will work in industry & educational field where we
can put all these it in our practice. While developing this system ONLINE NOTES
SHARING USING PHP, I have learnt a lot about the working of system. During the
development process, I have understood the concept of designing and building a system.
While working on my system I have used all the knowledge which was taught us and all that
makes this project complete.
The project has a very vast scope in future. The project can be implemented on
intranet in future. Project can be updated in near future as and when requirement
for the same arises, as it is very flexible in terms of expansion. With the
proposed software of Class Notes Gallery will be ready to use by any
organisation hence run the entire work in a much better, accurate and error free
manner. The following are the future scope for the project.
25