Skip to content

Commit

Permalink
Merge pull request djroxx2000#18 from djroxx2000/hritik
Browse files Browse the repository at this point in the history
Admin Dashboard Completed ( 95% )
  • Loading branch information
hrithikkothari1234 authored Jan 14, 2020
2 parents 877ebdb + 8c585a9 commit b820918
Show file tree
Hide file tree
Showing 11 changed files with 458 additions and 7 deletions.
90 changes: 90 additions & 0 deletions admin/currentcases.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
<div class="container-fluid">
<div class="row">
<div class="col-sm-2">
<h1>
<?php echo $_SESSION["admin_name"]; ?>
</h1>
<br>
<ul id="side_menu" class="nav nav-pills nav-stacked">
<li class="active">
<a href="admin_dashboard.php">
<span class="glyphicon glyphicon-list-alt"></span>
&nbsp; Current Cases
</a>
</li>
<li class="">
<a href="admin_dashboard.php?q=finishedcases">
<span class="glyphicon glyphicon-ok"></span>
&nbsp; Finished Cases
</a>
</li>
<li class="">
<a href="admin_dashboard.php?q=managelawyers">
<span class="glyphicon glyphicon-user"></span>
&nbsp; Manage Lawyers
</a>
</li>
<li class="">
<a href="admin_dashboard.php?q=feedbacks">
<span class="glyphicon glyphicon-comment"></span>
&nbsp; Feedbacks
</a>
</li>
</ul>
</div> <!--div ending of vertical nav -->

