s11
parent
6e69bf9f35
commit
8bcf5c055d
|
@ -1,5 +1,12 @@
|
|||
<div class="container mt-4">
|
||||
<h2>Welcome: <?php echo $_SESSION['userName']; ?></h2>
|
||||
<?php
|
||||
if(isset($_SESSION['isLogedin']) && $_SESSION['isLogedin'] == 1){
|
||||
echo '<h2>Welcome: ' . $_SESSION['userName'] . '</h2>';
|
||||
} else{
|
||||
// echo '<a href="/login">Click here to login</a>';
|
||||
}
|
||||
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
// var_dump($_SESSION);
|
||||
|
|
|
@ -1,45 +1,47 @@
|
|||
<nav class="navbar navbar-expand-lg navbar-dark bg-primary">
|
||||
<nav class="navbar navbar-expand-lg " style="background-color: #ffffff; box-shadow: 0 0 5px 0; color: #374151;">
|
||||
<div class="container">
|
||||
<a class="navbar-brand" href="#">MyWebsite</a>
|
||||
<a class="navbar-brand" href="/" style="color: #374151; font-weight: bold;">
|
||||
<img src="/assets/logo_dark.png" alt="Class Boxes Logo" style="width: 100px;">
|
||||
</a>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarNav">
|
||||
<ul class="navbar-nav ms-auto">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" href="/">Home</a>
|
||||
<a class="nav-link active" href="/" style="color: #374151;">Home</a>
|
||||
</li>
|
||||
<?php
|
||||
if(isset($_SESSION['isLogedin']) && $_SESSION['isLogedin'] === true){
|
||||
if(isset($_SESSION['userType']) && $_SESSION['userType'] === 'admin'){
|
||||
echo '
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="/customers/new">New Customer</a>
|
||||
<a class="nav-link" href="/customers/new" style="color: #374151;">New Customer</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="/customers/list">Customer List</a>
|
||||
<a class="nav-link" href="/customers/list" style="color: #374151;">Customer List</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="/admin/stat/">Stat</a>
|
||||
<a class="nav-link" href="/admin/stat/" style="color: #374151;">Stat</a>
|
||||
</li>
|
||||
|
||||
';
|
||||
} elseif(isset($_SESSION['userType']) && $_SESSION['userType'] === 'user')
|
||||
echo '
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="/my-account">My Account</a>
|
||||
<a class="nav-link" href="/my-account" style="color: #374151;">My Account</a>
|
||||
</li>';
|
||||
}
|
||||
?>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="/contact-us">Contact</a>
|
||||
<a class="nav-link" href="/contact-us" style="color: #374151;">Contact</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<?php
|
||||
if (isset($_SESSION['isLogedin']) && $_SESSION['isLogedin'] === true) {
|
||||
echo '<a class="nav-link" href="/logout">Logout</a>';
|
||||
echo '<a class="nav-link" href="/logout" style="color: #374151;">Logout</a>';
|
||||
} else {
|
||||
echo '<a class="nav-link" href="/login">Login</a>';
|
||||
echo '<a class="nav-link" href="/login" style="color: #374151;">Login</a>';
|
||||
}
|
||||
?>
|
||||
</li>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<div class="container flex-grow-1 d-flex align-items-center justify-content-center mt-4">
|
||||
<div class="card shadow-lg border-0 p-4 w-100" style="max-width: 500px;">
|
||||
<div class="card-body">
|
||||
<h2 class="text-center text-primary fw-bold">Contact Us</h2>
|
||||
<h2 class="text-center fw-bold" style="color: #374151;">Contact Us</h2>
|
||||
<p class="text-center text-muted">We'd love to hear from you! Fill out the form below.</p>
|
||||
<form>
|
||||
<div class="mb-3">
|
||||
|
@ -16,7 +16,7 @@
|
|||
<label class="form-label fw-semibold">Message</label>
|
||||
<textarea class="form-control" rows="4" placeholder="Your Message"></textarea>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary w-100 fw-semibold">Send Message</button>
|
||||
<button type="submit" class="btn w-100 fw-semibold text-white" style="background-color: #374151;">Send Message</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
|
||||
<div class="d-flex justify-content-center align-items-center vh-100 bg-light">
|
||||
<div class="card p-4 shadow-lg" style="max-width: 400px; width: 100%;">
|
||||
<h3 class="text-center mb-4">Login</h3>
|
||||
<h3 class="text-center mb-4 fw-bold" style="color: #374151;">Login</h3>
|
||||
<form method="post">
|
||||
<div class="mb-3">
|
||||
<label for="email" class="form-label">Email address</label>
|
||||
|
@ -48,8 +48,8 @@
|
|||
<input type="checkbox" class="form-check-input" id="rememberMe">
|
||||
<label class="form-check-label" for="rememberMe">Remember me</label>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary w-100">Login</button>
|
||||
<button type="submit" class="btn text-white w-100" style="background-color: #374151;">Login</button>
|
||||
</form>
|
||||
<p class="text-center mt-3"><a href="#">Forgot password?</a></p>
|
||||
<!-- <p class="text-center mt-3"><a href="#">Forgot password?</a></p> -->
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -46,7 +46,7 @@ try {
|
|||
|
||||
|
||||
<div class="container mt-5">
|
||||
<h3 class="text-primary mb-4 text-center">Pending EMIs (<?php echo date('F Y', strtotime($startDate)); ?>)</h3>
|
||||
<h3 class="mb-4 text-center" style="color: #374151;">Pending EMIs (<?php echo date('F Y', strtotime($startDate)); ?>)</h3>
|
||||
|
||||
<!-- Date & Month Filter Form -->
|
||||
<form method="GET" class="d-flex flex-wrap gap-3 align-items-end justify-content-center">
|
||||
|
@ -66,14 +66,14 @@ try {
|
|||
<input type="date" id="end_date" name="end_date" class="form-control" value="<?php echo htmlspecialchars($endDate); ?>">
|
||||
</div>
|
||||
<div class="text-center">
|
||||
<button type="submit" class="btn btn-primary px-4">Filter</button>
|
||||
<button type="submit" class="btn text-white px-4" style="background-color: #374151;">Filter</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<!-- EMI Table -->
|
||||
<div class="table-responsive mt-4">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead class="bg-primary text-white text-center">
|
||||
<thead class="text-white text-center" style="background-color: #374151;">
|
||||
<tr>
|
||||
<th>Customer Name</th>
|
||||
<th>EMI Amount</th>
|
||||
|
@ -109,7 +109,7 @@ try {
|
|||
</div>
|
||||
|
||||
<!-- Total Demand Amount -->
|
||||
<div class="alert alert-info text-center mt-3">
|
||||
<div class="alert fw-bold text-center mt-3" style="background-color: #37415130;">
|
||||
<h4 class="mb-0">Total Demand EMI Amount: $<?php echo number_format($totalDemand, 2); ?></h4>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 308 KiB |
|
@ -46,7 +46,7 @@
|
|||
<h3 class="mb-3 ">Customer List</h3><hr>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-striped table-hover w-100" style="font-size: 13px;">
|
||||
<thead class="bg-primary text-white text-center" >
|
||||
<thead class="text-white text-center" style="background-color: #374151;">
|
||||
<tr>
|
||||
<th>Sl No</th>
|
||||
<th>Name</th>
|
||||
|
@ -123,9 +123,9 @@
|
|||
<td>$<?php echo isset($emi['totalAmount']) ? htmlspecialchars($emi['totalAmount']) : '0.00'; ?></td>
|
||||
|
||||
<td class="d-inline-flex gap-1">
|
||||
<a href="/customers/generate-invoice/?customerId=<?php echo $customer['customerId']; ?>" class="btn btn-primary btn-sm" style="font-size: 13px;">New</a>
|
||||
<a href="/customers/edit-invoice/?customerId=<?php echo $customer['customerId'].'&invoiceId='.$invoice['invoiceId']; ?>" class="btn btn-primary btn-sm" style="font-size: 13px;">Edit</a>
|
||||
<a href="/customers/print-invoice/?customerId=<?php echo $customer['customerId'].'&invoiceId='.$invoice['invoiceId']; ?>" class="btn btn-primary btn-sm" style="font-size: 13px;">Print</a>
|
||||
<a href="/customers/generate-invoice/?customerId=<?php echo $customer['customerId']; ?>" class="btn btn-sm text-white" style="font-size: 13px; background-color: #374151;">New</a>
|
||||
<a href="/customers/edit-invoice/?customerId=<?php echo $customer['customerId'].'&invoiceId='.$invoice['invoiceId']; ?>" class="btn btn-sm text-white" style="font-size: 13px; background-color: #374151;">Edit</a>
|
||||
<a href="/customers/print-invoice/?customerId=<?php echo $customer['customerId'].'&invoiceId='.$invoice['invoiceId']; ?>" class="btn btn-sm text-white" style="font-size: 13px; background-color: #374151;">Print</a>
|
||||
<form method="post">
|
||||
<input type="hidden" name="customerId" value="<?php echo htmlspecialchars($customer['customerId']); ?>" />
|
||||
<input type="hidden" name="invoiceId" value="<?php echo htmlspecialchars($invoice['invoiceId']); ?>" />
|
||||
|
@ -143,7 +143,7 @@
|
|||
<td><?php echo htmlspecialchars($customer['name']); ?></td>
|
||||
<td colspan="6" class="text-center">No EMI or Invoice Data</td>
|
||||
<td class="d-flex flex-wrap gap-1">
|
||||
<a href="/customers/generate-invoice/?customerId=<?php echo $customer['customerId']; ?>" class="btn btn-primary btn-sm">New</a>
|
||||
<a href="/customers/generate-invoice/?customerId=<?php echo $customer['customerId']; ?>" class="btn btn-sm text-white">New</a>
|
||||
<form method="post">
|
||||
<input type="hidden" name="customerId" value="<?php echo htmlspecialchars($customer['customerId']); ?>" />
|
||||
<input type="hidden" name="invoiceId" value="<?php echo htmlspecialchars($invoice['invoiceId']); ?>" />
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<div class="row justify-content-center">
|
||||
<div class="col-md-6">
|
||||
<div class="card shadow-lg">
|
||||
<div class="card-header bg-primary text-white text-center">
|
||||
<div class="card-header text-white text-center" style="background-color: #374151;">
|
||||
<h4>Customer Registration</h4>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
|
@ -87,7 +87,7 @@
|
|||
<label for="password">Password:</label>
|
||||
<input type="password" id="password" name="password" class="form-control" required>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-success btn-block mt-2">Save Customer</button>
|
||||
<button type="submit" class="btn btn-block mt-2 text-white" style="background-color: #374151;">Save Customer</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -22,7 +22,7 @@ if ($invoiceInfo['tenure'] > 1) {
|
|||
|
||||
<div class="container my-5">
|
||||
<div class="invoice-box">
|
||||
<h2 class="text-center text-blue">Invoice</h2><hr>
|
||||
<h2 class="text-center fw-bold" style="color: #374151;">Invoice</h2><hr>
|
||||
<div class="d-flex justify-content-between">
|
||||
<div class="w-100">
|
||||
<h6>Invoice ID: <?= $invoiceInfo['invoiceId'] ?></h6>
|
||||
|
@ -37,7 +37,7 @@ if ($invoiceInfo['tenure'] > 1) {
|
|||
</div>
|
||||
|
||||
<table class="table table-bordered mt-3">
|
||||
<thead class="table-dark">
|
||||
<thead class="text-white" style="background-color: #374151;">
|
||||
<tr>
|
||||
<th>Item</th>
|
||||
<th>Description</th>
|
||||
|
@ -63,12 +63,13 @@ if ($invoiceInfo['tenure'] > 1) {
|
|||
|
||||
<!-- EMI Table (if tenure > 1) -->
|
||||
<?php if ($invoiceInfo['tenure'] > 1): ?>
|
||||
<h5 class="mt-4 text-blue">EMI Payment Plan</h5>
|
||||
<h5 class="mt-4" style="color: #374151;">EMI Payment Plan</h5>
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>EMI No.</th>
|
||||
<th>EMI Date</th>
|
||||
<th>Payment Date</th>
|
||||
<th>EMI Amount</th>
|
||||
<th>Outstanding</th>
|
||||
<th>Status</th>
|
||||
|
@ -79,6 +80,7 @@ if ($invoiceInfo['tenure'] > 1) {
|
|||
<tr>
|
||||
<td><?= $emi['emiNumber'] ?></td>
|
||||
<td><?= $emi['emiDate'] ?></td>
|
||||
<td><?= $emi['payStatus'] == 1 ? $emi['paymentDate'] : 'Unpaid' ?></td>
|
||||
<td>$<?= number_format($emi['emiAmount'], 2) ?></td>
|
||||
<td>$<?= number_format($emi['outstanding'], 2) ?></td>
|
||||
<td>
|
||||
|
@ -89,7 +91,7 @@ if ($invoiceInfo['tenure'] > 1) {
|
|||
</tbody>
|
||||
</table>
|
||||
<?php endif; ?>
|
||||
<h5 class="mt-4 text-blue">Additional Payment Details:</h5>
|
||||
<h5 class="mt-4" style="color: #374151;">Additional Payment Details:</h5>
|
||||
<table class="table table-striped " style="font-size: 12px;">
|
||||
<thead class="">
|
||||
<tr>
|
||||
|
@ -122,7 +124,7 @@ if ($invoiceInfo['tenure'] > 1) {
|
|||
|
||||
<p class="text-muted mt-3"><strong>Admin Note:</strong> <?= $invoiceInfo['adminNote'] ?></p>
|
||||
<p style="font-size: 12px;"><strong>Invoice Generate Date: </strong><span id="invoiceGenDate"></span></p>
|
||||
<button onclick="window.print()" class="btn btn-primary btn-print w-100">Print Invoice</button>
|
||||
<button onclick="window.print()" class="btn text-white btn-print w-100" style="background-color: #374151;">Print Invoice</button>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 3.7 KiB |
|
@ -5,7 +5,7 @@
|
|||
<h2 class="mb-3 text-center">Customer List</h2>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-striped table-hover">
|
||||
<thead class="bg-primary text-white text-center">
|
||||
<thead class="text-white text-center" style="background-color: #374151;">
|
||||
<tr>
|
||||
<th>Sl No</th>
|
||||
<th>Name</th>
|
||||
|
@ -19,6 +19,9 @@
|
|||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
// var_dump($_SESSION);
|
||||
$customerId = $_SESSION['customerId'];
|
||||
// echo $customerId;
|
||||
try {
|
||||
// Connect to the database
|
||||
$db = new PDO("mysql:host=$mariaServer;dbname=$mariaDb", $mariaUser, $mariaPass);
|
||||
|
@ -26,15 +29,14 @@
|
|||
|
||||
// Fetch customer data
|
||||
$stmt = $db->prepare("SELECT * FROM customers WHERE customerId = :customerId ORDER BY regDate DESC");
|
||||
$stmt->bindParam(':customerId', $_SESSION['customerId']);
|
||||
$stmt->bindParam(':customerId', $customerId);
|
||||
$stmt->execute();
|
||||
$content = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
||||
|
||||
// Fetch invoice data
|
||||
$stmt2 = $db->prepare("SELECT * FROM invoice");
|
||||
$stmt2->execute();
|
||||
$invoiceContent = $stmt2->fetchAll(PDO::FETCH_ASSOC);
|
||||
|
||||
|
||||
// Loop through each customer
|
||||
$customerSerial = 1;
|
||||
foreach ($content as $customer) {
|
||||
|
@ -59,8 +61,8 @@
|
|||
<td><?php echo htmlspecialchars($invoice['totalAmount']); ?></td>
|
||||
|
||||
<td>
|
||||
<a href="/my-account/emi-details/?customerId=<?php echo $customer['customerId'] . '&invoiceId=' . $invoice['invoiceId']; ?>" class="btn btn-primary btn-sm">EMI Details</a>
|
||||
<a href="/my-account/print-invoice/?customerId=<?php echo $customer['customerId'] . '&invoiceId=' . $invoice['invoiceId']; ?>" class="btn btn-primary btn-sm">Print</a>
|
||||
<a href="/my-account/emi-details/?customerId=<?php echo $customer['customerId'] . '&invoiceId=' . $invoice['invoiceId']; ?>" class="btn text-white btn-sm" style="background-color: #374151;">EMI Details</a>
|
||||
<a href="/my-account/print-invoice/?customerId=<?php echo $customer['customerId'] . '&invoiceId=' . $invoice['invoiceId']; ?>" class="btn text-white btn-sm" style="background-color: #374151;">Print</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
|
@ -75,7 +77,7 @@
|
|||
<td><?php echo htmlspecialchars($customer['email']); ?></td>
|
||||
<td colspan="3">No invoice available</td>
|
||||
<td>
|
||||
<a href="/my-account/emi-details/?customerId=<?php echo $customer['customerId'] . '&invoiceId=' . $invoice['invoiceId']; ?>" class="btn btn-primary btn-sm">EMI Details</a>
|
||||
<a href="/my-account/emi-details/?customerId=<?php echo $customer['customerId'] . '&invoiceId=' . $invoice['invoiceId']; ?>" class="btn text-white btn-sm" style="background-color: #374151;">EMI Details</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
|
|
|
@ -71,7 +71,7 @@ try {
|
|||
|
||||
</div>
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead class="bg-primary text-white text-center">
|
||||
<thead class="text-white text-center" style="background-color: #374151;">
|
||||
<tr>
|
||||
<th>Number of EMI</th>
|
||||
<th>EMI Amount</th>
|
||||
|
|
|
@ -22,7 +22,7 @@ if ($invoiceInfo['tenure'] > 1) {
|
|||
|
||||
<div class="container my-5">
|
||||
<div class="invoice-box">
|
||||
<h2 class="text-center text-blue">Invoice</h2><hr>
|
||||
<h2 class="text-center fw-bold" style="color: #374151;">Invoice</h2><hr>
|
||||
<div class="d-flex justify-content-between">
|
||||
<div class="w-100">
|
||||
<h6>Invoice ID: <?= $invoiceInfo['invoiceId'] ?></h6>
|
||||
|
@ -64,12 +64,13 @@ if ($invoiceInfo['tenure'] > 1) {
|
|||
https://center.rgyci.org/printresult_admin.php?sid=®=WB180Y2021R11308&sem=1 -->
|
||||
<!-- EMI Table (if tenure > 1) -->
|
||||
<?php if ($invoiceInfo['tenure'] > 1): ?>
|
||||
<h4 class="mt-4 text-blue">EMI Payment Plan</h4>
|
||||
<h4 class="mt-4" style="color: #374151;">EMI Payment Plan</h4>
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>EMI No.</th>
|
||||
<th>EMI Date</th>
|
||||
<th>Payment Date</th>
|
||||
<th>EMI Amount</th>
|
||||
<th>Outstanding</th>
|
||||
<th>Status</th>
|
||||
|
@ -80,6 +81,7 @@ if ($invoiceInfo['tenure'] > 1) {
|
|||
<tr>
|
||||
<td><?= $emi['emiNumber'] ?></td>
|
||||
<td><?= $emi['emiDate'] ?></td>
|
||||
<td><?= $emi['payStatus'] == 1 ? $emi['paymentDate'] : 'Unpaid' ?></td>
|
||||
<td>$<?= number_format($emi['emiAmount'], 2) ?></td>
|
||||
<td>$<?= number_format($emi['outstanding'], 2) ?></td>
|
||||
<td>
|
||||
|
@ -94,7 +96,7 @@ if ($invoiceInfo['tenure'] > 1) {
|
|||
<p class="text-muted mt-3"><strong>Admin Note:</strong> <?= $invoiceInfo['adminNote'] ?></p>
|
||||
|
||||
<!-- Print Button -->
|
||||
<button onclick="window.print()" class="btn btn-primary btn-print w-100">Print Invoice</button>
|
||||
<button onclick="window.print()" class="btn text-white btn-print w-100" style="background-color: #374151;">Print Invoice</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in New Issue