diff --git a/.hta_config/crm_config.php b/.hta_config/crm_config.php index db71d12..401ee57 100644 --- a/.hta_config/crm_config.php +++ b/.hta_config/crm_config.php @@ -1,6 +1,6 @@ \ No newline at end of file diff --git a/.hta_slug/admin/add-forms.php b/.hta_slug/admin/add-forms.php new file mode 100644 index 0000000..184d572 --- /dev/null +++ b/.hta_slug/admin/add-forms.php @@ -0,0 +1,151 @@ +setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); + $stmt = $conn->prepare("INSERT INTO addforms (formname, bverticals) VALUES (:formname, :bverticals)"); + $stmt->bindParam(':formname', $lowercase_bv); + $stmt->bindParam(':bverticals', $_POST['bverticals']); + $stmt->execute(); + echo "Record added successfully"; + } catch(PDOException $e) { + echo "Error: " . $e->getMessage(); + } + } +?> +
+ +
+
+
+

Add New Forms

+

+
+
+
+ + +
+
+ + +
+
+ +
+
+
+ + + + + + + + + + + + setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); + $stmt = $conn->prepare("SELECT * FROM addforms ORDER BY created_at DESC"); + $stmt->execute(); + $rows = $stmt->fetchAll(PDO::FETCH_ASSOC); + foreach($rows as $row){ + ?> + + + + + + + + rowCount(); + } catch (PDOException $e) { + echo "

Error: " . $e->getMessage() . "

"; + } + ?> + +
SerialForm NameBusiness VerticalsTimeAction
+
+ Edit   |   + Delete +
+
+ + + + diff --git a/.hta_slug/admin/business-verticals.php b/.hta_slug/admin/business-verticals.php index 44a04ee..82af43a 100644 --- a/.hta_slug/admin/business-verticals.php +++ b/.hta_slug/admin/business-verticals.php @@ -5,7 +5,7 @@ if($_SERVER['REQUEST_METHOD'] == "POST" && $_POST['bv'] && $_POST['save_lead'] ){ try { - $lowercase_bv = strtolower($_POST['bv']); + $lowercase_bv = str_replace(' ', '_', strtolower($_POST['bv'])); $conn = new PDO("mysql:host=$mariaServer;dbname=$mariaDb", $mariaUser, $mariaPass); $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $stmt = $conn->prepare("INSERT INTO business_verticals (bv) VALUES (:bv)"); @@ -57,7 +57,7 @@ ?> - +
diff --git a/.hta_slug/admin/cleads.php b/.hta_slug/admin/cleads.php index 0395689..d18af5a 100644 --- a/.hta_slug/admin/cleads.php +++ b/.hta_slug/admin/cleads.php @@ -1,3 +1,61 @@ + + '; ?> + Quick Action Name ID Status Update Form Name Date - Quick Action @@ -175,7 +233,6 @@ $stmt->bindValue(2, "%$searchQuery%", PDO::PARAM_STR); $stmt->bindValue(3, "%$searchQuery%", PDO::PARAM_STR); $stmt->bindValue(4, "%$searchQuery%", PDO::PARAM_STR); - $stmt->bindValue( 5, 0, PDO::PARAM_INT); // Offset for pagination $stmt->bindValue( 6, $recordsPerPage, PDO::PARAM_INT); // Records per page // this is for date serch @@ -222,6 +279,30 @@ // if($row['status'] == 'Warm'){$conditional_status = '

'.$row['status'].'

';}elseif($row['status'] != 'Warm'){$conditional_status = $row['status'];} ?> + +
+ +
+ +
+
+ @@ -236,13 +317,6 @@ --> - -
- -
- -
- Lead Information
- +
-
+
diff --git a/.hta_slug/admin/delete-forms.php b/.hta_slug/admin/delete-forms.php new file mode 100644 index 0000000..0ca183a --- /dev/null +++ b/.hta_slug/admin/delete-forms.php @@ -0,0 +1,42 @@ +setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); + + $stmt = $conn->prepare("DELETE FROM addforms WHERE id = :id"); + $stmt->bindParam(':id', $_POST['id']); + $stmt->execute(); + echo ''; + exit(); + + } catch (PDOException $e) { + echo "

Error: " . $e->getMessage() . "

"; + } + } +?> +
+
+

Confirm to Delete id ?

+ + + NO +
+
+ \ No newline at end of file diff --git a/.hta_slug/admin/edit-business-verticals.php b/.hta_slug/admin/edit-business-verticals.php index abb64a8..44c7c09 100644 --- a/.hta_slug/admin/edit-business-verticals.php +++ b/.hta_slug/admin/edit-business-verticals.php @@ -27,10 +27,16 @@ require_once('/var/www/html/.htac_nav.php'); $bvrows = $stmt->fetchAll(PDO::FETCH_ASSOC); foreach($bvrows as $bvname){ ?> -
-
- - +
+ +

Edit Business Verticals

+
+ + +
+
+ +
setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); + $stmt = $conn->prepare("UPDATE addforms SET formname = :formname, bverticals = :bverticals WHERE id = :id"); + $stmt->bindParam(':formname', $_POST['formname']); + $stmt->bindParam(':formname', $_POST['formname']); + $stmt->bindParam(':id', $_GET['id']); + $stmt->execute(); + + echo "Record Updated successfully"; + } catch(PDOException $e) { + echo "Error: " . $e->getMessage(); + } + }; + + try { + $conn = new PDO("mysql:host=$mariaServer;dbname=$mariaDb", $mariaUser, $mariaPass); + $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); + $stmt = $conn->prepare("SELECT * FROM business_verticals"); + $stmt->execute(); + $verticals_data = $stmt->fetchAll(PDO::FETCH_ASSOC); + // foreach($verticals_data as $verticals){ + // $bverticals = $verticals['bv']; + // } + + } catch (PDOException $e) { + echo "

