mirror of
https://github.com/itflow-org/itflow
synced 2026-03-04 12:54:51 +00:00
Fix Client portal index.php, removed unused vars and functions, fix code indentation and syntax
This commit is contained in:
@@ -39,6 +39,7 @@ $contact = mysqli_fetch_array($contact_sql);
|
|||||||
$session_contact_name = $contact['contact_name'];
|
$session_contact_name = $contact['contact_name'];
|
||||||
$session_contact_initials = initials($session_contact_name);
|
$session_contact_initials = initials($session_contact_name);
|
||||||
$session_contact_email = $contact['contact_email'];
|
$session_contact_email = $contact['contact_email'];
|
||||||
|
$session_contact_photo = $contact['contact_photo'];
|
||||||
|
|
||||||
// Get client info
|
// Get client info
|
||||||
$client_sql = mysqli_query($mysqli, "SELECT * FROM clients WHERE client_id = '$session_client_id'");
|
$client_sql = mysqli_query($mysqli, "SELECT * FROM clients WHERE client_id = '$session_client_id'");
|
||||||
|
|||||||
166
portal/index.php
166
portal/index.php
@@ -4,10 +4,6 @@
|
|||||||
* Landing / Home page for the client portal
|
* Landing / Home page for the client portal
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$row = mysqli_fetch_array($sql);
|
|
||||||
$contact_photo = $row['contact_photo'];
|
|
||||||
$contact_id = $row['contact_id'];
|
|
||||||
|
|
||||||
require_once("inc_portal.php");
|
require_once("inc_portal.php");
|
||||||
|
|
||||||
// Ticket status from GET
|
// Ticket status from GET
|
||||||
@@ -46,101 +42,91 @@ $total_tickets = $row['total_tickets'];
|
|||||||
|
|
||||||
?>
|
?>
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="text-center">
|
<th class="text-center">
|
||||||
<a class="text-dark" href="#" data-toggle="modal" data-target="#editContactModal<?php echo $contact_id; ?>">
|
<?php if(!empty($session_contact_photo)){ ?>
|
||||||
<?php if(!empty($contact_photo)){ ?>
|
<img src="<?php echo "../uploads/clients/$session_company_id/$session_client_id/$session_contact_photo"; ?>" alt="..." class=" img-size-50 img-circle">
|
||||||
<img src="<?php echo "uploads/clients/$session_company_id/$client_id/$contact_photo"; ?>" alt="..." class="rounded-left">
|
|
||||||
>
|
<?php }else{ ?>
|
||||||
|
|
||||||
<?php }else{ ?>
|
<span class="fa-stack fa-2x rounded-left">
|
||||||
|
<i class="fa fa-circle fa-stack-2x text-secondary"></i>
|
||||||
<span class="fa-stack fa-2x rounded-left">
|
<span class="fa fa-stack-1x text-white"><?php echo $session_contact_initials; ?></span>
|
||||||
<i class="fa fa-circle fa-stack-2x text-secondary"></i>
|
</span>
|
||||||
<span class="fa fa-stack-1x text-white"><?php echo $contact_initials; ?></span>
|
<br>
|
||||||
</span>
|
|
||||||
<br>
|
<?php } ?>
|
||||||
|
<div class="text-dark"><?php echo $contact_name; ?></div>
|
||||||
<?php } ?>
|
<div><?php echo $contact_title_display; ?></div>
|
||||||
<div class="text-dark"><?php echo $contact_name; ?></div>
|
<div><?php echo $primary_contact_display; ?></div>
|
||||||
<div><?php echo $contact_title_display; ?></div>
|
</th>
|
||||||
<div><?php echo $primary_contact_display; ?></div>
|
<th>
|
||||||
</a>
|
<div class="">
|
||||||
</th>
|
<h4 class="">Welcome, <b><?php echo $session_contact_name ?></b>!</h4>
|
||||||
<th>
|
<hr>
|
||||||
|
</div>
|
||||||
<div class="">
|
</th>
|
||||||
<h4 class="">Welcome, <b><?php echo $session_contact_name ?></b>! </h4>
|
</tr>
|
||||||
<hr>
|
</table>
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</th>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
<div class="col-10">
|
<div class="col-10">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<span class="border border-secondary">
|
<span class="border border-secondary">
|
||||||
<table class="table">
|
<table class="table">
|
||||||
<thead class="thead-dark">
|
<thead class="thead-dark">
|
||||||
|
<tr>
|
||||||
<tr>
|
<th scope="col">#</th>
|
||||||
<th scope="col">#</th>
|
<th scope="col">Subject</th>
|
||||||
<th scope="col">Subject</th>
|
<th scope="col">Status</th>
|
||||||
<th scope="col">Status</th>
|
</tr>
|
||||||
</tr>
|
</thead>
|
||||||
</thead>
|
<tbody>
|
||||||
<tbody>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
while($ticket = mysqli_fetch_array($contact_tickets)){
|
|
||||||
echo "<tr>";
|
|
||||||
echo "<td> <a href='ticket.php?id=$ticket[ticket_id]'> $ticket[ticket_number]</a></td>";
|
|
||||||
echo "<td> <a href='ticket.php?id=$ticket[ticket_id]'> $ticket[ticket_subject]</a></td>";
|
|
||||||
echo "<td>$ticket[ticket_status]</td>";
|
|
||||||
echo "</tr>";
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</tbody>
|
|
||||||
</table></span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
<?php
|
||||||
|
while($ticket = mysqli_fetch_array($contact_tickets)){
|
||||||
|
echo "<tr>";
|
||||||
|
echo "<td> <a href='ticket.php?id=$ticket[ticket_id]'> $ticket[ticket_number]</a></td>";
|
||||||
|
echo "<td> <a href='ticket.php?id=$ticket[ticket_id]'> $ticket[ticket_subject]</a></td>";
|
||||||
|
echo "<td>$ticket[ticket_status]</td>";
|
||||||
|
echo "</tr>";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="col-2">
|
<div class="col-2">
|
||||||
|
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<a href="ticket_add.php" class="btn btn-primary">New ticket</a>
|
<a href="ticket_add.php" class="btn btn-primary">New ticket</a>
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
<a href="?status=Open"><div class="card text-white bg-danger mb-3" style="max-width: 18rem;">
|
<a href="?status=Open">
|
||||||
<div class="card-header">My Open tickets | <b><?php echo $total_tickets_open ?></b></div>
|
<div class="card text-white bg-danger mb-3" style="max-width: 18rem;">
|
||||||
</div></a>
|
<div class="card-header">My Open tickets | <b><?php echo $total_tickets_open ?></b></div>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
<a href="?status=Closed"><div class="card text-white bg-success mb-3" style="max-width: 18rem;">
|
|
||||||
<div class="card-header">Resolved tickets | <b><?php echo $total_tickets_closed ?></b></div>
|
|
||||||
</div></a>
|
|
||||||
|
|
||||||
<a href="?status=%"><div class="card text-white bg-secondary mb-3" style="max-width: 18rem;">
|
|
||||||
<div class="card-header">All my tickets | <b><?php echo $total_tickets ?></b></div>
|
|
||||||
</div></a>
|
|
||||||
|
|
||||||
|
<a href="?status=Closed">
|
||||||
|
<div class="card text-white bg-success mb-3" style="max-width: 18rem;">
|
||||||
|
<div class="card-header">Resolved tickets | <b><?php echo $total_tickets_closed ?></b></div>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<a href="?status=%">
|
||||||
|
<div class="card text-white bg-secondary mb-3" style="max-width: 18rem;">
|
||||||
|
<div class="card-header">All my tickets | <b><?php echo $total_tickets ?></b></div>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<?php include("portal_footer.php"); ?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<?php include("portal_footer.php"); ?>
|
|
||||||
Reference in New Issue
Block a user