You are on page 1of 168

CHAPTER I

INTRODUCTION

1.0 Background of the Study


The impact of computer technology on the society is growing at a high speed in
recent time. Digital communications networks now cover the globe and even reach out
into the space. With rise of the computer connectivity the physical system of
organizations across the world is becoming increasingly, integrated and interdependent.
As the world is being developed with the new technologies, discovering and
manipulating new idea and concepts of taking everything online are rapidly changing. It
is difficult for teachers to circulate their notes to every student whom he/she teaching.
Student Notes System provide an easy approach for both students and teacher to circulate
the notes whether of any kind like lecture notes, assignment questions, questions paper
and all important documents.

Most of the Students having trouble looking for lecture to review, when the
Students asking for the lecture the teacher is having a difficult time to reply immediately.
The Students Note System is capable of uploading and downloading lecture and also can
view the Student’s information.

The Researchers aim to develop Students Notes System to eliminate the problem
of the students and teachers with this system the students can easily manage the lecture
and also to Minimize the workload of the teachers, after the discussion the teacher will
upload the lecture and the teacher will ask a favor to admin to approve the lectures that
the teachers uploaded so that the students can see the uploaded lectures and download it.
In this system the Researchers aim to provide accurate system for uploading and
downloading the lectures or Reviewer.

The Students Notes System will focus on uploading and downloading the
Lectures or Reviewer and also will focus only in one department.

STUDENT NOTE SYSTEM


1
2.0 Objectives

The objectives of the system to provide a better facility to the students and teachers to bring
out the easy circulation of the lectures within healthy environment. It will reduce the manual
paperwork, reduced the sharing and distribution time.

 To provider easy task for teachers and students

 To create a module that can manage the students and teachers.

 To minimize the workload of the teachers.

 To monitor the upload lectures of the students and teachers.

 To provide a reviewer for the upcoming exam of the students.

3.0 Scope and Limitation

3.1 Scope

 The admin can add the students account.

 The system is capable of uploading documents.

 The system is capable of downloading documents.

 The system is capable of viewing student and teacher information

 The system is can update students and teacher information

3.2 Limitation

 The system is intended only for the department of CICS.

 The system is not capable of accepting payment transaction.

 The system required internet connection.

 The system is not capable of monitoring the student’s attendance.

4.0 Significance of the Study


STUDENT NOTE SYSTEM
2
 Student notes system 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 managed online system. Student notes system
allows its users to securely register and log in to their individual accounts and create,
read, update, delete notes according to their needs. It provides notes to everyone in a
very secure manner. Multiple users can work in this system at the same time under
centralized supervision by administrator. It is a very useful notes management
system for colleges, Schools and other Institutes to manage and share their notes.

5.0 Definition of terms

Student Notes

A brief record of something written down to assist the memory or for future
referenceSSs. Notes, a record or outline of speech, statement, testimony, etc…, or of one’s
impressions of something. A brief written or printed statement giving particulars or
information.

6.0 Software

