AlkantarClanX12
| Current Path : /home/xdlcxzbz/accountsmtsgroup.com/ |
| Current File : //home/xdlcxzbz/accountsmtsgroup.com/account-table.php |
<?php
session_start();
if (!isset($_SESSION['userID'])) {
header("Location: sign-in.php");
exit();
}
require_once "SqlConnection/MySqlConnection.php";
$number = $_POST['number'];
$AccountName = $_POST['name'];
$sql = "Select * from tokens where customerNo='" . $number . "' order by SlipNo Asc";
$data = mysqli_query($conn, $sql);
$userID = $_SESSION['userID'];
$userType = $_SESSION['userType'];
$createCustomer;
$viewAccounts;
$editAccounts;
$createTokens;
$viewHistory;
$changePassword;
$loginAccess;
if ($userType == "user") {
$sql = "Select * from rights Where id='" . $userID . "'";
$rights = mysqli_query($conn, $sql);
while ($row = mysqli_fetch_array($rights)) {
$createCustomer = $row['createCustomer'];
$viewAccounts = $row['viewAccounts'];
$editAccounts = $row['editAccounts'];
$createTokens = $row['createTokens'];
$viewHistory = $row['viewHistory'];
$changePassword = $row['changePassword'];
$loginAccess = $row['loginAccess'];
}
}
//declaring
$totalPriceForEnd=0;
$totalPaidForEnd=0;
$totalBalanceForEnd=0;
?>
<!DOCTYPE html>
<html lang="en" dir="ltr" data-scompiler-id="0">
<head>
<meta charSet="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="format-detection" content="telephone=no" />
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="title" content="">
<title>Accounts</title><!-- icon -->
<?php
include('headerLinks.php');
?>
<style>
.focus {
background-color: orange;
color: black;
}
body {
background-color: black;
}
.menu {
color: black;
}
</style>
</head>
<!-- laravel -->
<body><!-- sa-app -->
<div class="sa-app sa-app--desktop-sidebar-shown sa-app--mobile-sidebar-hidden sa-app--toolbar-fixed">
<!-- sa-app__sidebar -->
<div class="sa-app__sidebar">
<div class="sa-sidebar">
<div class="sa-sidebar__body" data-simplebar="">
<ul class="sa-nav sa-nav--sidebar" data-sa-collapse="">
<li class="sa-nav__section">
<div class="sa-nav__section-title"><span></span></div>
<ul class="sa-nav__menu sa-nav__menu--root">
<li class="sa-nav__menu-item sa-nav__menu-item--has-icon"><a href="index.php" class="sa-nav__link"><span class="sa-nav__icon menu"><svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 16 16" fill="currentColor">
<path d="M8,13.1c-4.4,0-8,3.4-8-3C0,5.6,3.6,2,8,2s8,3.6,8,8.1C16,16.5,12.4,13.1,8,13.1zM8,4c-3.3,0-6,2.7-6,6c0,4,2.4,0.9,5,0.2C7,9.9,7.1,9.5,7.4,9.2l3-2.3c0.4-0.3,1-0.2,1.3,0.3c0.3,0.5,0.2,1.1-0.2,1.4l-2.2,1.7c2.5,0.9,4.8,3.6,4.8-0.2C14,6.7,11.3,4,8,4z">
</path>
</svg></span><span class="sa-nav__title menu">Dashboard</span></a></li>
<?php
if ($userType == "user") {
if ($createCustomer == "yes") {
echo "<li class='sa-nav__menu-item sa-nav__menu-item--has-icon'>";
echo " <a href='customer.php' class='sa-nav__link'>";
echo " <span class='sa-nav__icon menu'>";
echo "<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' class='bi bi-person' viewBox='0 0 16 16'>";
echo "<path d='M8 8a3 3 0 1 0 0-6 3 3 0 0 0 0 6Zm2-3a2 2 0 1 1-4 0 2 2 0 0 1 4 0Zm4 8c0 1-1 1-1 1H3s-1 0-1-1 1-4 6-4 6 3 6 4Zm-1-.004c-.001-.246-.154-.986-.832-1.664C11.516 10.68 10.289 10 8 10c-2.29 0-3.516.68-4.168 1.332-.678.678-.83 1.418-.832 1.664h10Z' />";
echo "</svg>";
echo "</span>";
echo "<span class='sa-nav__title menu'>Customers</span>";
echo "</a>";
echo "</li>";
}
}
if ($userType == "admin") {
echo "<li class='sa-nav__menu-item sa-nav__menu-item--has-icon'>";
echo " <a href='customer.php' class='sa-nav__link'>";
echo " <span class='sa-nav__icon menu'>";
echo "<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' class='bi bi-person' viewBox='0 0 16 16'>";
echo "<path d='M8 8a3 3 0 1 0 0-6 3 3 0 0 0 0 6Zm2-3a2 2 0 1 1-4 0 2 2 0 0 1 4 0Zm4 8c0 1-1 1-1 1H3s-1 0-1-1 1-4 6-4 6 3 6 4Zm-1-.004c-.001-.246-.154-.986-.832-1.664C11.516 10.68 10.289 10 8 10c-2.29 0-3.516.68-4.168 1.332-.678.678-.83 1.418-.832 1.664h10Z' />";
echo "</svg>";
echo "</span>";
echo "<span class='sa-nav__title menu'>Customers</span>";
echo "</a>";
echo "</li>";
}
?>
<?php
if ($userType == "user") {
if ($viewAccounts == "yes") {
echo "
<li class='sa-nav__menu-item sa-nav__menu-item--has-icon focus'>
<a href='accounts.php' class='sa-nav__link'>
<span class='sa-nav__icon menu'>
<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' class='bi bi-person-bounding-box' viewBox='0 0 16 16'>
<path d='M1.5 1a.5.5 0 0 0-.5.5v3a.5.5 0 0 1-1 0v-3A1.5 1.5 0 0 1 1.5 0h3a.5.5 0 0 1 0 1h-3zM11 .5a.5.5 0 0 1 .5-.5h3A1.5 1.5 0 0 1 16 1.5v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 0-.5-.5h-3a.5.5 0 0 1-.5-.5zM.5 11a.5.5 0 0 1 .5.5v3a.5.5 0 0 0 .5.5h3a.5.5 0 0 1 0 1h-3A1.5 1.5 0 0 1 0 14.5v-3a.5.5 0 0 1 .5-.5zm15 0a.5.5 0 0 1 .5.5v3a1.5 1.5 0 0 1-1.5 1.5h-3a.5.5 0 0 1 0-1h3a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 1 .5-.5z' />
<path d='M3 14s-1 0-1-1 1-4 6-4 6 3 6 4-1 1-1 1H3zm8-9a3 3 0 1 1-6 0 3 3 0 0 1 6 0z' />
</svg>
</span>
<span class='sa-nav__title menu'>Accounts</span>
</a>
</li>
";
}
}
?>
<?php
if ($userType == "admin") {
echo "
<li class='sa-nav__menu-item sa-nav__menu-item--has-icon focus'>
<a href='accounts.php' class='sa-nav__link'>
<span class='sa-nav__icon menu'>
<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' class='bi bi-person-bounding-box' viewBox='0 0 16 16'>
<path d='M1.5 1a.5.5 0 0 0-.5.5v3a.5.5 0 0 1-1 0v-3A1.5 1.5 0 0 1 1.5 0h3a.5.5 0 0 1 0 1h-3zM11 .5a.5.5 0 0 1 .5-.5h3A1.5 1.5 0 0 1 16 1.5v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 0-.5-.5h-3a.5.5 0 0 1-.5-.5zM.5 11a.5.5 0 0 1 .5.5v3a.5.5 0 0 0 .5.5h3a.5.5 0 0 1 0 1h-3A1.5 1.5 0 0 1 0 14.5v-3a.5.5 0 0 1 .5-.5zm15 0a.5.5 0 0 1 .5.5v3a1.5 1.5 0 0 1-1.5 1.5h-3a.5.5 0 0 1 0-1h3a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 1 .5-.5z' />
<path d='M3 14s-1 0-1-1 1-4 6-4 6 3 6 4-1 1-1 1H3zm8-9a3 3 0 1 1-6 0 3 3 0 0 1 6 0z' />
</svg>
</span>
<span class='sa-nav__title menu'>Accounts</span>
</a>
</li>
";
}
?>
<?php
if ($userType == "user") {
if ($createTokens == "yes") {
echo "
<li class='sa-nav__menu-item sa-nav__menu-item--has-icon'>
<a href='token.php' class='sa-nav__link'>
<span class='sa-nav__icon menu'>
<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' class='bi bi-receipt' viewBox='0 0 16 16'>
<path d='M1.92.506a.5.5 0 0 1 .434.14L3 1.293l.646-.647a.5.5 0 0 1 .708 0L5 1.293l.646-.647a.5.5 0 0 1 .708 0L7 1.293l.646-.647a.5.5 0 0 1 .708 0L9 1.293l.646-.647a.5.5 0 0 1 .708 0l.646.647.646-.647a.5.5 0 0 1 .708 0l.646.647.646-.647a.5.5 0 0 1 .801.13l.5 1A.5.5 0 0 1 15 2v12a.5.5 0 0 1-.053.224l-.5 1a.5.5 0 0 1-.8.13L13 14.707l-.646.647a.5.5 0 0 1-.708 0L11 14.707l-.646.647a.5.5 0 0 1-.708 0L9 14.707l-.646.647a.5.5 0 0 1-.708 0L7 14.707l-.646.647a.5.5 0 0 1-.708 0L5 14.707l-.646.647a.5.5 0 0 1-.708 0L3 14.707l-.646.647a.5.5 0 0 1-.801-.13l-.5-1A.5.5 0 0 1 1 14V2a.5.5 0 0 1 .053-.224l.5-1a.5.5 0 0 1 .367-.27zm.217 1.338L2 2.118v11.764l.137.274.51-.51a.5.5 0 0 1 .707 0l.646.647.646-.646a.5.5 0 0 1 .708 0l.646.646.646-.646a.5.5 0 0 1 .708 0l.646.646.646-.646a.5.5 0 0 1 .708 0l.646.646.646-.646a.5.5 0 0 1 .708 0l.509.509.137-.274V2.118l-.137-.274-.51.51a.5.5 0 0 1-.707 0L12 1.707l-.646.647a.5.5 0 0 1-.708 0L10 1.707l-.646.647a.5.5 0 0 1-.708 0L8 1.707l-.646.647a.5.5 0 0 1-.708 0L6 1.707l-.646.647a.5.5 0 0 1-.708 0L4 1.707l-.646.647a.5.5 0 0 1-.708 0l-.509-.51z' />
<path d='M3 4.5a.5.5 0 0 1 .5-.5h6a.5.5 0 1 1 0 1h-6a.5.5 0 0 1-.5-.5zm0 2a.5.5 0 0 1 .5-.5h6a.5.5 0 1 1 0 1h-6a.5.5 0 0 1-.5-.5zm0 2a.5.5 0 0 1 .5-.5h6a.5.5 0 1 1 0 1h-6a.5.5 0 0 1-.5-.5zm0 2a.5.5 0 0 1 .5-.5h6a.5.5 0 0 1 0 1h-6a.5.5 0 0 1-.5-.5zm8-6a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 0 1h-1a.5.5 0 0 1-.5-.5zm0 2a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 0 1h-1a.5.5 0 0 1-.5-.5zm0 2a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 0 1h-1a.5.5 0 0 1-.5-.5zm0 2a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 0 1h-1a.5.5 0 0 1-.5-.5z' />
</svg>
</span>
<span class='sa-nav__title menu'>Token</span>
</a>
</li>
";
}
}
?>
<?php
if ($userType == "admin") {
echo "
<li class='sa-nav__menu-item sa-nav__menu-item--has-icon'>
<a href='token.php' class='sa-nav__link'>
<span class='sa-nav__icon menu'>
<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' class='bi bi-receipt' viewBox='0 0 16 16'>
<path d='M1.92.506a.5.5 0 0 1 .434.14L3 1.293l.646-.647a.5.5 0 0 1 .708 0L5 1.293l.646-.647a.5.5 0 0 1 .708 0L7 1.293l.646-.647a.5.5 0 0 1 .708 0L9 1.293l.646-.647a.5.5 0 0 1 .708 0l.646.647.646-.647a.5.5 0 0 1 .708 0l.646.647.646-.647a.5.5 0 0 1 .801.13l.5 1A.5.5 0 0 1 15 2v12a.5.5 0 0 1-.053.224l-.5 1a.5.5 0 0 1-.8.13L13 14.707l-.646.647a.5.5 0 0 1-.708 0L11 14.707l-.646.647a.5.5 0 0 1-.708 0L9 14.707l-.646.647a.5.5 0 0 1-.708 0L7 14.707l-.646.647a.5.5 0 0 1-.708 0L5 14.707l-.646.647a.5.5 0 0 1-.708 0L3 14.707l-.646.647a.5.5 0 0 1-.801-.13l-.5-1A.5.5 0 0 1 1 14V2a.5.5 0 0 1 .053-.224l.5-1a.5.5 0 0 1 .367-.27zm.217 1.338L2 2.118v11.764l.137.274.51-.51a.5.5 0 0 1 .707 0l.646.647.646-.646a.5.5 0 0 1 .708 0l.646.646.646-.646a.5.5 0 0 1 .708 0l.646.646.646-.646a.5.5 0 0 1 .708 0l.646.646.646-.646a.5.5 0 0 1 .708 0l.509.509.137-.274V2.118l-.137-.274-.51.51a.5.5 0 0 1-.707 0L12 1.707l-.646.647a.5.5 0 0 1-.708 0L10 1.707l-.646.647a.5.5 0 0 1-.708 0L8 1.707l-.646.647a.5.5 0 0 1-.708 0L6 1.707l-.646.647a.5.5 0 0 1-.708 0L4 1.707l-.646.647a.5.5 0 0 1-.708 0l-.509-.51z' />
<path d='M3 4.5a.5.5 0 0 1 .5-.5h6a.5.5 0 1 1 0 1h-6a.5.5 0 0 1-.5-.5zm0 2a.5.5 0 0 1 .5-.5h6a.5.5 0 1 1 0 1h-6a.5.5 0 0 1-.5-.5zm0 2a.5.5 0 0 1 .5-.5h6a.5.5 0 1 1 0 1h-6a.5.5 0 0 1-.5-.5zm0 2a.5.5 0 0 1 .5-.5h6a.5.5 0 0 1 0 1h-6a.5.5 0 0 1-.5-.5zm8-6a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 0 1h-1a.5.5 0 0 1-.5-.5zm0 2a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 0 1h-1a.5.5 0 0 1-.5-.5zm0 2a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 0 1h-1a.5.5 0 0 1-.5-.5zm0 2a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 0 1h-1a.5.5 0 0 1-.5-.5z' />
</svg>
</span>
<span class='sa-nav__title menu'>Token</span>
</a>
</li>";
}
?>
<?php
if ($userType == "user") {
if ($viewHistory == "yes") {
echo "
<li class='sa-nav__menu-item sa-nav__menu-item--has-icon'>
<a href='history.php' class='sa-nav__link'>
<span class='sa-nav__icon menu'>
<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' class='bi bi-clock-history' viewBox='0 0 16 16'>
<path d='M8.515 1.019A7 7 0 0 0 8 1V0a8 8 0 0 1 .589.022l-.074.997zm2.004.45a7.003 7.003 0 0 0-.985-.299l.219-.976c.383.086.76.2 1.126.342l-.36.933zm1.37.71a7.01 7.01 0 0 0-.439-.27l.493-.87a8.025 8.025 0 0 1 .979.654l-.615.789a6.996 6.996 0 0 0-.418-.302zm1.834 1.79a6.99 6.99 0 0 0-.653-.796l.724-.69c.27.285.52.59.747.91l-.818.576zm.744 1.352a7.08 7.08 0 0 0-.214-.468l.893-.45a7.976 7.976 0 0 1 .45 1.088l-.95.313a7.023 7.023 0 0 0-.179-.483zm.53 2.507a6.991 6.991 0 0 0-.1-1.025l.985-.17c.067.386.106.778.116 1.17l-1 .025zm-.131 1.538c.033-.17.06-.339.081-.51l.993.123a7.957 7.957 0 0 1-.23 1.155l-.964-.267c.046-.165.086-.332.12-.501zm-.952 2.379c.184-.29.346-.594.486-.908l.914.405c-.16.36-.345.706-.555 1.038l-.845-.535zm-.964 1.205c.122-.122.239-.248.35-.378l.758.653a8.073 8.073 0 0 1-.401.432l-.707-.707z' />
<path d='M8 1a7 7 0 1 0 4.95 11.95l.707.707A8.001 8.001 0 1 1 8 0v1z' />
<path d='M7.5 3a.5.5 0 0 1 .5.5v5.21l3.248 1.856a.5.5 0 0 1-.496.868l-3.5-2A.5.5 0 0 1 7 9V3.5a.5.5 0 0 1 .5-.5z' />
</svg>
</span>
<span class='sa-nav__title menu'>History</span>
</a>
</li>
";
}
}
?>
<?php
if ($userType == "admin") {
echo "
<li class='sa-nav__menu-item sa-nav__menu-item--has-icon'>
<a href='history.php' class='sa-nav__link'>
<span class='sa-nav__icon menu'>
<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' class='bi bi-clock-history' viewBox='0 0 16 16'>
<path d='M8.515 1.019A7 7 0 0 0 8 1V0a8 8 0 0 1 .589.022l-.074.997zm2.004.45a7.003 7.003 0 0 0-.985-.299l.219-.976c.383.086.76.2 1.126.342l-.36.933zm1.37.71a7.01 7.01 0 0 0-.439-.27l.493-.87a8.025 8.025 0 0 1 .979.654l-.615.789a6.996 6.996 0 0 0-.418-.302zm1.834 1.79a6.99 6.99 0 0 0-.653-.796l.724-.69c.27.285.52.59.747.91l-.818.576zm.744 1.352a7.08 7.08 0 0 0-.214-.468l.893-.45a7.976 7.976 0 0 1 .45 1.088l-.95.313a7.023 7.023 0 0 0-.179-.483zm.53 2.507a6.991 6.991 0 0 0-.1-1.025l.985-.17c.067.386.106.778.116 1.17l-1 .025zm-.131 1.538c.033-.17.06-.339.081-.51l.993.123a7.957 7.957 0 0 1-.23 1.155l-.964-.267c.046-.165.086-.332.12-.501zm-.952 2.379c.184-.29.346-.594.486-.908l.914.405c-.16.36-.345.706-.555 1.038l-.845-.535zm-.964 1.205c.122-.122.239-.248.35-.378l.758.653a8.073 8.073 0 0 1-.401.432l-.707-.707z' />
<path d='M8 1a7 7 0 1 0 4.95 11.95l.707.707A8.001 8.001 0 1 1 8 0v1z' />
<path d='M7.5 3a.5.5 0 0 1 .5.5v5.21l3.248 1.856a.5.5 0 0 1-.496.868l-3.5-2A.5.5 0 0 1 7 9V3.5a.5.5 0 0 1 .5-.5z' />
</svg>
</span>
<span class='sa-nav__title menu'>History</span>
</a>
</li>
";
}
?>
<?php
if ($userType == "user") {
if ($changePassword == "yes") {
echo "
<li class='sa-nav__menu-item sa-nav__menu-item--has-icon'>
<a href='password.php' class='sa-nav__link'>
<span class='sa-nav__icon menu'>
<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' class='bi bi-shield-lock' viewBox='0 0 16 16'>
<path d='M5.338 1.59a61.44 61.44 0 0 0-2.837.856.481.481 0 0 0-.328.39c-.554 4.157.726 7.19 2.253 9.188a10.725 10.725 0 0 0 2.287 2.233c.346.244.652.42.893.533.12.057.218.095.293.118a.55.55 0 0 0 .101.025.615.615 0 0 0 .1-.025c.076-.023.174-.061.294-.118.24-.113.547-.29.893-.533a10.726 10.726 0 0 0 2.287-2.233c1.527-1.997 2.807-5.031 2.253-9.188a.48.48 0 0 0-.328-.39c-.651-.213-1.75-.56-2.837-.855C9.552 1.29 8.531 1.067 8 1.067c-.53 0-1.552.223-2.662.524zM5.072.56C6.157.265 7.31 0 8 0s1.843.265 2.928.56c1.11.3 2.229.655 2.887.87a1.54 1.54 0 0 1 1.044 1.262c.596 4.477-.787 7.795-2.465 9.99a11.775 11.775 0 0 1-2.517 2.453 7.159 7.159 0 0 1-1.048.625c-.28.132-.581.24-.829.24s-.548-.108-.829-.24a7.158 7.158 0 0 1-1.048-.625 11.777 11.777 0 0 1-2.517-2.453C1.928 10.487.545 7.169 1.141 2.692A1.54 1.54 0 0 1 2.185 1.43 62.456 62.456 0 0 1 5.072.56z' />
<path d='M9.5 6.5a1.5 1.5 0 0 1-1 1.415l.385 1.99a.5.5 0 0 1-.491.595h-.788a.5.5 0 0 1-.49-.595l.384-1.99a1.5 1.5 0 1 1 2-1.415z' />
</svg>
</span>
<span class='sa-nav__title menu'>Password</span>
</a>
</li>
";
}
}
?>
<?php
if ($userType == "admin") {
echo "
<li class='sa-nav__menu-item sa-nav__menu-item--has-icon'>
<a href='password.php' class='sa-nav__link'>
<span class='sa-nav__icon menu'>
<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' class='bi bi-shield-lock' viewBox='0 0 16 16'>
<path d='M5.338 1.59a61.44 61.44 0 0 0-2.837.856.481.481 0 0 0-.328.39c-.554 4.157.726 7.19 2.253 9.188a10.725 10.725 0 0 0 2.287 2.233c.346.244.652.42.893.533.12.057.218.095.293.118a.55.55 0 0 0 .101.025.615.615 0 0 0 .1-.025c.076-.023.174-.061.294-.118.24-.113.547-.29.893-.533a10.726 10.726 0 0 0 2.287-2.233c1.527-1.997 2.807-5.031 2.253-9.188a.48.48 0 0 0-.328-.39c-.651-.213-1.75-.56-2.837-.855C9.552 1.29 8.531 1.067 8 1.067c-.53 0-1.552.223-2.662.524zM5.072.56C6.157.265 7.31 0 8 0s1.843.265 2.928.56c1.11.3 2.229.655 2.887.87a1.54 1.54 0 0 1 1.044 1.262c.596 4.477-.787 7.795-2.465 9.99a11.775 11.775 0 0 1-2.517 2.453 7.159 7.159 0 0 1-1.048.625c-.28.132-.581.24-.829.24s-.548-.108-.829-.24a7.158 7.158 0 0 1-1.048-.625 11.777 11.777 0 0 1-2.517-2.453C1.928 10.487.545 7.169 1.141 2.692A1.54 1.54 0 0 1 2.185 1.43 62.456 62.456 0 0 1 5.072.56z' />
<path d='M9.5 6.5a1.5 1.5 0 0 1-1 1.415l.385 1.99a.5.5 0 0 1-.491.595h-.788a.5.5 0 0 1-.49-.595l.384-1.99a1.5 1.5 0 1 1 2-1.415z' />
</svg>
</span>
<span class='sa-nav__title menu'>Password</span>
</a>
</li>
";
}
?>
<?php
if ($userType == "admin") {
echo "<li class='sa-nav__menu-item sa-nav__menu-item--has-icon'>";
echo "<a href='users.php' class='sa-nav__link'>";
echo "<span class='sa-nav__icon menu'>";
echo "<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' class='bi bi-people' viewBox='0 0 16 16'>";
echo "<path d='M15 14s1 0 1-1-1-4-5-4-5 3-5 4 1 1 1 1h8Zm-7.978-1A.261.261 0 0 1 7 12.996c.001-.264.167-1.03.76-1.72C8.312 10.629 9.282 10 11 10c1.717 0 2.687.63 3.24 1.276.593.69.758 1.457.76 1.72l-.008.002a.274.274 0 0 1-.014.002H7.022ZM11 7a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm3-2a3 3 0 1 1-6 0 3 3 0 0 1 6 0ZM6.936 9.28a5.88 5.88 0 0 0-1.23-.247A7.35 7.35 0 0 0 5 9c-4 0-5 3-5 4 0 .667.333 1 1 1h4.216A2.238 2.238 0 0 1 5 13c0-1.01.377-2.042 1.09-2.904.243-.294.526-.569.846-.816ZM4.92 10A5.493 5.493 0 0 0 4 13H1c0-.26.164-1.03.76-1.724.545-.636 1.492-1.256 3.16-1.275ZM1.5 5.5a3 3 0 1 1 6 0 3 3 0 0 1-6 0Zm3-2a2 2 0 1 0 0 4 2 2 0 0 0 0-4Z' />";
echo "</svg>";
echo "</span>";
echo "<span class='sa-nav__title menu'>Users</span>";
echo "</a>";
echo "</li>";
echo "<li class='sa-nav__menu-item sa-nav__menu-item--has-icon'>";
echo "<a href='rights.php' class='sa-nav__link'>";
echo "<span class='sa-nav__icon menu'>";
echo "<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' class='bi bi-blockquote-right' viewBox='0 0 16 16'>";
echo " <path d='M2.5 3a.5.5 0 0 0 0 1h11a.5.5 0 0 0 0-1h-11zm0 3a.5.5 0 0 0 0 1h6a.5.5 0 0 0 0-1h-6zm0 3a.5.5 0 0 0 0 1h6a.5.5 0 0 0 0-1h-6zm0 3a.5.5 0 0 0 0 1h11a.5.5 0 0 0 0-1h-11zm10.113-5.373a6.59 6.59 0 0 0-.445-.275l.21-.352c.122.074.272.17.452.287.18.117.35.26.51.428.156.164.289.351.398.562.11.207.164.438.164.692 0 .36-.072.65-.216.873-.145.219-.385.328-.721.328-.215 0-.383-.07-.504-.211a.697.697 0 0 1-.188-.463c0-.23.07-.404.211-.521.137-.121.326-.182.569-.182h.281a1.686 1.686 0 0 0-.123-.498 1.379 1.379 0 0 0-.252-.37 1.94 1.94 0 0 0-.346-.298zm-2.168 0A6.59 6.59 0 0 0 10 6.352L10.21 6c.122.074.272.17.452.287.18.117.35.26.51.428.156.164.289.351.398.562.11.207.164.438.164.692 0 .36-.072.65-.216.873-.145.219-.385.328-.721.328-.215 0-.383-.07-.504-.211a.697.697 0 0 1-.188-.463c0-.23.07-.404.211-.521.137-.121.327-.182.569-.182h.281a1.749 1.749 0 0 0-.117-.492 1.402 1.402 0 0 0-.258-.375 1.94 1.94 0 0 0-.346-.3z' />";
echo " </svg>";
echo " </span>";
echo "<span class='sa-nav__title menu'>Rights</span>";
echo "</a>";
echo "</li>";
}
?>
</ul>
</li>
</ul>
</div>
</div>
<div class="sa-app__sidebar-shadow"></div>
<div class="sa-app__sidebar-backdrop" data-sa-close-sidebar=""></div>
</div><!-- sa-app__sidebar / end --><!-- sa-app__content -->
<div class="sa-app__content"><!-- sa-app__toolbar -->
<div class="sa-toolbar sa-toolbar--search-hidden sa-app__toolbar">
<div class="sa-toolbar__body">
<div class="sa-toolbar__item"><button class="sa-toolbar__button" type="button" aria-label="Menu" data-sa-toggle-sidebar=""><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="currentColor">
<path d="M1,11V9h18v2H1z M1,3h18v2H1V3z M15,17H1v-2h14V17z"></path>
</svg></button></div>
<div class="sa-toolbar__item sa-toolbar__item--search">
<form class="sa-search sa-search--state--pending">
<div class="sa-search__dropdown">
<div class="sa-search__dropdown-loader"></div>
<div class="sa-search__dropdown-wrapper">
<div class="sa-search__suggestions sa-suggestions"></div>
<div class="sa-search__help sa-search__help--type--no-results">
<div class="sa-search__help-title">No results for "<span class="sa-search__query"></span>"</div>
<div class="sa-search__help-subtitle">Make sure that all words are spelled
correctly.</div>
</div>
<div class="sa-search__help sa-search__help--type--greeting">
<div class="sa-search__help-title">Start typing to search for</div>
<div class="sa-search__help-subtitle">Products, orders, customers, actions, etc.
</div>
</div>
</div>
</div>
<div class="sa-search__backdrop"></div>
</form>
</div>
<div class="mx-auto"></div>
<div class="sa-toolbar__item d-sm-none"><button class="sa-toolbar__button" type="button" aria-label="Show search" data-sa-action="show-search"><svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 16 16" fill="currentColor">
<path d="M16.243 14.828C16.243 14.828 16.047 15.308 15.701 15.654C15.34 16.015 14.828 16.242 14.828 16.242L10.321 11.736C9.247 12.522 7.933 13 6.5 13C2.91 13 0 10.09 0 6.5C0 2.91 2.91 0 6.5 0C10.09 0 13 2.91 13 6.5C13 7.933 12.522 9.247 11.736 10.321L16.243 14.828ZM6.5 2C4.015 2 2 4.015 2 6.5C2 8.985 4.015 11 6.5 11C8.985 11 11 8.985 11 6.5C11 4.015 8.985 2 6.5 2Z">
</path>
</svg></button></div>
<div class="dropdown sa-toolbar__item"><button class="sa-toolbar-user" type="button" id="dropdownMenuButton" data-bs-toggle="dropdown" data-bs-offset="0,1" aria-expanded="false"><span class="sa-toolbar-user__avatar sa-symbol sa-symbol--shape--rounded"><img src="images/person-circle.svg" width="64" height="64" alt="" /></span><span class="sa-toolbar-user__info"><span class="sa-toolbar-user__title"></span><span class="sa-toolbar-user__subtitle"></span></span></button>
<ul class="dropdown-menu w-100" aria-labelledby="dropdownMenuButton">
<li><a class="dropdown-item" href="logout.php">Sign Out</a></li>
</ul>
</div>
</div>
<div class="sa-toolbar__shadow"></div>
</div><!-- sa-app__toolbar / end --><!-- sa-app__body -->
<div id="top" class="sa-app__body">
<div class="mx-sm-2 px-2 px-sm-3 px-xxl-4 pb-6">
<div class="container">
<div class="py-5">
</div>
<div class="sa-entity-layout" data-sa-container-query="{"920":"sa-entity-layout--size--md","1100":"sa-entity-layout--size--lg"}">
<div class="sa-entity-layout__body">
<div class="sa-entity-layout__main">
<div class="card">
<div class="card-body p-5">
<div class="mb-5">
<h2 class="mb-0 fs-exact-18">Select Account</h2>
<input type="hidden" class="form-control" id="numberInput" name="number" readonly />
</div>
<div><label for="form-product/name" class="form-label">Serial No# <?php echo $number; ?></label><br><label for="form-product/name" class="form-label">Name: <?php echo $AccountName; ?></div>
</div>
<div class="p-4"><input type="text" onkeyup="myFunction()" id="myInput" placeholder="Start typing to search for slip" class="form-control form-control--search mx-auto" id="table-search" />
<div class="sa-divider"><br></div>
<table class="sa-datatables-init text-nowrap" id="myTable" data-order="[[ 1, "asc" ]]" data-sa-search-input="#table-search">
<thead style="background-color:silver">
<tr>
<th>Slip#</th>
<th>Date</th>
<th>Against</th>
<th>Plot Size</th>
<th>Type</th>
<th>Cheque</th>
<th>Total Price</th>
<th>Paid</th>
<th>Balance</th>
<th class="w-min" data-orderable="false"></th>
</tr>
</thead>
<tbody>
<?php
while ($row = mysqli_fetch_array($data)) {
?>
<tr>
<td><?php echo $row['slipNumber'] ?></td>
<td><?php echo $row['date'] ?></td>
<td><?php echo $row['against'] ?></td>
<td><?php echo $row['plotSize'] ?></td>
<td><?php echo $row['type'] ?></td>
<td><?php echo $row['cheque'] ?></td>
<td><?php echo $row['totalPrice']; $totalPriceForEnd = $totalPriceForEnd+ $row['totalPrice']; ?></td>
<td><?php echo $row['paid']; $totalPaidForEnd = $totalPaidForEnd+$row['paid']; ?></td>
<td><?php echo $row['balance']; $totalBalanceForEnd = $totalBalanceForEnd+$row['balance'];?></td>
<td>
<?php
if ($userType == "user") {
if ($editAccounts == "yes") {
echo " <div class='dropdown'><button class='btn btn-sa-muted btn-sm' type='button' id='order-context-menu-0' data-bs-toggle='dropdown' aria-expanded='false' aria-label='More'><svg xmlns='http://www.w3.org/2000/svg' width='3' height='13' fill='currentColor'>
<path d='M1.5,8C0.7,8,0,7.3,0,6.5S0.7,5,1.5,5S3,5.7,3,6.5S2.3,8,1.5,8z M1.5,3C0.7,3,0,2.3,0,1.5S0.7,0,1.5,0 S3,0.7,3,1.5S2.3,3,1.5,3z M1.5,10C2.3,10,3,10.7,3,11.5S2.3,13,1.5,13S0,12.3,0,11.5S0.7,10,1.5,10z'>
</path>
</svg></button>
<ul class='dropdown-menu dropdown-menu-end' aria-labelledby='order-context-menu-0'>
<li>
<form action='delete-token.php' method='post'>";
?>
<input type="hidden" name="slipNo" value="<?php echo $row["slipNo"] ?>" />
<?php
echo "
<input type='submit' class='dropdown-item text-danger' value='Delete' />
</form>
</li>
</ul>
</div>
";
}
}
?>
<?php
if ($userType == "admin") {
echo " <div class='dropdown'><button class='btn btn-sa-muted btn-sm' type='button' id='order-context-menu-0' data-bs-toggle='dropdown' aria-expanded='false' aria-label='More'><svg xmlns='http://www.w3.org/2000/svg' width='3' height='13' fill='currentColor'>
<path d='M1.5,8C0.7,8,0,7.3,0,6.5S0.7,5,1.5,5S3,5.7,3,6.5S2.3,8,1.5,8z M1.5,3C0.7,3,0,2.3,0,1.5S0.7,0,1.5,0 S3,0.7,3,1.5S2.3,3,1.5,3z M1.5,10C2.3,10,3,10.7,3,11.5S2.3,13,1.5,13S0,12.3,0,11.5S0.7,10,1.5,10z'>
</path>
</svg></button>
<ul class='dropdown-menu dropdown-menu-end' aria-labelledby='order-context-menu-0'>
<li>
<form action='delete-token.php' method='post'>";
?>
<input type="hidden" name="slipNo" value="<?php echo $row["slipNo"] ?>" />
<?php
echo "
<input type='submit' class='dropdown-item text-danger' value='Delete' />
</form>
</li>
</ul>
</div>
";
}
?>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
</div>
<div class="py-5">
</div>
<div class="card">
<b> <label style="padding:10px">Total Price: <?php echo $totalPriceForEnd; ?></label></b>
<b> <label style="padding:10px">Total Paid: <?php echo $totalPaidForEnd; ?></label></b>
<b> <label style="padding:10px">Total Balance: <?php echo $totalBalanceForEnd; ?></label></b>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div><!-- sa-app__body / end --><!-- sa-app__footer -->
</div><!-- sa-app__body / end --><!-- sa-app__footer -->
</div><!-- sa-app__content / end --><!-- sa-app__toasts -->
<div class="sa-app__footer d-block d-md-flex"><!-- copyright -->
<div class="m-auto"></div>
<div style="color:white;">© 2023 Powered by <a href="https://limanitsolutions.com.au/" style="color:orange;">Liman IT Solutions</a>, Contact: +447828384750</div>
<!-- copyright / end -->
</div><!-- sa-app__footer / end -->
<div class="sa-app__toasts toast-container bottom-0 end-0"></div><!-- sa-app__toasts / end -->
</div><!-- sa-app / end --><!-- scripts -->
<script>
function myFunction() {
// Declare variables
var input, filter, table, tr, td, i, j, txtValue;
input = document.getElementById("myInput");
filter = input.value.toUpperCase();
table = document.getElementById("myTable");
tr = table.getElementsByTagName("tr");
// Loop through all table rows, and hide those who don't match the search query
for (i = 0; i < tr.length; i++) {
// Reset display of row
tr[i].style.display = "";
// Check if search query is empty
if (filter === "") {
continue;
}
// Loop through all columns of the table row
for (j = 0; j < tr[i].cells.length; j++) {
td = tr[i].cells[j];
if (td) {
txtValue = td.textContent || td.innerText;
if (txtValue.toUpperCase().indexOf(filter) > -1) {
// Show row if search query matches any column value
tr[i].style.display = "";
break;
} else {
// Hide row if search query doesn't match any column value
tr[i].style.display = "none";
}
}
}
}
}
</script>
<?php
include('footerLinks.php');
?>
</body>
</html>