diff --git a/agent/post/client.php b/agent/post/client.php index e5ac145d..f34fcbba 100644 --- a/agent/post/client.php +++ b/agent/post/client.php @@ -40,9 +40,9 @@ if (isset($_POST['add_client'])) { $client_id = mysqli_insert_id($mysqli); - if (!file_exists("../uploads/clients/$client_id")) { - mkdir("../uploads/clients/$client_id"); - file_put_contents("../uploads/clients/$client_id/index.php", ""); + if (!file_exists($_SERVER['DOCUMENT_ROOT'] . "/uploads/clients/$client_id")) { + mkdir($_SERVER['DOCUMENT_ROOT'] . "/uploads/clients/$client_id"); + file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/uploads/clients/$client_id/index.php", ""); } // Create Referral if it doesn't exist diff --git a/guest/guest_view_ticket.php b/guest/guest_view_ticket.php index 619f20ce..bab520f6 100644 --- a/guest/guest_view_ticket.php +++ b/guest/guest_view_ticket.php @@ -17,7 +17,19 @@ if (!isset($_GET['ticket_id'], $_GET['url_key'])) { } // Company info -$company_sql_row = mysqli_fetch_array(mysqli_query($mysqli, "SELECT company_phone, company_website FROM companies, settings WHERE companies.company_id = settings.company_id AND companies.company_id = 1")); +$company_sql_row = mysqli_fetch_array(mysqli_query($mysqli, " + SELECT + company_phone, + company_phone_country_code, + company_website + FROM + companies, + settings + WHERE + companies.company_id = settings.company_id + AND companies.company_id = 1" +)); + $company_phone_country_code = nullable_htmlentities($company_sql_row['company_phone_country_code']); $company_phone = nullable_htmlentities(formatPhoneNumber($company_sql_row['company_phone'], $company_phone_country_code)); $company_website = nullable_htmlentities($company_sql_row['company_website']);