Merge pull request 'add agent panel' (#3) from copy_main into main

Reviewed-on: #3
This commit is contained in:
2025-09-01 11:34:14 +00:00
4 changed files with 20 additions and 1 deletions

View File

@@ -1,5 +1,8 @@
<?php
if(!isset($_SESSION) && empty($_SESSION['user_id'])){
echo "<script>window.location.href = '/Agent/agent-login'</script>";
exit;
}
function getTotalAmount(array $rows): float {
// array_column diye sudhu AT_AMOUNT gulo niye ashbo
$amounts = array_column($rows, 'AT_AMOUNT');

View File

@@ -1,3 +1,9 @@
<?php
if(!isset($_SESSION) && empty($_SESSION['user_id'])){
echo "<script>window.location.href = '/Agent/agent-login'</script>";
exit;
}
?>
<div class="container">
<h3 class="">New Payment</h3>
<div style="display: flex; gap: 20px; flex-direction: row;">

View File

@@ -1,3 +1,9 @@
<?php
if(!isset($_SESSION) && empty($_SESSION['user_id'])){
echo "<script>window.location.href = '/Agent/agent-login'</script>";
exit;
}
?>
<div class="container mt-4">
<div class="card shadow-lg p-4 rounded-3">
<h4 class="mb-3">Generate Report</h4>

View File

@@ -1,4 +1,8 @@
<?php
if(!isset($_SESSION) && empty($_SESSION['user_id'])){
echo "<script>window.location.href = '/Agent/agent-login'</script>";
exit;
}
$conn = new mysqli($GLOBALS['host'], $GLOBALS['user'], $GLOBALS['pass'], $GLOBALS['db']);
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);