mirror of
https://github.com/itflow-org/itflow
synced 2026-03-28 08:15:38 +00:00
Merge pull request #619 from wrongecho/spacing
Adjust core files to 4 spaces
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
<?php require_once("inc_all_client.php"); ?>
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
require_once("inc_all_client.php");
|
||||||
|
|
||||||
if (!empty($_GET['sb'])) {
|
if (!empty($_GET['sb'])) {
|
||||||
$sb = strip_tags(mysqli_real_escape_string($mysqli, $_GET['sb']));
|
$sb = strip_tags(mysqli_real_escape_string($mysqli, $_GET['sb']));
|
||||||
@@ -99,13 +98,13 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<?php include("pagination.php"); ?>
|
<?php require_once("pagination.php"); ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
include("client_certificate_edit_modal.php");
|
require_once("client_certificate_edit_modal.php");
|
||||||
include("client_certificate_add_modal.php");
|
require_once("client_certificate_add_modal.php");
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
@@ -1,26 +1,23 @@
|
|||||||
<?php require_once("inc_all_client.php"); ?>
|
|
||||||
|
|
||||||
<link href='plugins/fullcalendar/main.min.css' rel='stylesheet' />
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
require_once("inc_all_client.php");
|
||||||
|
|
||||||
if (isset($_GET['calendar_id'])) {
|
if (isset($_GET['calendar_id'])) {
|
||||||
$calendar_selected_id = intval($_GET['calendar_id']);
|
$calendar_selected_id = intval($_GET['calendar_id']);
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
<link href='plugins/fullcalendar/main.min.css' rel='stylesheet' />
|
||||||
|
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div id='calendar'></div>
|
<div id='calendar'></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php include("calendar_event_add_modal.php"); ?>
|
|
||||||
<?php include("calendar_add_modal.php"); ?>
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
?>
|
include("calendar_event_add_modal.php");
|
||||||
|
include("calendar_add_modal.php");
|
||||||
|
|
||||||
<?php
|
|
||||||
//loop through IDs and create a modal for each
|
//loop through IDs and create a modal for each
|
||||||
$sql = mysqli_query($mysqli, "SELECT * FROM calendars LEFT JOIN events ON calendar_id = event_calendar_id WHERE event_client_id = $client_id AND calendars.company_id = $session_company_id");
|
$sql = mysqli_query($mysqli, "SELECT * FROM calendars LEFT JOIN events ON calendar_id = event_calendar_id WHERE event_client_id = $client_id AND calendars.company_id = $session_company_id");
|
||||||
while ($row = mysqli_fetch_array($sql)) {
|
while ($row = mysqli_fetch_array($sql)) {
|
||||||
@@ -34,7 +31,7 @@ while ($row = mysqli_fetch_array($sql)) {
|
|||||||
$calendar_name = htmlentities($row['calendar_name']);
|
$calendar_name = htmlentities($row['calendar_name']);
|
||||||
$calendar_color = htmlentities($row['calendar_color']);
|
$calendar_color = htmlentities($row['calendar_color']);
|
||||||
|
|
||||||
include("calendar_event_edit_modal.php");
|
require("calendar_event_edit_modal.php");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -95,4 +92,5 @@ while ($row = mysqli_fetch_array($sql)) {
|
|||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<?php include("footer.php"); ?>
|
<?php
|
||||||
|
require("footer.php");
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?php require_once("inc_all_client.php"); ?>
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
require_once("inc_all_client.php");
|
||||||
|
|
||||||
if (isset($_GET['q'])) {
|
if (isset($_GET['q'])) {
|
||||||
$q = strip_tags(mysqli_real_escape_string($mysqli, $_GET['q']));
|
$q = strip_tags(mysqli_real_escape_string($mysqli, $_GET['q']));
|
||||||
//Phone Numbers
|
//Phone Numbers
|
||||||
@@ -23,7 +23,9 @@ if (!empty($_GET['sb'])) {
|
|||||||
//Rebuild URL
|
//Rebuild URL
|
||||||
$url_query_strings_sb = http_build_query(array_merge($_GET, array('sb' => $sb, 'o' => $o)));
|
$url_query_strings_sb = http_build_query(array_merge($_GET, array('sb' => $sb, 'o' => $o)));
|
||||||
|
|
||||||
$sql = mysqli_query($mysqli, "SELECT SQL_CALC_FOUND_ROWS * FROM locations
|
$sql = mysqli_query(
|
||||||
|
$mysqli,
|
||||||
|
"SELECT SQL_CALC_FOUND_ROWS * FROM locations
|
||||||
WHERE location_client_id = $client_id
|
WHERE location_client_id = $client_id
|
||||||
AND location_archived_at IS NULL
|
AND location_archived_at IS NULL
|
||||||
AND (location_name LIKE '%$q%' OR location_address LIKE '%$q%' OR location_phone LIKE '%$phone_query%')
|
AND (location_name LIKE '%$q%' OR location_address LIKE '%$q%' OR location_phone LIKE '%$phone_query%')
|
||||||
@@ -132,28 +134,21 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<?php } ?>
|
<?php } ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php include("client_location_edit_modal.php"); ?>
|
<?php require("client_location_edit_modal.php"); ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<?php
|
<?php } ?>
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<?php include("pagination.php"); ?>
|
<?php require_once("pagination.php"); ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
include("client_location_add_modal.php");
|
require_once("client_location_add_modal.php");
|
||||||
include("client_location_import_modal.php");
|
require_once("client_location_import_modal.php");
|
||||||
|
require_once("footer.php");
|
||||||
?>
|
|
||||||
|
|
||||||
<?php include("footer.php"); ?>
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?php require_once("inc_all_client.php"); ?>
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
require_once("inc_all_client.php");
|
||||||
|
|
||||||
if (!empty($_GET['sb'])) {
|
if (!empty($_GET['sb'])) {
|
||||||
$sb = strip_tags(mysqli_real_escape_string($mysqli, $_GET['sb']));
|
$sb = strip_tags(mysqli_real_escape_string($mysqli, $_GET['sb']));
|
||||||
} else {
|
} else {
|
||||||
@@ -132,7 +132,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
include("client_login_edit_modal.php");
|
require("client_login_edit_modal.php");
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@@ -140,7 +140,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<?php include("pagination.php"); ?>
|
<?php require_once("pagination.php"); ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -167,10 +167,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
include("client_login_add_modal.php");
|
require_once("client_login_add_modal.php");
|
||||||
include("share_modal.php");
|
require_once("share_modal.php");
|
||||||
include("client_login_import_modal.php");
|
require_once("client_login_import_modal.php");
|
||||||
|
require_once("footer.php");
|
||||||
?>
|
|
||||||
|
|
||||||
<?php include("footer.php"); ?>
|
|
||||||
|
|||||||
@@ -114,4 +114,5 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php require_once("footer.php"); ?>
|
<?php
|
||||||
|
require_once("footer.php");
|
||||||
|
|||||||
@@ -10,11 +10,14 @@ if (!empty($_GET['sb'])) {
|
|||||||
//Rebuild URL
|
//Rebuild URL
|
||||||
$url_query_strings_sb = http_build_query(array_merge($_GET, array('sb' => $sb, 'o' => $o)));
|
$url_query_strings_sb = http_build_query(array_merge($_GET, array('sb' => $sb, 'o' => $o)));
|
||||||
|
|
||||||
$sql = mysqli_query($mysqli, "SELECT SQL_CALC_FOUND_ROWS * FROM networks
|
$sql = mysqli_query(
|
||||||
|
$mysqli,
|
||||||
|
"SELECT SQL_CALC_FOUND_ROWS * FROM networks
|
||||||
LEFT JOIN locations ON location_id = network_location_id
|
LEFT JOIN locations ON location_id = network_location_id
|
||||||
WHERE network_client_id = $client_id
|
WHERE network_client_id = $client_id
|
||||||
AND (network_name LIKE '%$q%' OR network_vlan LIKE '%$q%' OR network LIKE '%$q%' OR network_gateway LIKE '%$q%' OR network_dhcp_range LIKE '%$q%' OR location_name LIKE '%$q%')
|
AND (network_name LIKE '%$q%' OR network_vlan LIKE '%$q%' OR network LIKE '%$q%' OR network_gateway LIKE '%$q%' OR network_dhcp_range LIKE '%$q%' OR location_name LIKE '%$q%')
|
||||||
ORDER BY $sb $o LIMIT $record_from, $record_to");
|
ORDER BY $sb $o LIMIT $record_from, $record_to"
|
||||||
|
);
|
||||||
|
|
||||||
$num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
$num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
|
|
||||||
@@ -117,23 +120,19 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<?php
|
<?php } ?>
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<?php include("pagination.php"); ?>
|
<?php require_once("pagination.php"); ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
include("client_network_edit_modal.php");
|
require_once("client_network_edit_modal.php");
|
||||||
include("client_network_add_modal.php");
|
require_once("client_network_add_modal.php");
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
@@ -186,4 +185,5 @@ function populateNetworkEditModal(client_id, network_id) {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<?php include("footer.php"); ?>
|
<?php
|
||||||
|
require_once("footer.php");
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php require_once("inc_all_client.php");
|
<?php
|
||||||
|
|
||||||
|
require_once("inc_all_client.php");
|
||||||
|
|
||||||
$sql_contacts = mysqli_query($mysqli, "SELECT * FROM contacts WHERE contact_client_id = $client_id AND contact_archived_at IS NULL AND contacts.company_id = $session_company_id ORDER BY contact_updated_at, contact_created_at DESC LIMIT 5");
|
$sql_contacts = mysqli_query($mysqli, "SELECT * FROM contacts WHERE contact_client_id = $client_id AND contact_archived_at IS NULL AND contacts.company_id = $session_company_id ORDER BY contact_updated_at, contact_created_at DESC LIMIT 5");
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<?php require_once("inc_all_client.php"); ?>
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
require_once("inc_all_client.php");
|
||||||
|
|
||||||
if (!empty($_GET['sb'])) {
|
if (!empty($_GET['sb'])) {
|
||||||
$sb = strip_tags(mysqli_real_escape_string($mysqli, $_GET['sb']));
|
$sb = strip_tags(mysqli_real_escape_string($mysqli, $_GET['sb']));
|
||||||
@@ -17,12 +16,15 @@ if (!isset($_GET['o'])) {
|
|||||||
//Rebuild URL
|
//Rebuild URL
|
||||||
$url_query_strings_sb = http_build_query(array_merge($_GET, array('sb' => $sb, 'o' => $o)));
|
$url_query_strings_sb = http_build_query(array_merge($_GET, array('sb' => $sb, 'o' => $o)));
|
||||||
|
|
||||||
$sql = mysqli_query($mysqli, "SELECT SQL_CALC_FOUND_ROWS * FROM payments
|
$sql = mysqli_query(
|
||||||
|
$mysqli,
|
||||||
|
"SELECT SQL_CALC_FOUND_ROWS * FROM payments
|
||||||
LEFT JOIN invoices ON payment_invoice_id = invoice_id
|
LEFT JOIN invoices ON payment_invoice_id = invoice_id
|
||||||
LEFT JOIN accounts ON payment_account_id = account_id
|
LEFT JOIN accounts ON payment_account_id = account_id
|
||||||
WHERE invoice_client_id = $client_id
|
WHERE invoice_client_id = $client_id
|
||||||
AND (CONCAT(invoice_prefix,invoice_number) LIKE '%$q%' OR account_name LIKE '%$q%' OR payment_method LIKE '%$q%')
|
AND (CONCAT(invoice_prefix,invoice_number) LIKE '%$q%' OR account_name LIKE '%$q%' OR payment_method LIKE '%$q%')
|
||||||
ORDER BY $sb $o LIMIT $record_from, $record_to");
|
ORDER BY $sb $o LIMIT $record_from, $record_to"
|
||||||
|
);
|
||||||
|
|
||||||
$num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
$num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
|
|
||||||
@@ -105,17 +107,14 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<td><?php echo $account_name; ?></td>
|
<td><?php echo $account_name; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<?php
|
<?php } ?>
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<?php include("pagination.php"); ?>
|
<?php require_once("pagination.php"); ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php include("footer.php"); ?>
|
<?php
|
||||||
|
require_once("footer.php");
|
||||||
|
|||||||
@@ -17,11 +17,14 @@ if (!isset($_GET['o'])) {
|
|||||||
//Rebuild URL
|
//Rebuild URL
|
||||||
$url_query_strings_sb = http_build_query(array_merge($_GET, array('sb' => $sb, 'o' => $o)));
|
$url_query_strings_sb = http_build_query(array_merge($_GET, array('sb' => $sb, 'o' => $o)));
|
||||||
|
|
||||||
$sql = mysqli_query($mysqli, "SELECT SQL_CALC_FOUND_ROWS * FROM quotes
|
$sql = mysqli_query(
|
||||||
|
$mysqli,
|
||||||
|
"SELECT SQL_CALC_FOUND_ROWS * FROM quotes
|
||||||
LEFT JOIN categories ON category_id = quote_category_id
|
LEFT JOIN categories ON category_id = quote_category_id
|
||||||
WHERE quote_client_id = $client_id
|
WHERE quote_client_id = $client_id
|
||||||
AND (CONCAT(quote_prefix,quote_number) LIKE '%$q%' OR quote_scope LIKE '%$q%' OR category_name LIKE '%$q%' OR quote_status LIKE '%$q%')
|
AND (CONCAT(quote_prefix,quote_number) LIKE '%$q%' OR quote_scope LIKE '%$q%' OR category_name LIKE '%$q%' OR quote_status LIKE '%$q%')
|
||||||
ORDER BY $sb $o LIMIT $record_from, $record_to");
|
ORDER BY $sb $o LIMIT $record_from, $record_to"
|
||||||
|
);
|
||||||
|
|
||||||
$num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
$num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?php require_once("inc_all_client.php"); ?>
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
require_once("inc_all_client.php");
|
||||||
|
|
||||||
if (!empty($_GET['sb'])) {
|
if (!empty($_GET['sb'])) {
|
||||||
$sb = strip_tags(mysqli_real_escape_string($mysqli, $_GET['sb']));
|
$sb = strip_tags(mysqli_real_escape_string($mysqli, $_GET['sb']));
|
||||||
} else {
|
} else {
|
||||||
@@ -11,7 +11,9 @@ if (!empty($_GET['sb'])) {
|
|||||||
//Rebuild URL
|
//Rebuild URL
|
||||||
$url_query_strings_sb = http_build_query(array_merge($_GET, array('sb' => $sb, 'o' => $o)));
|
$url_query_strings_sb = http_build_query(array_merge($_GET, array('sb' => $sb, 'o' => $o)));
|
||||||
|
|
||||||
$sql = mysqli_query($mysqli, "SELECT * FROM recurring
|
$sql = mysqli_query(
|
||||||
|
$mysqli,
|
||||||
|
"SELECT * FROM recurring
|
||||||
LEFT JOIN categories ON recurring_category_id = category_id
|
LEFT JOIN categories ON recurring_category_id = category_id
|
||||||
WHERE recurring_client_id = $client_id
|
WHERE recurring_client_id = $client_id
|
||||||
AND (CONCAT(recurring_prefix,recurring_number) LIKE '%$q%' OR recurring_frequency LIKE '%$q%' OR recurring_scope LIKE '%$q%' OR category_name LIKE '%$q%')
|
AND (CONCAT(recurring_prefix,recurring_number) LIKE '%$q%' OR recurring_frequency LIKE '%$q%' OR recurring_scope LIKE '%$q%' OR category_name LIKE '%$q%')
|
||||||
@@ -124,7 +126,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
include("recurring_invoice_edit_modal.php");
|
require("recurring_invoice_edit_modal.php");
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@@ -132,10 +134,10 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<?php include("pagination.php"); ?>
|
<?php require_once("pagination.php"); ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php include("recurring_invoice_add_modal.php"); ?>
|
<?php
|
||||||
|
require_once("recurring_invoice_add_modal.php");
|
||||||
<?php include("footer.php"); ?>
|
require_once("footer.php");
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ $sql = mysqli_query(
|
|||||||
|
|
||||||
$num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
$num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<script src="js/scheduled_tickets_edit_modal.js"></script>
|
<script src="js/scheduled_tickets_edit_modal.js"></script>
|
||||||
|
|
||||||
|
|||||||
@@ -117,9 +117,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<?php
|
<?php } ?>
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
@@ -10,7 +10,9 @@ if (!empty($_GET['sb'])) {
|
|||||||
//Rebuild URL
|
//Rebuild URL
|
||||||
$url_query_strings_sb = http_build_query(array_merge($_GET, array('sb' => $sb, 'o' => $o)));
|
$url_query_strings_sb = http_build_query(array_merge($_GET, array('sb' => $sb, 'o' => $o)));
|
||||||
|
|
||||||
$sql = mysqli_query($mysqli, "SELECT SQL_CALC_FOUND_ROWS * FROM software
|
$sql = mysqli_query(
|
||||||
|
$mysqli,
|
||||||
|
"SELECT SQL_CALC_FOUND_ROWS * FROM software
|
||||||
LEFT JOIN logins ON login_software_id = software_id
|
LEFT JOIN logins ON login_software_id = software_id
|
||||||
WHERE software_client_id = $client_id
|
WHERE software_client_id = $client_id
|
||||||
AND software_template = 0
|
AND software_template = 0
|
||||||
|
|||||||
@@ -104,8 +104,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
if (empty($ticket_updated_at)) {
|
if (empty($ticket_updated_at)) {
|
||||||
if ($ticket_status == "Closed") {
|
if ($ticket_status == "Closed") {
|
||||||
$ticket_updated_at_display = "<p>Never</p>";
|
$ticket_updated_at_display = "<p>Never</p>";
|
||||||
}
|
} else{
|
||||||
else{
|
|
||||||
$ticket_updated_at_display = "<p class='text-danger'>Never</p>";
|
$ticket_updated_at_display = "<p class='text-danger'>Never</p>";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -134,8 +133,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
if (empty($ticket_assigned_to)) {
|
if (empty($ticket_assigned_to)) {
|
||||||
if ($ticket_status == "Closed") {
|
if ($ticket_status == "Closed") {
|
||||||
$ticket_assigned_to_display = "<p>Not Assigned</p>";
|
$ticket_assigned_to_display = "<p>Not Assigned</p>";
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
$ticket_assigned_to_display = "<p class='text-danger'>Not Assigned</p>";
|
$ticket_assigned_to_display = "<p class='text-danger'>Not Assigned</p>";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -26,7 +26,9 @@ if (isset($_GET['dtf'])) {
|
|||||||
//Rebuild URL
|
//Rebuild URL
|
||||||
$url_query_strings_sb = http_build_query(array_merge($_GET, array('sb' => $sb, 'o' => $o)));
|
$url_query_strings_sb = http_build_query(array_merge($_GET, array('sb' => $sb, 'o' => $o)));
|
||||||
|
|
||||||
$sql = mysqli_query($mysqli, "SELECT SQL_CALC_FOUND_ROWS * FROM trips
|
$sql = mysqli_query(
|
||||||
|
$mysqli,
|
||||||
|
"SELECT SQL_CALC_FOUND_ROWS * FROM trips
|
||||||
LEFT JOIN users ON trip_user_id = user_id
|
LEFT JOIN users ON trip_user_id = user_id
|
||||||
WHERE (trip_purpose LIKE '%$q%' OR trip_source LIKE '%$q%' OR trip_destination LIKE '%$q%' OR user_name LIKE '%$q%')
|
WHERE (trip_purpose LIKE '%$q%' OR trip_source LIKE '%$q%' OR trip_destination LIKE '%$q%' OR user_name LIKE '%$q%')
|
||||||
AND DATE(trip_date) BETWEEN '$dtf' AND '$dtt'
|
AND DATE(trip_date) BETWEEN '$dtf' AND '$dtt'
|
||||||
|
|||||||
@@ -23,7 +23,9 @@ if (!empty($_GET['sb'])) {
|
|||||||
//Rebuild URL
|
//Rebuild URL
|
||||||
$url_query_strings_sb = http_build_query(array_merge($_GET, array('sb' => $sb, 'o' => $o)));
|
$url_query_strings_sb = http_build_query(array_merge($_GET, array('sb' => $sb, 'o' => $o)));
|
||||||
|
|
||||||
$sql = mysqli_query($mysqli, "SELECT SQL_CALC_FOUND_ROWS * FROM vendors
|
$sql = mysqli_query(
|
||||||
|
$mysqli,
|
||||||
|
"SELECT SQL_CALC_FOUND_ROWS * FROM vendors
|
||||||
WHERE vendor_client_id = $client_id
|
WHERE vendor_client_id = $client_id
|
||||||
AND vendor_template = 0
|
AND vendor_template = 0
|
||||||
AND (vendor_name LIKE '%$q%' OR vendor_description LIKE '%$q%' OR vendor_account_number LIKE '%$q%' OR vendor_website LIKE '%$q%' OR vendor_contact_name LIKE '%$q%' OR vendor_email LIKE '%$q%' OR vendor_phone LIKE '%$phone_query%') ORDER BY $sb $o LIMIT $record_from, $record_to");
|
AND (vendor_name LIKE '%$q%' OR vendor_description LIKE '%$q%' OR vendor_account_number LIKE '%$q%' OR vendor_website LIKE '%$q%' OR vendor_contact_name LIKE '%$q%' OR vendor_email LIKE '%$q%' OR vendor_phone LIKE '%$phone_query%') ORDER BY $sb $o LIMIT $record_from, $record_to");
|
||||||
|
|||||||
@@ -89,7 +89,9 @@ if ($_GET['canned_date'] == "custom" && !empty($_GET['date_from'])) {
|
|||||||
//Rebuild URL
|
//Rebuild URL
|
||||||
$url_query_strings_sortby = http_build_query(array_merge($_GET, array('sortby' => $sortby, 'order' => $order)));
|
$url_query_strings_sortby = http_build_query(array_merge($_GET, array('sortby' => $sortby, 'order' => $order)));
|
||||||
|
|
||||||
$sql = mysqli_query($mysqli, "SELECT SQL_CALC_FOUND_ROWS * FROM clients
|
$sql = mysqli_query(
|
||||||
|
$mysqli,
|
||||||
|
"SELECT SQL_CALC_FOUND_ROWS * FROM clients
|
||||||
LEFT JOIN contacts ON clients.primary_contact = contacts.contact_id AND contact_archived_at IS NULL
|
LEFT JOIN contacts ON clients.primary_contact = contacts.contact_id AND contact_archived_at IS NULL
|
||||||
LEFT JOIN locations ON clients.primary_location = locations.location_id AND location_archived_at IS NULL
|
LEFT JOIN locations ON clients.primary_location = locations.location_id AND location_archived_at IS NULL
|
||||||
WHERE (client_name LIKE '%$query%' OR client_type LIKE '%$query%' OR client_referral LIKE '%$query%' OR contact_email LIKE '%$query%' OR contact_name LIKE '%$query%' OR contact_phone LIKE '%$phone_query%'
|
WHERE (client_name LIKE '%$query%' OR client_type LIKE '%$query%' OR client_referral LIKE '%$query%' OR contact_email LIKE '%$query%' OR contact_name LIKE '%$query%' OR contact_phone LIKE '%$phone_query%'
|
||||||
|
|||||||
@@ -10,7 +10,9 @@ if (!empty($_GET['sb'])) {
|
|||||||
//Rebuild URL
|
//Rebuild URL
|
||||||
$url_query_strings_sb = http_build_query(array_merge($_GET, array('sb' => $sb, 'o' => $o)));
|
$url_query_strings_sb = http_build_query(array_merge($_GET, array('sb' => $sb, 'o' => $o)));
|
||||||
|
|
||||||
$sql = mysqli_query($mysqli, "SELECT SQL_CALC_FOUND_ROWS * FROM companies, settings
|
$sql = mysqli_query(
|
||||||
|
$mysqli,
|
||||||
|
"SELECT SQL_CALC_FOUND_ROWS * FROM companies, settings
|
||||||
WHERE companies.company_id = settings.company_id
|
WHERE companies.company_id = settings.company_id
|
||||||
AND (company_name LIKE '%$q%')
|
AND (company_name LIKE '%$q%')
|
||||||
ORDER BY $sb $o LIMIT $record_from, $record_to");
|
ORDER BY $sb $o LIMIT $record_from, $record_to");
|
||||||
@@ -73,7 +75,6 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
$company_initials = htmlentities(initials($company_name));
|
$company_initials = htmlentities(initials($company_name));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
7
cron.php
7
cron.php
@@ -246,11 +246,14 @@ while($row = mysqli_fetch_array($sql_companies)){
|
|||||||
if (!empty($config_smtp_host) && $config_ticket_client_general_notifications == 1) {
|
if (!empty($config_smtp_host) && $config_ticket_client_general_notifications == 1) {
|
||||||
|
|
||||||
// Get contact/ticket/company details
|
// Get contact/ticket/company details
|
||||||
$sql = mysqli_query($mysqli, "SELECT contact_name, contact_email, ticket_prefix, ticket_number, ticket_subject, company_phone FROM tickets
|
$sql = mysqli_query(
|
||||||
|
$mysqli,
|
||||||
|
"SELECT contact_name, contact_email, ticket_prefix, ticket_number, ticket_subject, company_phone FROM tickets
|
||||||
LEFT JOIN clients ON ticket_client_id = client_id
|
LEFT JOIN clients ON ticket_client_id = client_id
|
||||||
LEFT JOIN contacts ON ticket_contact_id = contact_id
|
LEFT JOIN contacts ON ticket_contact_id = contact_id
|
||||||
LEFT JOIN companies ON tickets.company_id = companies.company_id
|
LEFT JOIN companies ON tickets.company_id = companies.company_id
|
||||||
WHERE ticket_id = $id AND tickets.company_id = $company_id");
|
WHERE ticket_id = $id AND tickets.company_id = $company_id"
|
||||||
|
);
|
||||||
$row = mysqli_fetch_array($sql);
|
$row = mysqli_fetch_array($sql);
|
||||||
|
|
||||||
$contact_name = $row['contact_name'];
|
$contact_name = $row['contact_name'];
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ TODO:
|
|||||||
- Support for authenticating with OAuth
|
- Support for authenticating with OAuth
|
||||||
- Separate Mailbox Account for tickets 2022-12-14 - JQ
|
- Separate Mailbox Account for tickets 2022-12-14 - JQ
|
||||||
|
|
||||||
Relate PRs to https://github.com/itflow-org/itflow/issues/225 & https://forum.itflow.org/d/11-road-map & https://forum.itflow.org/d/31-tickets-from-email
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Get ITFlow config & helper functions
|
// Get ITFlow config & helper functions
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php include("inc_all.php");
|
<?php
|
||||||
|
require_once("inc_all.php");
|
||||||
|
|
||||||
// Enforce accountant / admin role for the financial dashboard
|
// Enforce accountant / admin role for the financial dashboard
|
||||||
if ($_SESSION['user_role'] != 3 && $_SESSION['user_role'] != 1) {
|
if ($_SESSION['user_role'] != 3 && $_SESSION['user_role'] != 1) {
|
||||||
@@ -12,7 +13,9 @@ if (isset($_GET['year'])) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//GET unique years from expenses, payments invoices and revenues
|
//GET unique years from expenses, payments invoices and revenues
|
||||||
$sql_years_select = mysqli_query($mysqli, "SELECT YEAR(expense_date) AS all_years FROM expenses WHERE company_id = $session_company_id
|
$sql_years_select = mysqli_query(
|
||||||
|
$mysqli,
|
||||||
|
"SELECT YEAR(expense_date) AS all_years FROM expenses WHERE company_id = $session_company_id
|
||||||
UNION DISTINCT SELECT YEAR(payment_date) FROM payments WHERE company_id = $session_company_id
|
UNION DISTINCT SELECT YEAR(payment_date) FROM payments WHERE company_id = $session_company_id
|
||||||
UNION DISTINCT SELECT YEAR(revenue_date) FROM revenues WHERE company_id = $session_company_id
|
UNION DISTINCT SELECT YEAR(revenue_date) FROM revenues WHERE company_id = $session_company_id
|
||||||
UNION DISTINCT SELECT YEAR(invoice_date) FROM invoices WHERE company_id = $session_company_id
|
UNION DISTINCT SELECT YEAR(invoice_date) FROM invoices WHERE company_id = $session_company_id
|
||||||
@@ -461,7 +464,8 @@ $vendors_added = $row['vendors_added'];
|
|||||||
</div>
|
</div>
|
||||||
</div> <!-- row -->
|
</div> <!-- row -->
|
||||||
|
|
||||||
<?php include("footer.php"); ?>
|
<?php require_once("footer.php"); ?>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
// Set new default font family and font color to mimic Bootstrap's default styling
|
// Set new default font family and font color to mimic Bootstrap's default styling
|
||||||
Chart.defaults.global.defaultFontFamily = '-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif';
|
Chart.defaults.global.defaultFontFamily = '-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif';
|
||||||
|
|||||||
@@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
require_once("inc_all.php");
|
require_once("inc_all.php");
|
||||||
|
|
||||||
//$o = "DESC";
|
|
||||||
|
|
||||||
if (!empty($_GET['sb'])) {
|
if (!empty($_GET['sb'])) {
|
||||||
$sb = strip_tags(mysqli_real_escape_string($mysqli, $_GET['sb']));
|
$sb = strip_tags(mysqli_real_escape_string($mysqli, $_GET['sb']));
|
||||||
} else {
|
} else {
|
||||||
@@ -58,7 +56,9 @@ if ($_GET['canned_date'] == "custom" && !empty($_GET['dtf'])) {
|
|||||||
//Rebuild URL
|
//Rebuild URL
|
||||||
$url_query_strings_sb = http_build_query(array_merge($_GET, array('sb' => $sb, 'o' => $o)));
|
$url_query_strings_sb = http_build_query(array_merge($_GET, array('sb' => $sb, 'o' => $o)));
|
||||||
|
|
||||||
$sql = mysqli_query($mysqli, "SELECT SQL_CALC_FOUND_ROWS * FROM expenses
|
$sql = mysqli_query(
|
||||||
|
$mysqli,
|
||||||
|
"SELECT SQL_CALC_FOUND_ROWS * FROM expenses
|
||||||
LEFT JOIN categories ON expense_category_id = category_id
|
LEFT JOIN categories ON expense_category_id = category_id
|
||||||
LEFT JOIN vendors ON expense_vendor_id = vendor_id
|
LEFT JOIN vendors ON expense_vendor_id = vendor_id
|
||||||
LEFT JOIN accounts ON expense_account_id = account_id
|
LEFT JOIN accounts ON expense_account_id = account_id
|
||||||
|
|||||||
@@ -11,14 +11,17 @@ if (isset($_GET['client_id'])) {
|
|||||||
|
|
||||||
$sql = mysqli_query($mysqli, "UPDATE clients SET client_accessed_at = NOW() WHERE client_id = $client_id AND company_id = $session_company_id");
|
$sql = mysqli_query($mysqli, "UPDATE clients SET client_accessed_at = NOW() WHERE client_id = $client_id AND company_id = $session_company_id");
|
||||||
|
|
||||||
$sql = mysqli_query($mysqli, "SELECT * FROM clients
|
$sql = mysqli_query(
|
||||||
|
$mysqli,
|
||||||
|
"SELECT * FROM clients
|
||||||
LEFT JOIN locations ON primary_location = location_id AND location_archived_at IS NULL
|
LEFT JOIN locations ON primary_location = location_id AND location_archived_at IS NULL
|
||||||
LEFT JOIN contacts ON primary_contact = contact_id AND contact_archived_at IS NULL
|
LEFT JOIN contacts ON primary_contact = contact_id AND contact_archived_at IS NULL
|
||||||
WHERE client_id = $client_id
|
WHERE client_id = $client_id
|
||||||
AND clients.company_id = $session_company_id");
|
AND clients.company_id = $session_company_id"
|
||||||
|
);
|
||||||
|
|
||||||
if (mysqli_num_rows($sql) == 0) {
|
if (mysqli_num_rows($sql) == 0) {
|
||||||
include("header.php");
|
require_once("header.php");
|
||||||
echo "<center><h1 class='text-secondary mt-5'>Nothing to see here</h1></center>";
|
echo "<center><h1 class='text-secondary mt-5'>Nothing to see here</h1></center>";
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
include("config.php");
|
require_once("config.php");
|
||||||
include_once("functions.php");
|
require_once("functions.php");
|
||||||
include("check_login.php");
|
require_once("check_login.php");
|
||||||
include("header.php");
|
require_once("header.php");
|
||||||
include("top_nav.php");
|
require_once("top_nav.php");
|
||||||
include("reports_side_nav.php");
|
require_once("reports_side_nav.php");
|
||||||
include("inc_wrapper.php");
|
require_once("inc_wrapper.php");
|
||||||
include("inc_alert_feedback.php");
|
require_once("inc_alert_feedback.php");
|
||||||
|
|
||||||
// Set variable default values
|
// Set variable default values
|
||||||
$largest_income_month = 0;
|
$largest_income_month = 0;
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
include("config.php");
|
require_once("config.php");
|
||||||
include_once("functions.php");
|
require_once("functions.php");
|
||||||
include("check_login.php");
|
require_once("check_login.php");
|
||||||
|
|
||||||
validateAdminRole();
|
validateAdminRole();
|
||||||
|
|
||||||
include("header.php");
|
require_once("header.php");
|
||||||
include("top_nav.php");
|
require_once("top_nav.php");
|
||||||
include("settings_side_nav.php");
|
require_once("settings_side_nav.php");
|
||||||
include("inc_wrapper.php");
|
require_once("inc_wrapper.php");
|
||||||
include("inc_alert_feedback.php");
|
require_once("inc_alert_feedback.php");
|
||||||
include("pagination_head.php");
|
require_once("pagination_head.php");
|
||||||
|
|
||||||
|
|||||||
@@ -16,71 +16,54 @@ $location_phone = formatPhoneNumber($location_phone);
|
|||||||
<div><i class="fa fa-fw fa-map-marker-alt text-secondary ml-1 mr-1"></i> <?php echo $location_address; ?></div>
|
<div><i class="fa fa-fw fa-map-marker-alt text-secondary ml-1 mr-1"></i> <?php echo $location_address; ?></div>
|
||||||
<div class="ml-4 mb-2"><?php echo "$location_city $location_state $location_zip"; ?></div>
|
<div class="ml-4 mb-2"><?php echo "$location_city $location_state $location_zip"; ?></div>
|
||||||
</a>
|
</a>
|
||||||
<?php } ?>
|
<?php }
|
||||||
<?php
|
|
||||||
if (!empty($location_phone)) {
|
if (!empty($location_phone)) { ?>
|
||||||
?>
|
|
||||||
<i class="fa fa-fw fa-phone text-secondary ml-1 mr-2 mb-2"></i> <a href="tel:<?php echo $location_phone?>"><?php echo $location_phone; ?></a>
|
<i class="fa fa-fw fa-phone text-secondary ml-1 mr-2 mb-2"></i> <a href="tel:<?php echo $location_phone?>"><?php echo $location_phone; ?></a>
|
||||||
<br>
|
<br>
|
||||||
<?php
|
<?php }
|
||||||
}
|
|
||||||
?>
|
if (!empty($client_website)) { ?>
|
||||||
<?php
|
|
||||||
if (!empty($client_website)) {
|
|
||||||
?>
|
|
||||||
<i class="fa fa-fw fa-globe text-secondary ml-1 mr-2 mb-2"></i> <a target="_blank" href="//<?php echo $client_website; ?>"><?php echo $client_website; ?></a>
|
<i class="fa fa-fw fa-globe text-secondary ml-1 mr-2 mb-2"></i> <a target="_blank" href="//<?php echo $client_website; ?>"><?php echo $client_website; ?></a>
|
||||||
<br>
|
<br>
|
||||||
<?php
|
<?php }
|
||||||
}
|
|
||||||
?>
|
|
||||||
<?php
|
|
||||||
if (!empty($client_tag_name_display_array)) {
|
if (!empty($client_tag_name_display_array)) {
|
||||||
?>
|
echo $client_tags_display;
|
||||||
<?php echo $client_tags_display; ?>
|
} ?>
|
||||||
<?php
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md border-left">
|
<div class="col-md border-left">
|
||||||
<h4 class="text-secondary">Primary Contact</h4>
|
<h4 class="text-secondary">Primary Contact</h4>
|
||||||
<?php
|
<?php
|
||||||
if (!empty($contact_name)) {
|
|
||||||
?>
|
if (!empty($contact_name)) { ?>
|
||||||
<i class="fa fa-fw fa-user text-secondary ml-1 mr-2 mb-2"></i> <?php echo $contact_name; ?>
|
<i class="fa fa-fw fa-user text-secondary ml-1 mr-2 mb-2"></i> <?php echo $contact_name; ?>
|
||||||
<br>
|
<br>
|
||||||
<?php
|
<?php }
|
||||||
}
|
|
||||||
?>
|
|
||||||
<?php
|
if (!empty($contact_email)) { ?>
|
||||||
if (!empty($contact_email)) {
|
|
||||||
?>
|
|
||||||
<i class="fa fa-fw fa-envelope text-secondary ml-1 mr-2 mb-2"></i> <a href="mailto:<?php echo $contact_email; ?>"><?php echo $contact_email; ?></a><button class='btn btn-sm clipboardjs' data-clipboard-text='<?php echo $contact_email; ?>'><i class='far fa-copy text-secondary'></i></button>
|
<i class="fa fa-fw fa-envelope text-secondary ml-1 mr-2 mb-2"></i> <a href="mailto:<?php echo $contact_email; ?>"><?php echo $contact_email; ?></a><button class='btn btn-sm clipboardjs' data-clipboard-text='<?php echo $contact_email; ?>'><i class='far fa-copy text-secondary'></i></button>
|
||||||
<br>
|
<br>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
<?php
|
|
||||||
if (!empty($contact_phone)) {
|
if (!empty($contact_phone)) { ?>
|
||||||
?>
|
|
||||||
<i class="fa fa-fw fa-phone text-secondary ml-1 mr-2 mb-2"></i> <a href="tel:<?php echo $contact_phone; ?>"><?php echo $contact_phone; ?> </a>
|
<i class="fa fa-fw fa-phone text-secondary ml-1 mr-2 mb-2"></i> <a href="tel:<?php echo $contact_phone; ?>"><?php echo $contact_phone; ?> </a>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if (!empty($contact_extension)) {
|
if (!empty($contact_extension)) {
|
||||||
?>
|
echo "x $contact_extension";
|
||||||
x<?php echo $contact_extension; ?>
|
|
||||||
<?php
|
|
||||||
}
|
}
|
||||||
?>
|
echo "<br>";
|
||||||
<br>
|
|
||||||
<?php
|
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
<?php
|
if (!empty($contact_mobile)) { ?>
|
||||||
if (!empty($contact_mobile)) {
|
|
||||||
?>
|
|
||||||
<i class="fa fa-fw fa-mobile-alt text-secondary ml-1 mr-2 mb-2"></i> <a href="tel:<?php echo $contact_mobile; ?>"> <?php echo $contact_mobile; ?> </a>
|
<i class="fa fa-fw fa-mobile-alt text-secondary ml-1 mr-2 mb-2"></i> <a href="tel:<?php echo $contact_mobile; ?>"> <?php echo $contact_mobile; ?> </a>
|
||||||
<?php
|
<?php } ?>
|
||||||
}
|
|
||||||
?>
|
|
||||||
</div>
|
</div>
|
||||||
<?php if ($session_user_role == 1 || $session_user_role == 3 && $config_module_enable_accounting == 1) { ?>
|
<?php if ($session_user_role == 1 || $session_user_role == 3 && $config_module_enable_accounting == 1) { ?>
|
||||||
<div class="col-md border-left">
|
<div class="col-md border-left">
|
||||||
@@ -91,12 +74,14 @@ $location_phone = formatPhoneNumber($location_phone);
|
|||||||
<h6 class="ml-1 text-secondary">Net Terms <div class="text-dark float-right"><?php echo $client_net_terms; ?> <small class="text-secondary">Days</small></div></h6>
|
<h6 class="ml-1 text-secondary">Net Terms <div class="text-dark float-right"><?php echo $client_net_terms; ?> <small class="text-secondary">Days</small></div></h6>
|
||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<?php if ($config_module_enable_ticketing == 1) { ?>
|
<?php if ($config_module_enable_ticketing == 1) { ?>
|
||||||
<div class="col-md border-left">
|
<div class="col-md border-left">
|
||||||
<h4 class="text-secondary">Support</h4>
|
<h4 class="text-secondary">Support</h4>
|
||||||
<h6 class="ml-1 text-secondary">Open Tickets <div class="text-dark float-right"><?php echo $num_active_tickets; ?></div></h6>
|
<h6 class="ml-1 text-secondary">Open Tickets <div class="text-dark float-right"><?php echo $num_active_tickets; ?></div></h6>
|
||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<div class="col-md-1 border-left">
|
<div class="col-md-1 border-left">
|
||||||
<?php if ($session_user_role == 3) { ?>
|
<?php if ($session_user_role == 3) { ?>
|
||||||
<div class="dropdown dropleft text-center">
|
<div class="dropdown dropleft text-center">
|
||||||
@@ -122,8 +107,7 @@ $location_phone = formatPhoneNumber($location_phone);
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
include("client_edit_modal.php");
|
require_once("client_edit_modal.php");
|
||||||
include("client_delete_modal.php");
|
require_once("client_delete_modal.php");
|
||||||
include("category_quick_add_modal.php");
|
require_once("category_quick_add_modal.php");
|
||||||
|
|
||||||
?>
|
|
||||||
|
|||||||
@@ -119,14 +119,17 @@ if ($_GET['canned_date'] == "custom" && !empty($_GET['dtf'])) {
|
|||||||
//Rebuild URL
|
//Rebuild URL
|
||||||
$url_query_strings_sb = http_build_query(array_merge($_GET, array('sb' => $sb, 'o' => $o)));
|
$url_query_strings_sb = http_build_query(array_merge($_GET, array('sb' => $sb, 'o' => $o)));
|
||||||
|
|
||||||
$sql = mysqli_query($mysqli, "SELECT SQL_CALC_FOUND_ROWS * FROM invoices
|
$sql = mysqli_query(
|
||||||
|
$mysqli,
|
||||||
|
"SELECT SQL_CALC_FOUND_ROWS * FROM invoices
|
||||||
LEFT JOIN clients ON invoice_client_id = client_id
|
LEFT JOIN clients ON invoice_client_id = client_id
|
||||||
LEFT JOIN categories ON invoice_category_id = category_id
|
LEFT JOIN categories ON invoice_category_id = category_id
|
||||||
WHERE invoices.company_id = $session_company_id
|
WHERE invoices.company_id = $session_company_id
|
||||||
AND (invoice_status LIKE '$status_query')
|
AND (invoice_status LIKE '$status_query')
|
||||||
AND DATE(invoice_date) BETWEEN '$dtf' AND '$dtt'
|
AND DATE(invoice_date) BETWEEN '$dtf' AND '$dtt'
|
||||||
AND (CONCAT(invoice_prefix,invoice_number) LIKE '%$q%' OR invoice_scope LIKE '%$q%' OR client_name LIKE '%$q%' OR invoice_status LIKE '%$q%' OR invoice_amount LIKE '%$q%' OR category_name LIKE '%$q%')
|
AND (CONCAT(invoice_prefix,invoice_number) LIKE '%$q%' OR invoice_scope LIKE '%$q%' OR client_name LIKE '%$q%' OR invoice_status LIKE '%$q%' OR invoice_amount LIKE '%$q%' OR category_name LIKE '%$q%')
|
||||||
ORDER BY $sb $o LIMIT $record_from, $record_to");
|
ORDER BY $sb $o LIMIT $record_from, $record_to"
|
||||||
|
);
|
||||||
|
|
||||||
$num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
$num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,9 @@ if (!empty($_GET['dtf'])) {
|
|||||||
|
|
||||||
$url_query_strings_sb = http_build_query(array_merge($_GET, array('sb' => $sb, 'o' => $o)));
|
$url_query_strings_sb = http_build_query(array_merge($_GET, array('sb' => $sb, 'o' => $o)));
|
||||||
|
|
||||||
$sql = mysqli_query($mysqli, "SELECT SQL_CALC_FOUND_ROWS * FROM notifications
|
$sql = mysqli_query(
|
||||||
|
$mysqli,
|
||||||
|
"SELECT SQL_CALC_FOUND_ROWS * FROM notifications
|
||||||
LEFT JOIN users ON notification_dismissed_by = user_id
|
LEFT JOIN users ON notification_dismissed_by = user_id
|
||||||
LEFT JOIN clients ON notification_client_id = client_id
|
LEFT JOIN clients ON notification_client_id = client_id
|
||||||
WHERE (notification_type LIKE '%$q%' OR notification LIKE '%$q%' OR user_name LIKE '%$q%' OR client_name LIKE '%$q%')
|
WHERE (notification_type LIKE '%$q%' OR notification LIKE '%$q%' OR user_name LIKE '%$q%' OR client_name LIKE '%$q%')
|
||||||
|
|||||||
6
post.php
6
post.php
@@ -1,8 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
include("config.php");
|
require_once("config.php");
|
||||||
include("functions.php");
|
require_once("functions.php");
|
||||||
include("check_login.php");
|
require_once("check_login.php");
|
||||||
|
|
||||||
if(isset($_POST['change_records_per_page'])){
|
if(isset($_POST['change_records_per_page'])){
|
||||||
|
|
||||||
|
|||||||
@@ -413,7 +413,7 @@ require_once("footer.php");
|
|||||||
?>
|
?>
|
||||||
|
|
||||||
<!-- JSON Autocomplete / type ahead -->
|
<!-- JSON Autocomplete / type ahead -->
|
||||||
<!-- //TODO: Not sure quite how to make this more modular to include elsewhere, I'll leave that design decision down to you.. -->
|
<!-- //TODO: Move to js/ -->
|
||||||
<link rel="stylesheet" href="plugins/jquery-ui/jquery-ui.min.css">
|
<link rel="stylesheet" href="plugins/jquery-ui/jquery-ui.min.css">
|
||||||
<script src="plugins/jquery-ui/jquery-ui.min.js"></script>
|
<script src="plugins/jquery-ui/jquery-ui.min.js"></script>
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
@@ -55,7 +55,9 @@ if ($_GET['canned_date'] == "custom" && !empty($_GET['dtf'])) {
|
|||||||
//Rebuild URL
|
//Rebuild URL
|
||||||
$url_query_strings_sb = http_build_query(array_merge($_GET, array('sb' => $sb, 'o' => $o)));
|
$url_query_strings_sb = http_build_query(array_merge($_GET, array('sb' => $sb, 'o' => $o)));
|
||||||
|
|
||||||
$sql = mysqli_query($mysqli, "SELECT SQL_CALC_FOUND_ROWS * FROM quotes
|
$sql = mysqli_query(
|
||||||
|
$mysqli,
|
||||||
|
"SELECT SQL_CALC_FOUND_ROWS * FROM quotes
|
||||||
LEFT JOIN clients ON quote_client_id = client_id
|
LEFT JOIN clients ON quote_client_id = client_id
|
||||||
LEFT JOIN categories ON quote_category_id = category_id
|
LEFT JOIN categories ON quote_category_id = category_id
|
||||||
WHERE quotes.company_id = $session_company_id
|
WHERE quotes.company_id = $session_company_id
|
||||||
|
|||||||
@@ -219,7 +219,7 @@ if (isset($_GET['recurring_id'])) {
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
include("item_edit_modal.php");
|
require("item_edit_modal.php");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -55,7 +55,9 @@ if (empty($_GET['canned_date'])) {
|
|||||||
//Rebuild URL
|
//Rebuild URL
|
||||||
$url_query_strings_sb = http_build_query(array_merge($_GET, array('sb' => $sb, 'o' => $o)));
|
$url_query_strings_sb = http_build_query(array_merge($_GET, array('sb' => $sb, 'o' => $o)));
|
||||||
|
|
||||||
$sql = mysqli_query($mysqli, "SELECT SQL_CALC_FOUND_ROWS * FROM recurring
|
$sql = mysqli_query(
|
||||||
|
$mysqli,
|
||||||
|
"SELECT SQL_CALC_FOUND_ROWS * FROM recurring
|
||||||
LEFT JOIN clients ON recurring_client_id = client_id
|
LEFT JOIN clients ON recurring_client_id = client_id
|
||||||
LEFT JOIN categories ON recurring_category_id = category_id
|
LEFT JOIN categories ON recurring_category_id = category_id
|
||||||
WHERE recurring.company_id = $session_company_id
|
WHERE recurring.company_id = $session_company_id
|
||||||
|
|||||||
@@ -32,9 +32,7 @@ $sql_categories = mysqli_query($mysqli, "SELECT * FROM categories WHERE category
|
|||||||
?>
|
?>
|
||||||
<option <?php if ($year == $expense_year) { ?> selected <?php } ?> > <?php echo $expense_year; ?></option>
|
<option <?php if ($year == $expense_year) { ?> selected <?php } ?> > <?php echo $expense_year; ?></option>
|
||||||
|
|
||||||
<?php
|
<?php } ?>
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
</form>
|
</form>
|
||||||
@@ -84,20 +82,12 @@ $sql_categories = mysqli_query($mysqli, "SELECT * FROM categories WHERE category
|
|||||||
?>
|
?>
|
||||||
<td class="text-right"><a class="text-dark" href="expenses.php?q=<?php echo $category_name; ?>&dtf=<?php echo "$year-$month"; ?>-01&dtt=<?php echo "$year-$month"; ?>-31"><?php echo numfmt_format_currency($currency_format, $expense_amount_for_month, $session_company_currency); ?></a></td>
|
<td class="text-right"><a class="text-dark" href="expenses.php?q=<?php echo $category_name; ?>&dtf=<?php echo "$year-$month"; ?>-01&dtt=<?php echo "$year-$month"; ?>-31"><?php echo numfmt_format_currency($currency_format, $expense_amount_for_month, $session_company_currency); ?></a></td>
|
||||||
|
|
||||||
<?php
|
<?php } ?>
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
<th class="text-right"><a class="text-dark" href="expenses.php?q=<?php echo $category_name; ?>&dtf=<?php echo $year; ?>-01-01&dtt=<?php echo $year; ?>-12-31"><?php echo numfmt_format_currency($currency_format, $total_expense_for_all_months, $session_company_currency); ?></a></th>
|
<th class="text-right"><a class="text-dark" href="expenses.php?q=<?php echo $category_name; ?>&dtf=<?php echo $year; ?>-01-01&dtt=<?php echo $year; ?>-12-31"><?php echo numfmt_format_currency($currency_format, $total_expense_for_all_months, $session_company_currency); ?></a></th>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<?php
|
<?php } ?>
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<th>Total</th>
|
<th>Total</th>
|
||||||
@@ -113,11 +103,8 @@ $sql_categories = mysqli_query($mysqli, "SELECT * FROM categories WHERE category
|
|||||||
?>
|
?>
|
||||||
|
|
||||||
<th class="text-right"><a class="text-dark" href="expenses.php?dtf=<?php echo "$year-$month"; ?>-01&dtt=<?php echo "$year-$month"; ?>-31"><?php echo numfmt_format_currency($currency_format, $expense_total_amount_for_month, $session_company_currency); ?></a></th>
|
<th class="text-right"><a class="text-dark" href="expenses.php?dtf=<?php echo "$year-$month"; ?>-01&dtt=<?php echo "$year-$month"; ?>-31"><?php echo numfmt_format_currency($currency_format, $expense_total_amount_for_month, $session_company_currency); ?></a></th>
|
||||||
<?php
|
|
||||||
|
|
||||||
}
|
<?php } ?>
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
<th class="text-right"><a class="text-dark" href="expenses.php?dtf=<?php echo $year; ?>-01-01&dtt=<?php echo $year; ?>-12-31"><?php echo numfmt_format_currency($currency_format, $total_expense_for_all_months, $session_company_currency); ?></th>
|
<th class="text-right"><a class="text-dark" href="expenses.php?dtf=<?php echo $year; ?>-01-01&dtt=<?php echo $year; ?>-12-31"><?php echo numfmt_format_currency($currency_format, $total_expense_for_all_months, $session_company_currency); ?></th>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -164,15 +151,9 @@ $sql_categories = mysqli_query($mysqli, "SELECT * FROM categories WHERE category
|
|||||||
$largest_expense_month = $expenses_for_month;
|
$largest_expense_month = $expenses_for_month;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
echo "$expenses_for_month,";
|
||||||
|
|
||||||
?>
|
} ?>
|
||||||
<?php echo "$expenses_for_month,"; ?>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
],
|
],
|
||||||
}],
|
}],
|
||||||
|
|||||||
@@ -32,9 +32,7 @@ $sql_clients = mysqli_query($mysqli, "SELECT * FROM clients WHERE company_id = $
|
|||||||
?>
|
?>
|
||||||
<option <?php if ($year == $payment_year) { ?> selected <?php } ?> > <?php echo $payment_year; ?></option>
|
<option <?php if ($year == $payment_year) { ?> selected <?php } ?> > <?php echo $payment_year; ?></option>
|
||||||
|
|
||||||
<?php
|
<?php } ?>
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
</form>
|
</form>
|
||||||
@@ -76,4 +74,5 @@ $sql_clients = mysqli_query($mysqli, "SELECT * FROM clients WHERE company_id = $
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php require_once("footer.php"); ?>
|
<?php
|
||||||
|
require_once("footer.php");
|
||||||
|
|||||||
@@ -56,7 +56,9 @@ if ($_GET['canned_date'] == "custom" && !empty($_GET['dtf'])) {
|
|||||||
//Rebuild URL
|
//Rebuild URL
|
||||||
$url_query_strings_sb = http_build_query(array_merge($_GET, array('sb' => $sb, 'o' => $o)));
|
$url_query_strings_sb = http_build_query(array_merge($_GET, array('sb' => $sb, 'o' => $o)));
|
||||||
|
|
||||||
$sql = mysqli_query($mysqli, "SELECT SQL_CALC_FOUND_ROWS * FROM revenues
|
$sql = mysqli_query(
|
||||||
|
$mysqli,
|
||||||
|
"SELECT SQL_CALC_FOUND_ROWS * FROM revenues
|
||||||
JOIN categories ON revenue_category_id = category_id
|
JOIN categories ON revenue_category_id = category_id
|
||||||
LEFT JOIN accounts ON revenue_account_id = account_id
|
LEFT JOIN accounts ON revenue_account_id = account_id
|
||||||
WHERE revenues.company_id = $session_company_id
|
WHERE revenues.company_id = $session_company_id
|
||||||
|
|||||||
@@ -94,15 +94,14 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
if ($session_user_role == 3) { ?>
|
if ($session_user_role == 3) { ?>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item text-danger" href="post.php?delete_scheduled_ticket=<?php echo $scheduled_ticket_id; ?>">Delete</a>
|
<a class="dropdown-item text-danger" href="post.php?delete_scheduled_ticket=<?php echo $scheduled_ticket_id; ?>">Delete</a>
|
||||||
|
<?php } ?>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
|
||||||
} ?>
|
|
||||||
</div>
|
</div>
|
||||||
<?php
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php require_once("inc_all_settings.php"); ?>
|
<?php
|
||||||
|
require_once("inc_all_settings.php"); ?>
|
||||||
|
|
||||||
<div class="card card-dark">
|
<div class="card card-dark">
|
||||||
<div class="card-header py-3">
|
<div class="card-header py-3">
|
||||||
@@ -50,4 +51,5 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php include("footer.php");
|
<?php
|
||||||
|
require_once("footer.php");
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php require_once("inc_all_settings.php"); ?>
|
<?php
|
||||||
|
require_once("inc_all_settings.php"); ?>
|
||||||
|
|
||||||
<div class="card card-dark">
|
<div class="card card-dark">
|
||||||
<div class="card-header py-3">
|
<div class="card-header py-3">
|
||||||
@@ -36,4 +37,4 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php include("footer.php");
|
<?php require_once("footer.php");
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php require_once("inc_all_settings.php"); ?>
|
<?php
|
||||||
|
require_once("inc_all_settings.php"); ?>
|
||||||
|
|
||||||
<div class="card card-dark">
|
<div class="card card-dark">
|
||||||
<div class="card-header py-3">
|
<div class="card-header py-3">
|
||||||
@@ -88,4 +89,5 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php include("footer.php");
|
<?php
|
||||||
|
require_once("footer.php");
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php require_once("inc_all_settings.php"); ?>
|
<?php
|
||||||
|
require_once("inc_all_settings.php"); ?>
|
||||||
|
|
||||||
<div class="card card-dark">
|
<div class="card card-dark">
|
||||||
<div class="card-header py-3">
|
<div class="card-header py-3">
|
||||||
@@ -165,4 +166,4 @@
|
|||||||
|
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<?php include("footer.php");
|
<?php require_once("footer.php");
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
require_once("inc_all_settings.php"); ?>
|
require_once("inc_all_settings.php"); ?>
|
||||||
|
|
||||||
<div class="card card-dark">
|
<div class="card card-dark">
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php require_once("inc_all_settings.php"); ?>
|
<?php
|
||||||
|
require_once("inc_all_settings.php"); ?>
|
||||||
|
|
||||||
<div class="card card-dark">
|
<div class="card card-dark">
|
||||||
<div class="card-header py-3">
|
<div class="card-header py-3">
|
||||||
@@ -60,4 +61,5 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php include("footer.php");
|
<?php
|
||||||
|
require_once("footer.php");
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php require_once("inc_all_settings.php"); ?>
|
<?php
|
||||||
|
require_once("inc_all_settings.php"); ?>
|
||||||
|
|
||||||
<div class="card card-dark">
|
<div class="card card-dark">
|
||||||
<div class="card-header py-3">
|
<div class="card-header py-3">
|
||||||
@@ -40,4 +41,5 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php include("footer.php");
|
<?php
|
||||||
|
require_once("footer.php");
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php require_once("inc_all_settings.php"); ?>
|
<?php
|
||||||
|
require_once("inc_all_settings.php"); ?>
|
||||||
|
|
||||||
<div class="card card-dark">
|
<div class="card card-dark">
|
||||||
<div class="card-header py-3">
|
<div class="card-header py-3">
|
||||||
@@ -41,4 +42,5 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php include("footer.php");
|
<?php
|
||||||
|
require_once("footer.php");
|
||||||
|
|||||||
@@ -1021,7 +1021,7 @@ if (isset($_POST['add_company_settings'])) {
|
|||||||
|
|
||||||
if (isset($_POST['add_telemetry'])) {
|
if (isset($_POST['add_telemetry'])) {
|
||||||
|
|
||||||
if ($_POST['share_data'] == 1) {
|
if (isset($_POST['share_data']) && $_POST['share_data'] == 1) {
|
||||||
|
|
||||||
$comments = trim(strip_tags($_POST['comments']));
|
$comments = trim(strip_tags($_POST['comments']));
|
||||||
|
|
||||||
|
|||||||
12
side_nav.php
12
side_nav.php
@@ -93,9 +93,9 @@
|
|||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<?php } ?>
|
<?php }
|
||||||
|
|
||||||
<?php if ($config_module_enable_accounting == 1) { ?>
|
if ($config_module_enable_accounting == 1) { ?>
|
||||||
|
|
||||||
<li class="nav-header mt-3">SALES</li>
|
<li class="nav-header mt-3">SALES</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
@@ -129,9 +129,9 @@
|
|||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<?php } ?>
|
<?php }
|
||||||
|
|
||||||
<?php if ($session_user_role == 1 || $session_user_role == 3 && $config_module_enable_accounting == 1) { ?>
|
if ($session_user_role == 1 || $session_user_role == 3 && $config_module_enable_accounting == 1) { ?>
|
||||||
|
|
||||||
<li class="nav-header mt-3">ACCOUNTING</li>
|
<li class="nav-header mt-3">ACCOUNTING</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
@@ -173,9 +173,9 @@
|
|||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<?php } ?>
|
<?php }
|
||||||
|
|
||||||
<?php if ($session_user_role == 3) { ?>
|
if ($session_user_role == 3) { ?>
|
||||||
|
|
||||||
<li class="nav-item mt-3">
|
<li class="nav-item mt-3">
|
||||||
<a href="users.php" class="nav-link">
|
<a href="users.php" class="nav-link">
|
||||||
|
|||||||
@@ -637,3 +637,4 @@ if ($ticket_status !== "Closed") { ?>
|
|||||||
<!-- Ticket collision detect JS (jQuery is called in footer, so collision detection script MUST be below it) -->
|
<!-- Ticket collision detect JS (jQuery is called in footer, so collision detection script MUST be below it) -->
|
||||||
<script src="js/ticket_collision_detection.js"></script>
|
<script src="js/ticket_collision_detection.js"></script>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
|
|||||||
23
tickets.php
23
tickets.php
@@ -109,7 +109,9 @@ if ($_GET['canned_date'] == "custom" && !empty($_GET['dtf'])) {
|
|||||||
$url_query_strings_sb = http_build_query(array_merge($_GET, array('sb' => $sb, 'o' => $o, 'status' => $status, 'assigned' => $ticket_assigned_filter)));
|
$url_query_strings_sb = http_build_query(array_merge($_GET, array('sb' => $sb, 'o' => $o, 'status' => $status, 'assigned' => $ticket_assigned_filter)));
|
||||||
|
|
||||||
// Main ticket query:
|
// Main ticket query:
|
||||||
$sql = mysqli_query($mysqli, "SELECT SQL_CALC_FOUND_ROWS * FROM tickets
|
$sql = mysqli_query(
|
||||||
|
$mysqli,
|
||||||
|
"SELECT SQL_CALC_FOUND_ROWS * FROM tickets
|
||||||
LEFT JOIN clients ON ticket_client_id = client_id
|
LEFT JOIN clients ON ticket_client_id = client_id
|
||||||
LEFT JOIN contacts ON ticket_contact_id = contact_id
|
LEFT JOIN contacts ON ticket_contact_id = contact_id
|
||||||
LEFT JOIN users ON ticket_assigned_to = user_id
|
LEFT JOIN users ON ticket_assigned_to = user_id
|
||||||
@@ -120,7 +122,8 @@ AND ticket_assigned_to LIKE '%$ticket_assigned_filter%'
|
|||||||
AND $ticket_status_snippet
|
AND $ticket_status_snippet
|
||||||
AND DATE(ticket_created_at) BETWEEN '$dtf' AND '$dtt'
|
AND DATE(ticket_created_at) BETWEEN '$dtf' AND '$dtt'
|
||||||
AND (CONCAT(ticket_prefix,ticket_number) LIKE '%$q%' OR client_name LIKE '%$q%' OR ticket_subject LIKE '%$q%' OR user_name LIKE '%$q%')
|
AND (CONCAT(ticket_prefix,ticket_number) LIKE '%$q%' OR client_name LIKE '%$q%' OR ticket_subject LIKE '%$q%' OR user_name LIKE '%$q%')
|
||||||
ORDER BY $sb $o LIMIT $record_from, $record_to");
|
ORDER BY $sb $o LIMIT $record_from, $record_to"
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
$num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
$num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||||
@@ -384,8 +387,7 @@ $user_active_assigned_tickets = $row['total_tickets_assigned'];
|
|||||||
if (empty($ticket_assigned_to)) {
|
if (empty($ticket_assigned_to)) {
|
||||||
if ($ticket_status == "Closed") {
|
if ($ticket_status == "Closed") {
|
||||||
$ticket_assigned_to_display = "<p>Not Assigned</p>";
|
$ticket_assigned_to_display = "<p>Not Assigned</p>";
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
$ticket_assigned_to_display = "<p class='text-danger'>Not Assigned</p>";
|
$ticket_assigned_to_display = "<p class='text-danger'>Not Assigned</p>";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -435,10 +437,9 @@ $user_active_assigned_tickets = $row['total_tickets_assigned'];
|
|||||||
<?php } ?>
|
<?php } ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?php }
|
||||||
<?php
|
|
||||||
|
|
||||||
include("ticket_edit_modal.php");
|
require("ticket_edit_modal.php");
|
||||||
|
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
@@ -453,10 +454,10 @@ $user_active_assigned_tickets = $row['total_tickets_assigned'];
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<?php include("pagination.php"); ?>
|
<?php require_once("pagination.php"); ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php include("ticket_add_modal.php"); ?>
|
<?php
|
||||||
|
require_once("ticket_add_modal.php");
|
||||||
<?php include("footer.php");
|
require_once("footer.php");
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php require_once("inc_all_settings.php");
|
<?php
|
||||||
|
require_once("inc_all_settings.php");
|
||||||
|
|
||||||
if (!empty($_GET['sb'])) {
|
if (!empty($_GET['sb'])) {
|
||||||
$sb = strip_tags(mysqli_real_escape_string($mysqli, $_GET['sb']));
|
$sb = strip_tags(mysqli_real_escape_string($mysqli, $_GET['sb']));
|
||||||
|
|||||||
Reference in New Issue
Block a user