XAMPP x`

STUDENT NOTE SYSTEM


3
 Is a software distribution which provides the Apache web server, MySQL database (actually
Maria DB), PHP and Perl (as command-line executable and Apache modules) all in one package.
It is available for Windows, MAC and Linux systems. No configuration is necessary to integrate
PHP with MySQL. It is a great fit for this course and provides a relatively painless installation
and way to manage the configuration changes. Also provided is PhpMyadmin which gives a GUI
tool for managing your MySQL databases. I would highly recommend installing this for
Windows or MAC. It doesn't exclude you from other competing software installations, it just
gives an easy way to get going. For Ubuntu Linux systems, I still would recommend installing
Apache/MySQL/PHP/PhpMyadmin through Ubuntu packages.

Sublime Text is available for Mac, Windows and Linux. One license is all you need to use
Sublime Text on every computer you own, no matter what operating system it uses. Sublime
Text uses a custom UI toolkit, optimized for speed and beauty, while taking advantage of native
functionality on each platform.

BROWSER

to view data. Many database systems support a special browse mode in which you can flip


through fields and records quickly. For example, you look at Web pages with a
Web browser. Browse is often used to mean the same as surf.

OPERATING SYSTEM

An operating system (OS) is system software that manages computer


hardware, software resources, and provides common services for computer programs. Time-
sharing operating systems schedule tasks for efficient use of the system and may also include
accounting software for cost allocation of processor time, mass storage, printing, and other
resources.

CHAPTER II
REVIEW OF RELATED LITERATURES

STUDENT NOTE SYSTEM


4
Students’ acceptance and readiness for E-learning in Northeastern Thailand
Ngampornchai, A. (2016, October 10) Stated that the Students’ acceptance and readiness
for E-learning in Northeastern Thailand The study explored student readiness for online learning
in the Northeast of Thailand, using the Unified Theory of Acceptance and Use of Technology
(UTAUT). The survey also explored students’ self-regulation, computing devices ownership, and
level of familiarity with education-related technologies. The responses imply that students have a
slightly positive perception toward e-learning. They use mobile technologies extensively, and
have experience using social media; but are unfamiliar with other collaborative e-learning tools.
A discussion includes recommendations for cultural context and the design of e-learning in
Thailand.

E-Learning Systems in Higher Education


According to Katoua, Taghreed & AL-Lozi, Musa & Alrowwad, Alaaldin. (2016) Due to
the rapid growth of internet technology, universities around the world are investing heavily in e-
learning systems to support their traditional teaching and to improve their students’ learning
experience and performance. However, the success of an e-learning system depends on the
understanding of certain antecedent factors that influence the students’ acceptance and usage of
such e-learning systems. This study aims to provide a discussion of the current e-learning
environments including their characteristics, limitations, advantages and the major factors that
affect the acceptance of such technologies. It is concluded that a successful e-learning system
should consider the personal, social, cultural, technological, organizational and environmental
factors.

A MOBILE-BASED E-LEARNING SYSTEM


According to Ojokoh bolanle and doyeni, olubimtan and adewale olumide, isnkiye
folasade (2015) E-learning is a innovate approach for delivering electronically mediated, well-
designed, leader-centered interactive learning environments by utilizing internet and digital
technologies with respect to instructional design principles. This paper presents the application
of software development techniques in the development of a mobile based E-learning system that
facilitates learning in a university environment. The develop application presents a system where
a student after registration, has access to various function that can improve the process of
learning. Web pages were develop to serve as the user interface of the MLS abd provide all the
services needed for an E-learning portal including assessment and provision of feedback to

STUDENT NOTE SYSTEM


5
learners. A portal exists for lectures to upload learning contents and students examination results.
The online portal uses apache HTTP server as its web server, My SQL for relational database
management and PHP as the scripting languang

e to serve as a communication gateway between the back end the users. The system was
tested and evaluated with satisfactory results. This work, if adopted in schools and aid
convetional learning, is expected to immensely improve the learning process and performance of
students.

4.2 Synthesis
The review of related literature and study has been a matter of immense pleasure honor
and challenge to have this opportunity to take up this project and complete it successfully. This
will be helpful educational field where we can put all these it in our practice, According to
Ngampornchai The survey also explored students’ self-regulation, computing devices ownership,
and level of familiarity with education-related technologies, Katoua, Taghreed & AL-Lozi, Musa
& Alrowwad, Alaaldin This study aims to provide a discussion of the current e-learning
environments including their characteristics, limitations, advantages and the major factors that

STUDENT NOTE SYSTEM


6
affect the acceptance of such technologies, Ojokoh bolanle and doyeni ) E-learning is a innovate
approach for delivering electronically mediated, well-designed, leader-centered interactive
learning environments by utilizing internet and digital technologies with respect to instructional
design principles. This system proves that It is concluded that a successful e-learning system
should consider the personal, social, cultural, technological, organizational and environmental
factors.

4.2.1 Synthesis Table


Module Ngampornchai, Katoua, Ojokoh Current System
A. (2016, Taghreed bolanle(2005)
October 10) (2016)
Student Notes ✔ ✔ ✔ ✔
System

Student ✔
Registration

Upload Lesson ✔

Download Lesson ✔

CHAPTER III

METHODOLOGY

Planning

Design
STUDENT NOTE SYSTEM
7
Development

Testing

FIGURE 3.1
MODIFIED WATERFALL MODEL
The Researchers used this kind of methodology which is waterfall model because it is
more convenient or accessible and much faster to used when each phase is completed
successfully, it is reviewed to see it the project is on the track and whether it is feasible to
continue.

3.1 PLANNING

It is proceeding of conceiving and classifying the activities that we acquired to hit


the desired goals. It involves the creation and maintenance of a plan, such a psychological
aspect that required conceptual skills. Planning is a fundamentals property of intelligent
behaviour. The researchers see Student Notes System as a perfect to make this proposed
system. With the help of Student Notes System student and teacher can easily download
and upload the notes

3.2 DESIGN

This Student Notes System recommendation is for College Information of


Computer Science (CICS) school of Zamboanga Peninsula Polytechnic State University
(ZPPSU), we used the logo of the school and the logo of our department. The user
interface design needs to be simplistic, presentable and easily to understand by its user

3.3 DEVELOPMENT

STUDENT NOTE SYSTEM


8
In development the student notes system, the most important is to ensure that the
function of this system is hundred percent functioning and can easily track where the
error is or what is the error. To ensure that the admin can create an account for the user
and the user can log in and upload/download the lecture without any circumstances.

3.4 TESTING

The purpose of the testing is to determine the capabilities of each module. It is


implemented to meet its objective which is to the teacher can upload the documents and
students can download it.

CHAPER IV

DIAGRAMS OF THE SYSTEM

4.1 GANTT CHART

STUDENT NOTE SYSTEM


9
Figure 4.1.1
In this Figure 4.1.1 module shows that the chapter I we finish it on our estimated time
and also the chapter II but as you can see we finished the chapter III too early of our
estimated time because each one of us is assigned of each phases.

Table 4.1.1 Gantt Chart

STUDENT NOTE SYSTEM


10
4.1.2 TEAM PLAYER
depends on what methodology you will use in the system development; each group must
assign certain people in each phase and must work together to achieve the desired objectives.

Phase Team Task

1 - Planning Team Leader: Jacob G. Candido Gather information


Team Member:
Christian C. Sanoh Shared Idea
Karl E. Marcos Shared Possible Design to the
system
Romie Lusay

STUDENT NOTE SYSTEM


11
Looking for information to
develope the system
2 - Design Team Leader: Karl E. Marcos In Charge in Design
Team Member:
Christian C. Sanoh Shared Idea
Jacob G. Candido Suggesting the color in design
Romie Lusay Suggesting look for the school
color to design it to the system

3 - Development Team Leader: Christian C. Sanoh In charge in developing

Team Member:
Jacob G. Candido Gave idea to add some features
to the system
Romie Lusay
Looking for possible errors in
the system
Karl E. Marcos
Helping in codings

4 - Testing Team Leader: Jacob G.Candido In charge in testing


Team Member:
Romie Lusay
GROUP SUPPORT
Karl E. Marcos
Christian C. Sanoh

Table 4.1.2 Team Player Chart

STUDENT NOTE SYSTEM


12
4.2 FLOWCHART

STUDENT NOTE SYSTEM


13
4.3 HIPO

Figure 4.3 HIPO Diagram

STUDENT NOTE SYSTEM


14
4.4 UNIFIED MODELING LANGUAGE

FIGURE 4.4 UNIFIED MODELING LANGUAGE


STUDENT NOTE SYSTEM
15
4.5 ENTITY RELATIONSHIP DIAGRAM

FIGURE 4.5 ENTITY RELATIONSHIP DIAGRAM

STUDENT NOTE SYSTEM


16
4.6 Data Flow Diagram
Admin Manage Students

Figure 4.6 Data flow Diagram


In this Figure Show us on how the admin manage the student registration

STUDENT NOTE SYSTEM


17
Admin Manage users

4.6.1 Data Flow Diagram


In this Figure Show us on how the process of admin manage the users registration

STUDENT NOTE SYSTEM


18
Admin Manage Lessons

Figure 4.6.2 Data Flow Diagram


In this Figure show us on how the process of admin manage the student lessons

STUDENT NOTE SYSTEM


19
Student Manage Lessons

Figure 4.6.3 Data Flow Diagram


In this Figure show us on how the student download the lessons

STUDENT NOTE SYSTEM


20
BIBLIOGRAPHY

[1] Ngampornchai, A. (2016, October 10). Students’ acceptance and readiness for E-learning in

Northeastern Thailand. International Journal of Educational Technology in Higher

Education. https://educationaltechnologyjournal.springeropen.com/articles/10.1186/

s41239-016-0034-x

[2] Katoua, Taghreed & AL-Lozi, Musa & Alrowwad, Alaaldin. (2016). A Review of Literature

on E-Learning Systems in Higher Education. International Journal of Business

Management and Economic Research. 7. 754-762.

[3] Ojokoh, Bolanle & Doyeni, Olubimtan & Adewale, Olumide & Isinkaye, Folasade. (2015). A

Mobile-Based E-Learning System. International Journal of Web-Based Learning and

Teaching Technologies. 8. 1-17. 10.4018/ijwltt.2013070101.

STUDENT NOTE SYSTEM


21
APPENDIX (A)
HOW TO USE THE
SYSTEM

STUDENT NOTE SYSTEM


22
Admin

Figure: 1.0 In this interface are the Admin Login

STUDENT NOTE SYSTEM


23
Figure: 1.1 after you log in as a admin click the Student registration

STUDENT NOTE SYSTEM


24
Figure: 1.1.2 after you clicked the Student Registration bar this is the interface
will pop – up Registration Account of Student is where you create an account for
student.

STUDENT NOTE SYSTEM


25
Figure 1.1.3 In the lesson tab is will you can upload the video, edit, delete and change the
upload file if in case you mistaken the file that you have upload.

Figure: 1.1.4 click the new tab to enter the interface where you will upload the lesson.

STUDENT NOTE SYSTEM


26
Figure: 1.1.5 this will be the interface where you will input the description and the title.
In select File Type bar where you will choose what type of file that you will upload it can
be docs or video.

STUDENT NOTE SYSTEM


27
Figure: 1.1.6 Click the edit tab to enter the interface.

Figure: 1.1.7 the interface where you will update the lesson.

STUDENT NOTE SYSTEM


28
Figure: 1.1.8 click the change file bar to enter the interface where you will change
the file that you have uploaded if in case you have mistaken the file that you have
uploaded

STUDENT NOTE SYSTEM


29
Figure: 1.1.9 this the interface where you will change the file that you have mistaken
upload.

STUDENT NOTE SYSTEM


30
Figure 1.2 click the manage student to view the list of info of the student

Figure: 1.2.1 This the interface of the list of student info.

STUDENT NOTE SYSTEM


31
Figure: 1.2.2 Manage user where you will edit your account as a admin.

Student Module

STUDENT NOTE SYSTEM


32
Figure: 1.2.3 this the interface when you were log in your student account

STUDENT NOTE SYSTEM


33
Figure: 1.2.4 this interface allows you to download your lessons in any subjects.

STUDENT NOTE SYSTEM


34
APPENDIX (B)
CODES

STUDENT NOTE SYSTEM


35
Home.php

<style type="text/css">

.secondrow > .row {


border: 1px solid #ddd;
/*padding: 5px 30px;*/
text-align: center;
margin: 20px;
min-height: 50px;
border-radius: 50%;
}
.imgstretch{
padding: 10px 30px;
}
.imgstretch img {
width: 100%;
height: 100px;
}

</style>

<div class="btn-controls">
<div class="btn-box-row row-fluid">
<a href="#" class="btn-box big span4"><i class=" icon-random"></i><b>65%</b>

STUDENT NOTE SYSTEM


36
<p class="text-muted">
Lesson</p>
</a><a href="#" class="btn-box big span4"><i class="icon-user"></i><b>15</b>
<p class="text-muted">
New Users</p>
</a><a href="#" class="btn-box big span4"><i class="icon-money"></i><b>15,152</b>
<p class="text-muted">
Exercises</p>
</a>
</div>
</div>
Index. Php

<?php
require_once("../include/initialize.php");
if (!isset($_SESSION['USERID'])){
redirect(web_root."admin/login.php");
}

$content='home.php';
$view = (isset($_GET['page']) && $_GET['page'] != '') ? $_GET['page'] : '';
switch ($view) {
default :
$content = 'home.php';
}
require_once("themes/templates.php");
?>
Login.php

STUDENT NOTE SYSTEM


37
<?php
require_once("../include/initialize.php");

?>
<?php
// login confirmation
if(isset($_SESSION['USERID'])){
redirect(web_root."admin/index.php");
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Student Notes</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!--
=====================================================================
==========================-->
<link rel="icon" type="image/png" href="<?php echo
web_root;?>plugins/adminlogin/images/icons/favicon.ico"/>
<!--
=====================================================================
==========================-->
<link rel="stylesheet" type="text/css" href="<?php echo
web_root;?>plugins/adminlogin/vendor/bootstrap/css/bootstrap.min.css">
<!--
=====================================================================
==========================-->
<link rel="stylesheet" type="text/css" href="<?php echo
web_root;?>plugins/adminlogin/fonts/font-awesome-4.7.0/css/font-awesome.min.css">
<!--
=====================================================================
==========================-->

STUDENT NOTE SYSTEM


38
<link rel="stylesheet" type="text/css" href="<?php echo
web_root;?>plugins/adminlogin/fonts/Linearicons-Free-v1.0.0/icon-font.min.css">
<!--
=====================================================================
==========================-->
<link rel="stylesheet" type="text/css" href="<?php echo
web_root;?>plugins/adminlogin/vendor/animate/animate.css">
<!--
=====================================================================
==========================-->
<link rel="stylesheet" type="text/css" href="<?php echo
web_root;?>plugins/adminlogin/vendor/css-hamburgers/hamburgers.min.css">
<!--
=====================================================================
==========================-->
<link rel="stylesheet" type="text/css" href="<?php echo
web_root;?>plugins/adminlogin/vendor/animsition/css/animsition.min.css">
<!--
=====================================================================
==========================-->
<link rel="stylesheet" type="text/css" href="<?php echo
web_root;?>plugins/adminlogin/vendor/select2/select2.min.css">
<!--
=====================================================================
==========================-->
<link rel="stylesheet" type="text/css" href="<?php echo
web_root;?>plugins/adminlogin/vendor/daterangepicker/daterangepicker.css">
<!--
=====================================================================
==========================-->
<link rel="stylesheet" type="text/css" href="<?php echo
web_root;?>plugins/adminlogin/css/util.css">
<link rel="stylesheet" type="text/css" href="<?php echo
web_root;?>plugins/adminlogin/css/main.css">
<!--
=====================================================================
==========================-->
</head>
<body>
STUDENT NOTE SYSTEM
39
<div class="limiter">
<div class="container-login100">
<div class="wrap-login100 p-l-85 p-r-85 p-t-55 p-b-55">
<form class="login100-form validate-form flex-sb flex-w" method="POST"
action="login.php">
<span class="login100-form-title p-b-32">
Account Login
</span>

<span class="txt1 p-b-11">


Username
</span>
<div class="wrap-input100 validate-input m-b-36" data-validate = "Username is
required">
<input class="input100" type="text" name="user_email" >
<span class="focus-input100"></span>
</div>

<span class="txt1 p-b-11">


Password
</span>
<div class="wrap-input100 validate-input m-b-12" data-validate = "Password is required">
<span class="btn-show-pass">
<i class="fa fa-eye"></i>
</span>
<input class="input100" type="password" name="user_pass" >
<span class="focus-input100"></span>
</div>

<div class="flex-sb-m w-full p-b-48">

STUDENT NOTE SYSTEM


40
<div class="contact100-form-checkbox">
<input class="input-checkbox100" id="ckb1" type="checkbox" name="remember-me">
<label class="label-checkbox100" for="ckb1">
Remember me
</label>
</div>

<div>
<a href="#" class="txt3">
Forgot Password?
</a>
</div>
</div>

<div class="container-login100-form-btn">
<button type="submit" class="login100-form-btn" name="btnLogin">
Login
</button>
</div>

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

<div id="dropDownSelect1"></div>

<!--
=====================================================================
==========================-->

STUDENT NOTE SYSTEM


41
<script src="<?php echo web_root;?>plugins/adminlogin/vendor/jquery/jquery-
3.2.1.min.js"></script>
<!--
=====================================================================
==========================-->
<script src="<?php echo
web_root;?>plugins/adminlogin/vendor/animsition/js/animsition.min.js"></script>
<!--
=====================================================================
==========================-->
<script src="<?php echo
web_root;?>plugins/adminlogin/vendor/bootstrap/js/popper.js"></script>
<script src="<?php echo
web_root;?>plugins/adminlogin/vendor/bootstrap/js/bootstrap.min.js"></script>
<!--
=====================================================================
==========================-->
<script src="<?php echo
web_root;?>plugins/adminlogin/vendor/select2/select2.min.js"></script>
<!--
=====================================================================
==========================-->
<script src="<?php echo
web_root;?>plugins/adminlogin/vendor/daterangepicker/moment.min.js"></script>
<script src="<?php echo
web_root;?>plugins/adminlogin/vendor/daterangepicker/daterangepicker.js"></script>
<!--
=====================================================================
==========================-->
<script src="<?php echo
web_root;?>plugins/adminlogin/vendor/countdowntime/countdowntime.js"></script>
<!--
=====================================================================
==========================-->
<script src="<?php echo web_root;?>plugins/adminlogin/js/main.js"></script>

</body>
</html>

STUDENT NOTE SYSTEM


42
<?php

if(isset($_POST['btnLogin'])){
$email = trim($_POST['user_email']);
$upass = trim($_POST['user_pass']);
$h_upass = sha1($upass);

if ($email == '' OR $upass == '') {

message("Invalid Username and Password!", "error");


redirect("login.php");

} else {
//it creates a new objects of member
$user = new User();
//make use of the static function, and we passed to parameters
$res = $user::userAuthentication($email, $h_upass);
if ($res==true) {
message("You login as ".$_SESSION['TYPE'].".","success");
if ($_SESSION['TYPE']=='Administrator'){
redirect(web_root."admin/index.php");
}else{
redirect(web_root."admin/login.php");
}
}else{
message("Account does not exist! Please contact Administrator.", "error");
redirect(web_root."admin/login.php");
}
}
}
STUDENT NOTE SYSTEM
43
?>
Login.php

<?php
require_once '../include/initialize.php';
// Four steps to closing a session
// (i.e. logging out)

// 1. Find the session


@session_start();

// 2. Unset all the session variables


unset( $_SESSION['USERID'] );
unset( $_SESSION['NAME'] );
unset( $_SESSION['UEMAIL'] );
unset( $_SESSION['PASS'] );
unset( $_SESSION['TYPE'] );
// unset($_SESSION['fixnmix_cart']);
// unset($_SESSION['fixnmix_carttwo']);
// unset($_SESSION['FIRSTNAME']);
// unset($_SESSION['LASTNAME']);
// unset($_SESSION['ADDRESS']);
// unset($_SESSION['CONTACTNUMBER']);

// 4. Destroy the session


// session_destroy();
redirect(web_root."admin/login.php?logout=1");
?>
Sidebar.php

STUDENT NOTE SYSTEM


44
<div class="col-md-3">
<div class="sidebar-nav-fixed affix">
<div class="well">
<ul class="nav ">
<li class="nav-header"></li>
<!-- <li class="active"><a href="#">Link</a> -->
<li class="dropdown-toggle">
<?php if($_SESSION['TYPE']=='Administrator'){
?>
<a href="<?php echo web_root; ?>admin/modules/setting/index.php"><span
class="glyphicon glyphicon-cog"></span>Settings</a>
<?php
}?>
</li>
<li><a href="#">Link</a>
</li>
<li><a href="#">Link</a>
</li>
<li class="nav-header">Sidebar</li>
<li><a href="#">Link</a>
</li>
<li><a href="#">Link</a>
</li>
<li><a href="#">Link</a>
</li>

</ul>
</div>
<!--/.well -->

STUDENT NOTE SYSTEM


45
</div>
<!--/sidebar-nav-fixed -->
</div>
Lesson add.php

<?php
if(!isset($_SESSION['USERID'])){
redirect(web_root."admin/index.php");
}

// $autonum = New Autonumber();


// $res = $autonum->single_autonumber(2);

?>
<form class="form-horizontal span6" action="controller.php?action=add" method="POST"
enctype="multipart/form-data">

<div class="row">
<div class="col-lg-12">
<h1 class="page-header">Upload New Lesson</h1>
</div>
<!-- /.col-lg-12 -->
</div>
<style>

.form-group{border:1px solid transparent; margin:10px;}


}
.upload-container{
display:flex;
}
.upload-container div{

STUDENT NOTE SYSTEM


46
display:flex;
text-indent: 90px;
}
</style>
<!--
<div class="form-group">
<div class="col-md-11">
<label class="col-md-2 control-label" for=
"LessonChapter">Teacher Name:</label>

<div class="col-md-11">
<input name="deptid" type="hidden" value="">
<input class="form-control input-sm" id="LessonChapter"
name="LessonChapter" placeholder=
"Teacher Name" type="text" value="">
</div>
</div>
</div>
-->
<div class="form-group">
<div class="col-md-11">
<label class="col-md-2 control-label" for=
"LessonChapter">Description:</label>

<div class="col-md-10">
<input name="deptid" type="hidden" value="">
<input class="form-control input-sm" id="LessonChapter"
name="LessonChapter" placeholder=
"Chapter" type="text" value="">
</div>
</div>

STUDENT NOTE SYSTEM


47
</div>

<div class="form-group">
<div class="col-md-11">
<label class="col-md-2 control-label" for=
"LessonTitle">Title:</label>

<div class="col-md-10">
<input name="deptid" type="hidden" value="">
<input class="form-control input-sm" id="LessonTitle" name="LessonTitle"
placeholder=
"Title" type="text" value="">
</div>
</div>
</div>

<div class="form-group">
<div class="col-md-11">
<label class="col-md-2 control-label" for=
"Category">Select File Type:</label>

<div class="col-md-10">
<input name="deptid" type="hidden" value="">
<select class="form-control input-sm" id="Category" name="Category" >
<option>Docs</option>
<option>Video</option>
</select>
</div>
</div>
</div>

STUDENT NOTE SYSTEM


48
<div class="form-group upload-container">
<div class="col-md-11">
<label class="col-md-2" align = "right"for=
"file">Upload File:</label>

<div class="col-md-10">
<input type="file" name="file"/>
</div>
</div>
</div>

<div class="form-group">
<div class="col-md-11">
<label class="col-md-2 control-label" for=
"idno"></label>

<div class="col-md-10">
<button class="btn btn-primary btn-sm" name="save" type="submit" ><span
class="fa fa-save fw-fa"></span> Save</button>
</div>
</div>
</div>
</form>
Controller.php

<?php
require_once ("../../../include/initialize.php");
if(!isset($_SESSION['USERID'])){
redirect(web_root."admin/index.php");
}

STUDENT NOTE SYSTEM


49
$action = (isset($_GET['action']) && $_GET['action'] != '') ? $_GET['action'] : '';

switch ($action) {
case 'add' :
doInsert();
break;

case 'edit' :
doEdit();
break;

case 'delete' :
doDelete();
break;

case 'updatefiles' :
dochangefile();
break;

function doInsert(){
if(isset($_POST['save'])){
$userid = $_SESSION['USERID'];
$chapter = $_POST['LessonChapter'];
$title = $_POST['LessonTitle'];
$category = $_POST['Category'];

$filename = UploadImage();
STUDENT NOTE SYSTEM
50
$location = "files/". $filename ;

$lesson = new Lesson();


$lesson->USERID = $userid;
$lesson->LessonChapter = $chapter;
$lesson->LessonTitle = $title;
$lesson->FileLocation = $location;
$lesson->Category = $category;
$lesson->create();

message("Lesson has been saved in the database.", "success");


redirect("index.php");

}
}

function doEdit(){
if(isset($_POST['save'])){
$chapter = $_POST['LessonChapter'];
$title = $_POST['LessonTitle'];
$id = $_POST['LessonID'];
$category = $_POST['Category'];

// $filename = UploadImage();
// $location = "files/". $filename ;

$lesson = new Lesson();


$lesson->LessonChapter = $chapter;
$lesson->LessonTitle = $title;
$lesson->Category = $category;
STUDENT NOTE SYSTEM
51
// $lesson->FileLocation = $location;
$lesson->update($id);

message("Lesson has been saved in the database.", "success");


redirect("index.php");

}
}

function doDelete(){

$id = $_GET['id'];

$lesson = New Lesson();


$lesson->delete($id);

message("Lesson has been removed!","info");


redirect('index.php');

function dochangefile(){
if(isset($_POST['save'])){
$id = $_POST['LessonID'];

STUDENT NOTE SYSTEM


52
$filename = UploadImage();
$location = "files/". $filename ;

$lesson = new Lesson();


$lesson->FileLocation = $location;
$lesson->update($id);

message("File has been updated in the database.", "success");


redirect("index.php");

}
}

function UploadImage(){
$target_dir = "files/";
$target_file = $target_dir . basename($_FILES["file"]["name"]);
$uploadOk = 1;
$imageFileType = pathinfo($target_file,PATHINFO_EXTENSION);

if($imageFileType != "jpg" || $imageFileType != "png" ||


$imageFileType != "jpeg"
|| $imageFileType != "gif" || $imageFileType != "docs" ||
$imageFileType != "mp4") {
if (move_uploaded_file($_FILES["file"]["tmp_name"],
$target_file)) {
STUDENT NOTE SYSTEM
53
return basename($_FILES["file"]["name"]);
}else{
echo "Error Uploading File";
exit;
}
}else{
echo "File Not Supported";
exit;
}
}

?>

Edit.php

<?php
if(!isset($_SESSION['USERID'])){
redirect(web_root."admin/index.php");
}

@$id = $_GET['id'];
if($id==''){
redirect("index.php");
}
$lesson = New Lesson();
$res = $lesson->single_lesson($id);

STUDENT NOTE SYSTEM


54
?>

<form class="form-horizontal span6" action="controller.php?action=edit" method="POST"


enctype="multipart/form-data">

<div class="row">
<div class="col-lg-12">
<h1 class="page-header">Update Lesson</h1>
</div>
<!-- /.col-lg-12 -->
</div>
<!--
<style>
.form-group{border: 1px solid transparent;margin:10px;
}
.upload-container{
display:flex;
}
.upload-container div{
display:flex;
text-indent: 90px;
}
</style>
-->

<div class="form-group">
<div class="col-md-11">
<label class="col-md-2 control-label" for=
"LessonChapter">Chapter:</label>

<div class="col-md-10">

STUDENT NOTE SYSTEM


55
<input name="LessonID" type="hidden" value="<?php echo $res->LessonID; ?
>">
<input class="form-control input-sm" id="LessonChapter"
name="LessonChapter" placeholder=
"Chapter" type="text" value="<?php echo $res->LessonChapter; ?>">
</div>
</div>
</div>

<div class="form-group">
<div class="col-md-11">
<label class="col-md-2 control-label" for=
"LessonTitle">Title:</label>

<div class="col-md-10">
<input name="deptid" type="hidden" value="">
<input class="form-control input-sm" id="LessonTitle" name="LessonTitle"
placeholder=
"Title" type="text" value="<?php echo $res->LessonTitle; ?>">
</div>
</div>
</div>

<div class="form-group">
<div class="col-md-11">
<label class="col-md-2 control-label" for=
"Category">Select File Type:</label>

<div class="col-md-10">
<input name="deptid" type="hidden" value="">
<select class="form-control input-sm" id="Category" name="Category" >

STUDENT NOTE SYSTEM


56
<option <?php echo ($res->Category == "Docs") ? "Selected" :
""?>>Docs</option>
<option <?php echo ($res->Category == "Video") ? "Selected" : ""?
>>Video</option>
</select>
</div>
</div>
</div>

<!-- <div class="form-group">


<div class="col-md-11">
<label class="col-md-2" align = "right"for=
"file">Upload File:</label>

<div class="col-md-10">
<input type="file" name="file" value="<?php echo $res->FileLocation; ?>" />
</div>
</div>
</div> -->

<div class="form-group">
<div class="col-md-11">
<label class="col-md-2 control-label" for=
"idno"></label>

<div class="col-md-10">
<button class="btn btn-primary btn-sm" name="save" type="submit" ><span
class="fa fa-save fw-fa"></span> Save</button>
</div>
</div>
</div>
</form>
STUDENT NOTE SYSTEM
57
Lesson folder index.php

<?php
require_once("../../../include/initialize.php");
if(!isset($_SESSION['USERID'])){
redirect(web_root."admin/index.php");
}

$view = (isset($_GET['view']) && $_GET['view'] != '') ? $_GET['view'] : '';


$header=$view;
switch ($view) {
case 'list' :
$content = 'list.php';
break;

case 'add' :
$content = 'add.php';
break;

case 'edit' :
$content = 'edit.php';
break;
case 'playvideo' :
$title="Play Video";
$content = 'playvideo.php';
break;
case 'viewpdf' :
$title="View File";
$content = 'viewpdf.php';
break;
STUDENT NOTE SYSTEM
58
case 'uploadfile' :
$content = 'uploadfiles.php';
break;

default :
$content = 'list.php';
}
require_once("../../themes/templates.php");
?>
List.php

<?php
if(!isset($_SESSION['USERID'])){
redirect(web_root."admin/index.php");
}

?>

<div class="module-head">
<h1 class="page-header">List of Lessons <a href="index.php?view=add" class="btn btn-
primary"> <i class="fa fa-plus-circle fw-fa"></i> New</a></h1>

</div>
<form action="controller.php?action=delete" Method="POST">
<div class="table-responsive">
<table id="example" class="datatable-1 table table-striped table-
bordered table-hover table-responsive" style="font-size:12px" cellspacing="0">

<thead>
<tr>
<th>Chapter</th>

STUDENT NOTE SYSTEM


59
<th>Title</th>
<th>File Type</th>
<th width="30%" >Action</th>

</tr>
</thead>
<tbody>
<?php
$mydb->setQuery("SELECT *
FROM
`tbllesson` where USERID='".$_SESSION['USERID']."'");
$cur = $mydb->loadResultList();

foreach ($cur as $result) {


echo '<tr>';
echo '<td>'. $result->LessonChapter.'</td>';
echo '<td>'. $result->LessonTitle.'</td>';
echo '<td>'. $result->Category.'</td>';

if ($result->Category=="Video") {
# code...
$view = "index.php?view=playvideo&id=".
$result->LessonID;
}else{
$view = "index.php?view=viewpdf&id=".
$result->LessonID;

echo '<td align="center" > <a title="Edit Details"


href="index.php?view=edit&id='.$result->LessonID.'" class="btn btn-primary btn-xs "> <span
class="fa fa-edit fw-fa"></span> Edit</a>

STUDENT NOTE SYSTEM


60
<a title="Change File"
href="index.php?view=uploadfile&id='.$result->LessonID.'" class="btn btn-primary btn-xs ">
<span class="fa fa-upload fw-fa"></span> Change File</a>
<a title="View Files"
href="'.$view.'" class="btn btn-info btn-xs" ><span class="fa fa-info fw-fa"></span> View</a>
<a title="Delete"
href="controller.php?action=delete&id='.$result->LessonID.'" class="btn btn-danger btn-xs"
><span class="fa fa-trash-o fw-fa"></span> Delete</a>
</td>';
echo '</tr>';
}
?>
</tbody>

</table>
</div>
</form>
Uploadfiles.php

<?php
if(!isset($_SESSION['USERID'])){
redirect(web_root."admin/index.php");
}

@$id = $_GET['id'];
if($id==''){
redirect("index.php");
}
$lesson = New Lesson();
$res = $lesson->single_lesson($id);

STUDENT NOTE SYSTEM


61
?>

<form class="form-horizontal span6" action="controller.php?action=updatefiles"


method="POST" enctype="multipart/form-data">

<div class="row">
<div class="col-lg-12">
<h1 class="page-header">Update Files</h1>
</div>
<!-- /.col-lg-12 -->
</div>

<div class="form-group">
<div class="col-md-11">
<label class="col-md-2 control-label" for=
"LessonChapter">Chapter:</label>

<div class="col-md-10">
<input name="LessonID" type="hidden" value="<?php echo $res->LessonID; ?
>">
<label class="control-label"><?php echo $res->LessonChapter; ?></label>
</div>
</div>
</div>

<div class="form-group">
<div class="col-md-11">
<label class="col-md-2 control-label" for=
"LessonTitle">Title:</label>

<div class="col-md-10">

STUDENT NOTE SYSTEM


62
<input name="deptid" type="hidden" value="">
<label class="control-label"><?php echo $res->LessonTitle; ?></label>
</div>
</div>
</div>

<div class="form-group">
<div class="col-md-11">
<label class="col-md-2 control-label" for=
"Category">File Type:</label>

<div class="col-md-10">
<input name="deptid" type="hidden" value="">
<label class="control-label"><?php echo $res->Category ?></label>
</div>
</div>
</div>

<div class="form-group">
<div class="col-md-11">
<label class="col-md-2" align = "right"for=
"file"></label>

<div class="col-md-10">
<input type="file" name="file" value="<?php echo $res->FileLocation; ?>" />
</div>
</div>
</div>

<div class="form-group">
STUDENT NOTE SYSTEM
63
<div class="col-md-11">
<label class="col-md-2 control-label" for=
"idno"></label>

<div class="col-md-10">
<button class="btn btn-primary btn-sm" name="save" type="submit" ><span
class="fa fa-save fw-fa"></span> Save</button>
</div>
</div>
</div>
</form>
View.php
<?php
if(!isset($_SESSION['USERID'])){
redirect(web_root."admin/index.php");
}
@$id = $_GET['id'];
if($id==''){
redirect("index.php");
}
$lesson = New Lesson();
$res = $lesson->single_lesson($id);

?>
<h2><?php echo $title ; ?></h2>
<p style="font-size: 18px;font-weight: bold;">Chapter : <?php echo $res->LessonChapter;?> |
Title : <?php echo $res->LessonTitle;?></p>
<div class="container">
<embed src="<?php echo web_root.'admin/modules/lesson/'.$res->FileLocation; ?>"
type="application/pdf" width="100%" height="400px" />
</div>
Adduser.php
STUDENT NOTE SYSTEM
64
<?php
// if (!isset($_SESSION['TYPE'])=='Administrator'){
// redirect(web_root."index.php");
// }

// $autonum = New Autonumber();


// $res = $autonum->single_autonumber(2);

?>
<form class="form-horizontal span6" action="controller.php?action=add" method="POST"
onsubmit="return validatedpass()">
<div class="row">
<div class="col-lg-12">
<h1 class="page-header">Add New User</h1>
</div>
<!-- /.col-lg-12 -->
</div>
<!-- <div class="form-group">
<div class="col-md-8">
<label class="col-md-4 control-label" for=
"user_id">User Id:</label>

<div class="col-md-8"> -->


<!-- <input class="form-control input-sm" id="user_id" name="user_id"
placeholder=
"Account Id" type="hidden" value="<?php echo $res->AUTO; ?>"> -->
<!-- </div>
</div>
</div> -->

STUDENT NOTE SYSTEM


65
<style>
.form-group{border:1px solid transparent;margin:10px;}

</style>
<div class="form-group">
<div class="col-md-8">
<label class="col-md-4 control-label" for=
"user_name">Name:</label>

<div class="col-md-8">
<input name="deptid" type="hidden" value="">
<input class="form-control input-sm" id="user_name" name="user_name"
placeholder=
"Account Name" type="text" value="">
</div>
</div>
</div>

<div class="form-group">
<div class="col-md-8">
<label class="col-md-4 control-label" for=
"user_email">Username:</label>

<div class="col-md-8">
<input name="deptid" type="hidden" value="">
<input class="form-control input-sm" id="user_email" name="user_email"
placeholder=
"Username" type="text" value="">
</div>
</div>
</div>

STUDENT NOTE SYSTEM


66
<div class="form-group">
<div class="col-md-8">
<label class="col-md-4 control-label" for=
"user_pass">Password:</label>

<div class="col-md-8">
<input name="deptid" type="hidden" value="">
<input class="form-control input-sm" id="user_pass" name="user_pass"
placeholder=
"Account Password" type="Password" value="">
</div>
</div>
</div>

<div class="form-group">
<div class="col-md-8">
<label class="col-md-4 control-label" for=
"user_pass">Retype Password:</label>

<div class="col-md-8">
<input name="deptid" type="hidden" value="">
<input class="form-control input-sm" id="retype_user_pass"
name="retype_user_pass" placeholder=
"Retype Password" type="Password" value="">
</div>
</div>
</div>
<!-- <div class="form-group">
<div class="col-md-8">
<label class="col-md-4 control-label" for=

STUDENT NOTE SYSTEM


67
"user_type">Type:</label>

<div class="col-md-8">
<select class="form-control input-sm" name="user_type" id="user_type">
<option value="Administrator">Administrator</option>
<option value="Staff">Staff</option>
<option value="Customer">Customer</option>
<option value="Encoder">Encoder</option>
</select>
</div>
</div>
</div> -->

<div class="form-group">
<div class="col-md-8">
<label class="col-md-4 control-label" for=
"idno"></label>

<div class="col-md-8">
<button class="btn btn_kcctc" id="usersave" name="save" type="submit"
><strong>Save</strong></button>
<a href="index.php" class="btn btn_kcctc"><span class="glyphicon glyphicon-
arrow-left"></span>&nbsp;<strong>List of Users</strong></a>
</div>
</div>
</div>

</form>

STUDENT NOTE SYSTEM


68
User:Controller.php

<?php
require_once ("../../../include/initialize.php");
// if (!isset($_SESSION['TYPE'])=='Administrator'){
// redirect(web_root."index.php");
// }

$action = (isset($_GET['action']) && $_GET['action'] != '') ? $_GET['action'] : '';

switch ($action) {
case 'add' :
doInsert();
break;

case 'edit' :
doEdit();
break;

case 'delete' :
doDelete();
break;

case 'assign':
doassignsubj();
break;

case 'delsubj':
doDelsubj();
break;
STUDENT NOTE SYSTEM
69
case 'grade':
savegrade();
break;
}

function doInsert(){
global $mydb;
if(isset($_POST['save'])){

if ($_POST['user_name'] == "" OR $_POST['user_email'] == "" OR


$_POST['user_pass'] == "") {
$messageStats = false;
message("All field is required!","error");
redirect('index.php?view=add');
}else{
$user = New User();
// $user->USERID = $_POST['user_id'];
$user->NAME = $_POST['user_name'];
$user->UEMAIL = $_POST['user_email'];
$user->PASS =sha1($_POST['user_pass']);
$user->TYPE = "Administrator" ;// $_POST['user_type'];
$user->create();
$id = $mydb->insert_id();
$student = New Student();
$student->IDNO = $id;
$student->FNAME = $_POST['user_name'];
$student->USERNAME = $_POST['user_email'];
$student->STUDPASS = sha1($_POST['user_pass']);
// $student->PROIMAGE = $location;
$student->create();

STUDENT NOTE SYSTEM


70
// $autonum = New Autonumber();
// $autonum->auto_update(2);

message("New [". $_POST['user_name'] ."] created successfully!",


"success");
redirect("index.php");

}
}

function doEdit(){
global $mydb;
if(isset($_POST['save'])){

$user = New User();


$user->NAME = $_POST['user_name'];
$user->UEMAIL = $_POST['user_email'];
$user->PASS =sha1($_POST['user_pass']);
$user->TYPE = "Administrator" ; //$_POST['user_type'];
$user->update($_POST['user_id']);

$sql = "SELECT * FROM `tblstudent` WHERE `IDNO`='".


$_POST['user_id']."'";
$mydb->setQuery($sql);
$mydb->executeQuery();

message("[". $_POST['user_name'] ."] has been updated!", "success");

STUDENT NOTE SYSTEM


71
redirect("index.php");
}
}

function doDelete(){

// if (isset($_POST['selector'])==''){
// message("Select the records first before you delete!","info");
// redirect('index.php');
// }else{

// $id = $_POST['selector'];
// $key = count($id);

// for($i=0;$i<$key;$i++){

// $user = New User();


// $user->delete($id[$i]);

$id = $_GET['id'];

$user = New User();


$user->delete($id);

message("User already Deleted!","info");


redirect('index.php');
// }
// }

STUDENT NOTE SYSTEM


72
}
?>
User:edit.php

<?php
// if (!isset($_SESSION['TYPE'])=='Administrator'){
// redirect(web_root."index.php");
// }

@$user_id = $_GET['id'];
if($user_id==''){
redirect("index.php");
}
$user = New User();
$singleuser = $user->single_user($user_id);

?>

<form class="form-horizontal span6" action="controller.php?action=edit" method="POST">

<div class="row">
<div class="col-lg-12">
<h1 class="page-header">Update User</h1>
</div>
<!-- /.col-lg-12 -->
</div>
<!-- <div class="form-group">
<div class="col-md-8">
<label class="col-md-4 control-label" for=
"user_id">User Id:</label> -->
STUDENT NOTE SYSTEM
73
<!-- <div class="col-md-8"> -->

<input class="form-control input-sm" id="user_id" name="user_id" placeholder=


"Account Id" type="Hidden" value="<?php echo $singleuser->USERID; ?>">
<!-- </div>
</div>
</div> -->
<style>
.form-group{border:1px solid transparent;margin:10px;}

</style>
<div class="form-group">
<div class="col-md-8">
<label class="col-md-4 control-label" for=
"user_name">Name:</label>

<div class="col-md-8">
<input name="deptid" type="hidden" value="">
<input class="form-control input-sm" id="user_name" name="user_name"
placeholder=
"Account Name" type="text" value="<?php echo $singleuser->NAME; ?>">
</div>
</div>
</div>

<div class="form-group">
<div class="col-md-8">
<label class="col-md-4 control-label" for=
"user_email">Username:</label>

STUDENT NOTE SYSTEM


74
<div class="col-md-8">
<input name="deptid" type="hidden" value="">
<input class="form-control input-sm" id="user_email" name="user_email"
placeholder=
"Username" type="text" value="<?php echo $singleuser->UEMAIL; ?>">
</div>
</div>
</div>

<div class="form-group">
<div class="col-md-8">
<label class="col-md-4 control-label" for=
"user_pass">Password:</label>

<div class="col-md-8">
<input name="deptid" type="hidden" value="">
<input class="form-control input-sm" id="user_pass" name="user_pass"
placeholder=
"Account Password" type="Password" value="">
</div>
</div>
</div>
<div class="form-group">
<div class="col-md-8">
<label class="col-md-4 control-label" for=
"user_pass">Retype Password:</label>

<div class="col-md-8">
<input name="deptid" type="hidden" value="">
<input class="form-control input-sm" id="retype_user_pass"
name="retype_user_pass" placeholder=
"Retype Password" type="Password" value="">
STUDENT NOTE SYSTEM
75
</div>
</div>
</div>
<!-- <div class="form-group">
<div class="col-md-8">
<label class="col-md-4 control-label" for=
"user_type">Type:</label>

<div class="col-md-8">
<select class="form-control input-sm" name="user_type" id="user_type">
<option value="Administrator">Administrator</option>
<option value="Staff">Staff</option>
<option value="Customer">Customer</option>
<option value="Encoder">Encoder</option>
</select>
</div>
</div>
</div>
-->

<div class="form-group">
<div class="col-md-8">
<label class="col-md-4 control-label" for=
"idno"></label>

<div class="col-md-8">
<button class="btn btn_kcctc" id="usersave" name="save" type="submit"
>Save</button>
<a href="index.php" class="btn btn_kcctc"><span class="glyphicon glyphicon-
arrow-left"></span>&nbsp;<strong>List of Users</strong></a>
</div>

STUDENT NOTE SYSTEM


76
</div>
</div>

</form>

User:index.php

<?php
require_once("../../../include/initialize.php");
if(!isset($_SESSION['USERID'])){
redirect(web_root."admin/index.php");
}

$view = (isset($_GET['view']) && $_GET['view'] != '') ? $_GET['view'] : '';

switch ($view) {
case 'list' :
$content = 'list.php';
break;

case 'add' :
$content = 'add.php';
break;

case 'edit' :
$content = 'edit.php';
break;
case 'view' :
STUDENT NOTE SYSTEM
77
$content = 'view.php';
break;

default :
$content = 'list.php';
}
require_once("../../themes/templates.php");
?>
User:list.php

<?php
// if (!isset($_SESSION['TYPE'])=='Administrator'){
// redirect(web_root."index.php");
// }

?>
<div class="module-head">
<h1 class="page-header">List of Users <a href="index.php?view=add" class="btn btn-
primary">New</a></h1>

</div>
<form action="controller.php?action=delete" Method="POST">

<table id="example" class="datatable-1 table table-hover table-


bordered" cellspacing="0" style="font-size:12px" >
<thead>
<tr>
<th> Account Name</th>
<th>Username</th>
<th width="10%">Action</th>
</tr>
STUDENT NOTE SYSTEM
78
</thead>
<tbody>
<?php
// $mydb->setQuery("SELECT *
// FROM
`tblusers` WHERE TYPE != 'Customer'");
$mydb->setQuery("SELECT *
FROM
`tblusers`");
$cur = $mydb->loadResultList();

foreach ($cur as $result) {


echo '<tr>';
echo '<td>' . $result->NAME.'</a></td>';
echo '<td>'. $result->UEMAIL.'</td>';
// echo '<td>'. $result->TYPE.'</td>';
echo '<td > <a title="Edit" href="index.php?
view=edit&id='.$result->USERID.'" class="btn btn-primary btn-xs" >Edit</a>
<a title="Delete"
href="controller.php?action=delete&id='.$result->USERID.'" class="btn btn-danger btn-xs"
>Delete</a>
</td>';
echo '</tr>';
}
?>
</tbody>

</table>
</form>

User:register.php

STUDENT NOTE SYSTEM


79
<?php
require_once ("../../../include/initialize.php");
if (isset($_SESSION['StudentID'])) {
# code...
redirect('index.php');
}
?>

<!DOCTYPE html>
<html lang="en">

<head>
<!-- Required meta tags-->
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="Colorlib Templates">
<meta name="author" content="Colorlib">
<meta name="keywords" content="Colorlib Templates">

<!-- Title Page-->


<title>Au Register Forms by Colorlib</title>

<!-- Icons font CSS-->


<link href="<?php echo web_root;?>plugins/registration/vendor/mdi-font/css/material-design-
iconic-font.min.css" rel="stylesheet" media="all">
<link href="<?php echo web_root;?>plugins/registration/vendor/font-awesome-4.7/css/font-
awesome.min.css" rel="stylesheet" media="all">
<!-- Font special for pages-->
<link href="https://fonts.googleapis.com/css?
family=Roboto:100,100i,300,300i,400,400i,500,500i,700,700i,900,900i" rel="stylesheet">
STUDENT NOTE SYSTEM
80
<!-- Vendor CSS-->
<link href="<?php echo web_root;?>plugins/registration/vendor/select2/select2.min.css"
rel="stylesheet" media="all">
<link href="<?php echo
web_root;?>plugins/registration/vendor/datepicker/daterangepicker.css" rel="stylesheet"
media="all">

<!-- Main CSS-->


<link href="<?php echo web_root;?>plugins/registration/css/main.css" rel="stylesheet"
media="all">
</head>

<body>
<div class="page-wrapper bg-blue p-t-100 p-b-100 font-robo">
<div class="wrapper wrapper--w680">
<div class="card card-1">
<div class="card-heading"></div>
<div class="card-body">
<h2 class="title">Registration Info</h2>
<form method="POST" action="register.php">
<div class="input-group">
<input class="input--style-1" type="text" placeholder="Firstname"
name="FNAME">
</div>

<div class="input-group">
<input class="input--style-1" type="text" placeholder="Lastname"
name="LNAME">
</div>
<div class="input-group">
<input class="input--style-1" type="text" placeholder="Address"
name="ADDRESS">

STUDENT NOTE SYSTEM


81
</div>
<div class="input-group">
<input class="input--style-1" type="number" placeholder="Phone"
name="PHONE">
</div>
<div class="input-group">
<input class="input--style-1" type="text" placeholder="Username"
name="USERNAME">
</div>
<div class="input-group">
<input class="input--style-1" type="password" placeholder="Password"
name="PASS">
</div>

<div class="p-t-20">
<button class="btn btn--radius btn--green" type="submit"
name="btnRegister">Submit</button>
<a href="index.php">Back to Login</a>
</div>
</form>
</div>
</div>
</div>
</div>

<!-- Jquery JS-->


<script src="<?php echo
web_root;?>plugins/registration/vendor/jquery/jquery.min.js"></script>
<!-- Vendor JS-->
<script src="<?php echo
web_root;?>plugins/registration/vendor/select2/select2.min.js"></script>

STUDENT NOTE SYSTEM


82
<script src="<?php echo
web_root;?>plugins/registration/vendor/datepicker/moment.min.js"></script>
<script src="<?php echo
web_root;?>plugins/registration/vendor/datepicker/daterangepicker.js"></script>

<!-- Main JS-->


<script src="js/global.js"></script>

</body><!-- This templates was made by Colorlib (https://colorlib.com) -->

</html>
<!-- end document-->

<?php
if (isset($_POST['btnRegister'])) {
# code...

$student = New Student();


$student->Fname = $_POST['FNAME'];
$student->Lname = $_POST['LNAME'];
$student->Address = $_POST['ADDRESS'];
$student->MobileNo = $_POST['PHONE'];
$student->STUDUSERNAME = $_POST['USERNAME'];
$student->STUDPASS = sha1($_POST['PASS']);
$student->create();

message("Your now succefully registered. You can login now!","success");


redirect("index.php");

STUDENT NOTE SYSTEM


83
}

?>
Galery:index.php

<?php
require_once("../../../include/initialize.php");
if(!isset($_SESSION['USERID'])){
redirect(web_root."admin/index.php");
}

$view = (isset($_GET['view']) && $_GET['view'] != '') ? $_GET['view'] : '';

switch ($view) {
default :
$content = 'list.php';
}
require_once("../../themes/templates.php");
?>
Galery:list.php

<!-- Video Gallery - START -->


<div class="container-fluid pb-video-container">
<div class="col-md-10 col-md-offset-1">
<h3 class="text-center">Video Gallery</h3>

<?php
STUDENT NOTE SYSTEM
84
$mydb->setQuery("SELECT * FROM `tbllesson` ");
$cur = $mydb->loadResultList();

foreach ($cur as $result) {

if ($result->Category=='Video') {

?>
<div class="span4">
<div class="stretch">
<video controls class="pb-video-frame">
<source src="<?php echo web_root.'admin/modules/lesson/'.$result-
>FileLocation; ?>" type="video/mp4">
<source class="pb-video-frame" src="<?php echo
web_root.'admin/modules/lesson/'.$result->FileLocation; ?>" type="video/ogg">
</video>
</div>
</div>

<?php
}
}
?>

</div>
</div>
<style>

STUDENT NOTE SYSTEM


85
.stretch video {
width: 100%;
}

.pb-video {
border: 1px solid #e6e6e6;
padding: 5px;
}

.pb-video:hover {
background: #2c3e50;
}

.pb-video-frame {
transition: width 2s, height 2s;
}

.pb-video-frame:hover {
height: 300px;
}

.pb-row {
margin-bottom: 10px;
}
</style>

<!-- Video Gallery - END -->

</div>
Account.php
STUDENT NOTE SYSTEM
86
<?php
require_once(LIB_PATH.DS.'database.php');
class User {
protected static $tblname = "tblusers";

function dbfields () {
global $mydb;
return $mydb->getfieldsononetable(self::$tblname);
}
function listofuser(){
global $mydb;
$mydb->setQuery("SELECT * FROM ".self::$tblname);
return $cur;
}
function find_user($id="",$user_name=""){
global $mydb;
$mydb->setQuery("SELECT * FROM ".self::$tblname."
WHERE USERID = {$id} OR UEMAIL = '{$user_name}'");
$cur = $mydb->executeQuery();
$row_count = $mydb->num_rows($cur);
return $row_count;
}
static function userAuthentication($email,$h_pass){
global $mydb;
$mydb->setQuery("SELECT * FROM `tblusers` WHERE `UEMAIL` = '".
$email ."' and `PASS` = '". $h_pass ."'");
$cur = $mydb->executeQuery();
if($cur==false){
die(mysql_error());

STUDENT NOTE SYSTEM


87
}
$row_count = $mydb->num_rows($cur);//get the number of count
if ($row_count == 1){
$user_found = $mydb->loadSingleResult();
$_SESSION['USERID'] = $user_found->USERID;
$_SESSION['NAME'] = $user_found->NAME;
$_SESSION['UEMAIL'] = $user_found->UEMAIL;
$_SESSION['PASS'] = $user_found->PASS;
$_SESSION['TYPE'] = $user_found->TYPE;
return true;
}else{
return false;
}
}
function single_user($id=""){
global $mydb;
$mydb->setQuery("SELECT * FROM ".self::$tblname."
Where USERID= '{$id}' LIMIT 1");
$cur = $mydb->loadSingleResult();
return $cur;
}
/*---Instantiation of Object dynamically---*/
static function instantiate($record) {
$object = new self;

foreach($record as $attribute=>$value){
if($object->has_attribute($attribute)) {
$object->$attribute = $value;
}
}
return $object;
STUDENT NOTE SYSTEM
88
}

/*--Cleaning the raw data before submitting to Database--*/


private function has_attribute($attribute) {
// We don't care about the value, we just want to know if the key exists
// Will return true or false
return array_key_exists($attribute, $this->attributes());
}

protected function attributes() {


// return an array of attribute names and their values
global $mydb;
$attributes = array();
foreach($this->dbfields() as $field) {
if(property_exists($this, $field)) {
$attributes[$field] = $this->$field;
}
}
return $attributes;
}

protected function sanitized_attributes() {


global $mydb;
$clean_attributes = array();
// sanitize the values before submitting
// Note: does not alter the actual value of each attribute
foreach($this->attributes() as $key => $value){
$clean_attributes[$key] = $mydb->escape_value($value);
}
return $clean_attributes;
STUDENT NOTE SYSTEM
89
}

/*--Create,Update and Delete methods--*/


public function save() {
// A new record won't have an id yet.
return isset($this->id) ? $this->update() : $this->create();
}

public function create() {


global $mydb;
// Don't forget your SQL syntax and good habits:
// - INSERT INTO table (key, key) VALUES ('value', 'value')
// - single-quotes around all values
// - escape all values to prevent SQL injection
$attributes = $this->sanitized_attributes();
$sql = "INSERT INTO ".self::$tblname." (";
$sql .= join(", ", array_keys($attributes));
$sql .= ") VALUES ('";
$sql .= join("', '", array_values($attributes));
$sql .= "')";
echo $mydb->setQuery($sql);

if($mydb->executeQuery()) {
$this->id = $mydb->insert_id();
return true;
} else {
return false;
}
}

STUDENT NOTE SYSTEM


90
public function update($id=0) {
global $mydb;
$attributes = $this->sanitized_attributes();
$attribute_pairs = array();
foreach($attributes as $key => $value) {
$attribute_pairs[] = "{$key}='{$value}'";
}
$sql = "UPDATE ".self::$tblname." SET ";
$sql .= join(", ", $attribute_pairs);
$sql .= " WHERE USERID=". $id;
$mydb->setQuery($sql);
if(!$mydb->executeQuery()) return false;

public function delete($id=0) {


global $mydb;
$sql = "DELETE FROM ".self::$tblname;
$sql .= " WHERE USERID=". $id;
$sql .= " LIMIT 1 ";
$mydb->setQuery($sql);

if(!$mydb->executeQuery()) return false;

}
?>
Cofig.php

STUDENT NOTE SYSTEM


91
<?php
defined('server') ? null : define("server", "localhost");
defined('user') ? null : define ("user", "root") ;
defined('pass') ? null : define("pass","");
defined('database_name') ? null : define("database_name", "studentnotes") ;

$this_file = str_replace('\\', '/', __File__) ;


$doc_root = $_SERVER['DOCUMENT_ROOT'];

$web_root = str_replace (array($doc_root, "include/config.php") , '' , $this_file);


$server_root = str_replace ('config/config.php' ,'', $this_file);

define ('web_root' , $web_root);


define('server_root' , $server_root);
?>

Connection.php
<?php
$conn = mysqli_connect("localhost","root","","notes" ) or die ("error" . mysqli_error($conn));
?>
Database.php

<?php
require_once(LIB_PATH.DS."config.php");
class Database {
var $sql_string = '';
var $error_no = 0;
var $error_msg = '';
STUDENT NOTE SYSTEM
92
private $conn;
public $last_query;
private $magic_quotes_active;
private $real_escape_string_exists;

function __construct() {
$this->open_connection();
$this->magic_quotes_active = get_magic_quotes_gpc();
$this->real_escape_string_exists = function_exists("mysqli_real_escape_string");
}

public function open_connection() {


$this->conn = mysqli_connect(server,user,pass);
if(!$this->conn){
echo "Problem in database connection! Contact administrator!";
exit();

}else{

$db_select = mysqli_select_db($this->conn,database_name);
if (!$db_select) {
echo "Problem in selecting database! Contact administrator!";
exit();
}
}

function setQuery($sql='') {
$this->sql_string=$sql;
}
STUDENT NOTE SYSTEM
93
function executeQuery() {
$result = mysqli_query($this->conn,$this->sql_string);
$this->confirm_query($result);
return $result;
}

private function confirm_query($result) {


if(!$result){
$this->error_no = mysqli_errno($this->conn);
$this->error_msg = mysqli_error($this->conn);
return false;
}
return $result;
}

function loadResultList( $key='' ) {


$cur = $this->executeQuery();

$array = array();
while ($row = mysqli_fetch_object($cur)) {
if ($key) {
$array[$row->$key] = $row;
} else {
$array[] = $row;
}
}
mysqli_free_result( $cur );
return $array;
}

STUDENT NOTE SYSTEM


94
function loadSingleResult() {
$cur = $this->executeQuery();

while ($row = mysqli_fetch_object($cur)) {


return $data = $row;
}
mysqli_free_result($cur);
//return $data;
}

function getFieldsOnOneTable($tbl_name) {

$this->setQuery("DESC ".$tbl_name);
$rows = $this->loadResultList();

$f = array();
for ( $x=0; $x<count($rows); $x++ ) {
$f[] = $rows[$x]->Field;
}

return $f;
}

public function fetch_array($result) {


return mysqli_fetch_array($result);
}
//gets the number or rows
public function num_rows($result_set) {
return mysqli_num_rows($result_set);
}

STUDENT NOTE SYSTEM


95
public function insert_id() {
// get the last id inserted over the current db connection
return mysqli_insert_id($this->conn);
}

public function affected_rows() {


return mysqli_affected_rows($this->conn);
}

public function escape_value( $value ) {


if( $this->real_escape_string_exists ) { // PHP v4.3.0 or higher
// undo any magic quote effects so mysql_real_escape_string can do the
work
if($this->magic_quotes_active) { $value = stripslashes($value); }
$value = mysqli_real_escape_string($this->conn,$value);
} else { // before PHP v4.3.0
// if magic quotes aren't already on then add slashes manually
if( !$this->magic_quotes_active ) { $value = addslashes($value); }
// if magic quotes are active, then the slashes already exist
}
return $value;
}

public function close_connection() {


if(isset($this->conn)) {
mysqli_close($this->conn);
unset($this->conn);
}
}

STUDENT NOTE SYSTEM


96
$mydb = new Database();

?>

Footer.php

<footer class="foo">
<div class="row">
<div class="col-lg-12">
<p style="text-align:center; font-family: 'Monotype Corsiva'; font-size:17px;"><i
class="material-icons" style="color: brown;"></i> 2021 <b>Student Notes System CICS
ZPPSU</b></p>
</div>
</div>
</footer>

Function.php

<?php
function strip_zeros_from_date($marked_string="") {
//first remove the marked zeros
$no_zeros = str_replace('*0','',$marked_string);
$cleaned_string = str_replace('*0','',$no_zeros);
return $cleaned_string;
}
function redirect_to($location = NULL) {
if($location != NULL){

STUDENT NOTE SYSTEM


97
header("Location: {$location}");
exit;
}
}
function redirect($location=Null){
if($location!=Null){
echo "<script>
window.location='{$location}'
</script>";
}else{
echo 'error location';
}

}
function output_message($message="") {

if(!empty($message)){
return "<p class=\"message\">{$message}</p>";
}else{
return "";
}
}
function date_toText($datetime=""){
$nicetime = strtotime($datetime);
return strftime("%B %d, %Y at %I:%M %p", $nicetime);

}
function __autoload($class_name) {
$class_name = strtolower($class_name);
$path = LIB_PATH.DS."{$class_name}.php";
if(file_exists($path)){
STUDENT NOTE SYSTEM
98
require_once($path);
}else{
die("The file {$class_name}.php could not be found.");
}

function currentpage_public(){
$this_page = $_SERVER['SCRIPT_NAME']; // will return /path/to/file.php
$bits = explode('/',$this_page);
$this_page = $bits[count($bits)-1]; // will return file.php, with parameters if case, like
file.php?id=2
$this_script = $bits[0]; // will return file.php, no parameters*/
return $bits[2];

function currentpage_admin(){
$this_page = $_SERVER['SCRIPT_NAME']; // will return /path/to/file.php
$bits = explode('/',$this_page);
$this_page = $bits[count($bits)-1]; // will return file.php, with parameters if case, like
file.php?id=2
$this_script = $bits[0]; // will return file.php, no parameters*/
return $bits[4];

}
// echo "string " .currentpage_admin()."<br/>";

function curPageName() {
return substr($_SERVER['REQUEST_URI'], 21, strrpos($_SERVER['REQUEST_URI'], '/')-
24);
}
STUDENT NOTE SYSTEM
99
// echo "The current page name is ".curPageName();

function dateFormat($date="",$format=""){
return date_format(date_create($date),$format);
}

?>
Header.php

<?php
include('connection.php');
?>

<!DOCTYPE html>
<html>
<head>
<title> Student Notes System CICS ZPPU</title>
<script src="dashboard/js/tinymce/tinymce.min.js"></script>
<script src="dashboard/js/tinymce/script.js"></script>
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="css/cms-home.css">
<link rel="stylesheet" type="text/css" href="css/material-icons.css">
<link rel="stylesheet" type="text/css" href="css/style.css" media="all" />
<link rel="stylesheet" type="text/css" href="css/demo.css" media="all" />
<link rel="stylesheet" type="text/css" href="css/jquery-ui.css">

<link rel="stylesheet" href="css/loginstyle.css">


<link href="dashboard/font-awesome/css/font-awesome.min.css" rel="stylesheet"
type="text/css">

STUDENT NOTE SYSTEM 10


0
</head>
<body>
Iniatialize.php

<?php
//define the core paths
//Define them as absolute peths to make sure that require_once works as expected

//DIRECTORY_SEPARATOR is a PHP Pre-defined constants:


//(\ for windows, / for Unix)
defined('DS') ? null : define('DS', DIRECTORY_SEPARATOR);

defined('SITE_ROOT') ? null : define ('SITE_ROOT',


$_SERVER['DOCUMENT_ROOT'].DS.'StudentZnotes');

defined('LIB_PATH') ? null : define ('LIB_PATH',SITE_ROOT.DS.'include');

//load the database configuration first.


require_once(LIB_PATH.DS."config.php");
require_once(LIB_PATH.DS."function.php");
require_once(LIB_PATH.DS."session.php");
require_once(LIB_PATH.DS."accounts.php");
require_once(LIB_PATH.DS."lessons.php");
require_once(LIB_PATH.DS."students.php");
require_once(LIB_PATH.DS."database.php");
?>

Lesson.php

STUDENT NOTE SYSTEM 10


1
<?php
require_once(LIB_PATH.DS.'database.php');
// SELECT `LessonID`, `EVENT_TEXT`, `EVENT_WHAT`, `EVENT_WHEN`,
`EVENT_WHERE` FROM `tblevent` WHERE 1
class Lesson {
protected static $tblname = "tbllesson";

function dbfields () {
global $mydb;
return $mydb->getfieldsononetable(self::$tblname);

}
function listoflesson(){
global $mydb;
$mydb->setQuery("SELECT * FROM ".self::$tblname);
return $cur;
}
function find_lesson($id="",$chapter=""){
global $mydb;
$mydb->setQuery("SELECT * FROM ".self::$tblname."
WHERE LessonID = {$id} OR LessonChapter = '{$chapter}'");
$cur = $mydb->executeQuery();
$row_count = $mydb->num_rows($cur);
return $row_count;
}

function find_all_lesson($chapter=""){
global $mydb;
$mydb->setQuery("SELECT * FROM ".self::$tblname."

STUDENT NOTE SYSTEM 10


2
WHERE LessonChapter = '{$chapter}'");
$cur = $mydb->executeQuery();
$row_count = $mydb->num_rows($cur);
return $row_count;
}

function single_lesson($id=0){
global $mydb;
$mydb->setQuery("SELECT * FROM ".self::$tblname."
Where LessonID= '{$id}' LIMIT 1");
$cur = $mydb->loadSingleResult();
return $cur;
}

/*---Instantiation of Object dynamically---*/


static function instantiate($record) {
$object = new self;

foreach($record as $attribute=>$value){
if($object->has_attribute($attribute)) {
$object->$attribute = $value;
}
}
return $object;
}

/*--Cleaning the raw data before submitting to Database--*/


private function has_attribute($attribute) {
// We don't care about the value, we just want to know if the key exists
STUDENT NOTE SYSTEM 10
3
// Will return true or false
return array_key_exists($attribute, $this->attributes());
}

protected function attributes() {


// return an array of attribute names and their values
global $mydb;
$attributes = array();
foreach($this->dbfields() as $field) {
if(property_exists($this, $field)) {
$attributes[$field] = $this->$field;
}
}
return $attributes;
}

protected function sanitized_attributes() {


global $mydb;
$clean_attributes = array();
// sanitize the values before submitting
// Note: does not alter the actual value of each attribute
foreach($this->attributes() as $key => $value){
$clean_attributes[$key] = $mydb->escape_value($value);
}
return $clean_attributes;
}

/*--Create,Update and Delete methods--*/


public function save() {
// A new record won't have an id yet.
STUDENT NOTE SYSTEM 10
4
return isset($this->id) ? $this->update() : $this->create();
}

public function create() {


global $mydb;
// Don't forget your SQL syntax and good habits:
// - INSERT INTO table (key, key) VALUES ('value', 'value')
// - single-quotes around all values
// - escape all values to prevent SQL injection
$attributes = $this->sanitized_attributes();
$sql = "INSERT INTO ".self::$tblname." (";
$sql .= join(", ", array_keys($attributes));
$sql .= ") VALUES ('";
$sql .= join("', '", array_values($attributes));
$sql .= "')";
echo $mydb->setQuery($sql);

if($mydb->executeQuery()) {
$this->id = $mydb->insert_id();
return true;
} else {
return false;
}
}

public function update($id=0) {


global $mydb;
$attributes = $this->sanitized_attributes();
$attribute_pairs = array();
foreach($attributes as $key => $value) {
$attribute_pairs[] = "{$key}='{$value}'";
STUDENT NOTE SYSTEM 10
5
}
$sql = "UPDATE ".self::$tblname." SET ";
$sql .= join(", ", $attribute_pairs);
$sql .= " WHERE LessonID=". $id;
$mydb->setQuery($sql);
if(!$mydb->executeQuery()) return false;

public function delete($id=0) {


global $mydb;
$sql = "DELETE FROM ".self::$tblname;
$sql .= " WHERE LessonID=". $id;
$sql .= " LIMIT 1 ";
$mydb->setQuery($sql);

if(!$mydb->executeQuery()) return false;

}
?>
Navigation.php

<!doctype html>
<html lang="en">

<head>
STUDENT NOTE SYSTEM 10
6
<meta charset="UTP-8">
<title>Navigation</title>
<link rel="stylesheet" href="css/style3.css">
</head>
<body>
<div class="navbar">
<a href="home.php" class="logo">Student notes</a>
<ul class="nav">
<li><a href="about.php"><b>About Us</b></a></li>
<li><a href="login.php"><b>Login</b></a></li>

</ul>
</div>

</body>
</html>

Session.php

<?php
session_start(); //before we store information of our member, we need to start first the session

//create a new function to check if the session variable member_id is on set


function logged_in() {
return isset($_SESSION['USERID']);

}
//this function if session member is not set then it will be redirected to login.php
function confirm_logged_in() {
if (!logged_in()) {?>
STUDENT NOTE SYSTEM 10
7
<script type="text/javascript">
window.location = "login.php";
</script>

<?php
}
}
function admin_confirm_logged_in() {
if (@!$_SESSION['USERID']) {?>
<script type="text/javascript">
window.location ="login.php";
</script>

<?php
}
}

function studlogged_in() {
return isset($_SESSION['IDNO']);

}
function studconfirm_logged_in() {
if (!studlogged_in()) {?>
<script type="text/javascript">
window.location = "index.php";
</script>

<?php
}
}
STUDENT NOTE SYSTEM 10
8
function message($msg="", $msgtype="") {
if(!empty($msg)) {
// then this is "set message"
// make sure you understand why $this->message=$msg wouldn't work
$_SESSION['message'] = $msg;
$_SESSION['msgtype'] = $msgtype;
} else {
// then this is "get message"
return $message;
}
}
function check_message(){

if(isset($_SESSION['message'])){
if(isset($_SESSION['msgtype'])){
if ($_SESSION['msgtype']=="info"){
echo '<div class="alert alert-info">'.
$_SESSION['message'] . '</div>';

}elseif($_SESSION['msgtype']=="error"){
echo '<div class="alert alert-danger">' .
$_SESSION['message'] . '</div>';

}elseif($_SESSION['msgtype']=="success"){
echo '<div class="alert alert-success">' .
$_SESSION['message'] . '</div>';
}
unset($_SESSION['message']);
unset($_SESSION['msgtype']);
}

STUDENT NOTE SYSTEM 10


9
}

}
function keyactive($key=""){
if(!empty($key)) {
// then this is "set message"
// make sure you understand why $this->message=$msg wouldn't work
$_SESSION['active'] = $key;
} else {
// then this is "get message"
return $keyactive;
}

function check_active(){
if(isset($_SESSION['active'])){
switch ($_SESSION['active']) {

case 'basicInfo' :
$_SESSION['basicInfo'] = "active";
break;
case 'otherInfo' :
$_SESSION['otherInfo']= 'active';
break;

case 'work' :
$_SESSION['work'] = 'active' ;
break;
}
}else{
STUDENT NOTE SYSTEM 11
0
$active = (isset($_GET['active']) && $_GET['active'] != '') ? $_GET['active'] : '';
switch ($active) {

case 'otherInfo' :
$_SESSION['otherInfo']= 'active';
break;

case 'work' :
$_SESSION['work'] = 'active' ;
break;

default :

$_SESSION['basicInfo'] = "active";
break;

// if(isset($_GET['active'])){
// $_SESSION['work'] = 'active' ;
// }elseif(isset($_GET['active'])){
// $_SESSION['otherInfo']='active';
// }else{
// $_SESSION['basicInfo'] = "active";
// }

}
}
STUDENT NOTE SYSTEM 11
1
}

?>
Students.php

<?php
require_once(LIB_PATH.DS.'database.php');
class Student {
protected static $tblname = "tblstudent";

function dbfields () {
global $mydb;
return $mydb->getfieldsononetable(self::$tblname);

}
function listofstudents(){
global $mydb;
$mydb->setQuery("SELECT * FROM ".self::$tblname);
return $cur;
}
function find_students($id="",$name=""){
global $mydb;
$mydb->setQuery("SELECT * FROM ".self::$tblname."
WHERE StudentID = {$id} OR LNAME = '{$name}'");
$cur = $mydb->executeQuery();
$row_count = $mydb->num_rows($cur);
return $row_count;
}

function find_all_students($name=""){
STUDENT NOTE SYSTEM 11
2
global $mydb;
$mydb->setQuery("SELECT * FROM ".self::$tblname."
WHERE LNAME = '{$name}'");
$cur = $mydb->executeQuery();
$row_count = $mydb->num_rows($cur);
return $row_count;
}
static function studentAuthentication($email,$h_pass){
global $mydb;
$mydb->setQuery("SELECT * FROM `tblstudent` WHERE
`STUDUSERNAME` = '". $email ."' and `STUDPASS` = '". $h_pass ."'");
$cur = $mydb->executeQuery();
if($cur==false){
die(mysqli_error());
}
$row_count = $mydb->num_rows($cur);//get the number of count
if ($row_count == 1){
$user_found = $mydb->loadSingleResult();
$_SESSION['StudentID'] = $user_found->StudentID;
$_SESSION['Fname'] = $user_found->Fname;
$_SESSION['Lname'] = $user_found->Lname;
$_SESSION['USERNAME'] = $user_found-
>STUDUSERNAME;
$_SESSION['STUDPASS'] = $user_found->STUDPASS;
return true;
}else{
return false;
}
}
function find_pass($id="",$pass=""){
global $mydb;

STUDENT NOTE SYSTEM 11


3
$mydb->setQuery("SELECT * FROM ".self::$tblname."
WHERE StudentID = {$id} and STUDPASS = '{$pass}'");
$cur = $mydb->executeQuery();
$row_count = $mydb->num_rows($cur);
return $row_count;
}

function single_students($id=""){
global $mydb;
$mydb->setQuery("SELECT * FROM ".self::$tblname."
Where StudentID= '{$id}' LIMIT 1");
$cur = $mydb->loadSingleResult();
return $cur;
}
/*---Instantiation of Object dynamically---*/
static function instantiate($record) {
$object = new self;

foreach($record as $attribute=>$value){
if($object->has_attribute($attribute)) {
$object->$attribute = $value;
}
}
return $object;
}

/*--Cleaning the raw data before submitting to Database--*/


private function has_attribute($attribute) {
// We don't care about the value, we just want to know if the key exists
STUDENT NOTE SYSTEM 11
4
// Will return true or false
return array_key_exists($attribute, $this->attributes());
}

protected function attributes() {


// return an array of attribute names and their values
global $mydb;
$attributes = array();
foreach($this->dbfields() as $field) {
if(property_exists($this, $field)) {
$attributes[$field] = $this->$field;
}
}
return $attributes;
}

protected function sanitized_attributes() {


global $mydb;
$clean_attributes = array();
// sanitize the values before submitting
// Note: does not alter the actual value of each attribute
foreach($this->attributes() as $key => $value){
$clean_attributes[$key] = $mydb->escape_value($value);
}
return $clean_attributes;
}

/*--Create,Update and Delete methods--*/


public function save() {
// A new record won't have an id yet.
STUDENT NOTE SYSTEM 11
5
return isset($this->id) ? $this->update() : $this->create();
}

public function create() {


global $mydb;
// Don't forget your SQL syntax and good habits:
// - INSERT INTO table (key, key) VALUES ('value', 'value')
// - single-quotes around all values
// - escape all values to prevent SQL injection
$attributes = $this->sanitized_attributes();
$sql = "INSERT INTO ".self::$tblname." (";
$sql .= join(", ", array_keys($attributes));
$sql .= ") VALUES ('";
$sql .= join("', '", array_values($attributes));
$sql .= "')";
echo $mydb->setQuery($sql);

if($mydb->executeQuery()) {
$this->id = $mydb->insert_id();
return true;
} else {
return false;
}
}

public function update($id=0) {


global $mydb;
$attributes = $this->sanitized_attributes();
$attribute_pairs = array();
foreach($attributes as $key => $value) {
$attribute_pairs[] = "{$key}='{$value}'";
STUDENT NOTE SYSTEM 11
6
}
$sql = "UPDATE ".self::$tblname." SET ";
$sql .= join(", ", $attribute_pairs);
$sql .= " WHERE StudentID=". $id;
$mydb->setQuery($sql);
if(!$mydb->executeQuery()) return false;

public function delete($id=0) {


global $mydb;
$sql = "DELETE FROM ".self::$tblname;
$sql .= " WHERE StudentID=". $id;
$sql .= " LIMIT 1 ";
$mydb->setQuery($sql);

if(!$mydb->executeQuery()) return false;

}
?>

Student module
About.php

<?php include 'includes/navigation.php';?>

STUDENT NOTE SYSTEM 11


7
<head>

</center>
</head>
<body>

<center><div class="col-lg-12">
<p style="text-align:center; font-family: 'Monotype Corsiva'; font-size:17px;"><i
class="material-icons" style="color: brown;"></i><b> MISSION</b></p>
</div></center>
<center>Provide effective and efficient services through advanced technological studies and
researches for the empowerment of the nation’s human resources.

</center>
<center><div class="col-lg-12">
<p style="text-align:center; font-family: 'Monotype Corsiva'; font-size:17px;"><i
class="material-icons" style="color: brown;"></i><b> MISSION</b></p>
</div></center>
<center>Provide effective and efficient services through advanced technological studies and
researches for the empowerment of the nation’s human resources.

</center>

<center><div class="col-lg-12">
<p style="text-align:center; font-family: 'Monotype Corsiva'; font-size:17px;"><i
class="material-icons" style="color: brown;"></i><b> VISSION </b></p>
</div></center>
<center> ZPPSU as the leading provider of Globally-competitive Human Resources.

</center>

STUDENT NOTE SYSTEM 11


8
<center><div class="col-lg-12">
<p style="text-align:center; font-family: 'Monotype Corsiva'; font-size:17px;"><i
class="material-icons" style="color: brown;"></i><b> CORE VALUES </b></p>
</div></center>
<center>Love of God and Country</center>

<center>Social Responsibility</center>

<center>Commitment/Dedication to Service</center>

<center>Accountability</center></center>

</body>
<center>
<a href="#"><img src="images/trade.jpg" alt="" width="200" height="200" tittle=""></a>
</center>
</a>
<?php include 'includes/footer.php';?>

Download.php

<h1><?php echo $title;?></h1>


<div class="col-lg-6">
<h3>PDF/Docs</h3>
<div class="table-responsive">
<table id="example" class="table table-bordered">
<thead>
<th width="2%">#</th>

STUDENT NOTE SYSTEM 11


9
<th>Description</th>
<th>Title</th>
<th width="10%">Action</th>
</thead>
<tbody>
<?php
$sql = "SELECT * FROM tbllesson WHERE Category='Docs'";
$mydb->setQuery($sql);
$cur = $mydb->loadResultList();
foreach ($cur as $result) {
# code...
echo '<tr>';
echo '<td></td>';
echo '<td>'.$result->LessonChapter.'</td>';
echo '<td>'.$result->LessonTitle.'</td>';
echo '<td><a href="'.web_root.'admin/modules/lesson/'.
$result->FileLocation.'" class="btn btn-xs btn-info" download><i class="fa fa-download"></i>
Download</a></td>';
echo '</tr>';
}
?>
</tbody>
</table>
</div>
</div>
<div class="col-lg-6">
<h3>VIDEO</h3>
<div class="table-responsive">
<table id="example2" class="table table-bordered">
<thead>

STUDENT NOTE SYSTEM 12


0
<th width="2%">#</th>
<th>Decription</th>
<th width="10%">Action</th>
</thead>
<tbody>
<?php
$sql = "SELECT * FROM tbllesson WHERE Category='Video'";
$mydb->setQuery($sql);
$cur = $mydb->loadResultList();
foreach ($cur as $result) {
# code...
echo '<tr>';
echo '<td></td>';
echo '<td>'.$result->LessonTitle.'</td>';
echo '<td><a href="'.web_root.'admin/modules/lesson/'.
$result->FileLocation.'" class="btn btn-xs btn-info" download><i class="fa fa-download"></i>
Download</a></td>';
echo '</tr>';
}
?>
</tbody>
</table>
</div>
</div>
Home.php

<?php include 'includes/connection.php';?>


<?php include 'includes/header.php';?>
<?php include 'includes/navigation.php';?>

STUDENT NOTE SYSTEM 12


1
<br><br>
<link rel="stylesheet" type="text/css" href="styles.css" media="all" />
<link rel="stylesheet" type="text/css" href="demo.css" media="all" />
<!-- jQuery -->
<script type="text/javascript" src="js/jquery.min.js"></script>
<!-- FlexSlider -->
<script type="text/javascript" src="js/jquery.flexslider-min.js"></script>
<script type="text/javascript" charset="utf-8">
var $ = jQuery.noConflict();
$(window).load(function() {
$('.flexslider').flexslider({
animation: "fade"
});

$(function() {
$('.show_menu').click(function(){
$('.menu').fadeIn();
$('.show_menu').fadeOut();
$('.hide_menu').fadeIn();
});
$('.hide_menu').click(function(){
$('.menu').fadeOut();
$('.show_menu').fadeIn();
$('.hide_menu').fadeOut();
});
});
});
</script>

<div class="slider_container">
<div class="flexslider">
STUDENT NOTE SYSTEM 12
2
<ul class="slides">
<li>
<a href="#"><img src="images/slider/trade1.jpg" alt="" width="900"
height="400" title=""/></a>
<div class="flex-caption">
<div class="caption_title_line"><h2>Easy Notes Management</h2><p>Now easily
manage all kind of notes by uploading them here.</p></div>
</div>
</li>
<li>
<a href="#"><img src="images/slider/trade3.jpg" alt="" width="900"
height="400" title=""/></a>
<div class="flex-caption">
<div class="caption_title_line"><h2>Upload Various Files</h2><p>User can
upload various types of files like PDF, PPT, DOC etc..</p></div>
</div>
</li>
<li>
<a href="#"><img src="images/slider/trade2.jpg" alt="" width="900"
height="400" title=""/></a>
<div class="flex-caption">
<div class="caption_title_line"><h2>Controled By Admin</h2><p>Everying is
managed and controled by administrator</p></div>
</div>
</li>
<li>
<a href="#"><img src="images/slider/trade4.jpg" alt="" width="900"
height="400" title=""/></a>
<div class="flex-caption">
<div class="caption_title_line"><h2>Login For Both Teacher and
Student</h2><p>Both teacher and student can login and upload notes </p></div>
</div>
</li>

STUDENT NOTE SYSTEM 12


3
</ul>
</div>
</div>
</div>
</div>

</body>
</html>
<?php include 'include/footer.php';?>

Studentmodule:index.php

<?php
require_once("include/initialize.php");
if (!isset($_SESSION['StudentID'])) {
# code...
redirect('login.php');
}
$content='home.php';
$view = (isset($_GET['q']) && $_GET['q'] != '') ? $_GET['q'] : '';
switch ($view) {
case 'lesson':
$title = "Lesson";
$content = 'lesson.php';
# code...
break;
case 'exercises':
$title = "Exercises";
$content = 'exercises.php';
# code...
STUDENT NOTE SYSTEM 12
4
break;
case 'download':
$title = "Download";
$content = 'download.php';
# code...
break;
case 'about':
$title = "About Us";
$content = 'about.php';
# code...
break;
case 'playvideo':
$title = "Play Video";
$content = 'playvideo.php';
# code...
break;
case 'viewpdf':
$title = "Play Video";
$content = 'viewpdf.php';
# code...
break;
case 'question':
$title = "Question";
$content = 'question.php';
# code...
break;
case 'quizresult':
$title = "Result";
$content = 'quizresult.php';
# code...
break;
STUDENT NOTE SYSTEM 12
5
default :
$title = "Home";
$content = 'home.php';
}
require_once("theme/templates.php");
?>

Lesson.php

<h1><?php echo $title;?></h1>


<div class="col-lg-6">
<h3>PDF</h3>
<div class="table-responsive">
<table id="example" class="table table-bordered">
<thead>
<th width="2%">#</th>
<th>Chapter</th>
<th>Title</th>
<th width="2%">Action</th>
</thead>
<tbody>
<?php
$sql = "SELECT * FROM tbllesson WHERE Category='Docs'";
$mydb->setQuery($sql);
$cur = $mydb->loadResultList();
foreach ($cur as $result) {
# code...
echo '<tr>';
echo '<td></td>';
echo '<td>'.$result->LessonChapter.'</td>';
echo '<td>'.$result->LessonTitle.'</td>';
STUDENT NOTE SYSTEM 12
6
echo '<td><a href="index.php?q=viewpdf&id='.$result-
>LessonID.'" class="btn btn-xs btn-info"><i class="fa fa-info"></i> View File</a></td>';
echo '</tr>';
}
?>
</tbody>
</table>
</div>
</div>
<div class="col-lg-6">
<h3>VIDEO</h3>
<div class="table-responsive">
<table id="example2" class="table table-bordered">
<thead>
<th width="2%">#</th>
<th>Decription</th>
<th width="2%">Action</th>
</thead>
<tbody>
<?php
$sql = "SELECT * FROM tbllesson WHERE Category='Video'";
$mydb->setQuery($sql);
$cur = $mydb->loadResultList();
foreach ($cur as $result) {
# code...
echo '<tr>';
echo '<td></td>';
echo '<td>'.$result->LessonTitle.'</td>';
echo '<td><a href="index.php?q=playvideo&id='.$result-
>LessonID.'" class="btn btn-xs btn-info"><i class="fa fa-play"></i> Play Video</a></td>';
echo '</tr>';

STUDENT NOTE SYSTEM 12


7
}
?>
</tbody>
</table>
</div>
</div>

Studentmodule:login.php

<?php
require_once("includes/navigation.php");
require_once ("include/initialize.php");
if (isset($_SESSION['StudentID'])) {
# code...
redirect('index.php');
}
?>

<style type="text/css">
body {
background-color: #fff;
}
</style>

<!DOCTYPE html>
<html lang="en">
<head>
<title>Login</title>
STUDENT NOTE SYSTEM 12
8
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!--
=====================================================================
==========================-->
<link rel="icon" type="image/png" href="images/icons/favicon.ico"/>

<link href="<?php echo web_root; ?>css/bootstrap.min.css" rel="stylesheet">


<link href="<?php echo web_root; ?>fonts/font-awesome.min.css" rel="stylesheet"
media="screen">

<!--
=====================================================================
==========================-->
<link rel="stylesheet" type="text/css" href="<?php echo web_root; ?>css/util.css">
<link rel="stylesheet" type="text/css" href="<?php echo web_root; ?>css/main.css">
<!--
=====================================================================
==========================-->
</head>
<body>

<div class="limiter">
<div class="container-login100">
<?php check_message(); ?>
<div class="wrap-login100">
<div class="login100-pic js-tilt" data-tilte>
<img src="<?php echo web_root; ?>images/trade.jpg" alt="IMG">
</div>

<form class="login100-form validate-form" action="" method="POST">


<span class="login100-form-title">
Student Login

STUDENT NOTE SYSTEM 12


9
</span>

<div class="wrap-input100 validate-input" >


<input class="input100" type="text" name="user_email" placeholder="Username">
<span class="focus-input100"></span>
<span class="symbol-input100">
<i class="fa fa-user" aria-hidden="true"></i>
</span>
</div>

<div class="wrap-input100 validate-input" data-validate = "Password is required">


<input class="input100" type="password" name="user_pass" placeholder="Password">
<span class="focus-input100"></span>
<span class="symbol-input100">
<i class="fa fa-lock" aria-hidden="true"></i>
</span>
</div>

<div class="container-login100-form-btn">
<button class="login100-form-btn" type="submit" name="btnLogin">
Login
</button>
</div>

<div class="text-center p-t-136"style="visibility:hidden">


<a class="txt2" href="register.php">
Create your Account
<i class="fa fa-long-arrow-right m-l-5" aria-hidden="true"></i>
</a>
</div>
</form>
STUDENT NOTE SYSTEM 13
0
</div>
</div>
</div>

<?php

if(isset($_POST['btnLogin'])){
$email = trim($_POST['user_email']);
$upass = trim($_POST['user_pass']);
$h_upass = sha1($upass);

if ($email == '' OR $upass == '') {

message("Invalid Username and Password!", "error");


redirect (web_root."login.php");

} else {
//it creates a new objects of member
$student = new Student();
//make use of the static function, and we passed to parameters
$res = $student::studentAuthentication($email, $h_upass);
if ($res==true) {
redirect(web_root."index.php?q=download");

echo $_SESSION['StudentID'];
}else{
message("Account does not exist! Please contact Administrator.", "error");
redirect (web_root."login.php");
}
STUDENT NOTE SYSTEM 13
1
}
}
?>

<script type="text/javascript" language="javascript" src="<?php echo web_root;


?>js/jquery.js"></script>
<script src="<?php echo web_root; ?>js/bootstrap.min.js"></script>
<!--
=====================================================================
==========================-->
<script src="<?php echo web_root; ?>vendor/select2/select2.min.js"></script>
<!--
=====================================================================
==========================-->
<script src="<?php echo web_root; ?>vendor/tilt/tilt.jquery.min.js"></script>
<script >
$('.js-tilt').tilt({
scale: 1.1
})
</script>
<!--
=====================================================================
==========================-->
<script src="js/main.js"></script>

</body>
</html>
Logout.php

<?php
require_once 'include/initialize.php';
// Four steps to closing a session

STUDENT NOTE SYSTEM 13


2
// (i.e. logging out)

// 1. Find the session


@session_start();

// 2. Unset all the session variables


unset( $_SESSION['StudentID'] );
unset( $_SESSION['Fname'] );
unset( $_SESSION['Lname'] );
unset( $_SESSION['STUDUSERNAME'] );
unset( $_SESSION['STUDPASS'] );

// 4. Destroy the session


// session_destroy();
redirect("index.php?logout=1");
?>

Validation.php

<?php
require_once("include/initialize.php");

$studentid = $_SESSION['StudentID'];
$exersiceid = $_POST['ExerciseID'];
$value = $_POST['Value'];

$sql = "SELECT * FROM `tblexercise` WHERE `ExerciseID`='{$exersiceid}'";


$mydb->setQuery($sql);
STUDENT NOTE SYSTEM 13
3
$quiz = $mydb->loadSingleResult();

$answer = $quiz->Answer;
$lessonid = $quiz->LessonID;

if ($answer == $value) {
# code...
$score= 1;
// echo 'Correct';
}else{
$score = 0;
// echo 'Wrong';
}

$sql = "SELECT * From tblscore WHERE ExerciseID = '{$exersiceid}' AND


StudentID='{$studentid}'";
$mydb->setQuery($sql);
$row = $mydb->executeQuery();
$maxrow = $mydb->num_rows($row);

if ($maxrow>0) {
$sql = "UPDATE tblscore SET Score='{$score}' WHERE ExerciseID = '{$exersiceid}'
AND StudentID='{$studentid}'";
$mydb->setQuery($sql);
$mydb->executeQuery();

}else{
$sql = "INSERT INTO tblscore (`LessonID`,`ExerciseID`, `StudentID`, `Score`)
VALUES ('{$lessonid}','{$exersiceid}','{$studentid}','{$score}')";
$mydb->setQuery($sql);
$mydb->executeQuery();
}
STUDENT NOTE SYSTEM 13
4
?>
Viewpdf.php

<?php
@$id = $_GET['id'];
if($id==''){
redirect("index.php");
}
$lesson = New Lesson();
$res = $lesson->single_lesson($id);

?>
<h2>View PDF File</h2>
<p style="font-size: 18px;font-weight: bold;">Chapter : <?php echo $res->LessonChapter;?> |
Title : <?php echo $res->LessonTitle;?></p>
<div class="container">
<embed src="<?php echo web_root.'admin/modules/lesson/'.$res->FileLocation; ?>"
type="application/pdf" width="100%" height="400px" />
</div>

Templates.php

<!DOCTYPE html>
<html lang="en">
<head>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">

STUDENT NOTE SYSTEM 13


5
<title>Student Notes </title>
<link type="text/css" href="<?php echo web_root;
?>e_admin/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link type="text/css" href="<?php echo web_root; ?>e_admin/bootstrap/css/bootstrap-
responsive.min.css" rel="stylesheet">
<link type="text/css" href="<?php echo web_root; ?>e_admin/css/theme.css"
rel="stylesheet">
<link type="text/css" href="<?php echo web_root; ?>e_admin/images/icons/css/font-
awesome.css" rel="stylesheet">
<link type="text/css" href='http://fonts.googleapis.com/css?
family=Open+Sans:400italic,600italic,400,600'
rel='stylesheet'>
<link rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/lightbox2/2.8.2/css/lightbox.min.css">
</head>
<body style="background:#eee">
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".navbar-inverse-
collapse">
<i class="icon-reorder shaded"></i></a><a class="brand"
href="index.html">Student Notes System </a>
<div class="nav-collapse collapse navbar-inverse-collapse">

<ul class="nav pull-right">


<li class="dropdown"><a href="#" class="dropdown-toggle" data-
toggle="dropdown">Add
<b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="<?php echo
web_root;?>admin/modules/exercises/index.php?view=add">Exercises</a></li>
<li><a href="<?php echo web_root;?>admin/modules/lesson/index.php?
view=add">Lesson</a></li>
</ul>
STUDENT NOTE SYSTEM 13
6
</li>
<li class="nav-user dropdown"><a href="#" class="dropdown-toggle" data-
toggle="dropdown">
<img src="images/user.png" class="nav-avatar" />
<b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="#">Your Profile</a></li>
<li><a href="#">Edit Profile</a></li>
<li class="divider"></li>
<li><a href="<?php echo
web_root;?>admin/logout.php">Logout</a></li>
</ul>
</li>
</ul>
</div>
<!-- /.nav-collapse -->
</div>
</div>
<!-- /navbar-inner -->
</div>
<!-- /navbar -->
<div class="wrapper" style="border:none">
<div class="container">
<div class="row">
<div class="span3">
<div class="sidebar">
<ul class="widget widget-menu unstyled">
<li class="active"><a href="<?php echo web_root; ?>/admin"><i
class="menu-icon icon-dashboard"></i>Dashboard
</a></li>
<li><a href="<?php echo web_root; ?>admin/modules/lesson/index.php"><i
class="menu-icon icon-bullhorn"></i>Lesson</a>

STUDENT NOTE SYSTEM 13


7
</li>
<!--
<li><a href="<?php echo web_root;
?>admin/modules/exercises/index.php"><i class="menu-icon icon-inbox"></i>Exercises <b
class="label green pull-right">
11</b> </a></li>
-->
</ul>
<!--/.widget-nav-->

<ul class="widget widget-menu unstyled">


<!--
<li><a href="<?php echo web_root; ?>admin/modules/galery/index.php"><i
class="menu-icon icon-bold"></i> Galery </a></li>-->
<li><a href="<?php echo web_root;
?>admin/modules/modstudent/index.php"><i class="menu-icon icon-bold"></i> Manage
Students </a></li>
<li><a href="<?php echo web_root; ?>admin/modules/user/index.php"><i
class="menu-icon icon-book"></i>Manage Users </a></li>
<li><a href="<?php echo web_root; ?>admin/modules/user/register.php"><i
class="menu-icon icon-book"></i>Student Registration</a></li>
</ul>
<!--/.widget-nav-->
<ul class="widget widget-menu unstyled">
<li><a href="<?php echo web_root;?>admin/logout.php"><i class ="menu-
icon icon-book"></i>Logout</a></li>
</ul>
</div>
<!--/.sidebar-->
</div>
<div class="span9">
<div class="content">

STUDENT NOTE SYSTEM 13


8
<div class="module">
<?php check_message(); ?>
<?php require_once $content;?>
</div>
</div>
</div>

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

<div class="footer"style="border:1px
solid;height:40px;padding:0px;position:fixed;bottom:0px;right:0;left:0;line-height:40px">
<div class="container">
<center><b class="copyright">&copy; 2021 Student Notes System </b>
</div>
</div>
<script src="<?php echo web_root; ?>e_admin/scripts/jquery-1.9.1.min.js"
type="text/javascript"></script>
<script src="<?php echo web_root; ?>e_admin/scripts/jquery-ui-1.10.1.custom.min.js"
type="text/javascript"></script>
<script src="<?php echo web_root; ?>e_admin/bootstrap/js/bootstrap.min.js"
type="text/javascript"></script>
<script src="<?php echo web_root; ?>e_admin/scripts/flot/jquery.flot.js"
type="text/javascript"></script>
<script src="<?php echo web_root; ?>e_admin/scripts/flot/jquery.flot.resize.js"
type="text/javascript"></script>
<script src="<?php echo web_root; ?>e_admin/scripts/datatables/jquery.dataTables.js"
type="text/javascript"></script>
<script src="<?php echo web_root; ?>e_admin/scripts/common.js"
type="text/javascript"></script>
<script src="<?php echo web_root;
?>e_admin/scripts/datatables/jquery.dataTables.js"></script>

STUDENT NOTE SYSTEM 13


9
<script src="https://cdnjs.cloudflare.com/ajax/libs/lightbox2/2.8.2/js/lightbox.min.js"></
script>
</body>
</html>

<script>
$(document).ready(function() {
$('.datatable-1').dataTable();
$('.dataTables_paginate').addClass("btn-group datatable-pagination");
$('.dataTables_paginate > a').wrapInner('<span />');
$('.dataTables_paginate > a:first-child').append('<i class="icon-chevron-left
shaded"></i>');
$('.dataTables_paginate > a:last-child').append('<i class="icon-chevron-right
shaded"></i>');
} );
</script>

CSS
Main.css

/*//////////////////////////////////////////////////////////////////
[ FONT ]*/

@font-face {
font-family: Poppins-Regular;
src: url('../fonts/poppins/Poppins-Regular.ttf');
}
STUDENT NOTE SYSTEM 14
0
@font-face {
font-family: Poppins-Bold;
src: url('../fonts/poppins/Poppins-Bold.ttf');
}

@font-face {
font-family: Poppins-Medium;
src: url('../fonts/poppins/Poppins-Medium.ttf');
}

@font-face {
font-family: Montserrat-Bold;
src: url('../fonts/montserrat/Montserrat-Bold.ttf');
}

/*//////////////////////////////////////////////////////////////////
[ RESTYLE TAG ]*/

*{
margin: 0px;
padding: 0px;
box-sizing: border-box;
}

body, html {
height: 100%;
font-family: Poppins-Regular, sans-serif;
}

/*---------------------------------------------*/
STUDENT NOTE SYSTEM 14
1
a{
font-family: Poppins-Regular;
font-size: 14px;
line-height: 1.7;
color: white;
margin: 0px;
transition: all 0.4s;
-webkit-transition: all 0.4s;
-o-transition: all 0.4s;
-moz-transition: all 0.4s;
}

a:focus {
outline: none !important;
}

a:hover {
text-decoration: none;
color: #57b846;
}

/*---------------------------------------------*/
h1,h2,h3,h4,h5,h6 {
margin: 0px;
}

p{
font-family: Poppins-Regular;
font-size: 14px;
line-height: 1.7;
color: #666666;
STUDENT NOTE SYSTEM 14
2
margin: 0px;
}

ul, li {
margin: 0px;
list-style-type: none;
}

/*---------------------------------------------*/
input {
outline: none;
border: none;
}

textarea {
outline: none;
border: none;
}

textarea:focus, input:focus {
border-color: transparent !important;
}

input:focus::-webkit-input-placeholder { color:transparent; }
input:focus:-moz-placeholder { color:transparent; }
input:focus::-moz-placeholder { color:transparent; }
input:focus:-ms-input-placeholder { color:transparent; }

textarea:focus::-webkit-input-placeholder { color:transparent; }
textarea:focus:-moz-placeholder { color:transparent; }
STUDENT NOTE SYSTEM 14
3
textarea:focus::-moz-placeholder { color:transparent; }
textarea:focus:-ms-input-placeholder { color:transparent; }

input::-webkit-input-placeholder { color: #999999; }


input:-moz-placeholder { color: #999999; }
input::-moz-placeholder { color: #999999; }
input:-ms-input-placeholder { color: #999999; }

textarea::-webkit-input-placeholder { color: #999999; }


textarea:-moz-placeholder { color: #999999; }
textarea::-moz-placeholder { color: #999999; }
textarea:-ms-input-placeholder { color: #999999; }

/*---------------------------------------------*/
button {
outline: none !important;
border: none;
background: transparent;
}

button:hover {
cursor: pointer;
}

iframe {
border: none !important;
}

/*//////////////////////////////////////////////////////////////////
[ Utility ]*/
STUDENT NOTE SYSTEM 14
4
.txt1 {
font-family: Poppins-Regular;
font-size: 13px;
line-height: 1.5;
color: #999999;
}

.txt2 {
font-family: Poppins-Regular;
font-size: 13px;
line-height: 1.5;
color: #666666;
}

/*//////////////////////////////////////////////////////////////////
[ login ]*/

.limiter {
width: 100%;
margin: 0 auto;
}

.container-login100 {
width: 100%;
min-height: 100vh;
display: -webkit-box;
display: -webkit-flex;
display: -moz-box;
display: -ms-flexbox;
display: flex;
STUDENT NOTE SYSTEM 14
5
flex-wrap: wrap;
justify-content: center;
align-items: center;
padding: 15px;
background: #ddd;
/* background: -webkit-linear-gradient(-135deg, #c850c0, #4158d0);
background: -o-linear-gradient(-135deg, #c850c0, #4158d0);
background: -moz-linear-gradient(-135deg, #c850c0, #4158d0);
background: linear-gradient(-135deg, #c850c0, #4158d0);*/
}

.wrap-login100 {
width: 960px;
background: #fff;
border-radius: 10px;
overflow: hidden;

display: -webkit-box;
display: -webkit-flex;
display: -moz-box;
display: -ms-flexbox;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
padding: 177px 130px 33px 95px;
}

/*------------------------------------------------------------------
[ ]*/
.login100-pic {
width: 316px;
STUDENT NOTE SYSTEM 14
6
}

.login100-pic img {
max-width: 100%;
}

/*------------------------------------------------------------------
[ ]*/
.login100-form {
width: 290px;
}

.login100-form-title {
font-family: Poppins-Bold;
font-size: 24px;
color: #333333;
line-height: 1.2;
text-align: center;

width: 100%;
display: block;
padding-bottom: 54px;
}

/*---------------------------------------------*/
.wrap-input100 {
position: relative;
width: 100%;
z-index: 1;
STUDENT NOTE SYSTEM 14
7
margin-bottom: 10px;
}

.input100 {
font-family: Poppins-Medium;
font-size: 15px;
line-height: 1.5;
color: #666666;

display: block;
width: 100%;
background: #e6e6e6;
height: 50px;
border-radius: 25px;
padding: 0 30px 0 68px;
}

/*------------------------------------------------------------------
[ Focus ]*/
.focus-input100 {
display: block;
position: absolute;
border-radius: 25px;
bottom: 0;
left: 0;
z-index: -1;
width: 100%;
height: 100%;
box-shadow: 0px 0px 0px 0px;
color: rgba(87,184,70, 0.8);
STUDENT NOTE SYSTEM 14
8
}

.input100:focus + .focus-input100 {
-webkit-animation: anim-shadow 0.5s ease-in-out forwards;
animation: anim-shadow 0.5s ease-in-out forwards;
}

@-webkit-keyframes anim-shadow {
to {
box-shadow: 0px 0px 70px 25px;
opacity: 0;
}
}

@keyframes anim-shadow {
to {
box-shadow: 0px 0px 70px 25px;
opacity: 0;
}
}

.symbol-input100 {
font-size: 15px;

display: -webkit-box;
display: -webkit-flex;
display: -moz-box;
display: -ms-flexbox;
display: flex;
align-items: center;
position: absolute;
STUDENT NOTE SYSTEM 14
9
border-radius: 25px;
bottom: 0;
left: 0;
width: 100%;
height: 100%;
padding-left: 35px;
pointer-events: none;
color: #666666;

-webkit-transition: all 0.4s;


-o-transition: all 0.4s;
-moz-transition: all 0.4s;
transition: all 0.4s;
}

.input100:focus + .focus-input100 + .symbol-input100 {


color: #57b846;
padding-left: 28px;
}

/*------------------------------------------------------------------
[ Button ]*/
.container-login100-form-btn {
width: 100%;
display: -webkit-box;
display: -webkit-flex;
display: -moz-box;
display: -ms-flexbox;
display: flex;
flex-wrap: wrap;
justify-content: center;
STUDENT NOTE SYSTEM 15
0
padding-top: 20px;
}

.login100-form-btn {
font-family: Montserrat-Bold;
font-size: 15px;
line-height: 1.5;
color: #fff;
text-transform: uppercase;

width: 100%;
height: 50px;
border-radius: 25px;
background: #57b846;
display: -webkit-box;
display: -webkit-flex;
display: -moz-box;
display: -ms-flexbox;
display: flex;
justify-content: center;
align-items: center;
padding: 0 25px;

-webkit-transition: all 0.4s;


-o-transition: all 0.4s;
-moz-transition: all 0.4s;
transition: all 0.4s;
}

.login100-form-btn:hover {
background: #333333;
STUDENT NOTE SYSTEM 15
1
}

/*------------------------------------------------------------------
[ Responsive ]*/

@media (max-width: 992px) {


.wrap-login100 {
padding: 177px 90px 33px 85px;
}

.login100-pic {
width: 35%;
}

.login100-form {
width: 50%;
}
}

@media (max-width: 768px) {


.wrap-login100 {
padding: 100px 80px 33px 80px;
}

.login100-pic {
display: none;
}
STUDENT NOTE SYSTEM 15
2
.login100-form {
width: 100%;
}
}

@media (max-width: 576px) {


.wrap-login100 {
padding: 100px 15px 33px 15px;
}
}

/*------------------------------------------------------------------
[ Alert validate ]*/

.validate-input {
position: relative;
}

.alert-validate::before {
content: attr(data-validate);
position: absolute;
max-width: 70%;
background-color: white;
border: 1px solid #c80000;
border-radius: 13px;
padding: 4px 25px 4px 10px;
top: 50%;
-webkit-transform: translateY(-50%);
-moz-transform: translateY(-50%);
STUDENT NOTE SYSTEM 15
3
-ms-transform: translateY(-50%);
-o-transform: translateY(-50%);
transform: translateY(-50%);
right: 8px;
pointer-events: none;

font-family: Poppins-Medium;
color: #c80000;
font-size: 13px;
line-height: 1.4;
text-align: left;

visibility: hidden;
opacity: 0;

-webkit-transition: opacity 0.4s;


-o-transition: opacity 0.4s;
-moz-transition: opacity 0.4s;
transition: opacity 0.4s;
}

.alert-validate::after {
content: "\f06a";
font-family: FontAwesome;
display: block;
position: absolute;
color: #c80000;
font-size: 15px;
top: 50%;
-webkit-transform: translateY(-50%);
-moz-transform: translateY(-50%);
STUDENT NOTE SYSTEM 15
4
-ms-transform: translateY(-50%);
-o-transform: translateY(-50%);
transform: translateY(-50%);
right: 13px;
}

.alert-validate:hover:before {
visibility: visible;
opacity: 1;
}

@media (max-width: 992px) {


.alert-validate::before {
visibility: visible;
opacity: 1;
}
}
Offcanvas.css

/*
* Style twaks
* --------------------------------------------------
*/
body {
padding-top: 70px;
}
footer {
padding-left: 15px;
padding-right: 15px;
}

STUDENT NOTE SYSTEM 15


5
/*
* Off Canvas
* --------------------------------------------------
*/
@media screen and (max-width: 768px) {
.row-offcanvas {
position: relative;
-webkit-transition: all 0.25s ease-out;
-moz-transition: all 0.25s ease-out;
transition: all 0.25s ease-out;
}

.row-offcanvas-right
.sidebar-offcanvas {
right: -50%; /* 6 columns */
}

.row-offcanvas-left
.sidebar-offcanvas {
left: -50%; /* 6 columns */
}

.row-offcanvas-right.active {
right: 50%; /* 6 columns */
}

.row-offcanvas-left.active {
left: 50%; /* 6 columns */
}

.sidebar-offcanvas {
STUDENT NOTE SYSTEM 15
6
position: absolute;
top: 0;
width: 50%; /* 6 columns */
}
.margin{
margin-right: 100%;
}
.alignment {
vertical-align: 50%
}
}

.navbar-magbanua {
background-color: #0000FF;
/*border-color: #0000FF;*/
border: 1px solid #ffffff;
}

.navbar-magbanua .navbar-brand {
color: #ffffff;
}

.navbar-magbanua .navbar-brand:hover,
.navbar-magbanua .navbar-brand:focus {
color: #000000;
/*background-color: #ffffff;*/
}

.navbar-magbanua .navbar-text {
color: #ffffff;
}
STUDENT NOTE SYSTEM 15
7
.navbar-magbanua .navbar-nav > li > a {
color: #ffffff;
}

.navbar-magbanua .navbar-nav > li > a:hover,


.navbar-magbanua .navbar-nav > li > a:focus {
color: #000000;
background-color: #ffffff;
}

.navbar-magbanua .navbar-nav > .active > a,


.navbar-magbanua .navbar-nav > .active > a:hover,
.navbar-magbanua .navbar-nav > .active > a:focus {
color: #000000;
background-color: #ffffff;
}

.navbar-magbanua .navbar-nav > .disabled > a,


.navbar-magbanua .navbar-nav > .disabled > a:hover,
.navbar-magbanua .navbar-nav > .disabled > a:focus {
color: #444444;
background-color: transparent;
}

.navbar-magbanua .navbar-toggle {
border-color: #0000FF;
}

.navbar-magbanua .navbar-toggle:hover,
.navbar-magbanua .navbar-toggle:focus {
STUDENT NOTE SYSTEM 15
8
background-color: #c1d849;
}

.navbar-magbanua .navbar-toggle .icon-bar {


background-color: #ffffff;
}

.navbar-magbanua .navbar-collapse,
.navbar-magbanua .navbar-form {
border-color: #101010;
}

.navbar-magbanua .navbar-nav > .open > a,


.navbar-magbanua .navbar-nav > .open > a:hover,
.navbar-magbanua .navbar-nav > .open > a:focus {
color: #000000;
background-color: #ffffff;
}

.navbar-magbanua .navbar-nav > .dropdown > a:hover .caret {


border-top-color: #ffffff;
border-bottom-color: #ffffff;
}

.navbar-magbanua .navbar-nav > .dropdown > a .caret {


border-top-color: #ffffff;
border-bottom-color: #ffffff;
}

.navbar-magbanua .navbar-nav > .open > a .caret,


.navbar-magbanua .navbar-nav > .open > a:hover .caret,
STUDENT NOTE SYSTEM 15
9
.navbar-magbanua .navbar-nav > .open > a:focus .caret {
border-top-color: #ffffff;
border-bottom-color: #ffffff;
}

@media (max-width: 767px) {


.navbar-magbanua .navbar-nav .open .dropdown-menu > .dropdown-header {
border-color: #0000FF;
}
.navbar-magbanua .navbar-nav .open .dropdown-menu > li > a {
color: #ffffff;
}
.navbar-magbanua .navbar-nav .open .dropdown-menu > li > a:hover,
.navbar-magbanua .navbar-nav .open .dropdown-menu > li > a:focus {
color: #000000;
background-color: #ffffff;
}
.navbar-magbanua .navbar-nav .open .dropdown-menu > .active > a,
.navbar-magbanua .navbar-nav .open .dropdown-menu > .active > a:hover,
.navbar-magbanua .navbar-nav .open .dropdown-menu > .active > a:focus {
color: #000000;
background-color: #ffffff;
}
.navbar-magbanua .navbar-nav .open .dropdown-menu > .disabled > a,
.navbar-magbanua .navbar-nav .open .dropdown-menu > .disabled > a:hover,
.navbar-magbanua .navbar-nav .open .dropdown-menu > .disabled > a:focus {
color: #000000;
background-color: #ffffff;
}
}

STUDENT NOTE SYSTEM 16


0
.navbar-magbanua .navbar-link {
color: #ffffff;
}

.navbar-magbanua .navbar-link:hover {
color: #ffffff;
}
Style.css

/*
http://www.freshdesignweb.com/beautiful-registration-form-with-html5-and-css3.html
*/

.form{
background:#8c4444; width:470px; margin:0 auto; padding-left:50px; padding-top:20px;
}
.form fieldset{border:0px; padding:0px; margin:0px;}
.form p.contact { font-size: 12px; margin:0px 0px 10px 0;line-height: 14px; font-family:Arial,
Helvetica;}

.form input[type="text"] { width: 400px; }


.form input[type="email"] { width: 400px; }
.form input[type="password"] { width: 400px; }
.form input.birthday{width:60px;}
.form input.birthyear{width:120px;}
.form label { color: #000; font-weight:bold;font-size: 12px;font-family:Arial, Helvetica; }
.form label.month {width: 135px;}
.form input, textarea { background-color:white; border: 1px solid rgba(122, 192, 0, 0.15);
padding: 7px; font-family: Keffeesatz, Arial; color: #4b4b4b; font-size: 14px; -webkit-border-
radius: 5px; margin-bottom: 15px; margin-top: -10px; }
.form input:focus, textarea:focus { border: 1px solid #ff5400; background-color: rgba(255, 255,
255, 1); }

STUDENT NOTE SYSTEM 16


1
.form .select-style {
-webkit-appearance: button;
-webkit-border-radius: 2px;
-webkit-box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1);
-webkit-padding-end: 20px;
-webkit-padding-start: 2px;
-webkit-user-select: none;
background-image: url(images/select-arrow.png),
-webkit-linear-gradient(#FAFAFA, #F4F4F4 40%, #E5E5E5);
background-position: center right;
background-repeat: no-repeat;
border: 0px solid #FFF;
color: #555;
font-size: inherit;
margin: 0;
overflow: hidden;
padding-top: 5px;
padding-bottom: 5px;
text-overflow: ellipsis;
white-space: nowrap;}
.form .gender {
width:410px;
}
.form input.buttom{ background: #4b8df9; display: inline-block; padding: 5px 10px 6px; color:
#fbf7f7; text-decoration: none; font-weight: bold; line-height: 1; -moz-border-radius: 5px; -
webkit-border-radius: 5px; border-radius: 5px; -moz-box-shadow: 0 1px 3px #999; -webkit-box-
shadow: 0 1px 3px #999; box-shadow: 0 1px 3px #999; text-shadow: 0 -1px 1px #222; border:
none; position: relative; cursor: pointer; font-size: 14px; font-family:Verdana, Geneva, sans-
serif;}
.form input.buttom:hover { background-color: #2a78f6; }
Style3.css

STUDENT NOTE SYSTEM 16


2
body{
background-color:white;
margin:0;
padding:0;
font-family:Poppins;
}
.navbar{
position:fixed;
display:flex;
justify-content:center;
align-items:center;
flex-direction:row;
flex-wrap:wrap;
background-color:#712f34;
width:100%;
height:70px;
z-index:1;

}
.nav{
display:flex;
justify-content:right;
list-style:none;
margin-right:15%;

}
.logo{
flex: 1 1 auto;
margin-left:10%;
text-transform: uppercase;
STUDENT NOTE SYSTEM 16
3
letter-spacing: 1px;
font-weight:bold;
font-size: 35px;
}
a{
margin: 15px;
color: white;
text-decoration:none;
text-transform:uppercase;

}
a:hover{
color: #000;

}
.banner-area{
position:relative;
background-image:url(images/trade.jpg);
width:100%;
height:100vh;

background-repeat:no-repeat;
-webkit-background-size:cover;
background-size:cover;

STUDENT NOTE SYSTEM 16


4
APPENDIX C

STUDENT NOTE SYSTEM 16


5
PROOF OF
DEVELOPMENT

STUDENT NOTE SYSTEM 16


6
STUDENT NOTE SYSTEM 16
7
In this picture you can see our hard work of doing our system. The researchers conduct
an overnight work to chase the due date of submission, first thing we do is to fix our system
again and review our system to ensure that there is no error. Christian Sanoh is the developer of
our system and Karl Marcos is the one who will make the documents and Jacob Candido he is
assigned to make a diagram for our system.

STUDENT NOTE SYSTEM 16


8

You might also like