c
This commit is contained in:
@@ -278,15 +278,15 @@
|
|||||||
<input type="checkbox" name="selected_records[]" value="<?php echo $lead['id']; ?>" id="<?php echo $lead['id']; ?>" />
|
<input type="checkbox" name="selected_records[]" value="<?php echo $lead['id']; ?>" id="<?php echo $lead['id']; ?>" />
|
||||||
</td>
|
</td>
|
||||||
<?php }?>
|
<?php }?>
|
||||||
<td class="border-y-2 p-2"><label for="<?php echo $lead['id']; ?>"><?php echo $lead['name'] ?></label></td>
|
<td class="whitespace-nowrap border-y-2 p-2"><label for="<?php echo $lead['id']; ?>"><?php echo $lead['name'] ?></label></td>
|
||||||
<td class="border-y-2 p-2 text-blue-500 hover:text-blue-700 hover:underline"><a href="/edit-lead/?id=<?php echo $lead['id'] ?>"><?php echo $lead['id'] ?></a></td>
|
<td class="whitespace-nowrap border-y-2 p-2 text-blue-500 hover:text-blue-700 hover:underline"><a href="/edit-lead/?id=<?php echo $lead['id'] ?>"><?php echo $lead['id'] ?></a></td>
|
||||||
<td class="border-y-2 p-2"><div style="<?php echo $conditional_background_color; ?> font-weight: bold;"><?php echo $lead['status'];?></div></td>
|
<td class="whitespace-nowrap border-y-2 p-2"><div style="<?php echo $conditional_background_color; ?> font-weight: bold;"><?php echo $lead['status'];?></div></td>
|
||||||
<!-- <td class="border-y-2 p-2">
|
<!-- <td class="border-y-2 p-2">
|
||||||
<p><i class="fa fa-envelope"> <?php // echo $lead['email'] ?></i></p>
|
<p><i class="fa fa-envelope"> <?php // echo $lead['email'] ?></i></p>
|
||||||
<p><i class="fa fa-phone"> <?php // echo $lead['phone'] ?></i></p>
|
<p><i class="fa fa-phone"> <?php // echo $lead['phone'] ?></i></p>
|
||||||
</td> -->
|
</td> -->
|
||||||
<td class="border-y-2 p-2"><?php echo $lead['formname'] ?></td>
|
<td class="border-y-2 p-2"><?php echo $lead['formname'] ?></td>
|
||||||
<td class="border-y-2 p-2"><?php echo $only_date; ?></td>
|
<td class="whitespace-nowrap border-y-2 p-2"><?php echo $only_date; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -132,36 +132,36 @@
|
|||||||
?>
|
?>
|
||||||
<p class="text-[28px] font-bold p-4">Lead Management</p>
|
<p class="text-[28px] font-bold p-4">Lead Management</p>
|
||||||
<div id="page-body" class="flex flex-row place-content-between px-4">
|
<div id="page-body" class="flex flex-row place-content-between px-4">
|
||||||
<dialog>
|
<dialog id="d" class="rounded-lg">
|
||||||
<button style="float: right; color: #FF0000; font-size: 25px; padding: 6px;">✘</button>
|
<form class="text-2xl text-[#464E5F] border-[3px] m-2 border-[#464E5F] duration-700 rounded-full px-2 float-right" method="dialog" class=""><button class="">✘</button></form>
|
||||||
<div class="flex flex-row">
|
<div class="flex flex-row ">
|
||||||
<div class="flex flex-col p-6 space-y-4">
|
<div class="flex flex-col p-4 space-y-4 border-r-[1px] border-[#464E5F]">
|
||||||
<a href="/leads?start_date=<?php echo $today_date ?>&end_date=<?php echo $next_day ?>">Today</a>
|
<a class="whitespace-nowrap" href="/leads?start_date=<?php echo $today_date ?>&end_date=<?php echo $next_day ?>">Today</a>
|
||||||
<a href="/leads?start_date=<?php echo $yesterday ?>&end_date=<?php echo $today_date ?>">Yesterday</a>
|
<a class="whitespace-nowrap" href="/leads?start_date=<?php echo $yesterday ?>&end_date=<?php echo $today_date ?>">Yesterday</a>
|
||||||
<a href="/leads?start_date=<?php echo $this_week ?>&end_date=<?php echo $today_date ?>">This Week</a>
|
<a class="whitespace-nowrap" href="/leads?start_date=<?php echo $this_week ?>&end_date=<?php echo $today_date ?>">This Week</a>
|
||||||
<a href="/leads?start_date=<?php echo $firstDayOfCurrentMonth ?>&end_date=<?php echo $today_date ?>">This Month</a>
|
<a class="whitespace-nowrap" href="/leads?start_date=<?php echo $firstDayOfCurrentMonth ?>&end_date=<?php echo $today_date ?>">This Month</a>
|
||||||
<a href="/leads?start_date=<?php echo $prev_month_date ?>&end_date=<?php echo $today_date ?>">Last Month</a>
|
<a class="whitespace-nowrap" href="/leads?start_date=<?php echo $prev_month_date ?>&end_date=<?php echo $today_date ?>">Last Month</a>
|
||||||
<a href="/leads?start_date=<?php echo $firstDateOfYear ?>&end_date=<?php echo $today_date ?>">This Year</a>
|
<a class="whitespace-nowrap" href="/leads?start_date=<?php echo $firstDateOfYear ?>&end_date=<?php echo $today_date ?>">This Year</a>
|
||||||
<a href="/leads?start_date=<?php echo $firstDateOfPreviousYear ?>&end_date=<?php echo $today_date ?>">Last Year</a>
|
<a class="whitespace-nowrap" href="/leads?start_date=<?php echo $firstDateOfPreviousYear ?>&end_date=<?php echo $today_date ?>">Last Year</a>
|
||||||
<a href="/leads">All Time</a>
|
<a class="whitespace-nowrap" href="/leads">All Time</a>
|
||||||
</div>
|
</div>
|
||||||
<form method="GET" class="p-6 flex flex-col pb-10">
|
<form method="GET" class="p-6 flex flex-col pb-10">
|
||||||
<p>Choose Date for filter</p>
|
<p class="font-bold">Choose Date for filter</p>
|
||||||
<div class="flex flex-row rounded-xl py-10">
|
<div class="flex flex-row rounded-xl py-10">
|
||||||
<div class="flex flex-row place-items-center">
|
<div class="flex flex-row place-items-center border-2 border-[#464E5F] rounded-md">
|
||||||
<label for="start_date">From Date</label>
|
<label class="whitespace-nowrap" for="start_date">From Date</label>
|
||||||
<input type="date" name="start_date" id="start_date" />
|
<input class="focus:outline-none" type="date" name="start_date" id="start_date" />
|
||||||
</div> |
|
</div> |
|
||||||
<div class="flex flex-row place-items-center">
|
<div class="flex flex-row place-items-center border-2 border-[#464E5F] rounded-md">
|
||||||
<label for="end_date">To Date</label>
|
<label class="whitespace-nowrap" for="end_date">To Date</label>
|
||||||
<input type="date" name="end_date" id="end_date" />
|
<input class="focus:outline-none" type="date" name="end_date" id="end_date" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<button class="rounded-lg p-1 text-[#fff]" style="background: linear-gradient(90deg, rgba(111, 107, 255, 0.91) 0%, rgba(68, 55, 128, 0.91) 100%); text-align: center;" type="submit"><p class="text-center p-1.5">Search</p></button>
|
<button class="rounded-lg p-1 text-[#fff]" style="background: linear-gradient(90deg, rgba(111, 107, 255, 0.91) 0%, rgba(68, 55, 128, 0.91) 100%); text-align: center;" type="submit"><p class="text-center p-1.5">Search</p></button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</dialog>
|
</dialog>
|
||||||
<button class="rounded-lg p-2 h-fit bg-[#fff] text-[#464E5F] shadow-lg" style="">Select Date</button>
|
<button onclick="d.showModal()" class="rounded-lg pl-2 h-fit bg-[#fff] text-[#464E5F] shadow-lg flex flex-row justify-center place-items-center">Select Date<span class="fa fa-calendar-o -ml-[17px] pt-1.5"></span></button>
|
||||||
<div class="flex flex-row">
|
<div class="flex flex-row">
|
||||||
<form method="GET" action="" class="bg-[#fff] flex flex-row place-items-center">
|
<form method="GET" action="" class="bg-[#fff] flex flex-row place-items-center">
|
||||||
<input class="p-2.5 rounded-l-lg focus:outline-none w-[320px]" type="text" name="search" placeholder="Name, lead ID, Mobile, Email..." style="border: 2px solid #8E8E8E;">
|
<input class="p-2.5 rounded-l-lg focus:outline-none w-[320px]" type="text" name="search" placeholder="Name, lead ID, Mobile, Email..." style="border: 2px solid #8E8E8E;">
|
||||||
@@ -173,10 +173,10 @@
|
|||||||
echo '<p onclick="deleteCofermation();" class="rounded-lg h-fit py-2 px-6 text-[#fff] text-center" style="background: linear-gradient(90deg, rgba(111, 107, 255, 0.91) 0%, rgba(68, 55, 128, 0.91) 100%); cursor: pointer;">Delete</p>';
|
echo '<p onclick="deleteCofermation();" class="rounded-lg h-fit py-2 px-6 text-[#fff] text-center" style="background: linear-gradient(90deg, rgba(111, 107, 255, 0.91) 0%, rgba(68, 55, 128, 0.91) 100%); cursor: pointer;">Delete</p>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<button onclick="toggleDisplay();" class="rounded-lg p-2 h-fit text-[#fff]" style="background: linear-gradient(90deg, rgba(111, 107, 255, 0.91) 0%, rgba(68, 55, 128, 0.91) 100%); text-align: center;">Add Leads</button>
|
<button onclick="toggleDisplay();" class="rounded-lg px-2 h-fit text-[#fff] flex flex-row justify-center place-items-center" style="background: linear-gradient(90deg, rgba(111, 107, 255, 0.91) 0%, rgba(68, 55, 128, 0.91) 100%); text-align: center;"><span style="font-size: 30px; font-weight: bold">+</span><span>Add Leads</span></button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<form method="post">
|
<form method="post" class="">
|
||||||
<table class="bg-[#fff] text-[#3F4254] rounded-lg font-bold" style="width: 100%;" >
|
<table class="bg-[#fff] text-[#3F4254] rounded-lg font-bold" style="width: 100%;" >
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -193,11 +193,11 @@
|
|||||||
</th>';
|
</th>';
|
||||||
?>
|
?>
|
||||||
<th class="text-center border-b-2 p-3">Name</th>
|
<th class="text-center border-b-2 p-3">Name</th>
|
||||||
<th class="text-center border-b-2 p-3">ID</th>
|
<th class="text-left border-b-2 p-3">ID</th>
|
||||||
<th class="text-center border-b-2 p-3">Status Update</th>
|
<th class="text-center border-b-2 p-3">Status Update</th>
|
||||||
<!-- <th class="text-center border-b-2 p-3">Contact Detail</th> -->
|
<!-- <th class="text-center border-b-2 p-3">Contact Detail</th> -->
|
||||||
<th class="text-center border-b-2 p-3">Form Name</th>
|
<th class="text-center border-b-2 p-3">Form Name</th>
|
||||||
<th class="text-center border-b-2 p-3">Date</th>
|
<th class="text-left border-b-2 p-3">Date</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody >
|
<tbody >
|
||||||
@@ -250,7 +250,7 @@
|
|||||||
$totalResults = count($leads);
|
$totalResults = count($leads);
|
||||||
$totalPages = ceil($totalRows / $resultsPerPage);
|
$totalPages = ceil($totalRows / $resultsPerPage);
|
||||||
if($resultsPerPage <= $totalRows) echo "<p class='px-4'>".$resultsPerPage." Out of ".$totalRows." Leads </p>";
|
if($resultsPerPage <= $totalRows) echo "<p class='px-4'>".$resultsPerPage." Out of ".$totalRows." Leads </p>";
|
||||||
else echo "<p class='px-4'>".$totalRows." Leads </p>";
|
// else echo "<p class='px-4'>".$totalRows." Leads </p>";
|
||||||
// Status Conditional Color
|
// Status Conditional Color
|
||||||
foreach($leads as $lead){
|
foreach($leads as $lead){
|
||||||
$only_date =isset($lead['time']) ? substr($lead['time'], 0, 10): 'Not Available';
|
$only_date =isset($lead['time']) ? substr($lead['time'], 0, 10): 'Not Available';
|
||||||
@@ -269,15 +269,15 @@
|
|||||||
<input type="checkbox" name="selected_records[]" value="<?php echo $lead['id']; ?>" id="<?php echo $lead['id']; ?>" />
|
<input type="checkbox" name="selected_records[]" value="<?php echo $lead['id']; ?>" id="<?php echo $lead['id']; ?>" />
|
||||||
</td>
|
</td>
|
||||||
<?php }?>
|
<?php }?>
|
||||||
<td class="border-y-2 p-2"><label for="<?php echo $lead['id']; ?>"><?php echo $lead['name'] ?></label></td>
|
<td class="whitespace-nowrap border-y-2 p-2"><label for="<?php echo $lead['id']; ?>"><?php echo $lead['name'] ?></label></td>
|
||||||
<td class="border-y-2 p-2 text-blue-500 hover:text-blue-700 hover:underline"><a href="/edit-lead/?id=<?php echo $lead['id'] ?>"><?php echo $lead['id'] ?></a></td>
|
<td class="whitespace-nowrap border-y-2 p-2 text-blue-500 hover:text-blue-700 hover:underline"><a href="/edit-lead/?id=<?php echo $lead['id'] ?>"><?php echo $lead['id'] ?></a></td>
|
||||||
<td class="border-y-2 p-2"><div style="<?php echo $conditional_background_color; ?> font-weight: bold;"><?php echo $lead['status'];?></div></td>
|
<td class="whitespace-nowrap border-y-2 p-2"><div style="<?php echo $conditional_background_color; ?> font-weight: bold;"><?php echo $lead['status'];?></div></td>
|
||||||
<!-- <td class="border-y-2 p-2">
|
<!-- <td class="border-y-2 p-2">
|
||||||
<p><i class="fa fa-envelope"> <?php // echo $lead['email'] ?></i></p>
|
<p><i class="fa fa-envelope"> <?php // echo $lead['email'] ?></i></p>
|
||||||
<p><i class="fa fa-phone"> <?php // echo $lead['phone'] ?></i></p>
|
<p><i class="fa fa-phone"> <?php // echo $lead['phone'] ?></i></p>
|
||||||
</td> -->
|
</td> -->
|
||||||
<td class="border-y-2 p-2"><?php echo $lead['formname'] ?></td>
|
<td class="border-y-2 p-2"><?php echo $lead['formname'] ?></td>
|
||||||
<td class="border-y-2 p-2"><?php echo $only_date; ?></td>
|
<td class="whitespace-nowrap border-y-2 p-2"><?php echo $only_date; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
@@ -292,7 +292,7 @@
|
|||||||
$execution_time = ($end_time - $start_time);
|
$execution_time = ($end_time - $start_time);
|
||||||
|
|
||||||
// Output execution time
|
// Output execution time
|
||||||
echo "Page executed in: " . $execution_time . " seconds";
|
// echo "Page executed in: " . $execution_time . " seconds";
|
||||||
?>
|
?>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
Reference in New Issue
Block a user