Adjust core files to 4 spaces
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
<?php require_once("inc_all_client.php"); ?>
|
||||
|
||||
<?php
|
||||
require_once("inc_all_client.php");
|
||||
|
||||
if (!empty($_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>
|
||||
</table>
|
||||
</div>
|
||||
<?php include("pagination.php"); ?>
|
||||
<?php require_once("pagination.php"); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
include("client_certificate_edit_modal.php");
|
||||
include("client_certificate_add_modal.php");
|
||||
require_once("client_certificate_edit_modal.php");
|
||||
require_once("client_certificate_add_modal.php");
|
||||
?>
|
||||
|
||||
<script>
|
||||
|
||||
+2
-2
@@ -34,7 +34,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
|
||||
?>
|
||||
|
||||
<div class="card card-dark">
|
||||
<div class="card card-dark">
|
||||
<div class="card-header py-2">
|
||||
<h3 class="card-title mt-2"><i class="fa fa-fw fa-users"></i> Contacts</h3>
|
||||
<div class="card-tools">
|
||||
@@ -221,7 +221,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
</div>
|
||||
<?php require_once("pagination.php"); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
|
||||
|
||||
+10
-12
@@ -1,26 +1,23 @@
|
||||
<?php require_once("inc_all_client.php"); ?>
|
||||
|
||||
<link href='plugins/fullcalendar/main.min.css' rel='stylesheet' />
|
||||
|
||||
<?php
|
||||
|
||||
require_once("inc_all_client.php");
|
||||
|
||||
if (isset($_GET['calendar_id'])) {
|
||||
$calendar_selected_id = intval($_GET['calendar_id']);
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<link href='plugins/fullcalendar/main.min.css' rel='stylesheet' />
|
||||
|
||||
<div class="card">
|
||||
<div id='calendar'></div>
|
||||
</div>
|
||||
|
||||
<?php include("calendar_event_add_modal.php"); ?>
|
||||
<?php include("calendar_add_modal.php"); ?>
|
||||
|
||||
<?php
|
||||
?>
|
||||
include("calendar_event_add_modal.php");
|
||||
include("calendar_add_modal.php");
|
||||
|
||||
<?php
|
||||
//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");
|
||||
while ($row = mysqli_fetch_array($sql)) {
|
||||
@@ -34,7 +31,7 @@ while ($row = mysqli_fetch_array($sql)) {
|
||||
$calendar_name = htmlentities($row['calendar_name']);
|
||||
$calendar_color = htmlentities($row['calendar_color']);
|
||||
|
||||
include("calendar_event_edit_modal.php");
|
||||
require("calendar_event_edit_modal.php");
|
||||
|
||||
}
|
||||
|
||||
@@ -93,6 +90,7 @@ while ($row = mysqli_fetch_array($sql)) {
|
||||
calendar.render();
|
||||
});
|
||||
|
||||
</script>
|
||||
</script>
|
||||
|
||||
<?php include("footer.php"); ?>
|
||||
<?php
|
||||
require("footer.php");
|
||||
|
||||
+16
-21
@@ -1,7 +1,7 @@
|
||||
<?php require_once("inc_all_client.php"); ?>
|
||||
|
||||
<?php
|
||||
|
||||
require_once("inc_all_client.php");
|
||||
|
||||
if (isset($_GET['q'])) {
|
||||
$q = strip_tags(mysqli_real_escape_string($mysqli, $_GET['q']));
|
||||
//Phone Numbers
|
||||
@@ -9,21 +9,23 @@ if (isset($_GET['q'])) {
|
||||
if (empty($phone_query)) {
|
||||
$phone_query = $q;
|
||||
}
|
||||
}else{
|
||||
} else {
|
||||
$q = "";
|
||||
$phone_query = "";
|
||||
}
|
||||
|
||||
if (!empty($_GET['sb'])) {
|
||||
$sb = strip_tags(mysqli_real_escape_string($mysqli, $_GET['sb']));
|
||||
}else{
|
||||
} else {
|
||||
$sb = "location_name";
|
||||
}
|
||||
|
||||
//Rebuild URL
|
||||
$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
|
||||
AND location_archived_at IS NULL
|
||||
AND (location_name LIKE '%$q%' OR location_address LIKE '%$q%' OR location_phone LIKE '%$phone_query%')
|
||||
@@ -89,13 +91,13 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
$location_phone = formatPhoneNumber($row['location_phone']);
|
||||
if (empty($location_phone)) {
|
||||
$location_phone_display = "-";
|
||||
}else{
|
||||
} else {
|
||||
$location_phone_display = $location_phone;
|
||||
}
|
||||
$location_hours = htmlentities($row['location_hours']);
|
||||
if (empty($location_hours)) {
|
||||
$location_hours_display = "-";
|
||||
}else{
|
||||
} else {
|
||||
$location_hours_display = $location_hours;
|
||||
}
|
||||
$location_photo = htmlentities($row['location_photo']);
|
||||
@@ -104,7 +106,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
$location_contact_id = $row['location_contact_id'];
|
||||
if ($location_id == $primary_location) {
|
||||
$primary_location_display = "<p class='text-success'>Primary Location</p>";
|
||||
}else{
|
||||
} else {
|
||||
$primary_location_display = "";
|
||||
}
|
||||
|
||||
@@ -132,28 +134,21 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php include("client_location_edit_modal.php"); ?>
|
||||
<?php require("client_location_edit_modal.php"); ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
<?php } ?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php include("pagination.php"); ?>
|
||||
<?php require_once("pagination.php"); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
|
||||
include("client_location_add_modal.php");
|
||||
include("client_location_import_modal.php");
|
||||
|
||||
?>
|
||||
|
||||
<?php include("footer.php"); ?>
|
||||
require_once("client_location_add_modal.php");
|
||||
require_once("client_location_import_modal.php");
|
||||
require_once("footer.php");
|
||||
|
||||
+16
-19
@@ -1,10 +1,10 @@
|
||||
<?php require_once("inc_all_client.php"); ?>
|
||||
|
||||
<?php
|
||||
|
||||
require_once("inc_all_client.php");
|
||||
|
||||
if (!empty($_GET['sb'])) {
|
||||
$sb = strip_tags(mysqli_real_escape_string($mysqli, $_GET['sb']));
|
||||
}else{
|
||||
} else {
|
||||
$sb = "login_name";
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
|
||||
?>
|
||||
|
||||
<div class="card card-dark">
|
||||
<div class="card card-dark">
|
||||
<div class="card-header py-2">
|
||||
<h3 class="card-title mt-2"><i class="fa fa-fw fa-key"></i> Passwords</h3>
|
||||
<div class="card-tools">
|
||||
@@ -75,13 +75,13 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
$login_uri = htmlentities($row['login_uri']);
|
||||
if (empty($login_uri)) {
|
||||
$login_uri_display = "-";
|
||||
}else{
|
||||
} else {
|
||||
$login_uri_display = "$login_uri<button class='btn btn-sm clipboardjs' data-clipboard-text='$login_uri'><i class='far fa-copy text-secondary'></i></button><a href='https://$login_uri' target='_blank'><i class='fa fa-external-link-alt text-secondary'></i></a>";
|
||||
}
|
||||
$login_username = htmlentities(decryptLoginEntry($row['login_username']));
|
||||
if (empty($login_username)) {
|
||||
$login_username_display = "-";
|
||||
}else{
|
||||
} else {
|
||||
$login_username_display = "$login_username<button class='btn btn-sm clipboardjs' data-clipboard-text='$login_username'><i class='far fa-copy text-secondary'></i></button>";
|
||||
}
|
||||
$login_password = htmlentities(decryptLoginEntry($row['login_password']));
|
||||
@@ -89,7 +89,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
$login_id_with_secret = '"' . $row['login_id'] . '","' . $row['login_otp_secret'] . '"';
|
||||
if (empty($login_otp_secret)) {
|
||||
$otp_display = "-";
|
||||
}else{
|
||||
} else {
|
||||
$otp_display = "<span onmouseenter='showOTP($login_id_with_secret)'><i class='far fa-clock'></i> <span id='otp_$login_id'><i>Hover..</i></span></span>";
|
||||
}
|
||||
$login_note = htmlentities($row['login_note']);
|
||||
@@ -132,7 +132,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
|
||||
<?php
|
||||
|
||||
include("client_login_edit_modal.php");
|
||||
require("client_login_edit_modal.php");
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -140,11 +140,11 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php include("pagination.php"); ?>
|
||||
</div>
|
||||
<?php require_once("pagination.php"); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<script>
|
||||
function showOTP(id, secret) {
|
||||
//Send a GET request to ajax.php as ajax.php?get_totp_token=true&totp_secret=SECRET
|
||||
jQuery.get(
|
||||
@@ -163,14 +163,11 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
function generatePassword() {
|
||||
document.getElementById("password").value = "<?php echo randomString(); ?>"
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
||||
<?php
|
||||
|
||||
include("client_login_add_modal.php");
|
||||
include("share_modal.php");
|
||||
include("client_login_import_modal.php");
|
||||
|
||||
?>
|
||||
|
||||
<?php include("footer.php"); ?>
|
||||
require_once("client_login_add_modal.php");
|
||||
require_once("share_modal.php");
|
||||
require_once("client_login_import_modal.php");
|
||||
require_once("footer.php");
|
||||
|
||||
+2
-1
@@ -114,4 +114,5 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php require_once("footer.php"); ?>
|
||||
<?php
|
||||
require_once("footer.php");
|
||||
|
||||
+15
-15
@@ -10,11 +10,14 @@ if (!empty($_GET['sb'])) {
|
||||
//Rebuild URL
|
||||
$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
|
||||
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%')
|
||||
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()"));
|
||||
|
||||
@@ -72,7 +75,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
$network_vlan = htmlentities($row['network_vlan']);
|
||||
if (empty($network_vlan)) {
|
||||
$network_vlan_display = "-";
|
||||
}else{
|
||||
} else {
|
||||
$network_vlan_display = $network_vlan;
|
||||
}
|
||||
$network = htmlentities($row['network']);
|
||||
@@ -80,7 +83,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
$network_dhcp_range = htmlentities($row['network_dhcp_range']);
|
||||
if (empty($network_dhcp_range)) {
|
||||
$network_dhcp_range_display = "-";
|
||||
}else{
|
||||
} else {
|
||||
$network_dhcp_range_display = $network_dhcp_range;
|
||||
}
|
||||
$network_location_id = $row['network_location_id'];
|
||||
@@ -117,28 +120,24 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
<?php } ?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php include("pagination.php"); ?>
|
||||
<?php require_once("pagination.php"); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
|
||||
include("client_network_edit_modal.php");
|
||||
include("client_network_add_modal.php");
|
||||
require_once("client_network_edit_modal.php");
|
||||
require_once("client_network_add_modal.php");
|
||||
|
||||
?>
|
||||
|
||||
<script>
|
||||
function populateNetworkEditModal(client_id, network_id) {
|
||||
function populateNetworkEditModal(client_id, network_id) {
|
||||
|
||||
// Send a GET request to post.php as post.php?network_get_json_details=true&client_id=NUM&network_id=NUM
|
||||
jQuery.get(
|
||||
@@ -183,7 +182,8 @@ function populateNetworkEditModal(client_id, network_id) {
|
||||
});
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php include("footer.php"); ?>
|
||||
<?php
|
||||
require_once("footer.php");
|
||||
|
||||
+3
-1
@@ -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");
|
||||
|
||||
|
||||
+11
-12
@@ -1,6 +1,5 @@
|
||||
<?php require_once("inc_all_client.php"); ?>
|
||||
|
||||
<?php
|
||||
require_once("inc_all_client.php");
|
||||
|
||||
if (!empty($_GET['sb'])) {
|
||||
$sb = strip_tags(mysqli_real_escape_string($mysqli, $_GET['sb']));
|
||||
@@ -17,12 +16,15 @@ if (!isset($_GET['o'])) {
|
||||
//Rebuild URL
|
||||
$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 accounts ON payment_account_id = account_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%')
|
||||
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()"));
|
||||
|
||||
@@ -85,7 +87,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
$payment_reference = htmlentities($row['payment_reference']);
|
||||
if (empty($payment_reference)) {
|
||||
$payment_reference_display = "-";
|
||||
}else{
|
||||
} else {
|
||||
$payment_reference_display = $payment_reference;
|
||||
}
|
||||
$payment_amount = floatval($row['payment_amount']);
|
||||
@@ -105,17 +107,14 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
<td><?php echo $account_name; ?></td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
<?php } ?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php include("pagination.php"); ?>
|
||||
<?php require_once("pagination.php"); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php include("footer.php"); ?>
|
||||
<?php
|
||||
require_once("footer.php");
|
||||
|
||||
+5
-2
@@ -17,11 +17,14 @@ if (!isset($_GET['o'])) {
|
||||
//Rebuild URL
|
||||
$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
|
||||
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%')
|
||||
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()"));
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php require_once("inc_all_client.php"); ?>
|
||||
|
||||
<?php
|
||||
|
||||
require_once("inc_all_client.php");
|
||||
|
||||
if (!empty($_GET['sb'])) {
|
||||
$sb = strip_tags(mysqli_real_escape_string($mysqli, $_GET['sb']));
|
||||
} else {
|
||||
@@ -11,7 +11,9 @@ if (!empty($_GET['sb'])) {
|
||||
//Rebuild URL
|
||||
$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
|
||||
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%')
|
||||
@@ -89,7 +91,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
if ($recurring_status == 1) {
|
||||
$status = "Active";
|
||||
$status_badge_color = "success";
|
||||
}else{
|
||||
} else {
|
||||
$status = "Inactive";
|
||||
$status_badge_color = "secondary";
|
||||
}
|
||||
@@ -124,7 +126,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
</tr>
|
||||
|
||||
<?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>
|
||||
</table>
|
||||
</div>
|
||||
<?php include("pagination.php"); ?>
|
||||
<?php require_once("pagination.php"); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php include("recurring_invoice_add_modal.php"); ?>
|
||||
|
||||
<?php include("footer.php"); ?>
|
||||
<?php
|
||||
require_once("recurring_invoice_add_modal.php");
|
||||
require_once("footer.php");
|
||||
|
||||
@@ -23,7 +23,6 @@ $sql = mysqli_query(
|
||||
|
||||
$num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
|
||||
|
||||
?>
|
||||
<script src="js/scheduled_tickets_edit_modal.js"></script>
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
|
||||
?>
|
||||
|
||||
<div class="card card-dark">
|
||||
<div class="card card-dark">
|
||||
<div class="card-header py-3">
|
||||
<h3 class="card-title"><i class="fa fa-fw fa-share"></i> Shared Items (Links)</h3>
|
||||
</div>
|
||||
@@ -117,16 +117,14 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php } ?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php require_once("pagination.php"); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
require_once("footer.php");
|
||||
|
||||
+5
-3
@@ -10,7 +10,9 @@ if (!empty($_GET['sb'])) {
|
||||
//Rebuild URL
|
||||
$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
|
||||
WHERE software_client_id = $client_id
|
||||
AND software_template = 0
|
||||
@@ -21,7 +23,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
|
||||
?>
|
||||
|
||||
<div class="card card-dark">
|
||||
<div class="card card-dark">
|
||||
<div class="card-header py-2">
|
||||
<h3 class="card-title mt-2"><i class="fa fa-fw fa-cube"></i> Licenses</h3>
|
||||
<div class="card-tools">
|
||||
@@ -190,7 +192,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
</div>
|
||||
<?php require_once("pagination.php"); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
require_once("client_software_add_modal.php");
|
||||
|
||||
+3
-5
@@ -104,8 +104,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
if (empty($ticket_updated_at)) {
|
||||
if ($ticket_status == "Closed") {
|
||||
$ticket_updated_at_display = "<p>Never</p>";
|
||||
}
|
||||
else{
|
||||
} else{
|
||||
$ticket_updated_at_display = "<p class='text-danger'>Never</p>";
|
||||
}
|
||||
} else {
|
||||
@@ -117,7 +116,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
$ticket_status_display = "<span class='p-2 badge badge-primary'>$ticket_status</span>";
|
||||
} elseif ($ticket_status == "Working") {
|
||||
$ticket_status_display = "<span class='p-2 badge badge-success'>$ticket_status</span>";
|
||||
} else{
|
||||
} else {
|
||||
$ticket_status_display = "<span class='p-2 badge badge-secondary'>$ticket_status</span>";
|
||||
}
|
||||
|
||||
@@ -134,8 +133,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
if (empty($ticket_assigned_to)) {
|
||||
if ($ticket_status == "Closed") {
|
||||
$ticket_assigned_to_display = "<p>Not Assigned</p>";
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$ticket_assigned_to_display = "<p class='text-danger'>Not Assigned</p>";
|
||||
}
|
||||
} else {
|
||||
|
||||
+3
-1
@@ -26,7 +26,9 @@ if (isset($_GET['dtf'])) {
|
||||
//Rebuild URL
|
||||
$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
|
||||
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'
|
||||
|
||||
@@ -33,7 +33,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
|
||||
?>
|
||||
|
||||
<div class="card card-dark">
|
||||
<div class="card card-dark">
|
||||
<div class="card-header py-2">
|
||||
<h3 class="card-title mt-2">
|
||||
<i class="fa fa-fw fa-building"></i> Vendor Templates
|
||||
@@ -163,7 +163,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
</div>
|
||||
<?php require_once("pagination.php"); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
require_once("vendor_template_add_modal.php");
|
||||
|
||||
+3
-1
@@ -23,7 +23,9 @@ if (!empty($_GET['sb'])) {
|
||||
//Rebuild URL
|
||||
$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
|
||||
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");
|
||||
|
||||
+5
-3
@@ -89,7 +89,9 @@ if ($_GET['canned_date'] == "custom" && !empty($_GET['date_from'])) {
|
||||
//Rebuild URL
|
||||
$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 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%'
|
||||
@@ -104,7 +106,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
|
||||
?>
|
||||
|
||||
<div class="card card-dark">
|
||||
<div class="card card-dark">
|
||||
<div class="card-header py-2">
|
||||
<h3 class="card-title mt-2"><i class="fa fa-fw fa-users"></i> Clients</h3>
|
||||
<div class="card-tools">
|
||||
@@ -352,7 +354,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
</div>
|
||||
<?php require_once("pagination.php"); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
require_once("client_add_modal.php");
|
||||
|
||||
+4
-3
@@ -10,7 +10,9 @@ if (!empty($_GET['sb'])) {
|
||||
//Rebuild URL
|
||||
$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
|
||||
AND (company_name LIKE '%$q%')
|
||||
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));
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<tr>
|
||||
@@ -81,7 +82,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
<a class="text-dark" href="#" data-toggle="modal" data-target="#editCompanyModal<?php echo $company_id; ?>">
|
||||
<?php if (!empty($company_logo)) { ?>
|
||||
<img height="48" width="48" class="img-fluid rounded-circle" src="<?php echo "uploads/settings/$company_id/$company_logo"; ?>">
|
||||
<?php }else{ ?>
|
||||
<?php } else { ?>
|
||||
<span class="fa-stack fa-2x">
|
||||
<i class="fa fa-circle fa-stack-2x text-secondary"></i>
|
||||
<span class="fa fa-stack-1x text-white"><?php echo $company_initials; ?></span>
|
||||
|
||||
@@ -5,7 +5,7 @@ require_once("functions.php");
|
||||
|
||||
$sql_companies = mysqli_query($mysqli, "SELECT * FROM companies, settings WHERE companies.company_id = settings.company_id");
|
||||
|
||||
while($row = mysqli_fetch_array($sql_companies)){
|
||||
while ($row = mysqli_fetch_array($sql_companies)) {
|
||||
$company_id = $row['company_id'];
|
||||
$company_name = $row['company_name'];
|
||||
$company_phone = formatPhoneNumber($row['company_phone']);
|
||||
@@ -127,7 +127,7 @@ while($row = mysqli_fetch_array($sql_companies)){
|
||||
|
||||
$domainAlertArray = [1,7,14,30,90,120];
|
||||
|
||||
foreach($domainAlertArray as $day){
|
||||
foreach ($domainAlertArray as $day) {
|
||||
|
||||
//Get Domains Expiring
|
||||
$sql = mysqli_query(
|
||||
@@ -138,7 +138,7 @@ while($row = mysqli_fetch_array($sql_companies)){
|
||||
AND domains.company_id = $company_id"
|
||||
);
|
||||
|
||||
while($row = mysqli_fetch_array($sql)){
|
||||
while ($row = mysqli_fetch_array($sql)) {
|
||||
$domain_id = $row['domain_id'];
|
||||
$domain_name = mysqli_real_escape_string($mysqli, $row['domain_name']);
|
||||
$domain_expire = $row['domain_expire'];
|
||||
@@ -155,7 +155,7 @@ while($row = mysqli_fetch_array($sql_companies)){
|
||||
|
||||
$certificateAlertArray = [1,7,14,30,90,120];
|
||||
|
||||
foreach($certificateAlertArray as $day){
|
||||
foreach ($certificateAlertArray as $day) {
|
||||
|
||||
//Get Certs Expiring
|
||||
$sql = mysqli_query(
|
||||
@@ -166,7 +166,7 @@ while($row = mysqli_fetch_array($sql_companies)){
|
||||
AND certificates.company_id = $company_id"
|
||||
);
|
||||
|
||||
while($row = mysqli_fetch_array($sql)){
|
||||
while ($row = mysqli_fetch_array($sql)) {
|
||||
$certificate_id = $row['certificate_id'];
|
||||
$certificate_name = mysqli_real_escape_string($mysqli, $row['certificate_name']);
|
||||
$certificate_domain = $row['certificate_domain'];
|
||||
@@ -184,7 +184,7 @@ while($row = mysqli_fetch_array($sql_companies)){
|
||||
|
||||
$warranty_alert_array = [1,7,14,30,90,120];
|
||||
|
||||
foreach($warranty_alert_array as $day){
|
||||
foreach ($warranty_alert_array as $day) {
|
||||
|
||||
//Get Asset Warranty Expiring
|
||||
$sql = mysqli_query(
|
||||
@@ -195,7 +195,7 @@ while($row = mysqli_fetch_array($sql_companies)){
|
||||
AND assets.company_id = $company_id"
|
||||
);
|
||||
|
||||
while($row = mysqli_fetch_array($sql)){
|
||||
while ($row = mysqli_fetch_array($sql)) {
|
||||
$asset_id = $row['asset_id'];
|
||||
$asset_name = mysqli_real_escape_string($mysqli, $row['asset_name']);
|
||||
$asset_warranty_expire = $row['asset_warranty_expire'];
|
||||
@@ -217,8 +217,8 @@ while($row = mysqli_fetch_array($sql_companies)){
|
||||
// Get scheduled tickets for today
|
||||
$sql_scheduled_tickets = mysqli_query($mysqli, "SELECT * FROM scheduled_tickets WHERE scheduled_ticket_next_run = '$today_text'");
|
||||
|
||||
if(mysqli_num_rows($sql_scheduled_tickets) > 0){
|
||||
while($row = mysqli_fetch_array($sql_scheduled_tickets)){
|
||||
if (mysqli_num_rows($sql_scheduled_tickets) > 0) {
|
||||
while ($row = mysqli_fetch_array($sql_scheduled_tickets)) {
|
||||
$schedule_id = $row['scheduled_ticket_id'];
|
||||
$subject = mysqli_real_escape_string($mysqli, $row['scheduled_ticket_subject']);
|
||||
$details = mysqli_real_escape_string($mysqli, $row['scheduled_ticket_details']);
|
||||
@@ -246,11 +246,14 @@ while($row = mysqli_fetch_array($sql_companies)){
|
||||
if (!empty($config_smtp_host) && $config_ticket_client_general_notifications == 1) {
|
||||
|
||||
// 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 contacts ON ticket_contact_id = contact_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);
|
||||
|
||||
$contact_name = $row['contact_name'];
|
||||
@@ -261,7 +264,7 @@ while($row = mysqli_fetch_array($sql_companies)){
|
||||
$company_phone = formatPhoneNumber($row['company_phone']);
|
||||
|
||||
// Verify contact email is valid
|
||||
if(filter_var($contact_email, FILTER_VALIDATE_EMAIL)){
|
||||
if (filter_var($contact_email, FILTER_VALIDATE_EMAIL)) {
|
||||
|
||||
$subject = "Ticket created - [$ticket_prefix$ticket_number] - $ticket_subject (scheduled)";
|
||||
$body = "<i style='color: #808080'>#--itflow--#</i><br><br>Hello, $contact_name<br><br>A ticket regarding \"$ticket_subject\" has been automatically created for you.<br><br>--------------------------------<br>$details--------------------------------<br><br>Ticket: $ticket_prefix$ticket_number<br>Subject: $ticket_subject<br>Status: Open<br>Portal: https://$config_base_url/portal/ticket.php?id=$id<br><br>~<br>$company_name<br>Support Department<br>$config_ticket_from_email<br>$company_phone";
|
||||
@@ -289,24 +292,24 @@ while($row = mysqli_fetch_array($sql_companies)){
|
||||
}
|
||||
|
||||
// Set the next run date
|
||||
if($frequency == "weekly"){
|
||||
if ($frequency == "weekly") {
|
||||
// Note: We seemingly have to initialize a new datetime for each loop to avoid stacking the dates
|
||||
$now = new DateTime();
|
||||
$next_run = date_add($now, date_interval_create_from_date_string('1 week'));
|
||||
}
|
||||
elseif($frequency == "monthly"){
|
||||
elseif ($frequency == "monthly") {
|
||||
$now = new DateTime();
|
||||
$next_run = date_add($now, date_interval_create_from_date_string('1 month'));
|
||||
}
|
||||
elseif($frequency == "quarterly"){
|
||||
elseif ($frequency == "quarterly") {
|
||||
$now = new DateTime();
|
||||
$next_run = date_add($now, date_interval_create_from_date_string('3 months'));
|
||||
}
|
||||
elseif($frequency == "biannually"){
|
||||
elseif ($frequency == "biannually") {
|
||||
$now = new DateTime();
|
||||
$next_run = date_add($now, date_interval_create_from_date_string('6 months'));
|
||||
}
|
||||
elseif($frequency == "annually"){
|
||||
elseif ($frequency == "annually") {
|
||||
$now = new DateTime();
|
||||
$next_run = date_add($now, date_interval_create_from_date_string('12 months'));
|
||||
}
|
||||
@@ -323,7 +326,7 @@ while($row = mysqli_fetch_array($sql_companies)){
|
||||
//$invoiceAlertArray = [$config_invoice_overdue_reminders];
|
||||
$invoiceAlertArray = [30,60,90,120,150,180,210,240,270,300,330,360,390,420,450,480,510,540,570,590,620];
|
||||
|
||||
foreach($invoiceAlertArray as $day){
|
||||
foreach ($invoiceAlertArray as $day) {
|
||||
|
||||
$sql = mysqli_query(
|
||||
$mysqli,
|
||||
@@ -338,7 +341,7 @@ while($row = mysqli_fetch_array($sql_companies)){
|
||||
ORDER BY invoice_number DESC"
|
||||
);
|
||||
|
||||
while($row = mysqli_fetch_array($sql)){
|
||||
while ($row = mysqli_fetch_array($sql)) {
|
||||
$invoice_id = $row['invoice_id'];
|
||||
$invoice_prefix = $row['invoice_prefix'];
|
||||
$invoice_number = $row['invoice_number'];
|
||||
@@ -392,7 +395,7 @@ while($row = mysqli_fetch_array($sql_companies)){
|
||||
//Loop through all recurring that match today's date and is active
|
||||
$sql_recurring = mysqli_query($mysqli, "SELECT * FROM recurring LEFT JOIN clients ON client_id = recurring_client_id WHERE recurring_next_date = CURDATE() AND recurring_status = 1 AND recurring.company_id = $company_id");
|
||||
|
||||
while($row = mysqli_fetch_array($sql_recurring)){
|
||||
while ($row = mysqli_fetch_array($sql_recurring)) {
|
||||
$recurring_id = $row['recurring_id'];
|
||||
$recurring_scope = $row['recurring_scope'];
|
||||
$recurring_frequency = $row['recurring_frequency'];
|
||||
@@ -427,7 +430,7 @@ while($row = mysqli_fetch_array($sql_companies)){
|
||||
//Copy Items from original recurring invoice to new invoice
|
||||
$sql_invoice_items = mysqli_query($mysqli, "SELECT * FROM invoice_items WHERE item_recurring_id = $recurring_id ORDER BY item_id ASC");
|
||||
|
||||
while($row = mysqli_fetch_array($sql_invoice_items)){
|
||||
while ($row = mysqli_fetch_array($sql_invoice_items)) {
|
||||
$item_id = $row['item_id'];
|
||||
$item_name = mysqli_real_escape_string($mysqli, $row['item_name']); //SQL Escape incase of ,
|
||||
$item_description = mysqli_real_escape_string($mysqli, $row['item_description']); //SQL Escape incase of ,
|
||||
@@ -451,7 +454,7 @@ while($row = mysqli_fetch_array($sql_companies)){
|
||||
|
||||
mysqli_query($mysqli, "UPDATE recurring SET recurring_last_sent = CURDATE(), recurring_next_date = DATE_ADD(CURDATE(), INTERVAL 1 $recurring_frequency), recurring_updated_at = NOW() WHERE recurring_id = $recurring_id");
|
||||
|
||||
if($config_recurring_auto_send_invoice == 1){
|
||||
if ($config_recurring_auto_send_invoice == 1) {
|
||||
$sql = mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT * FROM invoices
|
||||
|
||||
@@ -12,7 +12,6 @@ TODO:
|
||||
- Support for authenticating with OAuth
|
||||
- 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
|
||||
@@ -220,7 +219,7 @@ if ($emails) {
|
||||
rsort($emails);
|
||||
|
||||
// Loop through each email
|
||||
foreach($emails as $email) {
|
||||
foreach ($emails as $email) {
|
||||
|
||||
// Default false
|
||||
$email_processed = false;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php include("inc_all.php");
|
||||
<?php
|
||||
require_once("inc_all.php");
|
||||
|
||||
// Enforce accountant / admin role for the financial dashboard
|
||||
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
|
||||
$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(revenue_date) FROM revenues 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> <!-- row -->
|
||||
|
||||
<?php include("footer.php"); ?>
|
||||
<?php require_once("footer.php"); ?>
|
||||
|
||||
<script>
|
||||
// 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';
|
||||
|
||||
+3
-3
@@ -2,8 +2,6 @@
|
||||
|
||||
require_once("inc_all.php");
|
||||
|
||||
//$o = "DESC";
|
||||
|
||||
if (!empty($_GET['sb'])) {
|
||||
$sb = strip_tags(mysqli_real_escape_string($mysqli, $_GET['sb']));
|
||||
} else {
|
||||
@@ -58,7 +56,9 @@ if ($_GET['canned_date'] == "custom" && !empty($_GET['dtf'])) {
|
||||
//Rebuild URL
|
||||
$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 vendors ON expense_vendor_id = vendor_id
|
||||
LEFT JOIN accounts ON expense_account_id = account_id
|
||||
|
||||
@@ -5,11 +5,11 @@ if (!empty($_SESSION['alert_message'])) {
|
||||
if (!isset($_SESSION['alert_type'])) {
|
||||
$_SESSION['alert_type'] = "success";
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
<script type="text/javascript">
|
||||
<script type="text/javascript">
|
||||
|
||||
toastr.options = {
|
||||
toastr.options = {
|
||||
"closeButton": false,
|
||||
"debug": false,
|
||||
"newestOnTop": false,
|
||||
@@ -25,13 +25,13 @@ toastr.options = {
|
||||
"hideEasing": "linear",
|
||||
"showMethod": "fadeIn",
|
||||
"hideMethod": "fadeOut"
|
||||
}
|
||||
}
|
||||
|
||||
toastr["<?php echo $_SESSION['alert_type']; ?>"]("<?php echo $_SESSION['alert_message']; ?>")
|
||||
toastr["<?php echo $_SESSION['alert_type']; ?>"]("<?php echo $_SESSION['alert_message']; ?>")
|
||||
|
||||
</script>
|
||||
</script>
|
||||
|
||||
<?php
|
||||
<?php
|
||||
|
||||
unset($_SESSION['alert_type']);
|
||||
unset($_SESSION['alert_message']);
|
||||
|
||||
+6
-3
@@ -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, "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 contacts ON primary_contact = contact_id AND contact_archived_at IS NULL
|
||||
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) {
|
||||
include("header.php");
|
||||
require_once("header.php");
|
||||
echo "<center><h1 class='text-secondary mt-5'>Nothing to see here</h1></center>";
|
||||
} else {
|
||||
|
||||
|
||||
+8
-8
@@ -1,13 +1,13 @@
|
||||
<?php
|
||||
|
||||
include("config.php");
|
||||
include_once("functions.php");
|
||||
include("check_login.php");
|
||||
include("header.php");
|
||||
include("top_nav.php");
|
||||
include("reports_side_nav.php");
|
||||
include("inc_wrapper.php");
|
||||
include("inc_alert_feedback.php");
|
||||
require_once("config.php");
|
||||
require_once("functions.php");
|
||||
require_once("check_login.php");
|
||||
require_once("header.php");
|
||||
require_once("top_nav.php");
|
||||
require_once("reports_side_nav.php");
|
||||
require_once("inc_wrapper.php");
|
||||
require_once("inc_alert_feedback.php");
|
||||
|
||||
// Set variable default values
|
||||
$largest_income_month = 0;
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
<?php
|
||||
|
||||
include("config.php");
|
||||
include_once("functions.php");
|
||||
include("check_login.php");
|
||||
require_once("config.php");
|
||||
require_once("functions.php");
|
||||
require_once("check_login.php");
|
||||
|
||||
validateAdminRole();
|
||||
|
||||
include("header.php");
|
||||
include("top_nav.php");
|
||||
include("settings_side_nav.php");
|
||||
include("inc_wrapper.php");
|
||||
include("inc_alert_feedback.php");
|
||||
include("pagination_head.php");
|
||||
require_once("header.php");
|
||||
require_once("top_nav.php");
|
||||
require_once("settings_side_nav.php");
|
||||
require_once("inc_wrapper.php");
|
||||
require_once("inc_alert_feedback.php");
|
||||
require_once("pagination_head.php");
|
||||
|
||||
|
||||
+32
-48
@@ -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 class="ml-4 mb-2"><?php echo "$location_city $location_state $location_zip"; ?></div>
|
||||
</a>
|
||||
<?php } ?>
|
||||
<?php
|
||||
if (!empty($location_phone)) {
|
||||
?>
|
||||
<?php }
|
||||
|
||||
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>
|
||||
<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>
|
||||
<br>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
<?php }
|
||||
|
||||
if (!empty($client_tag_name_display_array)) {
|
||||
?>
|
||||
<?php echo $client_tags_display; ?>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
echo $client_tags_display;
|
||||
} ?>
|
||||
|
||||
</div>
|
||||
<div class="col-md border-left">
|
||||
<h4 class="text-secondary">Primary Contact</h4>
|
||||
<?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; ?>
|
||||
<br>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
if (!empty($contact_email)) {
|
||||
?>
|
||||
<?php }
|
||||
|
||||
|
||||
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>
|
||||
<br>
|
||||
<?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>
|
||||
|
||||
<?php
|
||||
if (!empty($contact_extension)) {
|
||||
?>
|
||||
x<?php echo $contact_extension; ?>
|
||||
<?php
|
||||
echo "x $contact_extension";
|
||||
}
|
||||
?>
|
||||
<br>
|
||||
<?php
|
||||
echo "<br>";
|
||||
}
|
||||
?>
|
||||
<?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>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php } ?>
|
||||
|
||||
</div>
|
||||
<?php if ($session_user_role == 1 || $session_user_role == 3 && $config_module_enable_accounting == 1) { ?>
|
||||
<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>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($config_module_enable_ticketing == 1) { ?>
|
||||
<div class="col-md border-left">
|
||||
<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>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<div class="col-md-1 border-left">
|
||||
<?php if ($session_user_role == 3) { ?>
|
||||
<div class="dropdown dropleft text-center">
|
||||
@@ -122,8 +107,7 @@ $location_phone = formatPhoneNumber($location_phone);
|
||||
|
||||
<?php
|
||||
|
||||
include("client_edit_modal.php");
|
||||
include("client_delete_modal.php");
|
||||
include("category_quick_add_modal.php");
|
||||
require_once("client_edit_modal.php");
|
||||
require_once("client_delete_modal.php");
|
||||
require_once("category_quick_add_modal.php");
|
||||
|
||||
?>
|
||||
|
||||
+5
-2
@@ -119,14 +119,17 @@ if ($_GET['canned_date'] == "custom" && !empty($_GET['dtf'])) {
|
||||
//Rebuild URL
|
||||
$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 categories ON invoice_category_id = category_id
|
||||
WHERE invoices.company_id = $session_company_id
|
||||
AND (invoice_status LIKE '$status_query')
|
||||
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%')
|
||||
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()"));
|
||||
|
||||
|
||||
@@ -256,7 +256,7 @@ if (isset($_POST['login'])) {
|
||||
<p class="login-box-msg"><?php if (isset($response)) { echo $response; } ?></p>
|
||||
<form method="post">
|
||||
<div class="input-group mb-3" <?php if (isset($token_field)) { echo "hidden"; } ?>>
|
||||
<input type="text" class="form-control" placeholder="Agent Email" name="email" value="<?php if(isset($token_field)){ echo $email; }?>" required <?php if(!isset($token_field)){ echo "autofocus"; } ?> >
|
||||
<input type="text" class="form-control" placeholder="Agent Email" name="email" value="<?php if (isset($token_field)) { echo $email; }?>" required <?php if (!isset($token_field)) { echo "autofocus"; } ?> >
|
||||
<div class="input-group-append">
|
||||
<div class="input-group-text">
|
||||
<span class="fas fa-envelope"></span>
|
||||
@@ -264,7 +264,7 @@ if (isset($_POST['login'])) {
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-group mb-3" <?php if (isset($token_field)) { echo "hidden"; } ?>>
|
||||
<input type="password" class="form-control" placeholder="Agent Password" name="password" value="<?php if(isset($token_field)){ echo $password; } ?>" required>
|
||||
<input type="password" class="form-control" placeholder="Agent Password" name="password" value="<?php if (isset($token_field)) { echo $password; } ?>" required>
|
||||
<div class="input-group-append">
|
||||
<div class="input-group-text">
|
||||
<span class="fas fa-lock"></span>
|
||||
|
||||
@@ -27,7 +27,9 @@ if (!empty($_GET['dtf'])) {
|
||||
|
||||
$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 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%')
|
||||
@@ -83,12 +85,12 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
<table class="table table-hover">
|
||||
<thead class="<?php if ($num_rows[0] == 0) { echo "d-none"; } ?>">
|
||||
<tr>
|
||||
<th><a class="text-dark" href="?<?php echo $url_query_strings_sb; ?>&sb=notification_timestamp&o=<?php echo $disp; ?>">Timestamp <i class="fa fa-sort-numeric<?php if ($disp=='ASC') { echo "-up"; }else{ echo "-down"; }?>"></i></a></th>
|
||||
<th><a class="text-dark" href="?<?php echo $url_query_strings_sb; ?>&sb=notification_type&o=<?php echo $disp; ?>">Type <i class="fa fa-sort-alpha<?php if ($disp=='ASC') { echo "-up"; }else{ echo "-down"; }?>"></i></a></th>
|
||||
<th><a class="text-dark" href="?<?php echo $url_query_strings_sb; ?>&sb=notification&o=<?php echo $disp; ?>">Notification <i class="fa fa-sort-alpha<?php if ($disp=='ASC') { echo "-up"; }else{ echo "-down"; }?>"></i></a></th>
|
||||
<th><a class="text-dark" href="?<?php echo $url_query_strings_sb; ?>&sb=client_name&o=<?php echo $disp; ?>">Client <i class="fa fa-sort-numeric<?php if ($disp=='ASC') { echo "-up"; }else{ echo "-down"; }?>"></i></a></th>
|
||||
<th><a class="text-dark" href="?<?php echo $url_query_strings_sb; ?>&sb=notification_dismissed_at&o=<?php echo $disp; ?>">Dismissed At <i class="fa fa-sort-numeric<?php if ($disp=='ASC') { echo "-up"; }else{ echo "-down"; }?>"></i></a></th>
|
||||
<th><a class="text-dark" href="?<?php echo $url_query_strings_sb; ?>&sb=user_name&o=<?php echo $disp; ?>">Dismissed By <i class="fa fa-sort-numeric<?php if ($disp=='ASC') { echo "-up"; }else{ echo "-down"; }?>"></i></a></th>
|
||||
<th><a class="text-dark" href="?<?php echo $url_query_strings_sb; ?>&sb=notification_timestamp&o=<?php echo $disp; ?>">Timestamp <i class="fa fa-sort-numeric<?php if ($disp=='ASC') { echo "-up"; } else { echo "-down"; }?>"></i></a></th>
|
||||
<th><a class="text-dark" href="?<?php echo $url_query_strings_sb; ?>&sb=notification_type&o=<?php echo $disp; ?>">Type <i class="fa fa-sort-alpha<?php if ($disp=='ASC') { echo "-up"; } else { echo "-down"; }?>"></i></a></th>
|
||||
<th><a class="text-dark" href="?<?php echo $url_query_strings_sb; ?>&sb=notification&o=<?php echo $disp; ?>">Notification <i class="fa fa-sort-alpha<?php if ($disp=='ASC') { echo "-up"; } else { echo "-down"; }?>"></i></a></th>
|
||||
<th><a class="text-dark" href="?<?php echo $url_query_strings_sb; ?>&sb=client_name&o=<?php echo $disp; ?>">Client <i class="fa fa-sort-numeric<?php if ($disp=='ASC') { echo "-up"; } else { echo "-down"; }?>"></i></a></th>
|
||||
<th><a class="text-dark" href="?<?php echo $url_query_strings_sb; ?>&sb=notification_dismissed_at&o=<?php echo $disp; ?>">Dismissed At <i class="fa fa-sort-numeric<?php if ($disp=='ASC') { echo "-up"; } else { echo "-down"; }?>"></i></a></th>
|
||||
<th><a class="text-dark" href="?<?php echo $url_query_strings_sb; ?>&sb=user_name&o=<?php echo $disp; ?>">Dismissed By <i class="fa fa-sort-numeric<?php if ($disp=='ASC') { echo "-up"; } else { echo "-down"; }?>"></i></a></th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<?php
|
||||
|
||||
include("config.php");
|
||||
include("functions.php");
|
||||
include("check_login.php");
|
||||
require_once("config.php");
|
||||
require_once("functions.php");
|
||||
require_once("check_login.php");
|
||||
|
||||
if(isset($_POST['change_records_per_page'])){
|
||||
|
||||
@@ -8411,7 +8411,7 @@ if(isset($_GET['export_client_pdf'])){
|
||||
$sql_certficates = mysqli_query($mysqli,"SELECT * FROM certificates WHERE certificate_client_id = $client_id ORDER BY certificate_name ASC");
|
||||
$sql_software = mysqli_query($mysqli,"SELECT * FROM software WHERE software_client_id = $client_id ORDER BY software_name ASC");
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
<script src='plugins/pdfmake/pdfmake.min.js'></script>
|
||||
<script src='plugins/pdfmake/vfs_fonts.js'></script>
|
||||
@@ -9606,7 +9606,7 @@ if(isset($_GET['export_client_pdf'])){
|
||||
</script>
|
||||
|
||||
|
||||
<?php
|
||||
<?php
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -413,7 +413,7 @@ require_once("footer.php");
|
||||
?>
|
||||
|
||||
<!-- 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">
|
||||
<script src="plugins/jquery-ui/jquery-ui.min.js"></script>
|
||||
<script>
|
||||
|
||||
+3
-1
@@ -55,7 +55,9 @@ if ($_GET['canned_date'] == "custom" && !empty($_GET['dtf'])) {
|
||||
//Rebuild URL
|
||||
$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 categories ON quote_category_id = category_id
|
||||
WHERE quotes.company_id = $session_company_id
|
||||
|
||||
@@ -219,7 +219,7 @@ if (isset($_GET['recurring_id'])) {
|
||||
|
||||
<?php
|
||||
|
||||
include("item_edit_modal.php");
|
||||
require("item_edit_modal.php");
|
||||
|
||||
}
|
||||
|
||||
|
||||
+13
-11
@@ -17,28 +17,28 @@ if (empty($_GET['canned_date'])) {
|
||||
if ($_GET['canned_date'] == "custom" && !empty($_GET['dtf'])) {
|
||||
$dtf = strip_tags(mysqli_real_escape_string($mysqli, $_GET['dtf']));
|
||||
$dtt = strip_tags(mysqli_real_escape_string($mysqli, $_GET['dtt']));
|
||||
}elseif ($_GET['canned_date'] == "today") {
|
||||
} elseif ($_GET['canned_date'] == "today") {
|
||||
$dtf = date('Y-m-d');
|
||||
$dtt = date('Y-m-d');
|
||||
}elseif ($_GET['canned_date'] == "yesterday") {
|
||||
} elseif ($_GET['canned_date'] == "yesterday") {
|
||||
$dtf = date('Y-m-d', strtotime("yesterday"));
|
||||
$dtt = date('Y-m-d', strtotime("yesterday"));
|
||||
}elseif ($_GET['canned_date'] == "thisweek") {
|
||||
} elseif ($_GET['canned_date'] == "thisweek") {
|
||||
$dtf = date('Y-m-d', strtotime("monday this week"));
|
||||
$dtt = date('Y-m-d');
|
||||
}elseif ($_GET['canned_date'] == "lastweek") {
|
||||
} elseif ($_GET['canned_date'] == "lastweek") {
|
||||
$dtf = date('Y-m-d', strtotime("monday last week"));
|
||||
$dtt = date('Y-m-d', strtotime("sunday last week"));
|
||||
}elseif ($_GET['canned_date'] == "thismonth") {
|
||||
} elseif ($_GET['canned_date'] == "thismonth") {
|
||||
$dtf = date('Y-m-01');
|
||||
$dtt = date('Y-m-d');
|
||||
}elseif ($_GET['canned_date'] == "lastmonth") {
|
||||
} elseif ($_GET['canned_date'] == "lastmonth") {
|
||||
$dtf = date('Y-m-d', strtotime("first day of last month"));
|
||||
$dtt = date('Y-m-d', strtotime("last day of last month"));
|
||||
}elseif ($_GET['canned_date'] == "thisyear") {
|
||||
} elseif ($_GET['canned_date'] == "thisyear") {
|
||||
$dtf = date('Y-01-01');
|
||||
$dtt = date('Y-m-d');
|
||||
}elseif ($_GET['canned_date'] == "lastyear") {
|
||||
} elseif ($_GET['canned_date'] == "lastyear") {
|
||||
$dtf = date('Y-m-d', strtotime("first day of january last year"));
|
||||
$dtt = date('Y-m-d', strtotime("last day of december last year"));
|
||||
} else {
|
||||
@@ -55,7 +55,9 @@ if (empty($_GET['canned_date'])) {
|
||||
//Rebuild URL
|
||||
$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 categories ON recurring_category_id = category_id
|
||||
WHERE recurring.company_id = $session_company_id
|
||||
@@ -67,7 +69,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
|
||||
?>
|
||||
|
||||
<div class="card card-dark">
|
||||
<div class="card card-dark">
|
||||
<div class="card-header py-2">
|
||||
<h3 class="card-title mt-2"><i class="fa fa-fw fa-sync-alt"></i> Recurring Invoices</h3>
|
||||
<div class="card-tools">
|
||||
@@ -212,7 +214,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
</div>
|
||||
<?php require_once("pagination.php"); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ $sql_vendors = mysqli_query($mysqli, "SELECT * FROM vendors WHERE company_id = $
|
||||
|
||||
?>
|
||||
|
||||
<div class="card card-dark">
|
||||
<div class="card card-dark">
|
||||
<div class="card-header py-2">
|
||||
<h3 class="card-title mt-2"><i class="fa fa-fw fa-building"></i> Expense By Vendor</h3>
|
||||
<div class="card-tools">
|
||||
@@ -72,6 +72,6 @@ $sql_vendors = mysqli_query($mysqli, "SELECT * FROM vendors WHERE company_id = $
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php require_once("footer.php"); ?>
|
||||
|
||||
@@ -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>
|
||||
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php } ?>
|
||||
|
||||
</select>
|
||||
</form>
|
||||
@@ -74,7 +72,7 @@ $sql_categories = mysqli_query($mysqli, "SELECT * FROM categories WHERE category
|
||||
<?php
|
||||
|
||||
$total_expense_for_all_months = 0;
|
||||
for($month = 1; $month<=12; $month++) {
|
||||
for ($month = 1; $month<=12; $month++) {
|
||||
$sql_expenses = mysqli_query($mysqli, "SELECT SUM(expense_amount) AS expense_amount_for_month FROM expenses WHERE expense_category_id = $category_id AND YEAR(expense_date) = $year AND MONTH(expense_date) = $month");
|
||||
$row = mysqli_fetch_array($sql_expenses);
|
||||
$expense_amount_for_month = $row['expense_amount_for_month'];
|
||||
@@ -84,26 +82,18 @@ $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>
|
||||
|
||||
<?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>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
<?php } ?>
|
||||
|
||||
<tr>
|
||||
<th>Total</th>
|
||||
<?php
|
||||
|
||||
for($month = 1; $month<=12; $month++) {
|
||||
for ($month = 1; $month<=12; $month++) {
|
||||
$sql_expenses = mysqli_query($mysqli, "SELECT SUM(expense_amount) AS expense_total_amount_for_month FROM expenses WHERE YEAR(expense_date) = $year AND MONTH(expense_date) = $month AND expense_vendor_id > 0 AND company_id = $session_company_id");
|
||||
$row = mysqli_fetch_array($sql_expenses);
|
||||
$expense_total_amount_for_month = $row['expense_total_amount_for_month'];
|
||||
@@ -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>
|
||||
<?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>
|
||||
</tr>
|
||||
@@ -155,7 +142,7 @@ $sql_categories = mysqli_query($mysqli, "SELECT * FROM categories WHERE category
|
||||
|
||||
$largest_expense_month = 0;
|
||||
|
||||
for($month = 1; $month<=12; $month++) {
|
||||
for ($month = 1; $month<=12; $month++) {
|
||||
$sql_expenses = mysqli_query($mysqli, "SELECT SUM(expense_amount) AS expense_amount_for_month FROM expenses WHERE YEAR(expense_date) = $year AND MONTH(expense_date) = $month AND expense_vendor_id > 0 AND expenses.company_id = $session_company_id");
|
||||
$row = mysqli_fetch_array($sql_expenses);
|
||||
$expenses_for_month = $row['expense_amount_for_month'];
|
||||
@@ -164,15 +151,9 @@ $sql_categories = mysqli_query($mysqli, "SELECT * FROM categories WHERE category
|
||||
$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>
|
||||
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php } ?>
|
||||
|
||||
</select>
|
||||
</form>
|
||||
@@ -76,4 +74,5 @@ $sql_clients = mysqli_query($mysqli, "SELECT * FROM clients WHERE company_id = $
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php require_once("footer.php"); ?>
|
||||
<?php
|
||||
require_once("footer.php");
|
||||
|
||||
+3
-1
@@ -56,7 +56,9 @@ if ($_GET['canned_date'] == "custom" && !empty($_GET['dtf'])) {
|
||||
//Rebuild URL
|
||||
$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
|
||||
LEFT JOIN accounts ON revenue_account_id = account_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) { ?>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item text-danger" href="post.php?delete_scheduled_ticket=<?php echo $scheduled_ticket_id; ?>">Delete</a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php
|
||||
} ?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
+6
-4
@@ -1,6 +1,7 @@
|
||||
<?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">
|
||||
<h3 class="card-title"><i class="fa fa-fw fa-bell"></i> Alerts</h3>
|
||||
</div>
|
||||
@@ -48,6 +49,7 @@
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php include("footer.php");
|
||||
<?php
|
||||
require_once("footer.php");
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<?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">
|
||||
<h3 class="card-title"><i class="fa fa-fw fa-puzzle-piece"></i> Integration Settings</h3>
|
||||
</div>
|
||||
@@ -34,6 +35,6 @@
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php include("footer.php");
|
||||
<?php require_once("footer.php");
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<?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">
|
||||
<h3 class="card-title"><i class="fa fa-fw fa-file"></i> Invoice Settings</h3>
|
||||
</div>
|
||||
@@ -86,6 +87,7 @@
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php include("footer.php");
|
||||
<?php
|
||||
require_once("footer.php");
|
||||
|
||||
+9
-8
@@ -1,6 +1,7 @@
|
||||
<?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">
|
||||
<h3 class="card-title"><i class="fa fa-fw fa-envelope"></i> Mail Settings</h3>
|
||||
</div>
|
||||
@@ -126,11 +127,11 @@
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if (!empty($config_smtp_host) && !empty($config_smtp_port) && !empty($config_smtp_username) && !empty($config_smtp_password) && !empty($config_mail_from_email) && !empty($config_mail_from_name)) { ?>
|
||||
|
||||
<div class="card card-dark">
|
||||
<div class="card card-dark">
|
||||
<div class="card-header py-3">
|
||||
<h3 class="card-title"><i class="fa fa-fw fa-paper-plane"></i> Test Email Sending</h3>
|
||||
</div>
|
||||
@@ -144,13 +145,13 @@
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
<?php if (!empty($config_smtp_username) && !empty($config_smtp_password) && !empty($config_imap_host) && !empty($config_imap_port)) { ?>
|
||||
|
||||
<div class="card card-dark">
|
||||
<div class="card card-dark">
|
||||
<div class="card-header py-3">
|
||||
<h3 class="card-title"><i class="fa fa-fw fa-paper-plane"></i> Test Email Receiving</h3>
|
||||
</div>
|
||||
@@ -161,8 +162,8 @@
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
<?php include("footer.php");
|
||||
<?php require_once("footer.php");
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
require_once("inc_all_settings.php"); ?>
|
||||
|
||||
<div class="card card-dark">
|
||||
|
||||
+4
-2
@@ -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-header py-3">
|
||||
@@ -60,4 +61,5 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php include("footer.php");
|
||||
<?php
|
||||
require_once("footer.php");
|
||||
|
||||
+2
-2
@@ -41,7 +41,7 @@ if ($num_rows > 0) {
|
||||
?>
|
||||
|
||||
|
||||
<div class="card card-dark">
|
||||
<div class="card card-dark">
|
||||
<div class="card-header py-2">
|
||||
<h3 class="card-title mt-2"><i class="fa fa-fw fa-tags"></i> Tags</h3>
|
||||
<div class="card-tools">
|
||||
@@ -118,7 +118,7 @@ if ($num_rows > 0) {
|
||||
</div>
|
||||
<?php require_once("pagination.php"); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
require_once("settings_tag_add_modal.php");
|
||||
|
||||
+2
-2
@@ -22,7 +22,7 @@ $num_rows = mysqli_num_rows($sql);
|
||||
|
||||
?>
|
||||
|
||||
<div class="card card-dark">
|
||||
<div class="card card-dark">
|
||||
<div class="card-header py-2">
|
||||
<h3 class="card-title mt-2"><i class="fa fa-fw fa-balance-scale"></i> Taxes</h3>
|
||||
<div class="card-tools">
|
||||
@@ -81,7 +81,7 @@ $num_rows = mysqli_num_rows($sql);
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
require_once("settings_tax_add_modal.php");
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<?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">
|
||||
<h3 class="card-title"><i class="fa fa-fw fa-broadcast-tower"></i> Telemetry</h3>
|
||||
</div>
|
||||
@@ -38,6 +39,7 @@
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php include("footer.php");
|
||||
<?php
|
||||
require_once("footer.php");
|
||||
|
||||
+4
-2
@@ -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-header py-3">
|
||||
@@ -41,4 +42,5 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php include("footer.php");
|
||||
<?php
|
||||
require_once("footer.php");
|
||||
|
||||
@@ -825,7 +825,7 @@ if (isset($_POST['add_database'])) {
|
||||
// If it has a semicolon at the end, it's the end of the query
|
||||
if (substr(trim($line), -1, 1) == ';') {
|
||||
// Perform the query
|
||||
mysqli_query($mysqli,$templine);
|
||||
mysqli_query($mysqli, $templine);
|
||||
// Reset temp variable to empty
|
||||
$templine = '';
|
||||
}
|
||||
@@ -846,8 +846,8 @@ if (isset($_POST['add_user'])) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$name = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['name'])));
|
||||
$email = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['email'])));
|
||||
$name = trim(strip_tags(mysqli_real_escape_string($mysqli, $_POST['name'])));
|
||||
$email = trim(strip_tags(mysqli_real_escape_string($mysqli, $_POST['email'])));
|
||||
$password = password_hash($_POST['password'], PASSWORD_DEFAULT);
|
||||
|
||||
//Generate master encryption key
|
||||
@@ -921,17 +921,17 @@ if (isset($_POST['add_company_settings'])) {
|
||||
$row = mysqli_fetch_array($sql);
|
||||
$user_id = $row['user_id'];
|
||||
|
||||
$name = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['name'])));
|
||||
$country = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['country'])));
|
||||
$address = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['address'])));
|
||||
$city = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['city'])));
|
||||
$state = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['state'])));
|
||||
$zip = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['zip'])));
|
||||
$name = trim(strip_tags(mysqli_real_escape_string($mysqli, $_POST['name'])));
|
||||
$country = trim(strip_tags(mysqli_real_escape_string($mysqli, $_POST['country'])));
|
||||
$address = trim(strip_tags(mysqli_real_escape_string($mysqli, $_POST['address'])));
|
||||
$city = trim(strip_tags(mysqli_real_escape_string($mysqli, $_POST['city'])));
|
||||
$state = trim(strip_tags(mysqli_real_escape_string($mysqli, $_POST['state'])));
|
||||
$zip = trim(strip_tags(mysqli_real_escape_string($mysqli, $_POST['zip'])));
|
||||
$phone = preg_replace("/[^0-9]/", '',$_POST['phone']);
|
||||
$email = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['email'])));
|
||||
$website = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['website'])));
|
||||
$locale = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['locale'])));
|
||||
$currency_code = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['currency_code'])));
|
||||
$email = trim(strip_tags(mysqli_real_escape_string($mysqli, $_POST['email'])));
|
||||
$website = trim(strip_tags(mysqli_real_escape_string($mysqli, $_POST['website'])));
|
||||
$locale = trim(strip_tags(mysqli_real_escape_string($mysqli, $_POST['locale'])));
|
||||
$currency_code = trim(strip_tags(mysqli_real_escape_string($mysqli, $_POST['currency_code'])));
|
||||
|
||||
mysqli_query($mysqli,"INSERT INTO companies SET company_name = '$name', company_address = '$address', company_city = '$city', company_state = '$state', company_zip = '$zip', company_country = '$country', company_phone = '$phone', company_email = '$email', company_website = '$website', company_locale = '$locale', company_currency = '$currency_code', company_created_at = NOW()");
|
||||
|
||||
@@ -1021,7 +1021,7 @@ if (isset($_POST['add_company_settings'])) {
|
||||
|
||||
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']));
|
||||
|
||||
|
||||
+4
-4
@@ -1,12 +1,12 @@
|
||||
<script>
|
||||
|
||||
function populateShareModal(client_id, item_type, item_ref_id) {
|
||||
function populateShareModal(client_id, item_type, item_ref_id) {
|
||||
document.getElementById("share_client_id").value = client_id;
|
||||
document.getElementById("share_item_type").value = item_type;
|
||||
document.getElementById("share_item_ref_id").value = item_ref_id;
|
||||
}
|
||||
}
|
||||
|
||||
function generateShareLink() {
|
||||
function generateShareLink() {
|
||||
let client_id = document.getElementById("share_client_id").value;
|
||||
let item_type = document.getElementById("share_item_type").value;
|
||||
let item_ref_id = document.getElementById("share_item_ref_id").value;
|
||||
@@ -34,7 +34,7 @@ function generateShareLink() {
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
+7
-7
@@ -40,7 +40,7 @@
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<?php }else{ ?>
|
||||
<?php } else { ?>
|
||||
|
||||
<h5 class="brand-text text-light my-3"><?php echo htmlentities($session_company_name); ?></h5>
|
||||
|
||||
@@ -93,9 +93,9 @@
|
||||
</a>
|
||||
</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-item">
|
||||
@@ -129,9 +129,9 @@
|
||||
</a>
|
||||
</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-item">
|
||||
@@ -173,9 +173,9 @@
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<?php } ?>
|
||||
<?php }
|
||||
|
||||
<?php if ($session_user_role == 3) { ?>
|
||||
if ($session_user_role == 3) { ?>
|
||||
|
||||
<li class="nav-item mt-3">
|
||||
<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) -->
|
||||
<script src="js/ticket_collision_detection.js"></script>
|
||||
<?php } ?>
|
||||
|
||||
|
||||
+27
-26
@@ -109,18 +109,21 @@ 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)));
|
||||
|
||||
// Main ticket query:
|
||||
$sql = mysqli_query($mysqli, "SELECT SQL_CALC_FOUND_ROWS * 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
|
||||
LEFT JOIN assets ON ticket_asset_id = asset_id
|
||||
LEFT JOIN locations ON ticket_location_id = location_id
|
||||
WHERE tickets.company_id = $session_company_id
|
||||
AND ticket_assigned_to LIKE '%$ticket_assigned_filter%'
|
||||
AND $ticket_status_snippet
|
||||
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%')
|
||||
ORDER BY $sb $o LIMIT $record_from, $record_to");
|
||||
$sql = mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT SQL_CALC_FOUND_ROWS * 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
|
||||
LEFT JOIN assets ON ticket_asset_id = asset_id
|
||||
LEFT JOIN locations ON ticket_location_id = location_id
|
||||
WHERE tickets.company_id = $session_company_id
|
||||
AND ticket_assigned_to LIKE '%$ticket_assigned_filter%'
|
||||
AND $ticket_status_snippet
|
||||
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%')
|
||||
ORDER BY $sb $o LIMIT $record_from, $record_to"
|
||||
);
|
||||
|
||||
|
||||
$num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
@@ -147,11 +150,11 @@ $row = mysqli_fetch_array($sql_total_tickets_assigned);
|
||||
$user_active_assigned_tickets = $row['total_tickets_assigned'];
|
||||
|
||||
?>
|
||||
<style>
|
||||
.popover {
|
||||
<style>
|
||||
.popover {
|
||||
max-width: 600px;
|
||||
}
|
||||
</style>
|
||||
}
|
||||
</style>
|
||||
<div class="card card-dark elevation-3">
|
||||
<div class="card-header py-2">
|
||||
<h3 class="card-title mt-2"><i class="fa fa-fw fa-life-ring"></i> Tickets
|
||||
@@ -200,7 +203,7 @@ $user_active_assigned_tickets = $row['total_tickets_assigned'];
|
||||
</div>
|
||||
<a href="?assigned=unassigned" class="btn btn-outline-danger"><i class="fa fa-fw fa-exclamation-triangle"></i>
|
||||
Unassigned Tickets | <strong> <?php echo $total_tickets_unassigned; ?></strong></a>
|
||||
<!-- <a href="#" class="btn btn-outline-info"><i class="fa fa-fw fa-cogs"></i> Tasks</a>-->
|
||||
<!-- <a href="#" class="btn btn-outline-info"><i class="fa fa-fw fa-cogs"></i> Tasks</a>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -384,8 +387,7 @@ $user_active_assigned_tickets = $row['total_tickets_assigned'];
|
||||
if (empty($ticket_assigned_to)) {
|
||||
if ($ticket_status == "Closed") {
|
||||
$ticket_assigned_to_display = "<p>Not Assigned</p>";
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
$ticket_assigned_to_display = "<p class='text-danger'>Not Assigned</p>";
|
||||
}
|
||||
} else {
|
||||
@@ -435,10 +437,9 @@ $user_active_assigned_tickets = $row['total_tickets_assigned'];
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php
|
||||
<?php }
|
||||
|
||||
include("ticket_edit_modal.php");
|
||||
require("ticket_edit_modal.php");
|
||||
|
||||
?>
|
||||
</td>
|
||||
@@ -453,10 +454,10 @@ $user_active_assigned_tickets = $row['total_tickets_assigned'];
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php include("pagination.php"); ?>
|
||||
<?php require_once("pagination.php"); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php include("ticket_add_modal.php"); ?>
|
||||
|
||||
<?php include("footer.php");
|
||||
<?php
|
||||
require_once("ticket_add_modal.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'])) {
|
||||
$sb = strip_tags(mysqli_real_escape_string($mysqli, $_GET['sb']));
|
||||
@@ -19,7 +20,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
|
||||
?>
|
||||
|
||||
<div class="card card-dark">
|
||||
<div class="card card-dark">
|
||||
<div class="card-header py-2">
|
||||
<h3 class="card-title mt-2"><i class="fa fa-fw fa-users"></i> Users</h3>
|
||||
<div class="card-tools">
|
||||
@@ -169,12 +170,12 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
</div>
|
||||
<?php include("pagination.php"); ?>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
</div>
|
||||
<script>
|
||||
function generatePassword() {
|
||||
document.getElementById("password").value = "<?php echo randomString() ?>"
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
||||
<?php
|
||||
|
||||
|
||||
Reference in New Issue
Block a user