diff --git a/.hta_slug/edit-lead.php b/.hta_slug/edit-lead.php index 83efff0..5ff7d04 100644 --- a/.hta_slug/edit-lead.php +++ b/.hta_slug/edit-lead.php @@ -186,9 +186,9 @@

-
+
-

Follow Update

+

Followup Date

@@ -222,6 +222,92 @@ ?>
+
+

Quick Action

+
+   |   +
+
+ +
+
+ + + + +
+ + +
+ + + + +
+ + +
+
+ + + + +
+ + +
+ + + + +
+ + Bespoke +
+
+ + + + +
+ +
+ + + + +
+ +
+ + + + +
+ +
+
+
+
+
+
+
@@ -231,7 +317,7 @@
-
+

Comments:

@@ -460,29 +546,51 @@
\ No newline at end of file diff --git a/.hta_slug/leads.php b/.hta_slug/leads.php index 6d75dc0..a858d70 100644 --- a/.hta_slug/leads.php +++ b/.hta_slug/leads.php @@ -1,60 +1,71 @@ -

Lead Management

-
- - -
-
+ + + +
+
+
Today Yesterday This Week @@ -161,20 +172,22 @@
- -
-
- - -
-
+ +
+ +
+
+ + +
+
Delete

'; } ?> - -
+ +
@@ -182,7 +195,7 @@ + echo ' '; ?> - - - - - - - + + + + + + @@ -211,7 +223,7 @@ $start_date = isset($_GET['start_date']) ? $_GET['start_date'] : '2014-05-05'; $end_date = isset($_GET['end_date']) ? $_GET['end_date'] : date('Y-m-d'); $start_time = microtime(true); - $resultsPerPage = 100; + $resultsPerPage = 200; $page =isset($_GET['page']) ? $_GET['page'] : 1; $offset = ($page - 1) * $resultsPerPage ; $accessArray = explode(",", $_SESSION['access']); @@ -242,8 +254,12 @@ $leads = $stmt->fetchAll(PDO::FETCH_ASSOC); $totalResults = count($leads); $totalPages = ceil($totalRows / $resultsPerPage); - if($resultsPerPage <= $totalRows) echo "

".$resultsPerPage." Out of ".$totalRows." Leads

"; - else echo "

".$totalRows." Leads

"; + + $end_time = microtime(true); + $execution_time = ($end_time - $start_time); + $executionTime = substr($execution_time, 0, 6); + // if($resultsPerPage <= $totalRows) echo "

".$resultsPerPage." Out of ".$totalRows." Leads in ".$executionTime." Seconds

"; + // else echo "

".$totalRows." Leads

"; // Status Conditional Color foreach($leads as $lead){ $only_date =isset($lead['time']) ? substr($lead['time'], 0, 10): 'Not Available'; @@ -257,30 +273,6 @@ // if($row['status'] == 'Warm'){$conditional_status = '

'.$row['status'].'

';}elseif($row['status'] != 'Warm'){$conditional_status = $row['status'];} ?> - Error: " . $e->getMessage() . "

"; } - - $end_time = microtime(true); - - // Calculate execution time - $execution_time = ($end_time - $start_time); // Output execution time - echo "Page executed in: " . $execution_time . " seconds"; ?>
Quick ActionNameIDStatus UpdateForm NameDateNameIDStatus UpdateForm NameDate
-
- -
- -
-
-
@@ -297,19 +289,12 @@
@@ -317,15 +302,16 @@ +echo'
+ +
+
'; ?> @@ -462,23 +448,8 @@ echo'
}); }); } - // Fetch countries on page load fetchCountries(); - - const dialog = document.querySelector("dialog"); - const showButton = document.querySelector("dialog + button"); - const closeButton = document.querySelector("dialog button"); - - // "Show the dialog" button opens the dialog modally - showButton.addEventListener("click", () => { - dialog.showModal(); - }); - - // "Close" button closes the dialog - closeButton.addEventListener("click", () => { - dialog.close(); - }); function toggleDisplay() { var element = document.getElementById('add-lead-form'); @@ -511,6 +482,37 @@ echo'
} } } + const data = ; + const filename = `leads_data.csv`; + + function downloadCSV(data, filename) { + const csv = convertToCSV(data); + const blob = new Blob([csv], { type: 'text/csv' }); + const link = document.createElement('a'); + link.href = URL.createObjectURL(blob); + link.download = filename; + document.body.appendChild(link); + link.click(); + document.body.removeChild(link); + } + + function convertToCSV(data) { + const csvRows = []; + const headers = Object.keys(data[0]); + csvRows.push(headers.join(',')); + data.forEach(row => { + const values = headers.map(header => { + const escaped = ('' + row[header]).replace(/"/g, '\\"'); + return `"${escaped}"`; + }); + csvRows.push(values.join(',')); + }); + + return csvRows.join('\n'); + + // downloadCSV(data, filename); + + }