<div class="col-sm-10">
<h1>Current Cases</h1>
<div class="table-responsive">
<table class="table table-striped table-hover">
<tr>
<th>Sr. no</th>
<th>Case type</th>
<th>Case details</th>
<th>Prev hearing</th>
<th>Next hearing</th>
<th>Case status</th>
<th>Court Appointed</th>
<th>Update</th>
</tr>
<?php
require_once("includes/db.php");
$con;
if ($con) {
$x=1;
$stmt = $con->prepare("
SELECT case_type, case_details, next_hearing_date, prev_hearing_date, court_name
FROM cases WHERE case_status = ?");
$status = "pending";
$stmt->bind_param('s', $status);
$stmt->execute();
$stmt->store_result();
$stmt->bind_result($case_type,
$case_details, $next_hearing_date,
$prev_hearing_date, $court_name);

while ($stmt->fetch()) {
echo "
<tr>
<td> {$x} </td>
<td> {$case_type} </td>
<td> {$case_details} </td>
<td> {$prev_hearing_date} </td>
<td> {$next_hearing_date} </td>
<td> Pending </td>
<td> {$court_name} </td>
<td><button class='btn btn-info'> Update </button> </td>
</tr>
";
$x++;
}
}
else{
echo "Server Prob";
}
?>
</table>
</div>
</div>
</div>
</div>
76 changes: 76 additions & 0 deletions admin/feedbacks.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
<div class="container-fluid">
<div class="row">
<div class="col-sm-2">
<h1>
<?php echo $_SESSION["admin_name"]; ?>
</h1>
<br>
<ul id="side_menu" class="nav nav-pills nav-stacked">
<li class="">
<a href="admin_dashboard.php">
<span class="glyphicon glyphicon-list-alt"></span>
&nbsp; Current Cases
</a>
</li>
<li class="">
<a href="admin_dashboard.php?q=finishedcases">
<span class="glyphicon glyphicon-ok"></span>
&nbsp; Finished Cases
</a>
</li>
<li class="">
<a href="admin_dashboard.php?q=managelawyers">
<span class="glyphicon glyphicon-user"></span>
&nbsp; Manage Lawyers
</a>
</li>
<li class="active">
<a href="admin_dashboard.php?q=feedbacks">
<span class="glyphicon glyphicon-comment"></span>
&nbsp; Feedbacks
</a>
</li>
</ul>
</div> <!--div ending of vertical nav -->

<div class="col-sm-10">
<h1>Feedbacks</h1>
<div class="table-responsive">
<table class="table table-striped table-hover">
<tr>
<th>Sr. no</th>
<th>Feedback</th>
<th>User</th>
</tr>
<?php
require_once("includes/db.php");
$con;
if ($con) {
$x=1;
$stmt = $con->prepare("
SELECT feedback_content, user_name
FROM feedbacks");
$stmt->execute();
$stmt->store_result();
$stmt->bind_result($feedback, $name);

while ($stmt->fetch()) {
echo "
<tr>
<td> {$x} </td>
<td> {$feedback} </td>
<td> {$name} </td>
</tr>
";
$x++;
}
}
else{
echo "Server Prob";
}
?>
</table>
</div>
</div>
</div>
</div>
83 changes: 83 additions & 0 deletions admin/finishedcases.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
<div class="container-fluid">
<div class="row">
<div class="col-sm-2">
<h1>
<?php echo $_SESSION["admin_name"]; ?>
</h1>
<br>
<ul id="side_menu" class="nav nav-pills nav-stacked">
<li class="">
<a href="admin_dashboard.php">
<span class="glyphicon glyphicon-list-alt"></span>
&nbsp; Current Cases
</a>
</li>
<li class="active">
<a href="admin_dashboard.php?q=finishedcases">
<span class="glyphicon glyphicon-ok"></span>
&nbsp; Finished Cases
</a>
</li>
<li class="">
<a href="admin_dashboard.php?q=managelawyers">
<span class="glyphicon glyphicon-user"></span>
&nbsp; Manage Lawyers
</a>
</li>
<li class="">
<a href="admin_dashboard.php?q=feedbacks">
<span class="glyphicon glyphicon-comment"></span>
&nbsp; Feedbacks
</a>
</li>
</ul>
</div> <!--div ending of vertical nav -->

<div class="col-sm-10">
<h1>Finished Cases</h1>
<div class="table-responsive">
<table class="table table-striped table-hover">
<tr>
<th>Sr. no</th>
<th>Case type</th>
<th>Case details</th>
<th>Case status</th>
<th>Court Appointed</th>
</tr>
<?php
require_once("includes/db.php");
$con;
if ($con) {
$x=1;
$stmt = $con->prepare("
SELECT case_type, case_details,court_name
FROM cases WHERE case_status = ?");
$status = "finished";
$stmt->bind_param('s', $status);
$stmt->execute();
$stmt->store_result();
$stmt->bind_result($case_type,
$case_details, $court_name);

while ($stmt->fetch()) {
echo "
<tr>
<td> {$x} </td>
<td> {$case_type} </td>
<td> {$case_details} </td>
<td> Finished </td>
<td> {$court_name} </td>
</tr>
";
$x++;
}
}
else{
echo "Server Prob";
}
?>
</table>
</div>
</div>
</div>
</div>
92 changes: 92 additions & 0 deletions admin/managelawyers.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
<div class="container-fluid">
<div class="row">
<div class="col-sm-2">
<h1>
<?php echo $_SESSION["admin_name"]; ?>
</h1>
<br>
<ul id="side_menu" class="nav nav-pills nav-stacked">
<li class="">
<a href="admin_dashboard.php">
<span class="glyphicon glyphicon-list-alt"></span>
&nbsp; Current Cases
</a>
</li>
<li class="">
<a href="admin_dashboard.php?q=finishedcases">
<span class="glyphicon glyphicon-ok"></span>
&nbsp; Finished Cases
</a>
</li>
<li class="active">
<a href="admin_dashboard.php?q=managelawyers">
<span class="glyphicon glyphicon-user"></span>
&nbsp; Manage Lawyers
</a>
</li>
<li class="">
<a href="admin_dashboard.php?q=feedbacks">
<span class="glyphicon glyphicon-comment"></span>
&nbsp; Feedbacks
</a>
</li>
</ul>
</div> <!--div ending of vertical nav -->

<div class="col-sm-10">
<h1>Lawyers</h1>
<div class="table-responsive">
<table class="table table-striped table-hover">
<tr>
<th>Sr. no</th>
<th>Name</th>
<th>Email</th>
<th>Phone no.</th>
<th>City</th>
<th>Rating</th>
<th>Delete</th>
</tr>
<?php
require_once("includes/db.php");
$con;
if ($con) {
$x=1;
$stmt = $con->prepare("
SELECT lawyer_id, lawyer_first_name, lawyer_last_name, lawyer_email,
lawyer_phone_no, lawyer_city, lawyer_rating
FROM lawyer_login");
$stmt->execute();
$stmt->store_result();
$stmt->bind_result($lawyer_id, $lawyer_first_name, $lawyer_last_name,
$lawyer_email, $lawyer_phone, $lawyer_city, $lawyer_rating);

while ($stmt->fetch()) {
if(!$lawyer_city)
$lawyer_city="<span class='text-muted'>Not given</span>";
if(!$lawyer_phone)
$lawyer_phone="<span class='text-muted'>Not given</span>";
if(!$lawyer_rating)
$lawyer_rating="<span class='text-muted'>Not given</span>";
echo "
<tr>
<td> {$x} </td>
<td> {$lawyer_first_name} {$lawyer_last_name}</td>
<td> {$lawyer_email} </td>
<td> {$lawyer_phone} </td>
<td> {$lawyer_city} </td>
<td> {$lawyer_rating} </td>
<td> <button class='btn btn-danger'> Remove </button> </td>
</tr>
";
$x++;
}
}
else{
echo "Server Prob";
}
?>
</table>
</div>
</div>
</div>
</div>
Loading

0 comments on commit b820918

Please sign in to comment.