Skip to content

Commit

Permalink
feat: "added working search bar in showItems.php"
Browse files Browse the repository at this point in the history
  • Loading branch information
kamranzafar4343 committed Sep 10, 2024
1 parent ed7cd15 commit e359a34
Show file tree
Hide file tree
Showing 4 changed files with 217 additions and 97 deletions.
22 changes: 11 additions & 11 deletions Companies.php
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@
<table class="table table-borderless datatable" style="table-layout: fixed;">

<colgroup>
<col style="width:10%;">
<col style="width:6%;">
<col style="width: 15%;">
<col style="width: 10%;">
<col style="width: 12%;">
Expand All @@ -434,18 +434,18 @@
</colgroup>
<thead>
<tr>
<th scope="col">Comp. Id</th>
<th scope="col" style="width:6%;">#</th>

<th scope="col">Name</th>
<th scope="col">Image</th>
<th scope="col">Phone</th>
<th scope="col">Email</th>
<th scope="col" style="width:10%;">Name</th>
<th scope="col" style="width:12%;">Image</th>
<th scope="col" style="width:14%;">Phone</th>
<th scope="col" style="width:15%;">Email</th>
<!-- <th scope="col">Password</th> -->
<th scope="col">City</th>
<th scope="col">Country</th>
<th scope="col"> Reg. Date</th>
<th scope="col">Expiry</th>
<th scope="col">Actions</th>
<th scope="col" style="width:8%;">City</th>
<th scope="col" style="width:9%;">Country</th>
<th scope="col" style="width:10%;"> Reg. Date</th>
<th scope="col" style="width:10%;">Expiry</th>
<th scope="col" style="width:9%;">Actions</th>
</tr>
</thead>
<tbody style="table-layout: fixed;">
Expand Down
37 changes: 25 additions & 12 deletions box.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@

$email = $_SESSION['email'];
//get user name and email from register table
$getAdminData = "SELECT * FROM register WHERE email = '$email'";
$resultData = mysqli_query($conn, $getAdminData);
if($resultData ->num_rows > 0){
$row2= $resultData->fetch_assoc();
$adminName= $row2['name'];
$adminEmail=$row2['email'];
}
$getAdminData = "SELECT * FROM register WHERE email = '$email'";
$resultData = mysqli_query($conn, $getAdminData);
if ($resultData->num_rows > 0) {
$row2 = $resultData->fetch_assoc();
$adminName = $row2['name'];
$adminEmail = $row2['email'];
}

// Fetch box of the company
$sql = "SELECT * FROM box";
Expand Down Expand Up @@ -222,7 +222,7 @@
}

.datatable-top {
width: 1048px;
width: 942px;

}

Expand Down Expand Up @@ -320,9 +320,6 @@
margin-left: 50px;
}

.datatable-top {
width: 844px;
}

.datatable-bottom {
width: 122%;
Expand Down Expand Up @@ -365,7 +362,7 @@
<button type="submit" title="Search"><i class="bi bi-search"></i></button>
</form>
</div><!-- End Search Bar -->
<h3>List of boxes</h3>

<nav class="header-nav ms-auto">
<ul class="d-flex align-items-center">

Expand Down Expand Up @@ -497,6 +494,22 @@

<div class="cardBranch recent-sales overflow-auto">
<div class="card-body">
<h5 class="card-title">List of Boxes</h5>
<!-- <div class="datatable-top">
<div class="datatable-dropdown">
<label>
<select class="datatable-selector" name="per-page">
<option value="5">5</option>
<option value="10" selected="">10</option>
<option value="15">15</option>
<option value="-1">All</option>
</select> entries per page
</label>
</div>
<div class="datatable-search">
<input class="datatable-input" placeholder="Search..." type="search" name="search" title="Search within table">
</div>
</div> -->
<?php
if ($result->num_rows > 0) {
?>
Expand Down
Loading

0 comments on commit e359a34

Please sign in to comment.