Error: " . $e->getMessage() . "

"; + } + + try { + $conn = new PDO("mysql:host=$mariaServer;dbname=$mariaDb", $mariaUser, $mariaPass); + $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); + $stmt = $conn->prepare("SELECT * FROM addforms WHERE id=:id"); + $stmt->bindParam(":id", $_GET['id']); + $stmt->execute(); + $formrows = $stmt->fetchAll(PDO::FETCH_ASSOC); + foreach($formrows as $formname){ $pre_verticals = $formname['bverticals']; ?> +
+
+

Edit From

+
+ + +
+
+ + + +
+
+ +
+
+
+ Error: " . $e->getMessage() . "

"; + } + +?> \ No newline at end of file diff --git a/.hta_slug/admin/users.php b/.hta_slug/admin/users.php index 2681821..1713bbe 100644 --- a/.hta_slug/admin/users.php +++ b/.hta_slug/admin/users.php @@ -42,8 +42,8 @@ } ?>
- - Add User + +
diff --git a/.hta_slug/cleads/_home.php b/.hta_slug/cleads/_home.php index ed8c193..bae800e 100644 --- a/.hta_slug/cleads/_home.php +++ b/.hta_slug/cleads/_home.php @@ -349,7 +349,7 @@
Lead Information
- +
-
+
diff --git a/.hta_slug/cleads/edit-lead.php b/.hta_slug/cleads/edit-lead.php index c3ec313..4cb91a9 100644 --- a/.hta_slug/cleads/edit-lead.php +++ b/.hta_slug/cleads/edit-lead.php @@ -476,7 +476,7 @@ copyButtons.forEach(button => { }); }); } - fetchCountries(); + // fetchCountries(); let nameID = document.getElementById('name'); let addressID = document.getElementById('address'); let countryID = document.getElementById('country'); diff --git a/.htac_header.php b/.htac_header.php index 1d7d77f..1c39e6d 100644 --- a/.htac_header.php +++ b/.htac_header.php @@ -57,7 +57,7 @@ select{ border: 1px solid #D9D9D9; border-radius: 5px; padding: 6px; } label, option, input{ - text-transform: uppercase; + /* text-transform: uppercase; */ } /* a { diff --git a/.htac_nav.php b/.htac_nav.php index ef7481f..a8a0a72 100644 --- a/.htac_nav.php +++ b/.htac_nav.php @@ -44,7 +44,7 @@
-
+