diff --git a/.hta_slug/edit-lead.php b/.hta_slug/edit-lead.php index 87f4655..83efff0 100644 --- a/.hta_slug/edit-lead.php +++ b/.hta_slug/edit-lead.php @@ -51,16 +51,17 @@ foreach($rows as $row){ $nameParts = explode(" ", $row['name']); $firstInitial = substr($nameParts[0], 0, 1); - $lastInitial = substr($nameParts[count($nameParts) - 1], 0, 1); - $name_letter = $firstInitial.$lastInitial; + $lastInitial = isset($nameParts[1]) ? substr($nameParts[1], 0, 1) : ''; + $name_letter = $firstInitial . $lastInitial; + if($row['status'] == 'New'){$conditional_background_color = 'background-color: #FFD9D9; border: 1px solid #FB5555; border-radius: 5px; color: #FB5555;';} elseif($row['status'] == 'Contacted'){$conditional_background_color = 'background-color: #D4FFFF; border: 1px solid #2C9C9C; border-radius: 5px; color: #2C9C9C;';} elseif($row['status'] == 'Disqualified'){$conditional_background_color = 'background-color: #CECECE; border: 1px solid #3F4254; border-radius: 5px; color: #3F4254;';} elseif($row['status'] == 'Converted'){$conditional_background_color = 'background-color: #D4FDE7; border: 1px solid #40916C; border-radius: 5px; color: #40916C;';} elseif($row['status'] == 'Warm'){$conditional_background_color = 'background-color: #FFD9D9; border: 1px solid #FB5555; border-radius: 5px; color: #FB5555;';} ?> -
-
+
+
@@ -90,13 +91,37 @@

+
-
-

Country

- -
+ prepare("SELECT `country` FROM `cleads` WHERE `id` = :id"); + $lead_country->bindParam(':id', $_GET["id"]); + $lead_country->execute(); + $lcountry = $lead_country->fetch(PDO::FETCH_COLUMN); + $country = json_decode($lcountry); + echo '
+

Country

+ +
'; + } + } + ?>

State

+
+

Assign to

+ +
@@ -173,10 +229,10 @@
-
+
-

Comments:

+

Comments:

@@ -244,7 +300,6 @@ $stmt->bindParam(':leadid', $_GET['id']); $stmt->bindParam(':comment', $_POST['comment']); $stmt->execute(); - $saved_message = "New Appointment save successfully"; } catch(PDOException $e) { echo "Error: " . $e->getMessage(); @@ -358,7 +413,7 @@
- +
@@ -405,54 +460,43 @@
\ No newline at end of file diff --git a/.hta_slug/notifications/_home.php b/.hta_slug/notifications/_home.php index 9925fb8..d733a40 100644 --- a/.hta_slug/notifications/_home.php +++ b/.hta_slug/notifications/_home.php @@ -28,20 +28,6 @@
setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); - $stmt = $conn->prepare("UPDATE appointment SET view_status = 1 WHERE id = :status_id AND email = :email"); - $stmt->bindParam(':status_id', $_POST['status_id']); - $stmt->bindParam(':email', $_SESSION['email']); - $stmt->execute(); - $saved_message = "Appointment 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); @@ -52,19 +38,26 @@ $stmt->execute(); $appt_data = $stmt->fetchAll(PDO::FETCH_ASSOC); foreach($appt_data as $appt){ + $leadID = json_decode($appt['leadid']); if($appt['view_status'] == 0){ $notification_bg = 'background: #F5F4FFE8;'; $notification_batch = '
'; + $clickButton = ''; }elseif($appt['view_status'] == 1){ $notification_bg = 'background: #fff;'; $notification_batch = '
'; + $clickButton = 'disabled'; } ?>
- @@ -77,5 +70,21 @@ echo "

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

"; }; + + if($_SERVER['REQUEST_METHOD'] == "POST" && isset($_POST['status_id']) && $_POST['status_id']){ + try { + $conn = new PDO("mysql:host=$mariaServer;dbname=$mariaDb", $mariaUser, $mariaPass); + $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); + $stmt = $conn->prepare("UPDATE appointment SET view_status = 1 WHERE id = :status_id AND email = :email"); + $stmt->bindParam(':status_id', $_POST['status_id']); + $stmt->bindParam(':email', $_SESSION['email']); + $stmt->execute(); + // $saved_message = "Appointment upd ated successfully"; + echo ''; + } catch(PDOException $e) { + echo "Error: " . $e->getMessage(); + } + }; + ?>
\ No newline at end of file diff --git a/.hta_slug/profile.php b/.hta_slug/profile.php new file mode 100644 index 0000000..6283acf --- /dev/null +++ b/.hta_slug/profile.php @@ -0,0 +1,83 @@ + +
+

Profile

+
+ + setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); + $stmt = $conn->prepare("UPDATE users SET name = :name, email = :email, pass = :pass WHERE email = :userID"); + $stmt->bindParam(':name', $_POST['name']); + $stmt->bindParam(':email', $_POST['email']); + $stmt->bindParam(':pass', $convertPass); + $stmt->bindParam(':userID', $_SESSION['email']); + $stmt->execute(); + + echo ''; + } 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 users WHERE email = :email"); + $stmt->bindParam(':email', $_SESSION['email']); + $stmt->execute(); + $rows = $stmt->fetchAll(PDO::FETCH_ASSOC); + foreach($rows as $row){ + $nameParts = explode(" ", $row['name']); + $firstInitial = substr($nameParts[0], 0, 1); + $lastInitial = substr($nameParts[count($nameParts) - 1], 0, 1); + $nameLetter = $firstInitial.$lastInitial; + ?> +
+

+
+
+
+ + +
+
+ + +
+
+ + +
+
+ +

+
+
+ +

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

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

if change profile information then login again

+
\ No newline at end of file diff --git a/.htac_nav.php b/.htac_nav.php index a1d76d6..ace1603 100644 --- a/.htac_nav.php +++ b/.htac_nav.php @@ -51,7 +51,7 @@ $lastInitial = substr($nameParts[count($nameParts) - 1], 0, 1); echo '

Hi '.$nameParts[0].'

  -

'.$firstInitial.$lastInitial.'

+ '.$firstInitial.$lastInitial.'
'; } } catch (PDOException $e) {