diff --git a/admin/contract_templates.php b/admin/contract_templates.php index 76fb13247..674fd599d 100644 --- a/admin/contract_templates.php +++ b/admin/contract_templates.php @@ -63,15 +63,15 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); $id = intval($row['contract_template_id']); $name = escapeHtml($row['contract_template_name']); $type = escapeHtml($row['contract_template_type']); - $freq = escapeHtml($row['contract_template_update_frequency']); - $sla_low_resp = escapeHtml($row['sla_low_response_time']); - $sla_med_resp = escapeHtml($row['sla_medium_response_time']); - $sla_high_resp = escapeHtml($row['sla_high_response_time']); - $sla_low_res = escapeHtml($row['sla_low_resolution_time']); - $sla_med_res = escapeHtml($row['sla_medium_resolution_time']); - $sla_high_res = escapeHtml($row['sla_high_resolution_time']); - $hourly_rate = escapeHtml($row['contract_template_hourly_rate']); - $after_hours = escapeHtml($row['contract_template_after_hours_hourly_rate']); + $freq = escapeHtml($row['contract_template_renewal_frequency']); + $sla_low_resp = escapeHtml($row['contract_template_sla_low_response_time']); + $sla_med_resp = escapeHtml($row['contract_template_sla_medium_response_time']); + $sla_high_resp = escapeHtml($row['contract_template_sla_high_response_time']); + $sla_low_res = escapeHtml($row['contract_template_sla_low_resolution_time']); + $sla_med_res = escapeHtml($row['contract_template_sla_medium_resolution_time']); + $sla_high_res = escapeHtml($row['contract_template_sla_high_resolution_time']); + $hourly_rate = escapeHtml($row['contract_template_rate_standard']); + $after_hours = escapeHtml($row['contract_template_rate_after_hours']); $support_hours = escapeHtml($row['contract_template_support_hours']); $net_terms = escapeHtml($row['contract_template_net_terms']); $created = escapeHtml($row['contract_template_created_at']); diff --git a/admin/modals/ticket_template/ticket_template_task_edit.php b/admin/modals/ticket_template/ticket_template_task_edit.php index 24e1874fe..467e217f0 100644 --- a/admin/modals/ticket_template/ticket_template_task_edit.php +++ b/admin/modals/ticket_template/ticket_template_task_edit.php @@ -4,7 +4,7 @@ require_once '../../includes/modal_header.php'; $task_template_id = intval($_GET['id']); -$sql = mysqli_query($mysqli, "SELECT * FROM task_templates WHERE task_template_id = $task_template_id LIMIT 1"); +$sql = mysqli_query($mysqli, "SELECT task_template_completion_estimate, task_template_name, task_template_order FROM task_templates WHERE task_template_id = $task_template_id LIMIT 1"); $row = mysqli_fetch_assoc($sql); $task_template_name = escapeHtml($row['task_template_name']); diff --git a/admin/post/users.php b/admin/post/users.php index 5a1fcb163..388929260 100644 --- a/admin/post/users.php +++ b/admin/post/users.php @@ -355,7 +355,7 @@ if (isset($_POST['export_users'])) { $sql = mysqli_query( $mysqli, - "SELECT * FROM users + "SELECT user_status FROM users LEFT JOIN user_roles ON user_role_id = role_id WHERE (user_name LIKE '%$q%' OR user_email LIKE '%$q%') AND user_type = 1 diff --git a/admin/ticket_template.php b/admin/ticket_template.php index ae0fd970e..55faac80b 100644 --- a/admin/ticket_template.php +++ b/admin/ticket_template.php @@ -34,7 +34,7 @@ $ticket_template_created_at = escapeHtml($row['ticket_template_created_at']); $ticket_template_updated_at = escapeHtml($row['ticket_template_updated_at']); // Get Task Templates -$sql_task_templates = mysqli_query($mysqli, "SELECT * FROM task_templates WHERE task_template_ticket_template_id = $ticket_template_id ORDER BY task_template_order ASC, task_template_id ASC"); +$sql_task_templates = mysqli_query($mysqli, "SELECT task_template_completion_estimate, task_template_id, task_template_name FROM task_templates WHERE task_template_ticket_template_id = $ticket_template_id ORDER BY task_template_order ASC, task_template_id ASC"); ?> diff --git a/agent/modals/location/location_edit.php b/agent/modals/location/location_edit.php index dcb8c3c5e..904de8caf 100644 --- a/agent/modals/location/location_edit.php +++ b/agent/modals/location/location_edit.php @@ -6,7 +6,11 @@ enforceUserPermission('module_client', 2); $location_id = intval($_GET['id']); -$sql = mysqli_query($mysqli, "SELECT * FROM locations WHERE location_id = $location_id LIMIT 1"); +$sql = mysqli_query($mysqli, "SELECT location_address, location_archived_at, location_city, location_client_id, + location_contact_id, location_country, location_created_at, location_description, + location_fax, location_fax_country_code, location_hours, location_name, location_notes, + location_phone, location_phone_country_code, location_phone_extension, location_photo, location_primary, + location_state, location_zip FROM locations WHERE location_id = $location_id LIMIT 1"); $row = mysqli_fetch_assoc($sql); $location_name = escapeHtml($row['location_name']); @@ -18,7 +22,7 @@ $location_state = escapeHtml($row['location_state']); $location_zip = escapeHtml($row['location_zip']); $location_phone_country_code = escapeHtml($row['location_phone_country_code']); $location_phone = escapeHtml(formatPhoneNumber($row['location_phone'], $location_phone_country_code)); -//$location_extension = intval($row['location_extension']); +$location_extension = escapeHtml($row['location_phone_extension']); $location_fax_country_code = escapeHtml($row['location_fax_country_code']); $location_fax = escapeHtml(formatPhoneNumber($row['location_fax'], $location_fax_country_code)); $location_hours = escapeHtml($row['location_hours']); diff --git a/agent/post/quote.php b/agent/post/quote.php index b299160ea..2de119994 100644 --- a/agent/post/quote.php +++ b/agent/post/quote.php @@ -734,7 +734,7 @@ if (isset($_POST['export_quotes'])) { $sql = mysqli_query( $mysqli, - "SELECT * FROM quotes + "SELECT quote_number, quote_prefix FROM quotes LEFT JOIN clients ON quote_client_id = client_id LEFT JOIN categories ON quote_category_id = category_id WHERE (CONCAT(quote_prefix,quote_number) LIKE '%$q%' OR quote_scope LIKE '%$q%' OR category_name LIKE '%$q%' OR quote_status LIKE '%$q%' OR quote_amount LIKE '%$q%' OR client_name LIKE '%$q%') diff --git a/agent/post/recurring_invoice.php b/agent/post/recurring_invoice.php index 4899d95a2..b91678827 100644 --- a/agent/post/recurring_invoice.php +++ b/agent/post/recurring_invoice.php @@ -671,7 +671,7 @@ if (isset($_POST['export_recurring_invoices'])) { $sql = mysqli_query( $mysqli, - "SELECT * FROM recurring_invoices + "SELECT recurring_invoice_frequency, recurring_invoice_number, recurring_invoice_prefix FROM recurring_invoices LEFT JOIN clients ON recurring_invoice_client_id = client_id LEFT JOIN categories ON recurring_invoice_category_id = category_id WHERE (CONCAT(recurring_invoice_prefix,recurring_invoice_number) LIKE '%$q%' OR recurring_invoice_frequency LIKE '%$q%' OR recurring_invoice_scope LIKE '%$q%' OR client_name LIKE '%$q%' OR category_name LIKE '%$q%') diff --git a/agent/post/software.php b/agent/post/software.php index cf75fcda3..16ebe26e9 100644 --- a/agent/post/software.php +++ b/agent/post/software.php @@ -292,7 +292,7 @@ if (isset($_POST['export_software'])) { $sql = mysqli_query( $mysqli, - "SELECT * FROM software + "SELECT software_id FROM software LEFT JOIN clients ON client_id = software_client_id LEFT JOIN vendors ON vendor_id = software_vendor_id WHERE (software_name LIKE '%$q%' OR software_type LIKE '%$q%' OR software_key LIKE '%$q%' OR client_name LIKE '%$q%') diff --git a/agent/post/ticket.php b/agent/post/ticket.php index eb3bd0570..8abc7f5ae 100644 --- a/agent/post/ticket.php +++ b/agent/post/ticket.php @@ -2890,7 +2890,7 @@ if (isset($_POST['export_tickets'])) { // Get records from database - same shape as the tickets page list query $sql = mysqli_query( $mysqli, - "SELECT * FROM tickets + "SELECT category_name, ticket_billable, ticket_number, ticket_prefix, user_name FROM tickets LEFT JOIN clients ON ticket_client_id = client_id LEFT JOIN contacts ON ticket_contact_id = contact_id LEFT JOIN users ON ticket_assigned_to = user_id