stacy_branch #50

Merged
MarkHipe merged 4 commits from stacy_branch into main 2024-04-02 08:02:14 +08:00
1 changed files with 15 additions and 4 deletions
Showing only changes of commit 1b4746336f - Show all commits

View File

@ -5,6 +5,7 @@ $_SESSION["url"] = $_SERVER['REQUEST_URI'];
if ($_SESSION["userId"] <> "") {
$_SESSION["isLoggedIn"] = true;
//$customer_data = getCustomerbyLoginId($_SESSION["userId"]);
$customer_data = getCustomerbyLoginId($_SESSION["userId"]);
} else {
$_SESSION["isLoggedIn"] = false;
header("location: login.php");
@ -14,6 +15,8 @@ if ($_SESSION["user_type"] != "admin") {
header("location: login.php?alert=Only admins allowed here!");
}
$products = productList();
$vendorSearchResult = $_SESSION["vendorSearchResult"];
?>
<!DOCTYPE html>
<html lang="en" dir="ltr">
@ -64,7 +67,8 @@ $products = productList();
<link id="ekka-css" rel="stylesheet" href="assets/css/ekka.css" />
<!-- FAVICON -->
<link href="assets/img/favicon.png" rel="shortcut icon" />
<!-- <link href="assets/img/favicon.png" rel="shortcut icon" /> -->
<link href="assets/img/favicon/favicon.png" rel="shortcut icon" />
<!-- FONTAWESOME -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css" integrity="sha512-DTOQO9RWCH3ppGqcWaEA1BIZOC6xxalwEsw9c2QQeAIftl+Vegovlnee1c9QX4TctnWMn13TZye+giMm8e2LwA==" crossorigin="anonymous" referrerpolicy="no-referrer" />
@ -128,7 +132,7 @@ $products = productList();
foreach ($vendorsCopy as $result) {
$vendorName = strtolower($result['user_login']);
if (
strpos($vendorName,$_GET['search'])!==false
strpos($vendorName,strtolower($_GET['search']))!==false
) {
$filteredProducts[] = $result;
} else{
@ -806,10 +810,17 @@ function validateEmail(vendorId) {
<!-- Ec Pagination Start -->
<div class="pagination mt-3">
<?php
for ($i = 1; $i <= $totalPages; $i++) {
echo "<a href='?page=$i' class='" . ($currentpage == $i ? 'active' : '') . "'>$i</a>";
// for ($i = 1; $i <= $totalPages; $i++) {
// echo "<a href='?page=$i' class='" . ($currentpage == $i ? 'active' : '') . "'>$i</a>";
// }
if ($totalVendors >= $vendorsPerPage) {
for ($i = 1; $i <= $totalPages; $i++) {
echo "<a href='?page=$i' class='" . ($currentpage == $i ? 'active' : '') . "'>$i</a>";
}
}
?>
</div>
<!-- Ec Pagination End -->