diff --git a/portal/check_login.php b/portal/check_login.php index 8b82da8a..e0a6cfe1 100644 --- a/portal/check_login.php +++ b/portal/check_login.php @@ -5,27 +5,27 @@ * Checks if the client is logged in or not */ -if(!isset($_SESSION)){ - // HTTP Only cookies - ini_set("session.cookie_httponly", True); - if($config_https_only){ - // Tell client to only send cookie(s) over HTTPS - ini_set("session.cookie_secure", True); - } - session_start(); +if (!isset($_SESSION)) { + // HTTP Only cookies + ini_set("session.cookie_httponly", True); + if ($config_https_only) { + // Tell client to only send cookie(s) over HTTPS + ini_set("session.cookie_secure", True); + } + session_start(); } -if(!$_SESSION['client_logged_in']){ - header("Location: login.php"); - die; +if (!$_SESSION['client_logged_in']) { + header("Location: login.php"); + die; } // SESSION FINGERPRINT -$session_ip = strip_tags(mysqli_real_escape_string($mysqli,get_ip())); -$session_os = strip_tags(mysqli_real_escape_string($mysqli,get_os())); +$session_ip = strip_tags(mysqli_real_escape_string($mysqli, get_ip())); +$session_os = strip_tags(mysqli_real_escape_string($mysqli, get_os())); // Get user agent -$session_user_agent = strip_tags(mysqli_real_escape_string($mysqli,$_SERVER['HTTP_USER_AGENT'])); +$session_user_agent = strip_tags(mysqli_real_escape_string($mysqli, $_SERVER['HTTP_USER_AGENT'])); // Get info from session $session_client_id = $_SESSION['client_id']; diff --git a/portal/inc_portal.php b/portal/inc_portal.php index bcabab29..36f5f3ee 100644 --- a/portal/inc_portal.php +++ b/portal/inc_portal.php @@ -4,19 +4,19 @@ * Includes for all pages (except login) */ -include('../config.php'); -include('../functions.php'); -include('check_login.php'); -include('portal_functions.php'); +require_once('../config.php'); +require_once('../functions.php'); +require_once('check_login.php'); +require_once('portal_functions.php'); -if(!isset($_SESSION)){ - // HTTP Only cookies - ini_set("session.cookie_httponly", True); - if($config_https_only){ - // Tell client to only send cookie(s) over HTTPS - ini_set("session.cookie_secure", True); - } - session_start(); +if (!isset($_SESSION)) { + // HTTP Only cookies + ini_set("session.cookie_httponly", True); + if ($config_https_only) { + // Tell client to only send cookie(s) over HTTPS + ini_set("session.cookie_secure", True); + } + session_start(); } -include("portal_header.php"); \ No newline at end of file +require_once("portal_header.php"); \ No newline at end of file diff --git a/portal/index.php b/portal/index.php index 60e49b6c..50f5858c 100644 --- a/portal/index.php +++ b/portal/index.php @@ -8,18 +8,18 @@ require_once("inc_portal.php"); // Ticket status from GET if (!isset($_GET['status'])) { - // If nothing is set, assume we only want to see open tickets - $status = 'Open'; - $ticket_status_snippet = "ticket_status != 'Closed'"; + // If nothing is set, assume we only want to see open tickets + $status = 'Open'; + $ticket_status_snippet = "ticket_status != 'Closed'"; } elseif (isset($_GET['status']) && ($_GET['status']) == 'Open') { - $status = 'Open'; - $ticket_status_snippet = "ticket_status != 'Closed'"; + $status = 'Open'; + $ticket_status_snippet = "ticket_status != 'Closed'"; } elseif (isset($_GET['status']) && ($_GET['status']) == 'Closed') { - $status = 'Closed'; - $ticket_status_snippet = "ticket_status = 'Closed'"; + $status = 'Closed'; + $ticket_status_snippet = "ticket_status = 'Closed'"; } else { - $status = '%'; - $ticket_status_snippet = "ticket_status LIKE '%'"; + $status = '%'; + $ticket_status_snippet = "ticket_status LIKE '%'"; } $contact_tickets = mysqli_query($mysqli, "SELECT * FROM tickets LEFT JOIN contacts ON ticket_contact_id = contact_id WHERE $ticket_status_snippet AND ticket_contact_id = '$session_contact_id' AND ticket_client_id = '$session_client_id' ORDER BY ticket_id DESC"); @@ -41,39 +41,39 @@ $total_tickets = $row['total_tickets']; ?> - - - + + +
- - " alt="..." class=" img-size-50 img-circle"> - - - - + + + - - -
+ + " alt="..." class=" img-size-50 img-circle"> + + + + -
- - -
-
-
-
-

Welcome, !

-
-
-
+
-
+ +
+
+
+
+

Welcome, !

+
+
+
-
- -
-
+
+ +
+ +
+
@@ -86,46 +86,46 @@ $total_tickets = $row['total_tickets']; "; - echo ""; - echo ""; - echo ""; - echo ""; + while ($ticket = mysqli_fetch_array($contact_tickets)) { + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; } ?>
$ticket[ticket_prefix]$ticket[ticket_number] $ticket[ticket_subject]$ticket[ticket_status]
$ticket[ticket_prefix]$ticket[ticket_number] $ticket[ticket_subject]$ticket[ticket_status]
+
+
+
-
- -
- - \ No newline at end of file + \ No newline at end of file diff --git a/portal/login.php b/portal/login.php index ff10e1ce..bf25864b 100644 --- a/portal/login.php +++ b/portal/login.php @@ -9,20 +9,20 @@ require_once('../config.php'); require_once('../functions.php'); require_once ('../get_settings.php'); -if(!isset($_SESSION)){ - // HTTP Only cookies - ini_set("session.cookie_httponly", True); - if($config_https_only){ - // Tell client to only send cookie(s) over HTTPS - ini_set("session.cookie_secure", True); - } - session_start(); +if (!isset($_SESSION)) { + // HTTP Only cookies + ini_set("session.cookie_httponly", True); + if ($config_https_only) { + // Tell client to only send cookie(s) over HTTPS + ini_set("session.cookie_secure", True); + } + session_start(); } $ip = strip_tags(mysqli_real_escape_string($mysqli,get_ip())); -$user_agent = strip_tags(mysqli_real_escape_string($mysqli,$_SERVER['HTTP_USER_AGENT'])); +$user_agent = strip_tags(mysqli_real_escape_string($mysqli, $_SERVER['HTTP_USER_AGENT'])); -$sql_settings = mysqli_query($mysqli,"SELECT config_azure_client_id FROM settings WHERE company_id = '1'"); +$sql_settings = mysqli_query($mysqli, "SELECT config_azure_client_id FROM settings WHERE company_id = '1'"); $settings = mysqli_fetch_array($sql_settings); $client_id = $settings['config_azure_client_id']; @@ -30,119 +30,119 @@ $company_sql = mysqli_query($mysqli, "SELECT company_name FROM companies WHERE c $company_results = mysqli_fetch_array($company_sql); $company_name = $company_results['company_name']; -if($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['login'])){ +if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['login'])) { - $email = strip_tags(mysqli_real_escape_string($mysqli, $_POST['email'])); - $password = $_POST['password']; - - if(!filter_var($email, FILTER_VALIDATE_EMAIL)){ - $_SESSION['login_message'] = 'Invalid e-mail'; - } - else{ - $sql = mysqli_query($mysqli, "SELECT * FROM contacts WHERE contact_email = '$email' LIMIT 1"); - $row = mysqli_fetch_array($sql); - if($row['contact_auth_method'] == 'local'){ - if(password_verify($password, $row['contact_password_hash'])){ - - $_SESSION['client_logged_in'] = TRUE; - $_SESSION['client_id'] = $row['contact_client_id']; - $_SESSION['contact_id'] = $row['contact_id']; - $_SESSION['company_id'] = $row['company_id']; - $_SESSION['login_method'] = "local"; - - header("Location: index.php"); - - mysqli_query($mysqli, "INSERT INTO logs SET log_type = 'Client Login', log_action = 'Success', log_description = 'Client contact $row[contact_email] successfully logged in locally', log_ip = '$ip', log_user_agent = '$user_agent', log_created_at = NOW(), log_client_id = $row[contact_client_id]"); - - } - else{ - mysqli_query($mysqli, "INSERT INTO logs SET log_type = 'Client Login', log_action = 'Failed', log_description = 'Failed client portal login attempt using $email', log_ip = '$ip', log_user_agent = '$user_agent', log_created_at = NOW()"); - $_SESSION['login_message'] = 'Incorrect username or password.'; - } + $email = strip_tags(mysqli_real_escape_string($mysqli, $_POST['email'])); + $password = $_POST['password']; + if (!filter_var($email, FILTER_VALIDATE_EMAIL)) { + $_SESSION['login_message'] = 'Invalid e-mail'; } - else{ - mysqli_query($mysqli, "INSERT INTO logs SET log_type = 'Client Login', log_action = 'Failed', log_description = 'Failed client portal login attempt using $email', log_ip = '$ip', log_user_agent = '$user_agent', log_created_at = NOW()"); - $_SESSION['login_message'] = 'Incorrect username or password.'; + else { + $sql = mysqli_query($mysqli, "SELECT * FROM contacts WHERE contact_email = '$email' LIMIT 1"); + $row = mysqli_fetch_array($sql); + if ($row['contact_auth_method'] == 'local') { + if (password_verify($password, $row['contact_password_hash'])) { + + $_SESSION['client_logged_in'] = TRUE; + $_SESSION['client_id'] = $row['contact_client_id']; + $_SESSION['contact_id'] = $row['contact_id']; + $_SESSION['company_id'] = $row['company_id']; + $_SESSION['login_method'] = "local"; + + header("Location: index.php"); + + mysqli_query($mysqli, "INSERT INTO logs SET log_type = 'Client Login', log_action = 'Success', log_description = 'Client contact $row[contact_email] successfully logged in locally', log_ip = '$ip', log_user_agent = '$user_agent', log_created_at = NOW(), log_client_id = $row[contact_client_id]"); + + } + else { + mysqli_query($mysqli, "INSERT INTO logs SET log_type = 'Client Login', log_action = 'Failed', log_description = 'Failed client portal login attempt using $email', log_ip = '$ip', log_user_agent = '$user_agent', log_created_at = NOW()"); + $_SESSION['login_message'] = 'Incorrect username or password.'; + } + + } + else { + mysqli_query($mysqli, "INSERT INTO logs SET log_type = 'Client Login', log_action = 'Failed', log_description = 'Failed client portal login attempt using $email', log_ip = '$ip', log_user_agent = '$user_agent', log_created_at = NOW()"); + $_SESSION['login_message'] = 'Incorrect username or password.'; + } } - } } ?> - - - <?php echo $company_name; ?> | Client Portal Login + + + <?php echo $company_name; ?> | Client Portal Login - - - + + + - - + + - - + + - - + +
- -
- @@ -158,7 +158,7 @@ if($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['login'])){ diff --git a/portal/login_microsoft.php b/portal/login_microsoft.php index e6ff7286..6e7703e7 100644 --- a/portal/login_microsoft.php +++ b/portal/login_microsoft.php @@ -31,7 +31,7 @@ $token_grant_url = "https://login.microsoftonline.com/organizations/oauth2/v2.0/ // Initial Login Request, via Microsoft // Returns a authorization code if login was successful -if ($_SERVER['REQUEST_METHOD'] == "GET"){ +if ($_SERVER['REQUEST_METHOD'] == "GET") { $params = array ( 'client_id' => $client_id, @@ -47,7 +47,7 @@ if ($_SERVER['REQUEST_METHOD'] == "GET"){ // Login was successful, Microsoft has returned us a authorization code via POST // Request an access token using authorization code (& client secret) (server side) -if (isset($_POST['code']) && $_POST['state'] == session_id()){ +if (isset($_POST['code']) && $_POST['state'] == session_id()) { $params = array ( 'client_id' =>$client_id, @@ -70,7 +70,7 @@ if (isset($_POST['code']) && $_POST['state'] == session_id()){ // Check if we have an access token // If we do, send a request to Microsoft Graph API to get user info - if (isset($access_token_response['access_token'])){ + if (isset($access_token_response['access_token'])) { $ch = curl_init(); curl_setopt($ch, CURLOPT_HTTPHEADER, array ('Authorization: Bearer '.$access_token_response['access_token'], @@ -81,7 +81,7 @@ if (isset($_POST['code']) && $_POST['state'] == session_id()){ $msgraph_response = json_decode(curl_exec($ch), 1); - if (isset($msgraph_response['error'])){ + if (isset($msgraph_response['error'])) { // Something went wrong verifying the token/using the Graph API - quit echo "Error with MS Graph API. Details:"; var_dump($msgraph_response['error']); @@ -119,5 +119,5 @@ if (isset($_POST['code']) && $_POST['state'] == session_id()){ // If the user is just sat on the page, redirect them to login to try again if (empty($_GET)) { - echo ""; + echo ""; } \ No newline at end of file diff --git a/portal/login_reset.php b/portal/login_reset.php index 6b9716fd..d78cdec3 100644 --- a/portal/login_reset.php +++ b/portal/login_reset.php @@ -10,22 +10,22 @@ require_once('../functions.php'); require_once('../get_settings.php'); if (empty($config_smtp_host)) { - header("Location: login.php"); - exit(); + header("Location: login.php"); + exit(); } if (!isset($_SESSION)) { - // HTTP Only cookies - ini_set("session.cookie_httponly", true); - if ($config_https_only) { - // Tell client to only send cookie(s) over HTTPS - ini_set("session.cookie_secure", true); - } - session_start(); + // HTTP Only cookies + ini_set("session.cookie_httponly", true); + if ($config_https_only) { + // Tell client to only send cookie(s) over HTTPS + ini_set("session.cookie_secure", true); + } + session_start(); } $ip = strip_tags(mysqli_real_escape_string($mysqli,get_ip())); -$user_agent = strip_tags(mysqli_real_escape_string($mysqli,$_SERVER['HTTP_USER_AGENT'])); +$user_agent = strip_tags(mysqli_real_escape_string($mysqli, $_SERVER['HTTP_USER_AGENT'])); $company_sql = mysqli_query($mysqli, "SELECT company_name FROM companies WHERE company_id = '1'"); $company_results = mysqli_fetch_array($company_sql); @@ -35,106 +35,106 @@ DEFINE("WORDING_ERROR", "Something went wrong! Your link may have expired. Pleas if ($_SERVER['REQUEST_METHOD'] == "POST") { - /* - * Send password reset email - */ - if (isset($_POST['password_reset_email_request'])) { - - $email = strip_tags(mysqli_real_escape_string($mysqli, $_POST['email'])); - - $sql = mysqli_query($mysqli, "SELECT contact_id, contact_name, contact_email, contact_client_id, company_id FROM contacts WHERE contact_email = '$email' AND contact_auth_method = 'local' LIMIT 1"); - $row = mysqli_fetch_assoc($sql); - - $id = $row['contact_id']; - $name = $row['contact_name']; - $client = $row['contact_client_id']; - $company = $row['company_id']; - - if ($row['contact_email'] == $email) { - $token = key32gen(); - $url = "https://$config_base_url/portal/login_reset.php?email=$email&token=$token&client=$client"; - mysqli_query($mysqli, "UPDATE contacts SET contact_password_reset_token = '$token' WHERE contact_id = $id LIMIT 1"); - mysqli_query($mysqli, "INSERT INTO logs SET log_type = 'Contact', log_action = 'Modify', log_description = 'Sent a portal password reset e-mail for $email.', log_ip = '$ip', log_user_agent = '$user_agent', log_created_at = NOW(), log_client_id = $client, company_id = $company"); - - - // Send reset email - $subject = "Password reset for $company_name ITFlow Portal"; - $body = "Hello, $name

Someone (probably you) has requested a new password for your account on $company_name's ITFlow Client Portal.

Please click here to reset your password.

Alternatively, copy and paste this URL into your browser: $url

If you didn't request this change, you can safely ignore this email.

~
$company_name
Support Department
$config_mail_from_email"; - - $mail = sendSingleEmail($config_smtp_host, $config_smtp_username, $config_smtp_password, $config_smtp_encryption, $config_smtp_port, - $config_mail_from_email, $config_mail_from_name, - $email, $name, - $subject, $body); - - // Error handling - if ($mail !== true) { - mysqli_query($mysqli,"INSERT INTO notifications SET notification_type = 'Mail', notification = 'Failed to send email to $email', notification_timestamp = NOW(), company_id = $company"); - mysqli_query($mysqli,"INSERT INTO logs SET log_type = 'Mail', log_action = 'Error', log_description = 'Failed to send email to $email regarding $subject. $mail', company_id = $company"); - } - - //End Mail IF - } else { - sleep(rand(2, 4)); // Mimic the e-mail send delay even if email is invalid to help prevent user enumeration - } - - $_SESSION['login_message'] = "If your account exists, a reset link is on it's way!"; - /* - * Do password reset + * Send password reset email */ - } elseif (isset($_POST['password_reset_set_password'])) { + if (isset($_POST['password_reset_email_request'])) { + + $email = strip_tags(mysqli_real_escape_string($mysqli, $_POST['email'])); + + $sql = mysqli_query($mysqli, "SELECT contact_id, contact_name, contact_email, contact_client_id, company_id FROM contacts WHERE contact_email = '$email' AND contact_auth_method = 'local' LIMIT 1"); + $row = mysqli_fetch_assoc($sql); + + $id = $row['contact_id']; + $name = $row['contact_name']; + $client = $row['contact_client_id']; + $company = $row['company_id']; + + if ($row['contact_email'] == $email) { + $token = key32gen(); + $url = "https://$config_base_url/portal/login_reset.php?email=$email&token=$token&client=$client"; + mysqli_query($mysqli, "UPDATE contacts SET contact_password_reset_token = '$token' WHERE contact_id = $id LIMIT 1"); + mysqli_query($mysqli, "INSERT INTO logs SET log_type = 'Contact', log_action = 'Modify', log_description = 'Sent a portal password reset e-mail for $email.', log_ip = '$ip', log_user_agent = '$user_agent', log_created_at = NOW(), log_client_id = $client, company_id = $company"); + + + // Send reset email + $subject = "Password reset for $company_name ITFlow Portal"; + $body = "Hello, $name

Someone (probably you) has requested a new password for your account on $company_name's ITFlow Client Portal.

Please click here to reset your password.

Alternatively, copy and paste this URL into your browser: $url

If you didn't request this change, you can safely ignore this email.

~
$company_name
Support Department
$config_mail_from_email"; + + $mail = sendSingleEmail($config_smtp_host, $config_smtp_username, $config_smtp_password, $config_smtp_encryption, $config_smtp_port, + $config_mail_from_email, $config_mail_from_name, + $email, $name, + $subject, $body); + + // Error handling + if ($mail !== true) { + mysqli_query($mysqli, "INSERT INTO notifications SET notification_type = 'Mail', notification = 'Failed to send email to $email', notification_timestamp = NOW(), company_id = $company"); + mysqli_query($mysqli, "INSERT INTO logs SET log_type = 'Mail', log_action = 'Error', log_description = 'Failed to send email to $email regarding $subject. $mail', company_id = $company"); + } + + //End Mail IF + } else { + sleep(rand(2, 4)); // Mimic the e-mail send delay even if email is invalid to help prevent user enumeration + } + + $_SESSION['login_message'] = "If your account exists, a reset link is on it's way!"; + + /* + * Do password reset + */ + } elseif (isset($_POST['password_reset_set_password'])) { + + if (!isset($_POST['new_password']) || !isset($_POST['email']) || !isset($_POST['token']) || !isset($_POST['client'])) { + $_SESSION['login_message'] = WORDING_ERROR; + } + + $token = strip_tags(mysqli_real_escape_string($mysqli, $_POST['token'])); + $email = strip_tags(mysqli_real_escape_string($mysqli, $_POST['email'])); + $client = intval(strip_tags(mysqli_real_escape_string($mysqli, $_POST['client']))); + + // Query user + $sql = mysqli_query($mysqli, "SELECT * FROM contacts WHERE contact_email = '$email' AND contact_password_reset_token = '$token' AND contact_client_id = $client AND contact_auth_method = 'local' LIMIT 1"); + $contact_row = mysqli_fetch_array($sql); + $contact_id = $contact_row['contact_id']; + $name = $contact_row['contact_name']; + $company = $contact_row['company_id']; + + // Ensure the token is correct + if (sha1($contact_row['contact_password_reset_token']) == sha1($token)) { + + // Set password, invalidate token, logging + $password = mysqli_real_escape_string($mysqli, password_hash($_POST['new_password'], PASSWORD_DEFAULT)); + mysqli_query($mysqli, "UPDATE contacts SET contact_password_hash = '$password', contact_password_reset_token = NULL WHERE contact_id = $contact_id LIMIT 1"); + mysqli_query($mysqli, "INSERT INTO logs SET log_type = 'Contact', log_action = 'Modify', log_description = 'Reset portal password for $email.', log_ip = '$ip', log_user_agent = '$user_agent', log_created_at = NOW(), log_client_id = $client, company_id = $company"); + + // Send confirmation email + $subject = "Password reset confirmation for $company_name ITFlow Portal"; + $body = "Hello, $name

Your password for your account on $company_name's ITFlow Client Portal was successfully reset. You should be all set!

If you didn't reset your password, please get in touch ASAP.

~
$company_name
Support Department
$config_mail_from_email"; + + + $mail = sendSingleEmail($config_smtp_host, $config_smtp_username, $config_smtp_password, $config_smtp_encryption, $config_smtp_port, + $config_mail_from_email, $config_mail_from_name, + $email, $name, + $subject, $body); + + // Error handling + if ($mail !== true) { + mysqli_query($mysqli, "INSERT INTO notifications SET notification_type = 'Mail', notification = 'Failed to send email to $email', notification_timestamp = NOW(), company_id = $company"); + mysqli_query($mysqli, "INSERT INTO logs SET log_type = 'Mail', log_action = 'Error', log_description = 'Failed to send email to $email regarding $subject. $mail', company_id = $company"); + } + + // Redirect to login page + $_SESSION['login_message'] = "Password reset successfully!"; + header("Location: login.php"); + exit(); + + } else { + $_SESSION['login_message'] = WORDING_ERROR; + } + - if (!isset($_POST['new_password']) || !isset($_POST['email']) || !isset($_POST['token']) || !isset($_POST['client'])) { - $_SESSION['login_message'] = WORDING_ERROR; } - $token = strip_tags(mysqli_real_escape_string($mysqli, $_POST['token'])); - $email = strip_tags(mysqli_real_escape_string($mysqli, $_POST['email'])); - $client = intval(strip_tags(mysqli_real_escape_string($mysqli, $_POST['client']))); - - // Query user - $sql = mysqli_query($mysqli, "SELECT * FROM contacts WHERE contact_email = '$email' AND contact_password_reset_token = '$token' AND contact_client_id = $client AND contact_auth_method = 'local' LIMIT 1"); - $contact_row = mysqli_fetch_array($sql); - $contact_id = $contact_row['contact_id']; - $name = $contact_row['contact_name']; - $company = $contact_row['company_id']; - - // Ensure the token is correct - if (sha1($contact_row['contact_password_reset_token']) == sha1($token)) { - - // Set password, invalidate token, logging - $password = mysqli_real_escape_string($mysqli, password_hash($_POST['new_password'], PASSWORD_DEFAULT)); - mysqli_query($mysqli, "UPDATE contacts SET contact_password_hash = '$password', contact_password_reset_token = NULL WHERE contact_id = $contact_id LIMIT 1"); - mysqli_query($mysqli, "INSERT INTO logs SET log_type = 'Contact', log_action = 'Modify', log_description = 'Reset portal password for $email.', log_ip = '$ip', log_user_agent = '$user_agent', log_created_at = NOW(), log_client_id = $client, company_id = $company"); - - // Send confirmation email - $subject = "Password reset confirmation for $company_name ITFlow Portal"; - $body = "Hello, $name

Your password for your account on $company_name's ITFlow Client Portal was successfully reset. You should be all set!

If you didn't reset your password, please get in touch ASAP.

~
$company_name
Support Department
$config_mail_from_email"; - - - $mail = sendSingleEmail($config_smtp_host, $config_smtp_username, $config_smtp_password, $config_smtp_encryption, $config_smtp_port, - $config_mail_from_email, $config_mail_from_name, - $email, $name, - $subject, $body); - - // Error handling - if ($mail !== true) { - mysqli_query($mysqli,"INSERT INTO notifications SET notification_type = 'Mail', notification = 'Failed to send email to $email', notification_timestamp = NOW(), company_id = $company"); - mysqli_query($mysqli,"INSERT INTO logs SET log_type = 'Mail', log_action = 'Error', log_description = 'Failed to send email to $email regarding $subject. $mail', company_id = $company"); - } - - // Redirect to login page - $_SESSION['login_message'] = "Password reset successfully!"; - header("Location: login.php"); - exit(); - - } else { - $_SESSION['login_message'] = WORDING_ERROR; - } - - - } - } @@ -142,110 +142,110 @@ if ($_SERVER['REQUEST_METHOD'] == "POST") { - - - <?php echo $company_name; ?> | Password Reset + + + <?php echo $company_name; ?> | Password Reset - - - + + + - - + + - - + + - - + +
diff --git a/portal/ticket_add.php b/portal/ticket_add.php index 902115e9..9f7d5e10 100644 --- a/portal/ticket_add.php +++ b/portal/ticket_add.php @@ -7,44 +7,44 @@ require('inc_portal.php'); ?> -

Raise a new ticket

+

Raise a new ticket

-
-
+
+ -
- -
-
- -
- -
+
+ +
+
+ +
+ +
+
+ +
+ +
+
+ +
+ +
+
+ +
+ + +
+ + + +
-
- -
-
- -
- -
-
- -
- - -
- - - - -
- -

All tickets

-
-
-
- - -
+

All tickets

+
+
+
+ + +
+
-
- - - - - - - - - - +
#SubjectContactStatus
+ + + + + + + + + - "; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - } - ?> - -
#SubjectContactStatus
$ticket[ticket_prefix]$ticket[ticket_id] $ticket[ticket_subject]$ticket[contact_name]$ticket[ticket_status]
-
+ "; + echo " $ticket[ticket_prefix]$ticket[ticket_id]"; + echo " $ticket[ticket_subject]"; + echo "$ticket[contact_name]"; + echo "$ticket[ticket_status]"; + echo ""; + } + ?> + + +