Report
Report
Finally, I also grateful to my parents and friends for their support, encouragement
and backing for achieving this goal of completing this project successfully.
Abstract
Chapter -1 Introduction
5.1 Admin........................................................................................................... 16
Chapter -6 ER Diagram
6.1 ER Diagram................................................................................................ 21
Chapter -8 Testing
Conclusion… .................................................................................................. 57
Task management system
CHAPTER-1
INTRODUCTION
1.1. OBJECTIVES
MMICT&BM 7
Task management system
1. Create and Assign Tasks: Allow detailed task creation and assignment to
team members.
2. Track Progress: Provide real-time updates on task status.
3. Enhance Collaboration: Integrate communication tools for seamless team
interaction.
4. Manage Resources: Optimize allocation and usage of resources.
5. Generate Reports: Offer comprehensive reporting tools for performance
insights.
6. User Management: Implement robust user roles and access control.
1.3 FEATURES
1 Task Creation: Users can create tasks with detailed descriptions, due dates,
and associated tags or categories.
2 Task Assignment: Tasks can be assigned to specific users or team members,
with notifications and reminders to ensure timely completion.
3 Priority Levels: Tasks can be prioritized based on importance, urgency, or
other criteria set by the user.
4 Status Tracking: Users can update the status of tasks (e.g., "Not Started," "In
Progress," "Completed"), providing visibility into the progress of individual or
team tasks.
5 Collaborative Tools: The system supports collaboration, allowing multiple
users to work on the same task, share files, and communicate within the
platform.
MMICT&BM 8
Task management system
CHAPTER-2
SYSTEM REQUIREMENTS
9.5.HARDWARE REQUIREMENTS
9.6.SOFFWARE REQUIREMENTS
3 Database MySQL
MMICT&BM 9
Task management system
CHAPTER-3
FEASIBILITY STUDY
The major phases involved in the MIS development process are referred to as
system development life cycle. Each phase of the development process must have
well defined objectives, and at the end of each phase, progress towards meeting
the objectives must be evaluated.
The development process should not continue until the objectives of all prior
phases have been met.
The system development life cycle can be divided into seven phases as shown
Fig-1.1
MMICT&BM 11
Task management system
CHAPTER-4
SOFTWARE COMPONENTS
Features of PHP:
We have learned about PHP and its uses. But what are the features that make
PHP popular. Now that we have a basic understanding of PHP, let us see some of
the most striking features of PHP .It is a very popular language because it is
simple and is open-source. There are many convincing reasons for why you
should be using PHP, some of them being:
MMICT&BM 12
Task management system
While html uses tags, CSS uses rulesets. CSS is easy to learn and
understand, but it provides powerful control over the presentation of an HTML
document.
CSS saves time: You can write CSS once and reuse the same sheet in
multiple HTML pages.
Easy Maintenance: To make a global change simply change the style, and
all elements in all the webpages will be updated automatically.
Search Engines: CSS is considered a clean coding technique, which means
search engines won’t have to struggle to “read” its content.
Superior styles to HTML: CSS has a much wider array of attributes than
HTML, so you can give a far better look to your HTML page in comparison
to HTML attributes.
Offline Browsing: CSS can store web applications locally with the help of
an offline cache. Using this we can view offline websites.
MMICT&BM 13
Task management system
This section is dedicated to the JavaScript language itself, and not the parts
that are specific to Web pages or other host environments. For information about
APIs that are specific to Web pages, please see web APIs and DOM.
HTML stands for Hyper Text Markup Language. It is used to design web
pages using a markup language. HTML is the combination of Hypertext and
Markup language. Hypertext defines the link between web pages. A markup
language is used to define the text document within the tag which defines the
structure of web pages. This language is used to annotate (make notes for the
computer) text so that a machine can understand it and manipulate text
accordingly. Most markup languages (e.g. HTML) are human-readable. The
language uses tags to define what manipulation has to be done on the text.
HTML uses predefined tags and elements which tell the browser how to properly
display the content. Remember to include closing tags. If omitted, the browser
MMICT&BM 14
Task management system
applies the effect of the opening tag until the end of the page.
Features of HTML:
MMICT&BM 15
Task management system
CHAPTER-5
DATABASE TABLE
5.1 Admin
NAME TYPE
id int(11)
name Varchar(53)
email Varchar(50)
password Varchar(50)
5.2 User
NAME TYPE
id int(11)
Email Varchar(50)
MMICT&BM 16
Task management system
Password Varchar(100)
NAME TYPE
Id int(11)
Name Varchar(30)
Description text
Status Tinyint(2)
Manager id Int(30)
User id text
MMICT&BM 17
Task management system
NAME TYPE
id int(30)
name Varchar(30)
email Varchar(30)
contact varchar(20)
address text
MMICT&BM 18
Task management system
NAME TYPE
id int(30)
Project id Int(30)
task varchar(200)
description text
status Tinyint(4)
Date time
Date created
MMICT&BM 19
Task management system
NAME TYPE
id int(30)
Project id Int(30)
Task id Int(30)
comment text
subject varchar(200)
date date
User id Int(30)
MMICT&BM 20
Task management system
CHAPTER-6
View user
Add user
Task
ADMIN SYSTEM
Project
Fig-1.1
6.2 ER Diagram :
Fig-1.2
MMICT&BM 21
Task management system
A graphical tool used to describe and analysis the movement of data through
a system is called data flow diagram. Data flow diagram is the central basis, from
which other components are developed, the transformation of data from input to
output, through process, may be described logically and independent of the
physical components associated with the system.
1. Physical DFD
2. Logical DFD
1. Physical DFD
2. Logical DFD
Logical DFD are the model of proposed system. They clearly should show
the requirement non which the new system should be built. Later during the
design activity this taken has basis for drawing the system structure charts.
MMICT&BM 22
Task management system
Fig-1.3
MMICT&BM 23
Task management system
CHAPTER-7
SNAPSHOTS OF THE PROJECT
Login Page-
Admin Dashboard-
MMICT&BM 24
Task management system
MMICT&BM 25
Task management system
Employee Dashboard-
Project List-
MMICT&BM 26
Task management system
Task List-
Report-
MMICT&BM 27
Task management system
CHAPTER-8
TESTING
Unit testing, a testing technique using which individual modules are tested
to determine if there are any issues by the developer himself. It is concerned with
functional correctness of the standalone modules. The main aim is to isolate each
unit of the system to identify, analyze and fix the defects.
Black Box Testing- Using which the user interface, input and output are
tested.
White Box Testing- used to test each one of those functions’ behavior is
tested.
MMICT&BM 28
Task management system
Advantages:
Disadvantages
MMICT&BM 29
Task management system
Advantages
Side effects of having the knowledge of the source code are beneficial to
thorough testing.
Optimization of code becomes easy as inconspicuous bottlenecks are
exposed Gives the programmer introspection because developers carefully
describe any new implementation.
Provides traceability of tests from the source, thereby allowing future
changes to the source to be easily captured in the newly added or modified
tests.
Easy to automate.
Provides clear, engineering-based rules for when to stop testing.
Disadvantages
White-box testing brings complexity to testing because the tester must have
knowledge of the program, including being a programmer. Whitebox
testing requires a programmer with a high level of knowledge due to the
complexity of the level of testing that needs to be done.
On some occasions, it is not realistic to be able to test every single existing
condition of the application and some conditions will be untested.
MMICT&BM 30
Task management system
CHAPTETR-9
9.1 Admin
<!DOCTYPE html>
<html lang="en">
<?php session_start() ?>
<?php
if(!isset($_SESSION['login_id']))
header('location:login.php');
include 'db_connect.php';
ob_start();
if(!isset($_SESSION['system'])){
include 'header.php'
?>
<body class="hold-transition sidebar-mini layout-fixed layout-navbar-fixed layout-footer-
fixed">
<div class="wrapper">
<?php include 'topbar.php' ?>
<?php include 'sidebar.php' ?>
<section class="content">
<div class="container-fluid">
<?php
$page = isset($_GET['page']) ? $_GET['page'] : 'home';
if(!file_exists($page.".php")){
include '404.html';
}else{
include $page.'.php';
}
?>
</div><!--/. container-fluid -->
</section>
<!-- /.content -->
<div class="modal fade" id="confirm_modal" role='dialog'>
<div class="modal-dialog modal-md" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Confirmation</h5>
</div>
<div class="modal-body">
<div id="delete_content"></div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" id='confirm' onclick="">Continue</button>
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="uni_modal" role='dialog'>
<div class="modal-dialog modal-md" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title"></h5>
</div>
<div class="modal-body">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" id='submit' onclick="$('#uni_modal
form').submit()">Save</button>
<button type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="uni_modal_right" role='dialog'>
<div class="modal-dialog modal-full-height modal-md" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title"></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span class="fa fa-arrow-right"></span>
MMICT&BM 32
Task management system
</button>
</div>
<div class="modal-body">
</div>
</div>
</div>
</div>
<div class="modal fade" id="viewer_modal" role='dialog'>
<div class="modal-dialog modal-md" role="document">
<div class="modal-content">
<button type="button" class="btn-close" data-dismiss="modal"><span class="fa fa-
times"></span></button>
<img src="" alt="">
</div>
</div>
</div>
</div>
<!-- /.content-wrapper -->
MMICT&BM 33
Task management system
<!DOCTYPE html>
<html lang="en">
<?php
session_start();
include('./db_connect.php');
ob_start();
// if(!isset($_SESSION['system'])){
?>
<?php include 'header.php' ?>
<body class="hold-transition login-page bg-black">
<div class="login-box">
<div class="login-logo">
<a href="#" class="text-white"><b><?php echo $_SESSION['system']['name'] ?> -
Admin</b></a>
</div>
<!-- /.login-logo -->
<div class="card">
<div class="card-body login-card-body">
<form action="" id="login-form">
<div class="input-group mb-3">
<input type="email" class="form-control" name="email" required placeholder="Email">
<div class="input-group-append">
<div class="input-group-text">
<span class="fas fa-envelope"></span>
</div>
</div>
</div>
<div class="input-group mb-3">
<input type="password" class="form-control" name="password" required
placeholder="Password">
<div class="input-group-append">
<div class="input-group-text">
<span class="fas fa-lock"></span>
</div>
</div>
</div>
<div class="row">
<div class="col-8">
MMICT&BM 34
Task management system
<div class="icheck-primary">
<input type="checkbox" id="remember">
<label for="remember">
Remember Me
</label>
</div>
</div>
<!-- /.col -->
<div class="col-4">
<button type="submit" class="btn btn-primary btn-block">Sign In</button>
</div>
<!-- /.col -->
</div>
</form>
</div>
<!-- /.login-card-body -->
</div>
</div>
<!-- /.login-box -->
<script>
$(document).ready(function(){
$('#login-form').submit(function(e){
e.preventDefault()
start_load()
if($(this).find('.alert-danger').length > 0 )
$(this).find('.alert-danger').remove();
$.ajax({
url:'ajax.php?action=login',
method:'POST',
data:$(this).serialize(),
error:err=>{
console.log(err)
end_load();
},
success:function(resp){
if(resp == 1){
location.href ='index.php?page=home';
}else{
$('#login-form').prepend('<div class="alert alert-danger">Username or password is
incorrect.</div>')
end_load();
}
}
})
})
})
</script>
<?php include 'footer.php' ?>
</body>
</html>
MMICT&BM 35
Task management system
9.3 Dashboard
<?php include('db_connect.php') ?>
<?php
$twhere ="";
if($_SESSION['login_type'] != 1)
$twhere = " ";
?>
<!-- Info boxes -->
<div class="col-12">
<div class="card">
<div class="card-body">
Welcome <?php echo $_SESSION['login_name'] ?>!
</div>
</div>
</div>
<hr>
<?php
$where = "";
if($_SESSION['login_type'] == 2){
$where = " where manager_id = '{$_SESSION['login_id']}' ";
}elseif($_SESSION['login_type'] == 3){
$where = " where concat('[',REPLACE(user_ids,',','],['),']') LIKE
'%[{$_SESSION['login_id']}]%' ";
}
$where2 = "";
if($_SESSION['login_type'] == 2){
$where2 = " where p.manager_id = '{$_SESSION['login_id']}' ";
}elseif($_SESSION['login_type'] == 3){
$where2 = " where concat('[',REPLACE(p.user_ids,',','],['),']') LIKE
'%[{$_SESSION['login_id']}]%' ";
}
?>
<div class="row">
<div class="col-md-8">
<div class="card card-outline card-success">
<div class="card-header">
<b>Project Progress</b>
</div>
<div class="card-body p-0">
<div class="table-responsive">
<table class="table m-0 table-hover">
<colgroup>
<col width="5%">
<col width="30%">
<col width="35%">
<col width="15%">
MMICT&BM 36
Task management system
<col width="15%">
</colgroup>
<thead>
<th>#</th>
<th>Project</th>
<th>Progress</th>
<th>Status</th>
<th></th>
</thead>
<tbody>
<?php
$i = 1;
$stat = array("Pending","Started","On-Progress","On-Hold","Over Due","Done");
$where = "";
if($_SESSION['login_type'] == 2){
$where = " where manager_id = '{$_SESSION['login_id']}' ";
}elseif($_SESSION['login_type'] == 3){
$where = " where concat('[',REPLACE(user_ids,',','],['),']') LIKE
'%[{$_SESSION['login_id']}]%' ";
}
$qry = $conn->query("SELECT * FROM project_list $where order by name asc");
while($row= $qry->fetch_assoc()):
$prog= 0;
$tprog = $conn->query("SELECT * FROM task_list where project_id =
{$row['id']}")->num_rows;
$cprog = $conn->query("SELECT * FROM task_list where project_id = {$row['id']}
and status = 3")->num_rows;
$prog = $tprog > 0 ? ($cprog/$tprog) * 100 : 0;
$prog = $prog > 0 ? number_format($prog,2) : $prog;
$prod = $conn->query("SELECT * FROM user_productivity where project_id =
{$row['id']}")->num_rows;
if($row['status'] == 0 && strtotime(date('Y-m-d')) >= strtotime($row['start_date'])):
if($prod > 0 || $cprog > 0)
$row['status'] = 2;
else
$row['status'] = 1;
elseif($row['status'] == 0 && strtotime(date('Y-m-d')) > strtotime($row['end_date'])):
$row['status'] = 4;
endif;
?>
<tr>
<td>
<?php echo $i++ ?>
</td>
<td>
<a>
<?php echo ucwords($row['name']) ?>
</a>
<br>
<small>
Due: <?php echo date("Y-m-d",strtotime($row['end_date'])) ?>
MMICT&BM 37
Task management system
</small>
</td>
<td class="project_progress">
<div class="progress progress-sm">
<div class="progress-bar bg-green" role="progressbar" aria-valuenow="57"
aria-valuemin="0" aria-valuemax="100" style="width: <?php echo $prog ?>%">
</div>
</div>
<small>
<?php echo $prog ?>% Complete
</small>
</td>
<td class="project-state">
<?php
if($stat[$row['status']] =='Pending'){
echo "<span class='badge badge-secondary'>{$stat[$row['status']]}</span>";
}elseif($stat[$row['status']] =='Started'){
echo "<span class='badge badge-primary'>{$stat[$row['status']]}</span>";
}elseif($stat[$row['status']] =='On-Progress'){
echo "<span class='badge badge-info'>{$stat[$row['status']]}</span>";
}elseif($stat[$row['status']] =='On-Hold'){
echo "<span class='badge badge-warning'>{$stat[$row['status']]}</span>";
}elseif($stat[$row['status']] =='Over Due'){
echo "<span class='badge badge-danger'>{$stat[$row['status']]}</span>";
}elseif($stat[$row['status']] =='Done'){
echo "<span class='badge badge-success'>{$stat[$row['status']]}</span>";
}
?>
</td>
<td>
<a class="btn btn-primary btn-sm"
href="./index.php?page=view_project&id=<?php echo $row['id'] ?>">
<i class="fas fa-folder">
</i>
View
</a>
</td>
</tr>
<?php endwhile; ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div class="col-md-4">
<div class="row">
<div class="col-12 col-sm-6 col-md-12">
<div class="small-box bg-light shadow-sm border">
<div class="inner">
<h3><?php echo $conn->query("SELECT * FROM project_list $where")->num_rows;
MMICT&BM 38
Task management system
?></h3>
<p>Total Projects</p>
</div>
<div class="icon">
<i class="fa fa-layer-group"></i>
</div>
</div>
</div>
<div class="col-12 col-sm-6 col-md-12">
<div class="small-box bg-light shadow-sm border">
<div class="inner">
<h3><?php echo $conn->query("SELECT t.*,p.name as pname,p.start_date,p.status as
pstatus, p.end_date,p.id as pid FROM task_list t inner join project_list p on p.id = t.project_id
$where2")->num_rows; ?></h3>
<p>Total Tasks</p>
</div>
<div class="icon">
<i class="fa fa-tasks"></i>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="form-group">
<label for="" class="control-label">User
Role</label>
<select name="type" id="type"
class="custom-select custom-select-sm">
<option value="3" <?php echo
isset($type) && $type == 3 ? 'selected' : '' ?>>Employee</option>
<option value="2" <?php echo
isset($type) && $type == 2 ? 'selected' : '' ?>>Project Manager</option>
<option value="1" <?php echo
isset($type) && $type == 1 ? 'selected' : '' ?>>Admin</option>
</select>
</div>
<?php else: ?>
<input type="hidden" name="type"
value="3">
<?php endif; ?>
<div class="form-group">
<label for="" class="control-
label">Avatar</label>
<div class="custom-file">
<input type="file" class="custom-file-input" id="customFile"
name="img" onchange="displayImg(this,$(this))">
<label class="custom-file-label" for="customFile">Choose
file</label>
</div>
</div>
<div class="form-group d-flex justify-content-
center align-items-center">
<img src="<?php echo isset($avatar) ?
'assets/uploads/'.$avatar :'' ?>" alt="Avatar" id="cimg" class="img-fluid img-thumbnail ">
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="control-label">Email</label>
<input type="email" class="form-control
form-control-sm" name="email" required value="<?php echo isset($email) ? $email : '' ?>">
<small id="#msg"></small>
</div>
<div class="form-group">
<label class="control-
label">Password</label>
<input type="password" class="form-
control form-control-sm" name="password" <?php echo !isset($id) ? "required":'' ?>>
<small><i><?php echo isset($id) ? "Leave
this blank if you dont want to change you password":'' ?></i></small>
</div>
<div class="form-group">
<label class="label control-label">Confirm
Password</label>
<input type="password" class="form-
MMICT&BM 40
Task management system
reader.readAsDataURL(input.files[0]);
}
}
$('#manage_user').submit(function(e){
e.preventDefault()
$('input').removeClass("border-danger")
MMICT&BM 41
Task management system
start_load()
$('#msg').html('')
if($('[name="password"]').val() != '' && $('[name="cpass"]').val() != ''){
if($('#pass_match').attr('data-status') != 1){
if($("[name='password']").val() !=''){
$('[name="password"],[name="cpass"]').addClass("border-
danger")
end_load()
return false;
}
}
}
$.ajax({
url:'ajax.php?action=save_user',
data: new FormData($(this)[0]),
cache: false,
contentType: false,
processData: false,
method: 'POST',
type: 'POST',
success:function(resp){
if(resp == 1){
alert_toast('Data successfully saved.',"success");
setTimeout(function(){
location.replace('index.php?page=user_list')
},750)
}else if(resp == 2){
$('#msg').html("<div class='alert alert-danger'>Email
already exist.</div>");
$('[name="email"]').addClass("border-danger")
end_load()
}
}
})
})
</script>
<th class="text-center">#</th>
<th>Name</th>
<th>Email</th>
<th>Role</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php
$i = 1;
$type = array('',"Admin","Project Manager","Employee");
$qry = $conn->query("SELECT *,concat(firstname,'
',lastname) as name FROM users order by concat(firstname,' ',lastname) asc");
while($row= $qry->fetch_assoc()):
?>
<tr>
<th class="text-center"><?php echo $i++ ?></th>
<td><b><?php echo ucwords($row['name'])
?></b></td>
<td><b><?php echo $row['email'] ?></b></td>
<td><b><?php echo $type[$row['type']]
?></b></td>
<td class="text-center">
<button type="button" class="btn btn-
default btn-sm btn-flat border-info wave-effect text-info dropdown-toggle" data-
toggle="dropdown" aria-expanded="true">
Action
</button>
<div class="dropdown-menu" style="">
<a class="dropdown-item view_user" href="javascript:void(0)"
data-id="<?php echo $row['id'] ?>">View</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item"
href="./index.php?page=edit_user&id=<?php echo $row['id'] ?>">Edit</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item delete_user" href="javascript:void(0)"
data-id="<?php echo $row['id'] ?>">Delete</a>
</div>
</td>
</tr>
<?php endwhile; ?>
</tbody>
</table>
</div>
</div>
</div>
<script>
$(document).ready(function(){
$('#list').dataTable()
$('.view_user').click(function(){
uni_modal("<i class='fa fa-id-card'></i> User
Details","view_user.php?id="+$(this).attr('data-id'))
})
MMICT&BM 43
Task management system
$('.delete_user').click(function(){
_conf("Are you sure to delete this user?","delete_user",[$(this).attr('data-id')])
})
})
function delete_user($id){
start_load()
$.ajax({
url:'ajax.php?action=delete_user',
method:'POST',
data:{id:$id},
success:function(resp){
if(resp==1){
alert_toast("Data successfully deleted",'success')
setTimeout(function(){
location.reload()
},1500)
}
}
})
}
</script>
MMICT&BM 44
Task management system
<th>Project</th>
<th>Date Started</th>
<th>Due Date</th>
<th>Status</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php
$i = 1;
$stat = array("Pending","Started","On-Progress","On-
Hold","Over Due","Done");
$where = "";
if($_SESSION['login_type'] == 2){
$where = " where manager_id =
'{$_SESSION['login_id']}' ";
}elseif($_SESSION['login_type'] == 3){
$where = " where
concat('[',REPLACE(user_ids,',','],['),']') LIKE '%[{$_SESSION['login_id']}]%' ";
}
$qry = $conn->query("SELECT * FROM project_list
$where order by name asc");
while($row= $qry->fetch_assoc()):
$trans =
get_html_translation_table(HTML_ENTITIES,ENT_QUOTES);
unset($trans["\""], $trans["<"], $trans[">"],
$trans["<h2"]);
$desc =
strtr(html_entity_decode($row['description']),$trans);
$desc=str_replace(array("<li>","</li>"), array("",",
"), $desc);
<td>
<p><b><?php echo ucwords($row['name'])
?></b></p>
<p class="truncate"><?php echo
strip_tags($desc) ?></p>
</td>
<td><b><?php echo date("M d,
Y",strtotime($row['start_date'])) ?></b></td>
<td><b><?php echo date("M d,
Y",strtotime($row['end_date'])) ?></b></td>
<td class="text-center">
<?php
if($stat[$row['status']] =='Pending'){
echo "<span class='badge badge-
secondary'>{$stat[$row['status']]}</span>";
}elseif($stat[$row['status']] =='Started'){
echo "<span class='badge badge-
primary'>{$stat[$row['status']]}</span>";
}elseif($stat[$row['status']] =='On-
Progress'){
echo "<span class='badge badge-
info'>{$stat[$row['status']]}</span>";
}elseif($stat[$row['status']] =='On-Hold'){
echo "<span class='badge badge-
warning'>{$stat[$row['status']]}</span>";
}elseif($stat[$row['status']] =='Over Due'){
echo "<span class='badge badge-
danger'>{$stat[$row['status']]}</span>";
}elseif($stat[$row['status']] =='Done'){
echo "<span class='badge badge-
success'>{$stat[$row['status']]}</span>";
}
?>
</td>
<td class="text-center">
<button type="button" class="btn btn-
default btn-sm btn-flat border-info wave-effect text-info dropdown-toggle" data-
toggle="dropdown" aria-expanded="true">
Action
</button>
<div class="dropdown-menu" style="">
<a class="dropdown-item view_project"
href="./index.php?page=view_project&id=<?php echo $row['id'] ?>" data-id="<?php echo
$row['id'] ?>">View</a>
<div class="dropdown-divider"></div>
<?php if($_SESSION['login_type'] != 3): ?>
<a class="dropdown-item"
href="./index.php?page=edit_project&id=<?php echo $row['id'] ?>">Edit</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item delete_project" href="javascript:void(0)"
data-id="<?php echo $row['id'] ?>">Delete</a>
<?php endif; ?>
</div>
MMICT&BM 46
Task management system
</td>
</tr>
<?php endwhile; ?>
</tbody>
</table>
</div>
</div>
</div>
<style>
table p{
margin: unset !important;
}
table td{
vertical-align: middle !important
}
</style>
<script>
$(document).ready(function(){
$('#list').dataTable()
$('.delete_project').click(function(){
_conf("Are you sure to delete this project?","delete_project",[$(this).attr('data-id')])
})
})
function delete_project($id){
start_load()
$.ajax({
url:'ajax.php?action=delete_project',
method:'POST',
data:{id:$id},
success:function(resp){
if(resp==1){
alert_toast("Data successfully deleted",'success')
setTimeout(function(){
location.reload()
},1500)
}
}
})
}
</script>
MMICT&BM 47
Task management system
$stat = array("Pending","Started","On-Progress","On-
Hold","Over Due","Done");
$qry = $conn->query("SELECT t.*,p.name as
pname,p.start_date,p.status as pstatus, p.end_date,p.id as pid FROM task_list t inner join
project_list p on p.id = t.project_id $where order by p.name asc");
while($row= $qry->fetch_assoc()):
$trans =
get_html_translation_table(HTML_ENTITIES,ENT_QUOTES);
unset($trans["\""], $trans["<"], $trans[">"],
$trans["<h2"]);
$desc =
strtr(html_entity_decode($row['description']),$trans);
$desc=str_replace(array("<li>","</li>"), array("",",
MMICT&BM 48
Task management system
"), $desc);
$tprog = $conn->query("SELECT * FROM
task_list where project_id = {$row['pid']}")->num_rows;
$cprog = $conn->query("SELECT * FROM task_list where project_id
= {$row['pid']} and status = 3")->num_rows;
$prog = $tprog > 0 ? ($cprog/$tprog) * 100 : 0;
$prog = $prog > 0 ? number_format($prog,2) : $prog;
$prod = $conn->query("SELECT * FROM user_productivity where
project_id = {$row['pid']}")->num_rows;
if($row['pstatus'] == 0 && strtotime(date('Y-m-d')) >=
strtotime($row['start_date'])):
if($prod > 0 || $cprog > 0)
$row['pstatus'] = 2;
else
$row['pstatus'] = 1;
elseif($row['pstatus'] == 0 && strtotime(date('Y-m-d')) >
strtotime($row['end_date'])):
$row['pstatus'] = 4;
endif;
?>
<tr>
<td class="text-center"><?php echo $i++ ?></td>
<td>
<p><b><?php echo ucwords($row['pname'])
?></b></p>
</td>
<td>
<p><b><?php echo ucwords($row['task'])
?></b></p>
<p class="truncate"><?php echo
strip_tags($desc) ?></p>
</td>
<td><b><?php echo date("M d,
Y",strtotime($row['start_date'])) ?></b></td>
<td><b><?php echo date("M d,
Y",strtotime($row['end_date'])) ?></b></td>
<td class="text-center">
<?php
if($stat[$row['pstatus']] =='Pending'){
echo "<span class='badge badge-
secondary'>{$stat[$row['pstatus']]}</span>";
}elseif($stat[$row['pstatus']] =='Started'){
echo "<span class='badge badge-
primary'>{$stat[$row['pstatus']]}</span>";
}elseif($stat[$row['pstatus']] =='On-
Progress'){
echo "<span class='badge badge-
info'>{$stat[$row['pstatus']]}</span>";
}elseif($stat[$row['pstatus']] =='On-Hold'){
echo "<span class='badge badge-
warning'>{$stat[$row['pstatus']]}</span>";
MMICT&BM 49
Task management system
}elseif($stat[$row['pstatus']] =='Over
Due'){
echo "<span class='badge badge-
danger'>{$stat[$row['pstatus']]}</span>";
}elseif($stat[$row['pstatus']] =='Done'){
echo "<span class='badge badge-
success'>{$stat[$row['pstatus']]}</span>";
}
?>
</td>
<td>
<?php
if($row['status'] == 1){
echo "<span class='badge badge-
secondary'>Pending</span>";
}elseif($row['status'] == 2){
echo "<span class='badge badge-
primary'>On-Progress</span>";
}elseif($row['status'] == 3){
echo "<span class='badge badge-
success'>Done</span>";
}
?>
</td>
<td class="text-center">
<button type="button" class="btn btn-
default btn-sm btn-flat border-info wave-effect text-info dropdown-toggle" data-
toggle="dropdown" aria-expanded="true">
Action
</button>
<div class="dropdown-menu" style="">
<a class="dropdown-item new_productivity" data-pid =
'<?php echo $row['pid'] ?>' data-tid = '<?php echo $row['id'] ?>' data-task = '<?php echo
ucwords($row['task']) ?>' href="javascript:void(0)">Add Productivity</a>
</div>
</td>
</tr>
<?php endwhile; ?>
</tbody>
</table>
</div>
</div>
</div>
<style>
table p{
margin: unset !important;
}
table td{
vertical-align: middle !important
}
</style>
<script>
$(document).ready(function(){
MMICT&BM 50
Task management system
$('#list').dataTable()
$('.new_productivity').click(function(){
uni_modal("<i class='fa fa-plus'></i> New Progress for: "+$(this).attr('data-
task'),"manage_progress.php?pid="+$(this).attr('data-pid')+"&tid="+$(this).attr('data-tid'),'large')
})
})
function delete_project($id){
start_load()
$.ajax({
url:'ajax.php?action=delete_project',
method:'POST',
data:{id:$id},
success:function(resp){
if(resp==1){
alert_toast("Data successfully deleted",'success')
setTimeout(function(){
location.reload()
},1500)
}
}
})
}
</script>
9.8. Report
MMICT&BM 51
Task management system
<th>Completed Task</th>
<th>Work Duration</th>
<th>Progress</th>
<th>Status</th>
</thead>
<tbody>
<?php
$i = 1;
$stat = array("Pending","Started","On-Progress","On-Hold","Over Due","Done");
$where = "";
if($_SESSION['login_type'] == 2){
$where = " where manager_id = '{$_SESSION['login_id']}' ";
}elseif($_SESSION['login_type'] == 3){
$where = " where concat('[',REPLACE(user_ids,',','],['),']') LIKE
'%[{$_SESSION['login_id']}]%' ";
}
$qry = $conn->query("SELECT * FROM project_list $where order by name asc");
while($row= $qry->fetch_assoc()):
$tprog = $conn->query("SELECT * FROM task_list where project_id =
{$row['id']}")->num_rows;
$cprog = $conn->query("SELECT * FROM task_list where project_id = {$row['id']}
and status = 3")->num_rows;
$prog = $tprog > 0 ? ($cprog/$tprog) * 100 : 0;
$prog = $prog > 0 ? number_format($prog,2) : $prog;
$prod = $conn->query("SELECT * FROM user_productivity where project_id =
{$row['id']}")->num_rows;
$dur = $conn->query("SELECT sum(time_rendered) as duration FROM
user_productivity where project_id = {$row['id']}");
$dur = $dur->num_rows > 0 ? $dur->fetch_assoc()['duration'] : 0;
if($row['status'] == 0 && strtotime(date('Y-m-d')) >= strtotime($row['start_date'])):
if($prod > 0 || $cprog > 0)
$row['status'] = 2;
else
$row['status'] = 1;
elseif($row['status'] == 0 && strtotime(date('Y-m-d')) > strtotime($row['end_date'])):
$row['status'] = 4;
endif;
?>
<tr>
<td>
<?php echo $i++ ?>
</td>
<td>
<a>
<?php echo ucwords($row['name']) ?>
</a>
<br>
<small>
Due: <?php echo date("Y-m-d",strtotime($row['end_date'])) ?>
</small>
</td>
<td class="text-center">
<?php echo number_format($tprog) ?>
MMICT&BM 52
Task management system
</td>
<td class="text-center">
<?php echo number_format($cprog) ?>
</td>
<td class="text-center">
<?php echo number_format($dur).' Hr/s.' ?>
</td>
<td class="project_progress">
<div class="progress progress-sm">
<div class="progress-bar bg-green" role="progressbar" aria-valuenow="57"
aria-valuemin="0" aria-valuemax="100" style="width: <?php echo $prog ?>%">
</div>
</div>
<small>
<?php echo $prog ?>% Complete
</small>
</td>
<td class="project-state">
<?php
if($stat[$row['status']] =='Pending'){
echo "<span class='badge badge-secondary'>{$stat[$row['status']]}</span>";
}elseif($stat[$row['status']] =='Started'){
echo "<span class='badge badge-primary'>{$stat[$row['status']]}</span>";
}elseif($stat[$row['status']] =='On-Progress'){
echo "<span class='badge badge-info'>{$stat[$row['status']]}</span>";
}elseif($stat[$row['status']] =='On-Hold'){
echo "<span class='badge badge-warning'>{$stat[$row['status']]}</span>";
}elseif($stat[$row['status']] =='Over Due'){
echo "<span class='badge badge-danger'>{$stat[$row['status']]}</span>";
}elseif($stat[$row['status']] =='Done'){
echo "<span class='badge badge-success'>{$stat[$row['status']]}</span>";
}
?>
</td>
</tr>
<?php endwhile; ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
<script>
$('#print').click(function(){
start_load()
var _h = $('head').clone()
var _p = $('#printable').clone()
var _d = "<p class='text-center'><b>Project Progress Report as of (<?php echo
date("F d, Y") ?>)</b></p>"
_p.prepend(_d)
_p.prepend(_h)
var nw = window.open("","","width=900,height=600")
nw.document.write(_p.html())
MMICT&BM 53
Task management system
nw.document.close()
nw.print()
setTimeout(function(){
nw.close()
end_load()
},750)
})
</script>
MMICT&BM 54
Task management system
CHAPTER-10
FUTURE ENHANCEMENTS
MMICT&BM 55
Task management system
Customizable Templates
Provide users with customizable templates for common project types and
tasks, streamlining setup and configuration.
Enhanced Security Features
Strengthen security measures with features like multi-factor authentication,
single sign-on (SSO), and advanced encryption.
API Integration
Develop APIs to enable seamless integration with other enterprise systems,
such as ERP, CRM, and HR management systems.
User Feedback Mechanism
Implement a feedback system where users can suggest features and report
issues, fostering continuous improvement.
MMICT&BM 56
Task management system
CONCLUSION
The development and implementation of the Task Management System represent a
significant advancement in addressing the challenges of efficient task management
within organizations. This system not only streamlines task allocation, tracking, and
completion but also fosters improved collaboration and accountability among team
members. By incorporating features such as real-time updates, comprehensive
reporting, and user-friendly interfaces, the Task Management System enhances
productivity and operational efficiency.
Throughout this project, we have demonstrated the system’s ability to mitigate
common issues like miscommunication, missed deadlines, and resource
inefficiencies. The system's scalability and adaptability ensure that it can meet the
evolving needs of various organizations, making it a versatile tool in diverse
contexts.
In conclusion, the Task Management System stands as a pivotal solution for modern
organizations seeking to optimize their workflows and achieve higher levels of
efficiency and effectiveness. As we look to the future, the potential for further
enhancements, such as AI integration and mobile accessibility, promises even
greater benefits and innovations in task management.
MMICT&BM 57