mirror of https://github.com/itflow-org/itflow
General cleanup/formatting
This commit is contained in:
parent
c219324bb8
commit
615f317d2b
|
|
@ -11,9 +11,12 @@ 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 accounts
|
||||
$sql = mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT SQL_CALC_FOUND_ROWS * FROM accounts
|
||||
WHERE account_name LIKE '%$q%' AND company_id = $session_company_id
|
||||
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()"));
|
||||
|
||||
|
|
|
|||
4
ajax.php
4
ajax.php
|
|
@ -141,7 +141,9 @@ if (isset($_GET['network_get_json_details'])) {
|
|||
}
|
||||
|
||||
// Lookup all client locations, as networks can be associated with any client location
|
||||
$locations_sql = mysqli_query($mysqli, "SELECT location_id, location_name FROM locations
|
||||
$locations_sql = mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT location_id, location_name FROM locations
|
||||
WHERE location_client_id = '$client_id' AND company_id = '$session_company_id'"
|
||||
);
|
||||
while ($row = mysqli_fetch_array($locations_sql)) {
|
||||
|
|
|
|||
|
|
@ -17,7 +17,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 categories
|
||||
$sql = mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT SQL_CALC_FOUND_ROWS * FROM categories
|
||||
WHERE category_name LIKE '%$q%'
|
||||
AND category_type = '$category'
|
||||
AND category_archived_at IS NULL
|
||||
|
|
@ -28,7 +30,9 @@ $sql = mysqli_query($mysqli,"SELECT SQL_CALC_FOUND_ROWS * FROM categories
|
|||
$num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
|
||||
//Colors Used
|
||||
$sql_colors_used = mysqli_query($mysqli,"SELECT category_color FROM categories
|
||||
$sql_colors_used = mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT category_color FROM categories
|
||||
WHERE category_type = '$category'
|
||||
AND category_archived_at IS NULL
|
||||
AND company_id = $session_company_id"
|
||||
|
|
|
|||
|
|
@ -55,7 +55,9 @@ if (isset($_GET['type']) && ($_GET['type']) == 'workstation') {
|
|||
//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 assets
|
||||
$sql = mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT SQL_CALC_FOUND_ROWS * FROM assets
|
||||
LEFT JOIN contacts ON asset_contact_id = contact_id
|
||||
LEFT JOIN locations ON asset_location_id = location_id
|
||||
LEFT JOIN logins ON login_asset_id = asset_id
|
||||
|
|
|
|||
|
|
@ -19,7 +19,9 @@ if (!empty($q)) {
|
|||
//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 documents
|
||||
$sql = mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT SQL_CALC_FOUND_ROWS * FROM documents
|
||||
WHERE document_template = 1
|
||||
AND documents.company_id = $session_company_id
|
||||
$query_snippet
|
||||
|
|
|
|||
|
|
@ -32,7 +32,9 @@ if (!empty($_GET['folder_id'])) {
|
|||
$get_folder_id = intval($_GET['folder_id']);
|
||||
}
|
||||
|
||||
$sql = mysqli_query($mysqli,"SELECT SQL_CALC_FOUND_ROWS * FROM documents
|
||||
$sql = mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT SQL_CALC_FOUND_ROWS * FROM documents
|
||||
WHERE document_client_id = $client_id
|
||||
AND documents.company_id = $session_company_id
|
||||
AND document_template = 0
|
||||
|
|
|
|||
|
|
@ -22,7 +22,8 @@ $sql = mysqli_query(
|
|||
LEFT JOIN categories ON invoice_category_id = category_id
|
||||
WHERE invoice_client_id = $client_id
|
||||
AND (CONCAT(invoice_prefix,invoice_number) LIKE '%$q%' OR invoice_scope LIKE '%$q%' OR category_name LIKE '%$q%' OR invoice_status LIKE '%$q%' OR invoice_amount 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()"));
|
||||
|
||||
|
|
|
|||
|
|
@ -11,10 +11,13 @@ 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 logins
|
||||
$sql = mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT SQL_CALC_FOUND_ROWS * FROM logins
|
||||
WHERE login_client_id = $client_id
|
||||
AND (login_name LIKE '%$q%' OR login_uri 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,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,7 +16,9 @@ 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 logs
|
||||
$sql = mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT SQL_CALC_FOUND_ROWS * FROM logs
|
||||
LEFT JOIN users ON log_user_id = user_id
|
||||
WHERE (log_type LIKE '%$q%' OR log_action LIKE '%$q%' OR log_description LIKE '%$q%' OR log_ip LIKE '%$q%' OR log_user_agent LIKE '%$q%' OR user_name LIKE '%$q%')
|
||||
AND log_client_id = $client_id
|
||||
|
|
@ -109,8 +110,8 @@ $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("footer.php"); ?>
|
||||
<?php require_once("footer.php"); ?>
|
||||
|
|
|
|||
|
|
@ -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']));
|
||||
|
|
|
|||
|
|
@ -15,7 +15,9 @@ $sql_logins = mysqli_query($mysqli, "SELECT * FROM logins WHERE login_client_id
|
|||
// Expiring Items
|
||||
|
||||
// Get Domains Expiring
|
||||
$sql_domains_expiring = mysqli_query($mysqli, "SELECT * FROM domains
|
||||
$sql_domains_expiring = mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT * FROM domains
|
||||
WHERE domain_client_id = $client_id
|
||||
AND domain_expire != '0000-00-00'
|
||||
AND domain_archived_at IS NULL
|
||||
|
|
|
|||
|
|
@ -12,7 +12,9 @@ if (!empty($_GET['sb'])) {
|
|||
$url_query_strings_sb = http_build_query(array_merge($_GET, array('sb' => $sb, 'o' => $o)));
|
||||
|
||||
// SQL
|
||||
$sql = mysqli_query($mysqli,"SELECT SQL_CALC_FOUND_ROWS * FROM scheduled_tickets
|
||||
$sql = mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT SQL_CALC_FOUND_ROWS * FROM scheduled_tickets
|
||||
LEFT JOIN clients on scheduled_ticket_client_id = client_id
|
||||
WHERE scheduled_ticket_client_id = $client_id
|
||||
AND scheduled_tickets.scheduled_ticket_subject LIKE '%$q%'
|
||||
|
|
|
|||
|
|
@ -12,7 +12,9 @@ if (!empty($_GET['sb'])) {
|
|||
$url_query_strings_sb = http_build_query(array_merge($_GET, array('sb' => $sb, 'o' => $o)));
|
||||
|
||||
// Overview SQL query
|
||||
$sql = mysqli_query($mysqli, "SELECT SQL_CALC_FOUND_ROWS * FROM services
|
||||
$sql = mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT SQL_CALC_FOUND_ROWS * FROM services
|
||||
WHERE service_client_id = '$client_id'
|
||||
AND (service_name LIKE '%$q%' OR service_description LIKE '%$q%' OR service_category LIKE '%$q%')
|
||||
ORDER BY $sb $o LIMIT $record_from, $record_to"
|
||||
|
|
@ -108,35 +110,36 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
|
|||
<?php
|
||||
|
||||
// Associated Assets (and their logins/networks/locations)
|
||||
$sql_assets = mysqli_query($mysqli, "SELECT * FROM service_assets
|
||||
LEFT JOIN assets
|
||||
ON service_assets.asset_id = assets.asset_id
|
||||
LEFT JOIN logins
|
||||
ON service_assets.asset_id = logins.login_asset_id
|
||||
LEFT JOIN networks
|
||||
ON assets.asset_network_id = networks.network_id
|
||||
LEFT JOIN locations
|
||||
ON assets.asset_location_id = locations.location_id
|
||||
$sql_assets = mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT * FROM service_assets
|
||||
LEFT JOIN assets ON service_assets.asset_id = assets.asset_id
|
||||
LEFT JOIN logins ON service_assets.asset_id = logins.login_asset_id
|
||||
LEFT JOIN networks ON assets.asset_network_id = networks.network_id
|
||||
LEFT JOIN locations ON assets.asset_location_id = locations.location_id
|
||||
WHERE service_id = '$service_id'"
|
||||
);
|
||||
|
||||
// Associated logins
|
||||
$sql_logins = mysqli_query($mysqli, "SELECT * FROM service_logins
|
||||
LEFT JOIN logins
|
||||
ON service_logins.login_id = logins.login_id
|
||||
$sql_logins = mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT * FROM service_logins
|
||||
LEFT JOIN logins ON service_logins.login_id = logins.login_id
|
||||
WHERE service_id = '$service_id'"
|
||||
);
|
||||
|
||||
// Associated Domains
|
||||
$sql_domains = mysqli_query($mysqli, "SELECT * FROM service_domains
|
||||
LEFT JOIN domains
|
||||
ON service_domains.domain_id = domains.domain_id
|
||||
$sql_domains = mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT * FROM service_domains
|
||||
LEFT JOIN domains ON service_domains.domain_id = domains.domain_id
|
||||
WHERE service_id = '$service_id'"
|
||||
);
|
||||
// Associated Certificates
|
||||
$sql_certificates = mysqli_query($mysqli, "SELECT * FROM service_certificates
|
||||
LEFT JOIN certificates
|
||||
ON service_certificates.certificate_id = certificates.certificate_id
|
||||
$sql_certificates = mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT * FROM service_certificates
|
||||
LEFT JOIN certificates ON service_certificates.certificate_id = certificates.certificate_id
|
||||
WHERE service_id = '$service_id'"
|
||||
);
|
||||
|
||||
|
|
@ -145,23 +148,26 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
|
|||
//WHERE service_id = '$service_id'");
|
||||
|
||||
// Associated Vendors
|
||||
$sql_vendors = mysqli_query($mysqli, "SELECT * FROM service_vendors
|
||||
LEFT JOIN vendors
|
||||
ON service_vendors.vendor_id = vendors.vendor_id
|
||||
$sql_vendors = mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT * FROM service_vendors
|
||||
LEFT JOIN vendors ON service_vendors.vendor_id = vendors.vendor_id
|
||||
WHERE service_id = '$service_id'"
|
||||
);
|
||||
|
||||
// Associated Contacts
|
||||
$sql_contacts = mysqli_query($mysqli, "SELECT * FROM service_contacts
|
||||
LEFT JOIN contacts
|
||||
ON service_contacts.contact_id = contacts.contact_id
|
||||
$sql_contacts = mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT * FROM service_contacts
|
||||
LEFT JOIN contacts ON service_contacts.contact_id = contacts.contact_id
|
||||
WHERE service_id = '$service_id'"
|
||||
);
|
||||
|
||||
// Associated Documents
|
||||
$sql_docs = mysqli_query($mysqli, "SELECT * FROM service_documents
|
||||
LEFT JOIN documents
|
||||
ON service_documents.document_id = documents.document_id
|
||||
$sql_docs = mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT * FROM service_documents
|
||||
LEFT JOIN documents ON service_documents.document_id = documents.document_id
|
||||
WHERE service_id = '$service_id'"
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
<?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']));
|
||||
|
|
@ -20,12 +19,15 @@ $sb = "item_created_at";
|
|||
//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 shared_items
|
||||
$sql = mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT SQL_CALC_FOUND_ROWS * FROM shared_items
|
||||
WHERE item_client_id = $client_id
|
||||
AND item_active = '1'
|
||||
AND item_views != item_view_limit
|
||||
AND item_expire_at > NOW()
|
||||
AND (item_note LIKE '%$q%') ORDER BY $sb $o LIMIT $record_from, $record_to");
|
||||
AND (item_note LIKE '%$q%') ORDER BY $sb $o LIMIT $record_from, $record_to"
|
||||
);
|
||||
|
||||
$num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
|
||||
|
|
@ -83,13 +85,11 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
|
|||
$share_item_sql = mysqli_query($mysqli, "SELECT login_name FROM logins WHERE login_id = '$item_related_id' AND login_client_id = '$client_id'");
|
||||
$share_item = mysqli_fetch_array($share_item_sql);
|
||||
$item_name = htmlentities($share_item['login_name']);
|
||||
}
|
||||
elseif ($item_type == 'Document') {
|
||||
} elseif ($item_type == 'Document') {
|
||||
$share_item_sql = mysqli_query($mysqli, "SELECT document_name FROM documents WHERE document_id = '$item_related_id' AND document_client_id = '$client_id'");
|
||||
$share_item = mysqli_fetch_array($share_item_sql);
|
||||
$item_name = htmlentities($share_item['document_name']);
|
||||
}
|
||||
elseif ($item_type == 'File') {
|
||||
} elseif ($item_type == 'File') {
|
||||
$share_item_sql = mysqli_query($mysqli, "SELECT file_name FROM files WHERE file_id = '$item_related_id' AND file_client_id = '$client_id'");
|
||||
$share_item = mysqli_fetch_array($share_item_sql);
|
||||
$item_name = htmlentities($share_item['file_name']);
|
||||
|
|
@ -124,8 +124,9 @@ $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("footer.php"); ?>
|
||||
<?php
|
||||
require_once("footer.php");
|
||||
|
|
|
|||
|
|
@ -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']));
|
||||
|
|
@ -122,8 +121,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
|
|||
<td><?php echo "$seat_count / $software_seats"; ?></td>
|
||||
<td>
|
||||
<?php
|
||||
if ($login_id > 0) {
|
||||
?>
|
||||
if ($login_id > 0) { ?>
|
||||
<button type="button" class="btn btn-dark btn-sm" data-toggle="modal" data-target="#viewPasswordModal<?php echo $login_id; ?>"><i class="fas fa-key"></i></button>
|
||||
|
||||
<div class="modal" id="viewPasswordModal<?php echo $login_id; ?>" tabindex="-1">
|
||||
|
|
@ -182,7 +180,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
|
|||
|
||||
<?php
|
||||
|
||||
include("client_software_edit_modal.php");
|
||||
require("client_software_edit_modal.php");
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
@ -190,11 +188,11 @@ $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_software_add_modal.php"); ?>
|
||||
<?php include("client_software_add_from_template_modal.php"); ?>
|
||||
|
||||
<?php include("footer.php"); ?>
|
||||
<?php
|
||||
require_once("client_software_add_modal.php");
|
||||
require_once("client_software_add_from_template_modal.php");
|
||||
require_once("footer.php");
|
||||
|
|
|
|||
|
|
@ -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']));
|
||||
|
|
@ -102,7 +101,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
|
|||
|
||||
<?php
|
||||
|
||||
include("client_software_template_edit_modal.php");
|
||||
require("client_software_template_edit_modal.php");
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
@ -110,10 +109,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("client_software_template_add_modal.php"); ?>
|
||||
|
||||
<?php include("footer.php"); ?>
|
||||
<?php
|
||||
require_once("client_software_template_add_modal.php");
|
||||
require_once("footer.php");
|
||||
|
|
|
|||
|
|
@ -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,14 +16,17 @@ 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 tickets
|
||||
$sql = mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT SQL_CALC_FOUND_ROWS * FROM tickets
|
||||
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 ticket_client_id = $client_id
|
||||
AND (CONCAT(ticket_prefix,ticket_number) LIKE '%$q%' OR ticket_subject LIKE '%$q%' OR ticket_status LIKE '%$q%' OR ticket_priority 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()"));
|
||||
|
||||
|
|
@ -183,7 +185,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
|
|||
|
||||
<?php
|
||||
|
||||
include("ticket_edit_modal.php");
|
||||
require("ticket_edit_modal.php");
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
@ -191,13 +193,11 @@ $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("ticket_add_modal.php");
|
||||
include("scheduled_ticket_add_modal.php");
|
||||
?>
|
||||
|
||||
<?php include("footer.php"); ?>
|
||||
require_once("ticket_add_modal.php");
|
||||
require_once("scheduled_ticket_add_modal.php");
|
||||
require_once("footer.php");
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
<?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']));
|
||||
|
|
@ -23,9 +22,12 @@ 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_template = 1
|
||||
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"
|
||||
);
|
||||
|
||||
$num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
|
||||
|
|
@ -108,42 +110,30 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
|
|||
<i class="fa fa-fw fa-building text-secondary"></i>
|
||||
<a class="text-dark" href="#" data-toggle="modal" data-target="#editVendorTemplateModal<?php echo $vendor_id; ?>"><?php echo $vendor_name; ?></a>
|
||||
<?php
|
||||
if (!empty($vendor_account_number)) {
|
||||
?>
|
||||
if (!empty($vendor_account_number)) { ?>
|
||||
<br>
|
||||
<small class="text-secondary"><?php echo $vendor_account_number; ?></small>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php } ?>
|
||||
</th>
|
||||
<td><?php echo $vendor_description_display; ?></td>
|
||||
<td>
|
||||
<?php
|
||||
if (!empty($vendor_contact_name)) {
|
||||
?>
|
||||
if (!empty($vendor_contact_name)) { ?>
|
||||
<i class="fa fa-fw fa-user text-secondary mr-2 mb-2"></i><?php echo $vendor_contact_name_display; ?>
|
||||
<br>
|
||||
<?php
|
||||
}else{
|
||||
<?php } else {
|
||||
echo $vendor_contact_name_display;
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
if (!empty($vendor_phone)) {
|
||||
?>
|
||||
|
||||
if (!empty($vendor_phone)) { ?>
|
||||
<i class="fa fa-fw fa-phone text-secondary mr-2 mb-2"></i><?php echo $vendor_phone; ?>
|
||||
<br>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
if (!empty($vendor_email)) {
|
||||
?>
|
||||
<?php }
|
||||
|
||||
if (!empty($vendor_email)) { ?>
|
||||
<i class="fa fa-fw fa-envelope text-secondary mr-2 mb-2"></i><?php echo $vendor_email; ?>
|
||||
<br>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php } ?>
|
||||
</td>
|
||||
<td>
|
||||
<div class="dropdown dropleft text-center">
|
||||
|
|
@ -163,7 +153,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
|
|||
|
||||
<?php
|
||||
|
||||
include("vendor_template_edit_modal.php");
|
||||
require("vendor_template_edit_modal.php");
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
@ -171,10 +161,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("vendor_template_add_modal.php"); ?>
|
||||
|
||||
<?php include("footer.php"); ?>
|
||||
<?php
|
||||
require_once("vendor_template_add_modal.php");
|
||||
require_once("footer.php");
|
||||
|
|
|
|||
71
cron.php
71
cron.php
|
|
@ -82,7 +82,9 @@ while($row = mysqli_fetch_array($sql_companies)){
|
|||
foreach($domainAlertArray as $day){
|
||||
|
||||
//Get Domains Expiring
|
||||
$sql = mysqli_query($mysqli,"SELECT * FROM domains
|
||||
$sql = mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT * FROM domains
|
||||
LEFT JOIN clients ON domain_client_id = client_id
|
||||
WHERE domain_expire = CURDATE() + INTERVAL $day DAY
|
||||
AND domains.company_id = $company_id"
|
||||
|
|
@ -108,7 +110,9 @@ while($row = mysqli_fetch_array($sql_companies)){
|
|||
foreach($certificateAlertArray as $day){
|
||||
|
||||
//Get Certs Expiring
|
||||
$sql = mysqli_query($mysqli,"SELECT * FROM certificates
|
||||
$sql = mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT * FROM certificates
|
||||
LEFT JOIN clients ON certificate_client_id = client_id
|
||||
WHERE certificate_expire = CURDATE() + INTERVAL $day DAY
|
||||
AND certificates.company_id = $company_id"
|
||||
|
|
@ -135,7 +139,9 @@ while($row = mysqli_fetch_array($sql_companies)){
|
|||
foreach($warranty_alert_array as $day){
|
||||
|
||||
//Get Asset Warranty Expiring
|
||||
$sql = mysqli_query($mysqli,"SELECT * FROM assets
|
||||
$sql = mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT * FROM assets
|
||||
LEFT JOIN clients ON asset_client_id = client_id
|
||||
WHERE asset_warranty_expire = CURDATE() + INTERVAL $day DAY
|
||||
AND assets.company_id = $company_id"
|
||||
|
|
@ -212,10 +218,19 @@ while($row = mysqli_fetch_array($sql_companies)){
|
|||
$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";
|
||||
|
||||
$mail = sendSingleEmail($config_smtp_host, $config_smtp_username, $config_smtp_password, $config_smtp_encryption, $config_smtp_port,
|
||||
$config_ticket_from_email, $config_ticket_from_name,
|
||||
$contact_email, $contact_name,
|
||||
$subject, $body);
|
||||
$mail = sendSingleEmail(
|
||||
$config_smtp_host,
|
||||
$config_smtp_username,
|
||||
$config_smtp_password,
|
||||
$config_smtp_encryption,
|
||||
$config_smtp_port,
|
||||
$config_ticket_from_email,
|
||||
$config_ticket_from_name,
|
||||
$contact_email,
|
||||
$contact_name,
|
||||
$subject,
|
||||
$body
|
||||
);
|
||||
|
||||
if ($mail !== true) {
|
||||
mysqli_query($mysqli, "INSERT INTO notifications SET notification_type = 'Mail', notification = 'Failed to send email to $contact_email', notification_timestamp = NOW(), company_id = $company_id");
|
||||
|
|
@ -273,7 +288,9 @@ while($row = mysqli_fetch_array($sql_companies)){
|
|||
|
||||
foreach($invoiceAlertArray as $day){
|
||||
|
||||
$sql = mysqli_query($mysqli,"SELECT * FROM invoices
|
||||
$sql = mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT * FROM invoices
|
||||
LEFT JOIN clients ON invoice_client_id = client_id
|
||||
LEFT JOIN contacts ON contact_id = primary_contact
|
||||
WHERE invoice_status NOT LIKE 'Draft'
|
||||
|
|
@ -306,10 +323,19 @@ while($row = mysqli_fetch_array($sql_companies)){
|
|||
<br><br>
|
||||
Please view the details of the invoice below.<br><br>Invoice: $invoice_prefix$invoice_number<br>Issue Date: $invoice_date<br>Total: " . numfmt_format_currency($currency_format, $invoice_amount, $invoice_currency_code) . "<br>Due Date: $invoice_due<br><br><br>To view your invoice click <a href='https://$config_base_url/guest_view_invoice.php?invoice_id=$invoice_id&url_key=$invoice_url_key'>here</a><br><br><br>~<br>$company_name<br>Billing Department<br>$config_invoice_from_email<br>$company_phone";
|
||||
|
||||
$mail = sendSingleEmail($config_smtp_host, $config_smtp_username, $config_smtp_password, $config_smtp_encryption, $config_smtp_port,
|
||||
$config_invoice_from_email, $config_invoice_from_name,
|
||||
$contact_email, $contact_name,
|
||||
$subject, $body);
|
||||
$mail = sendSingleEmail(
|
||||
$config_smtp_host,
|
||||
$config_smtp_username,
|
||||
$config_smtp_password,
|
||||
$config_smtp_encryption,
|
||||
$config_smtp_port,
|
||||
$config_invoice_from_email,
|
||||
$config_invoice_from_name,
|
||||
$contact_email,
|
||||
$contact_name,
|
||||
$subject,
|
||||
$body
|
||||
);
|
||||
|
||||
if ($mail === true) {
|
||||
mysqli_query($mysqli, "INSERT INTO history SET history_status = 'Sent', history_description = 'Cron Emailed Overdue Invoice', history_created_at = NOW(), history_invoice_id = $invoice_id, company_id = $company_id");
|
||||
|
|
@ -389,7 +415,9 @@ 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){
|
||||
$sql = mysqli_query($mysqli,"SELECT * FROM invoices
|
||||
$sql = mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT * FROM invoices
|
||||
LEFT JOIN clients ON invoice_client_id = client_id
|
||||
LEFT JOIN contacts ON contact_id = primary_contact
|
||||
WHERE invoice_id = $new_invoice_id
|
||||
|
|
@ -412,10 +440,19 @@ while($row = mysqli_fetch_array($sql_companies)){
|
|||
$subject = "Invoice $invoice_prefix$invoice_number";
|
||||
$body = "Hello $contact_name,<br><br>Please view the details of the invoice below.<br><br>Invoice: $invoice_prefix$invoice_number<br>Issue Date: $invoice_date<br>Total: " . numfmt_format_currency($currency_format, $invoice_amount, $recurring_currency_code) . "<br>Due Date: $invoice_due<br><br><br>To view your invoice click <a href='https://$config_base_url/guest_view_invoice.php?invoice_id=$new_invoice_id&url_key=$invoice_url_key'>here</a><br><br><br>~<br>$company_name<br>Billing Department<br>$config_invoice_from_email<br>$company_phone";
|
||||
|
||||
$mail = sendSingleEmail($config_smtp_host, $config_smtp_username, $config_smtp_password, $config_smtp_encryption, $config_smtp_port,
|
||||
$config_invoice_from_email, $config_invoice_from_name,
|
||||
$contact_email, $contact_name,
|
||||
$subject, $body);
|
||||
$mail = sendSingleEmail(
|
||||
$config_smtp_host,
|
||||
$config_smtp_username,
|
||||
$config_smtp_password,
|
||||
$config_smtp_encryption,
|
||||
$config_smtp_port,
|
||||
$config_invoice_from_email,
|
||||
$config_invoice_from_name,
|
||||
$contact_email,
|
||||
$contact_name,
|
||||
$subject,
|
||||
$body
|
||||
);
|
||||
|
||||
if ($mail === true) {
|
||||
mysqli_query($mysqli, "INSERT INTO history SET history_status = 'Sent', history_description = 'Cron Emailed Invoice!', history_created_at = NOW(), history_invoice_id = $new_invoice_id, company_id = $company_id");
|
||||
|
|
|
|||
|
|
@ -88,10 +88,19 @@ function addTicket($contact_id, $contact_name, $contact_email, $client_id, $comp
|
|||
$email_subject = "Ticket created - [$config_ticket_prefix$ticket_number] - $subject";
|
||||
$email_body = "<i style='color: #808080'>#--itflow--#</i><br><br>Hello, $contact_name<br><br>Thank you for your email. A ticket regarding \"$subject\" has been automatically created for you.<br><br>Ticket: $config_ticket_prefix$ticket_number<br>Subject: $subject<br>Status: Open<br>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";
|
||||
|
||||
$mail = sendSingleEmail($config_smtp_host, $config_smtp_username, $config_smtp_password, $config_smtp_encryption, $config_smtp_port,
|
||||
$config_ticket_from_email, $config_ticket_from_name,
|
||||
$contact_email, $contact_name,
|
||||
$email_subject, $email_body);
|
||||
$mail = sendSingleEmail(
|
||||
$config_smtp_host,
|
||||
$config_smtp_username,
|
||||
$config_smtp_password,
|
||||
$config_smtp_encryption,
|
||||
$config_smtp_port,
|
||||
$config_ticket_from_email,
|
||||
$config_ticket_from_name,
|
||||
$contact_email,
|
||||
$contact_name,
|
||||
$email_subject,
|
||||
$email_body
|
||||
);
|
||||
|
||||
if ($mail !== true) {
|
||||
mysqli_query($mysqli, "INSERT INTO notifications SET notification_type = 'Mail', notification = 'Failed to send email to $contact_email', notification_timestamp = NOW(), company_id = $company_id");
|
||||
|
|
|
|||
|
|
@ -58,14 +58,18 @@ $profit = $total_income - $total_expenses;
|
|||
|
||||
$sql_accounts = mysqli_query($mysqli, "SELECT * FROM accounts WHERE company_id = $session_company_id");
|
||||
|
||||
$sql_latest_invoice_payments = mysqli_query($mysqli, "SELECT * FROM payments, invoices, clients
|
||||
$sql_latest_invoice_payments = mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT * FROM payments, invoices, clients
|
||||
WHERE payment_invoice_id = invoice_id
|
||||
AND invoice_client_id = client_id
|
||||
AND clients.company_id = $session_company_id
|
||||
ORDER BY payment_id DESC LIMIT 5"
|
||||
);
|
||||
|
||||
$sql_latest_expenses = mysqli_query($mysqli, "SELECT * FROM expenses, vendors, categories
|
||||
$sql_latest_expenses = mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT * FROM expenses, vendors, categories
|
||||
WHERE expense_vendor_id = vendor_id
|
||||
AND expense_category_id = category_id
|
||||
AND expenses.company_id = $session_company_id
|
||||
|
|
|
|||
|
|
@ -9,7 +9,9 @@ if (isset($_GET['year'])) {
|
|||
}
|
||||
|
||||
// GET unique years from expenses, payments and revenues
|
||||
$sql_payment_years = mysqli_query($mysqli, "SELECT YEAR(expense_date) AS all_years FROM expenses
|
||||
$sql_payment_years = 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
|
||||
|
|
@ -17,28 +19,36 @@ $sql_payment_years = mysqli_query($mysqli, "SELECT YEAR(expense_date) AS all_yea
|
|||
);
|
||||
|
||||
// Get Total Clients added
|
||||
$sql_clients = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT COUNT('client_id') AS clients_added FROM clients
|
||||
$sql_clients = mysqli_fetch_assoc(mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT COUNT('client_id') AS clients_added FROM clients
|
||||
WHERE YEAR(client_created_at) = $year
|
||||
AND company_id = $session_company_id"
|
||||
));
|
||||
$clients_added = $sql_clients['clients_added'];
|
||||
|
||||
// Get Total contacts added
|
||||
$sql_contacts = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT COUNT('contact_id') AS contacts_added FROM contacts
|
||||
$sql_contacts = mysqli_fetch_assoc(mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT COUNT('contact_id') AS contacts_added FROM contacts
|
||||
WHERE YEAR(contact_created_at) = $year
|
||||
AND company_id = $session_company_id"
|
||||
));
|
||||
$contacts_added = $sql_contacts['contacts_added'];
|
||||
|
||||
// Get Total assets added
|
||||
$sql_assets = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT COUNT('asset_id') AS assets_added FROM assets
|
||||
$sql_assets = mysqli_fetch_assoc(mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT COUNT('asset_id') AS assets_added FROM assets
|
||||
WHERE YEAR(asset_created_at) = $year
|
||||
AND company_id = $session_company_id"
|
||||
));
|
||||
$assets_added = $sql_assets['assets_added'];
|
||||
|
||||
// Ticket count
|
||||
$sql_tickets = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT COUNT('ticket_id') AS active_tickets
|
||||
$sql_tickets = mysqli_fetch_assoc(mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT COUNT('ticket_id') AS active_tickets
|
||||
FROM tickets
|
||||
WHERE ticket_status != 'Closed'
|
||||
AND company_id = $session_company_id"
|
||||
|
|
@ -46,7 +56,9 @@ $sql_tickets = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT COUNT('ticket_id
|
|||
$active_tickets = $sql_tickets['active_tickets'];
|
||||
|
||||
// Expiring domains (but not ones that have already expired)
|
||||
$sql_domains_expiring = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT COUNT('domain_id') as expiring_domains
|
||||
$sql_domains_expiring = mysqli_fetch_assoc(mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT COUNT('domain_id') as expiring_domains
|
||||
FROM domains
|
||||
WHERE domain_expire != '0000-00-00'
|
||||
AND domain_expire > CURRENT_DATE
|
||||
|
|
@ -57,7 +69,9 @@ $sql_domains_expiring = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT COUNT('
|
|||
$expiring_domains = $sql_domains_expiring['expiring_domains'];
|
||||
|
||||
// Expiring Certificates (but not ones that have already expired)
|
||||
$sql_certs_expiring = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT COUNT('certificate_id') as expiring_certs
|
||||
$sql_certs_expiring = mysqli_fetch_assoc(mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT COUNT('certificate_id') as expiring_certs
|
||||
FROM certificates
|
||||
WHERE certificate_expire != '0000-00-00'
|
||||
AND certificate_expire > CURRENT_DATE
|
||||
|
|
|
|||
|
|
@ -275,10 +275,18 @@ if (isset($_GET['invoice_id'], $_GET['url_key']) && !isset($_GET['payment_intent
|
|||
$subject = "Payment Received - Invoice $invoice_prefix$invoice_number";
|
||||
$body = "Hello $contact_name,<br><br>We have received your payment in the amount of " . $pi_currency . $pi_amount_paid . " for invoice <a href='https://$config_base_url/guest_view_invoice.php?invoice_id=$invoice_id&url_key=$invoice_url_key'>$invoice_prefix$invoice_number</a>. Please keep this email as a receipt for your records.<br><br>Amount: " . numfmt_format_currency($currency_format, $pi_amount_paid, $invoice_currency_code) . "<br>Balance: " . numfmt_format_currency($currency_format, '0', $invoice_currency_code) . "<br><br>Thank you for your business!<br><br><br>~<br>$company_name<br>Billing Department<br>$config_invoice_from_email<br>$company_phone";
|
||||
|
||||
$mail = sendSingleEmail($config_smtp_host, $config_smtp_username, $config_smtp_password, $config_smtp_encryption, $config_smtp_port,
|
||||
$config_invoice_from_email, $config_invoice_from_name,
|
||||
$contact_email, $contact_name,
|
||||
$subject, $body
|
||||
$mail = sendSingleEmail(
|
||||
$config_smtp_host,
|
||||
$config_smtp_username,
|
||||
$config_smtp_password,
|
||||
$config_smtp_encryption,
|
||||
$config_smtp_port,
|
||||
$config_invoice_from_email,
|
||||
$config_invoice_from_name,
|
||||
$contact_email,
|
||||
$contact_name,
|
||||
$subject,
|
||||
$body
|
||||
);
|
||||
|
||||
// Email Logging
|
||||
|
|
|
|||
|
|
@ -185,7 +185,9 @@ if (isset($_GET['client_id'])) {
|
|||
// Expiring Items
|
||||
|
||||
// Count Domains Expiring within 30 Days
|
||||
$row = mysqli_fetch_assoc(mysqli_query($mysqli,"SELECT COUNT('domain_id') AS num FROM domains
|
||||
$row = mysqli_fetch_assoc(mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT COUNT('domain_id') AS num FROM domains
|
||||
WHERE domain_client_id = $client_id
|
||||
AND domain_expire != '0000-00-00'
|
||||
AND domain_expire < CURRENT_DATE + INTERVAL 30 DAY
|
||||
|
|
@ -195,7 +197,9 @@ if (isset($_GET['client_id'])) {
|
|||
$num_domains_expiring = $row['num'];
|
||||
|
||||
// Count Certificates Expiring within 30 Days
|
||||
$row = mysqli_fetch_assoc(mysqli_query($mysqli,"SELECT COUNT('certificate_id') AS num FROM certificates
|
||||
$row = mysqli_fetch_assoc(mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT COUNT('certificate_id') AS num FROM certificates
|
||||
WHERE certificate_client_id = $client_id
|
||||
AND certificate_expire != '0000-00-00'
|
||||
AND certificate_expire < CURRENT_DATE + INTERVAL 30 DAY
|
||||
|
|
@ -205,7 +209,9 @@ if (isset($_GET['client_id'])) {
|
|||
$num_certs_expiring = $row['num'];
|
||||
|
||||
// Get Asset Warranties Expiring
|
||||
$sql_asset_warranties_expiring = mysqli_query($mysqli,"SELECT * FROM assets
|
||||
$sql_asset_warranties_expiring = mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT * FROM assets
|
||||
WHERE asset_client_id = $client_id
|
||||
AND asset_warranty_expire != '0000-00-00'
|
||||
AND asset_archived_at IS NULL
|
||||
|
|
@ -214,7 +220,9 @@ if (isset($_GET['client_id'])) {
|
|||
);
|
||||
|
||||
// Get Assets Retiring
|
||||
$sql_asset_retire = mysqli_query($mysqli,"SELECT * FROM assets
|
||||
$sql_asset_retire = mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT * FROM assets
|
||||
WHERE asset_client_id = $client_id
|
||||
AND asset_install_date != '0000-00-00'
|
||||
AND asset_archived_at IS NULL
|
||||
|
|
@ -223,7 +231,9 @@ if (isset($_GET['client_id'])) {
|
|||
);
|
||||
|
||||
// Get Stale Tickets
|
||||
$sql_tickets_stale = mysqli_query($mysqli,"SELECT * FROM tickets
|
||||
$sql_tickets_stale = mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT * FROM tickets
|
||||
WHERE ticket_client_id = $client_id
|
||||
AND ticket_created_at < CURRENT_DATE - INTERVAL 14 DAY
|
||||
AND ticket_status != 'Closed'
|
||||
|
|
|
|||
4
logs.php
4
logs.php
|
|
@ -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 logs
|
||||
$sql = mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT SQL_CALC_FOUND_ROWS * FROM logs
|
||||
LEFT JOIN users ON log_user_id = user_id
|
||||
LEFT JOIN clients ON log_client_id = client_id
|
||||
WHERE (log_type LIKE '%$q%' OR log_action LIKE '%$q%' OR log_description LIKE '%$q%' OR log_ip LIKE '%$q%' OR log_user_agent LIKE '%$q%' OR user_name LIKE '%$q%' OR client_name LIKE '%$q%')
|
||||
|
|
|
|||
17
payments.php
17
payments.php
|
|
@ -1,4 +1,5 @@
|
|||
<?php include("inc_all.php");
|
||||
<?php
|
||||
require_once("inc_all.php");
|
||||
|
||||
if (!empty($_GET['sb'])) {
|
||||
$sb = strip_tags(mysqli_real_escape_string($mysqli, $_GET['sb']));
|
||||
|
|
@ -54,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 payments
|
||||
$sql = mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT SQL_CALC_FOUND_ROWS * FROM payments
|
||||
LEFT JOIN invoices ON payment_invoice_id = invoice_id
|
||||
LEFT JOIN clients ON invoice_client_id = client_id
|
||||
LEFT JOIN accounts ON payment_account_id = account_id
|
||||
|
|
@ -170,17 +173,13 @@ $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"); ?>
|
||||
|
|
|
|||
23
products.php
23
products.php
|
|
@ -1,4 +1,5 @@
|
|||
<?php include("inc_all.php");
|
||||
<?php
|
||||
require_once("inc_all.php");
|
||||
|
||||
if (!empty($_GET['sb'])) {
|
||||
$sb = strip_tags(mysqli_real_escape_string($mysqli, $_GET['sb']));
|
||||
|
|
@ -10,10 +11,13 @@ 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 products LEFT JOIN categories ON product_category_id = category_id
|
||||
$sql = mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT SQL_CALC_FOUND_ROWS * FROM products LEFT JOIN categories ON product_category_id = category_id
|
||||
WHERE products.company_id = $session_company_id
|
||||
AND (product_name LIKE '%$q%' OR product_description LIKE '%$q%' OR category_name LIKE '%$q%' OR product_price 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()"));
|
||||
|
||||
|
|
@ -93,7 +97,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
|
|||
|
||||
<?php
|
||||
|
||||
include("product_edit_modal.php");
|
||||
require("product_edit_modal.php");
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -102,15 +106,12 @@ $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("product_add_modal.php");
|
||||
include("category_quick_add_modal.php");
|
||||
|
||||
include("footer.php");
|
||||
|
||||
?>
|
||||
require_once("product_add_modal.php");
|
||||
require_once("category_quick_add_modal.php");
|
||||
require_once("footer.php");
|
||||
|
|
|
|||
18
quotes.php
18
quotes.php
|
|
@ -1,4 +1,5 @@
|
|||
<?php include("inc_all.php");
|
||||
<?php
|
||||
require_once("inc_all.php");
|
||||
|
||||
if (!empty($_GET['sb'])) {
|
||||
$sb = strip_tags(mysqli_real_escape_string($mysqli, $_GET['sb']));
|
||||
|
|
@ -212,8 +213,8 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
|
|||
|
||||
<?php
|
||||
|
||||
include("quote_edit_modal.php");
|
||||
include("quote_copy_modal.php");
|
||||
require("quote_edit_modal.php");
|
||||
require("quote_copy_modal.php");
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -222,15 +223,12 @@ $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("quote_add_modal.php");
|
||||
include("category_quick_add_modal.php");
|
||||
|
||||
include("footer.php");
|
||||
|
||||
?>
|
||||
require_once("quote_add_modal.php");
|
||||
require_once("category_quick_add_modal.php");
|
||||
require_once("footer.php");
|
||||
|
|
|
|||
|
|
@ -1,10 +1,13 @@
|
|||
<?php require_once("inc_all.php");
|
||||
<?php
|
||||
require_once("inc_all.php");
|
||||
|
||||
if (isset($_GET['recurring_id'])) {
|
||||
|
||||
$recurring_id = intval($_GET['recurring_id']);
|
||||
|
||||
$sql = mysqli_query($mysqli, "SELECT * FROM recurring
|
||||
$sql = mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT * FROM recurring
|
||||
LEFT JOIN clients ON recurring_client_id = client_id
|
||||
LEFT JOIN locations ON primary_location = location_id
|
||||
LEFT JOIN contacts ON primary_contact = contact_id
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
<?php include("inc_all.php");
|
||||
<?php
|
||||
require_once("inc_all.php");
|
||||
|
||||
if (!empty($_GET['sb'])) {
|
||||
$sb = strip_tags(mysqli_real_escape_string($mysqli, $_GET['sb']));
|
||||
|
|
@ -201,7 +202,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");
|
||||
|
||||
}
|
||||
?>
|
||||
|
|
@ -209,15 +210,14 @@ $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");
|
||||
include("category_quick_add_modal.php");
|
||||
|
||||
include("footer.php");
|
||||
require_once("recurring_invoice_add_modal.php");
|
||||
require_once("category_quick_add_modal.php");
|
||||
require_once("footer.php");
|
||||
|
||||
?>
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
include("inc_all_reports.php");
|
||||
require_once("inc_all_reports.php");
|
||||
validateAccountantRole();
|
||||
|
||||
if (isset($_GET['year'])) {
|
||||
|
|
@ -58,9 +58,7 @@ $sql_vendors = mysqli_query($mysqli,"SELECT * FROM vendors WHERE company_id = $s
|
|||
|
||||
$amount_paid = floatval($row['amount_paid']);
|
||||
|
||||
if ($amount_paid > 599) {
|
||||
|
||||
?>
|
||||
if ($amount_paid > 599) { ?>
|
||||
|
||||
<tr>
|
||||
<td><?php echo $vendor_name; ?></td>
|
||||
|
|
|
|||
|
|
@ -67,7 +67,9 @@ $sql_tax = mysqli_query($mysqli, "SELECT * FROM taxes WHERE company_id = $sessio
|
|||
|
||||
for($month = 1; $month<=3; $month++) {
|
||||
|
||||
$sql_tax_collected = mysqli_query($mysqli, "SELECT SUM(item_tax) AS tax_collected_for_month
|
||||
$sql_tax_collected = mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT SUM(item_tax) AS tax_collected_for_month
|
||||
FROM invoices, invoice_items
|
||||
WHERE item_invoice_id = invoice_id
|
||||
AND invoice_status LIKE 'Paid'
|
||||
|
|
@ -91,7 +93,9 @@ $sql_tax = mysqli_query($mysqli, "SELECT * FROM taxes WHERE company_id = $sessio
|
|||
|
||||
for($month = 4; $month <= 6; $month ++) {
|
||||
|
||||
$sql_tax_collected = mysqli_query($mysqli, "SELECT SUM(item_tax) AS tax_collected_for_month
|
||||
$sql_tax_collected = mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT SUM(item_tax) AS tax_collected_for_month
|
||||
FROM invoices, invoice_items
|
||||
WHERE item_invoice_id = invoice_id
|
||||
AND invoice_status LIKE 'Paid'
|
||||
|
|
@ -115,7 +119,9 @@ $sql_tax = mysqli_query($mysqli, "SELECT * FROM taxes WHERE company_id = $sessio
|
|||
|
||||
for($month = 7; $month <= 9; $month ++) {
|
||||
|
||||
$sql_tax_collected = mysqli_query($mysqli, "SELECT SUM(item_tax) AS tax_collected_for_month
|
||||
$sql_tax_collected = mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT SUM(item_tax) AS tax_collected_for_month
|
||||
FROM invoices, invoice_items
|
||||
WHERE item_invoice_id = invoice_id
|
||||
AND invoice_status LIKE 'Paid'
|
||||
|
|
@ -139,7 +145,9 @@ $sql_tax = mysqli_query($mysqli, "SELECT * FROM taxes WHERE company_id = $sessio
|
|||
|
||||
for($month = 10; $month <= 12; $month ++) {
|
||||
|
||||
$sql_tax_collected = mysqli_query($mysqli, "SELECT SUM(item_tax) AS tax_collected_for_month
|
||||
$sql_tax_collected = mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT SUM(item_tax) AS tax_collected_for_month
|
||||
FROM invoices, invoice_items
|
||||
WHERE item_invoice_id = invoice_id
|
||||
AND invoice_status LIKE 'Paid'
|
||||
|
|
@ -176,7 +184,9 @@ $sql_tax = mysqli_query($mysqli, "SELECT * FROM taxes WHERE company_id = $sessio
|
|||
|
||||
for($month = 1; $month <= 3; $month ++) {
|
||||
|
||||
$sql_tax_collected = mysqli_query($mysqli, "SELECT SUM(item_tax) AS tax_collected_for_month
|
||||
$sql_tax_collected = mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT SUM(item_tax) AS tax_collected_for_month
|
||||
FROM invoices, invoice_items
|
||||
WHERE item_invoice_id = invoice_id
|
||||
AND invoice_status LIKE 'Paid'
|
||||
|
|
@ -199,7 +209,9 @@ $sql_tax = mysqli_query($mysqli, "SELECT * FROM taxes WHERE company_id = $sessio
|
|||
|
||||
for($month = 4; $month <= 6; $month ++) {
|
||||
|
||||
$sql_tax_collected = mysqli_query($mysqli, "SELECT SUM(item_tax) AS tax_collected_for_month
|
||||
$sql_tax_collected = mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT SUM(item_tax) AS tax_collected_for_month
|
||||
FROM invoices, invoice_items
|
||||
WHERE item_invoice_id = invoice_id
|
||||
AND invoice_status LIKE 'Paid'
|
||||
|
|
@ -222,7 +234,9 @@ $sql_tax = mysqli_query($mysqli, "SELECT * FROM taxes WHERE company_id = $sessio
|
|||
|
||||
for($month = 7; $month <= 9; $month ++) {
|
||||
|
||||
$sql_tax_collected = mysqli_query($mysqli, "SELECT SUM(item_tax) AS tax_collected_for_month
|
||||
$sql_tax_collected = mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT SUM(item_tax) AS tax_collected_for_month
|
||||
FROM invoices, invoice_items
|
||||
WHERE item_invoice_id = invoice_id
|
||||
AND invoice_status LIKE 'Paid'
|
||||
|
|
@ -245,7 +259,9 @@ $sql_tax = mysqli_query($mysqli, "SELECT * FROM taxes WHERE company_id = $sessio
|
|||
|
||||
for($month = 10; $month <= 12; $month ++) {
|
||||
|
||||
$sql_tax_collected = mysqli_query($mysqli, "SELECT SUM(item_tax) AS tax_collected_for_month
|
||||
$sql_tax_collected = mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT SUM(item_tax) AS tax_collected_for_month
|
||||
FROM invoices, invoice_items
|
||||
WHERE item_invoice_id = invoice_id
|
||||
AND invoice_status LIKE 'Paid'
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
include("inc_all.php");
|
||||
require_once("inc_all.php");
|
||||
|
||||
if (!empty($_GET['sb'])) {
|
||||
$sb = strip_tags(mysqli_real_escape_string($mysqli, $_GET['sb']));
|
||||
|
|
@ -11,7 +11,9 @@ if (!empty($_GET['sb'])) {
|
|||
$url_query_strings_sb = http_build_query(array_merge($_GET, array('sb' => $sb, 'o' => $o)));
|
||||
|
||||
// SQL
|
||||
$sql = mysqli_query($mysqli,"SELECT SQL_CALC_FOUND_ROWS * FROM scheduled_tickets
|
||||
$sql = mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT SQL_CALC_FOUND_ROWS * FROM scheduled_tickets
|
||||
LEFT JOIN clients on scheduled_ticket_client_id = client_id
|
||||
WHERE scheduled_tickets.scheduled_ticket_subject LIKE '%$q%'
|
||||
ORDER BY $sb $o LIMIT $record_from, $record_to"
|
||||
|
|
@ -104,12 +106,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("scheduled_ticket_edit_modal.php");
|
||||
include("footer.php");
|
||||
require_once("scheduled_ticket_edit_modal.php");
|
||||
require_once("footer.php");
|
||||
|
|
|
|||
|
|
@ -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 SQL_CALC_FOUND_ROWS * FROM api_keys
|
||||
$sql = mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT SQL_CALC_FOUND_ROWS * FROM api_keys
|
||||
LEFT JOIN clients on api_keys.api_key_client_id = clients.client_id
|
||||
WHERE (api_key_name LIKE '%$q%')
|
||||
AND api_keys.company_id = $session_company_id
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php include("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']));
|
||||
} else {
|
||||
|
|
@ -11,11 +11,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 software
|
||||
$sql = mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT SQL_CALC_FOUND_ROWS * FROM software
|
||||
LEFT JOIN logins ON login_software_id = software_id
|
||||
WHERE software_template = 1
|
||||
AND (software_name LIKE '%$q%' OR software_type LIKE '%$q%' OR software_key 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()"));
|
||||
|
||||
|
|
@ -98,7 +101,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
|
|||
|
||||
<?php
|
||||
|
||||
include("client_software_template_edit_modal.php");
|
||||
require("client_software_template_edit_modal.php");
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
@ -106,10 +109,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("client_software_template_add_modal.php"); ?>
|
||||
|
||||
<?php include("footer.php"); ?>
|
||||
<?php
|
||||
require_once("client_software_template_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']));
|
||||
|
|
@ -9,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 tags
|
||||
$sql = mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT SQL_CALC_FOUND_ROWS * FROM tags
|
||||
WHERE tag_name LIKE '%$q%'
|
||||
AND company_id = $session_company_id
|
||||
ORDER BY $sb $o LIMIT $record_from, $record_to"
|
||||
|
|
@ -19,7 +22,9 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||
|
||||
if ($num_rows > 0) {
|
||||
//Colors Used
|
||||
$sql_colors_used = mysqli_query($mysqli, "SELECT tag_color FROM tags
|
||||
$sql_colors_used = mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT tag_color FROM tags
|
||||
WHERE tag_archived_at IS NULL
|
||||
AND company_id = $session_company_id"
|
||||
);
|
||||
|
|
@ -102,7 +107,7 @@ if ($num_rows > 0) {
|
|||
|
||||
<?php
|
||||
|
||||
include("settings_tag_edit_modal.php");
|
||||
require("settings_tag_edit_modal.php");
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -111,14 +116,10 @@ if ($num_rows > 0) {
|
|||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php include("pagination.php"); ?>
|
||||
<?php require_once("pagination.php"); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
|
||||
include("settings_tag_add_modal.php");
|
||||
|
||||
include("footer.php");
|
||||
|
||||
?>
|
||||
require_once("settings_tag_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']));
|
||||
|
|
@ -9,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 * FROM taxes
|
||||
$sql = mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT * FROM taxes
|
||||
WHERE tax_archived_at IS NULL
|
||||
AND company_id = $session_company_id
|
||||
ORDER BY $sb $o"
|
||||
|
|
@ -64,11 +67,11 @@ $num_rows = mysqli_num_rows($sql);
|
|||
|
||||
<?php
|
||||
|
||||
include("settings_tax_edit_modal.php");
|
||||
require("settings_tax_edit_modal.php");
|
||||
}
|
||||
|
||||
if ($num_rows == 0) {
|
||||
echo "<center><h3 class='text-secondary mt-3'>No Records Here</h3></center>";
|
||||
echo "<h3 class='text-secondary mt-3' style='text-align: center'>No Records Here</h3>";
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
@ -81,9 +84,5 @@ $num_rows = mysqli_num_rows($sql);
|
|||
</div>
|
||||
|
||||
<?php
|
||||
|
||||
include("settings_tax_add_modal.php");
|
||||
|
||||
include("footer.php");
|
||||
|
||||
?>
|
||||
require_once("settings_tax_add_modal.php");
|
||||
require_once("footer.php");
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php include("inc_all_settings.php"); ?>
|
||||
|
||||
<?php
|
||||
|
||||
require_once("inc_all_settings.php");
|
||||
|
||||
if (isset($_GET['q'])) {
|
||||
$q = strip_tags(mysqli_real_escape_string($mysqli, $_GET['q']));
|
||||
//Phone Numbers
|
||||
|
|
@ -23,9 +23,12 @@ 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_template = 1
|
||||
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"
|
||||
);
|
||||
|
||||
$num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
|
||||
|
|
@ -123,23 +126,17 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
|
|||
} else {
|
||||
echo $vendor_contact_name_display;
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
if (!empty($vendor_phone)) {
|
||||
?>
|
||||
|
||||
if (!empty($vendor_phone)) { ?>
|
||||
<i class="fa fa-fw fa-phone text-secondary mr-2 mb-2"></i><?php echo $vendor_phone; ?>
|
||||
<br>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
if (!empty($vendor_email)) {
|
||||
?>
|
||||
<?php }
|
||||
|
||||
if (!empty($vendor_email)) { ?>
|
||||
<i class="fa fa-fw fa-envelope text-secondary mr-2 mb-2"></i><?php echo $vendor_email; ?>
|
||||
<br>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php } ?>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<div class="dropdown dropleft text-center">
|
||||
|
|
@ -159,7 +156,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
|
|||
|
||||
<?php
|
||||
|
||||
include("vendor_template_edit_modal.php");
|
||||
require("vendor_template_edit_modal.php");
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
@ -167,10 +164,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("vendor_template_add_modal.php"); ?>
|
||||
|
||||
<?php include("footer.php"); ?>
|
||||
<?php
|
||||
require_once("vendor_template_add_modal.php");
|
||||
require_once("footer.php");
|
||||
|
|
|
|||
|
|
@ -4,7 +4,9 @@ require_once("inc_all.php");
|
|||
if (isset($_GET['ticket_id'])) {
|
||||
$ticket_id = intval($_GET['ticket_id']);
|
||||
|
||||
$sql = mysqli_query($mysqli,"SELECT * FROM tickets
|
||||
$sql = mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT * 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
|
||||
|
|
|
|||
|
|
@ -97,7 +97,9 @@
|
|||
<option value="0">Not Assigned</option>
|
||||
<?php
|
||||
|
||||
$sql = mysqli_query($mysqli, "SELECT users.user_id, user_name FROM users
|
||||
$sql = mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT users.user_id, user_name FROM users
|
||||
LEFT JOIN user_companies ON users.user_id = user_companies.user_id
|
||||
LEFT JOIN user_settings on users.user_id = user_settings.user_id
|
||||
WHERE user_companies.company_id = $session_company_id
|
||||
|
|
|
|||
|
|
@ -70,7 +70,9 @@
|
|||
<option value="0">Not Assigned</option>
|
||||
<?php
|
||||
|
||||
$sql_assign_to_select = mysqli_query($mysqli,"SELECT users.user_id, user_name FROM users
|
||||
$sql_assign_to_select = mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT users.user_id, user_name FROM users
|
||||
LEFT JOIN user_companies ON users.user_id = user_companies.user_id
|
||||
LEFT JOIN user_settings on users.user_id = user_settings.user_id
|
||||
WHERE user_companies.company_id = $session_company_id
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
<?php include("inc_all.php");
|
||||
<?php
|
||||
|
||||
require_once("inc_all.php");
|
||||
|
||||
//Column Sortby Filter
|
||||
if (!empty($_GET['sb'])) {
|
||||
|
|
@ -55,7 +57,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 transfer_created_at, expense_date AS transfer_date, expense_amount AS transfer_amount, expense_account_id AS transfer_account_from, revenue_account_id AS transfer_account_to, transfer_expense_id, transfer_revenue_id , transfer_id, transfer_notes FROM transfers, expenses, revenues
|
||||
$sql = mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT SQL_CALC_FOUND_ROWS transfer_created_at, expense_date AS transfer_date, expense_amount AS transfer_amount, expense_account_id AS transfer_account_from, revenue_account_id AS transfer_account_to, transfer_expense_id, transfer_revenue_id , transfer_id, transfer_notes FROM transfers, expenses, revenues
|
||||
WHERE transfer_expense_id = expense_id
|
||||
AND transfer_revenue_id = revenue_id
|
||||
AND transfers.company_id = $session_company_id
|
||||
|
|
@ -177,7 +181,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
|
|||
|
||||
<?php
|
||||
|
||||
include("transfer_edit_modal.php");
|
||||
require("transfer_edit_modal.php");
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -186,10 +190,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("transfer_add_modal.php"); ?>
|
||||
|
||||
<?php include("footer.php");
|
||||
<?php
|
||||
require_once("transfer_add_modal.php");
|
||||
require_once("footer.php");
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
<?php include("inc_all.php");
|
||||
<?php
|
||||
require_once("inc_all.php");
|
||||
|
||||
if (!empty($_GET['sb'])) {
|
||||
$sb = strip_tags(mysqli_real_escape_string($mysqli, $_GET['sb']));
|
||||
|
|
@ -56,7 +57,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 trips
|
||||
$sql = mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT SQL_CALC_FOUND_ROWS * FROM trips
|
||||
LEFT JOIN clients ON trip_client_id = client_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 trip_miles LIKE '%$q%' OR client_name LIKE '%$q%' OR user_name LIKE '%$q%')
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@
|
|||
<div class="modal-dialog">
|
||||
<div class="modal-content bg-dark">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title"><i class="fa fa-fw fa-building"></i> Company access: <strong><?php echo $user_name; ?></strong></h5>
|
||||
<h5 class="modal-title"><i class="fa fa-fw fa-building"></i> Company access:
|
||||
<strong><?php echo $user_name; ?></strong></h5>
|
||||
<button type="button" class="close text-white" data-dismiss="modal">
|
||||
<span>×</span>
|
||||
</button>
|
||||
|
|
@ -29,8 +30,16 @@
|
|||
?>
|
||||
<li class="list-group-item">
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input" name="companies[]" value="<?php echo $company_id_select; ?>" <?php if (in_array("$company_id_select",$user_company_access_array)) { echo "checked"; } ?> <?php if ($user_default_company == $company_id_select) { echo "disabled"; } ?>>
|
||||
<label class="form-check-label ml-2"><?php echo $company_name_select; ?> <?php if ($user_default_company == $company_id_select) { echo "<small>(Default Company)</small>"; } ?></label>
|
||||
<input type="checkbox" class="form-check-input" name="companies[]"
|
||||
value="<?php echo $company_id_select; ?>" <?php if (in_array("$company_id_select", $user_company_access_array)) {
|
||||
echo "checked";
|
||||
} ?> <?php if ($user_default_company == $company_id_select) {
|
||||
echo "disabled";
|
||||
} ?>>
|
||||
<label
|
||||
class="form-check-label ml-2"><?php echo $company_name_select; ?><?php if ($user_default_company == $company_id_select) {
|
||||
echo "<small>(Default Company)</small>";
|
||||
} ?></label>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
|
@ -43,7 +52,9 @@
|
|||
</div>
|
||||
<div class="modal-footer bg-white">
|
||||
<button type="button" class="btn btn-outline-secondary" data-dismiss="modal">Cancel</button>
|
||||
<button type="submit" name="edit_user_companies" class="btn btn-primary text-bold"><i class="fa fa-check"></i> Save</button>
|
||||
<button type="submit" name="edit_user_companies" class="btn btn-primary text-bold"><i
|
||||
class="fa fa-check"></i> Save
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@
|
|||
<div class="modal-dialog">
|
||||
<div class="modal-content bg-dark">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title"><i class="fa fa-fw fa-user-edit"></i> Editing user: <strong><?php echo $user_name; ?></strong></h5>
|
||||
<h5 class="modal-title"><i class="fa fa-fw fa-user-edit"></i> Editing user:
|
||||
<strong><?php echo $user_name; ?></strong></h5>
|
||||
<button type="button" class="close text-white" data-dismiss="modal">
|
||||
<span>×</span>
|
||||
</button>
|
||||
|
|
@ -30,7 +31,8 @@
|
|||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-user"></i></span>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="name" placeholder="Full Name" value="<?php echo $user_name; ?>" required>
|
||||
<input type="text" class="form-control" name="name" placeholder="Full Name"
|
||||
value="<?php echo $user_name; ?>" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -40,7 +42,8 @@
|
|||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-envelope"></i></span>
|
||||
</div>
|
||||
<input type="email" class="form-control" name="email" placeholder="Email Address" value="<?php echo $user_email; ?>" required>
|
||||
<input type="email" class="form-control" name="email" placeholder="Email Address"
|
||||
value="<?php echo $user_email; ?>" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -50,7 +53,8 @@
|
|||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-lock"></i></span>
|
||||
</div>
|
||||
<input type="password" class="form-control" data-toggle="password" name="new_password" placeholder="Leave Blank For No Password Change" autocomplete="new-password">
|
||||
<input type="password" class="form-control" data-toggle="password" name="new_password"
|
||||
placeholder="Leave Blank For No Password Change" autocomplete="new-password">
|
||||
<div class="input-group-append">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-eye"></i></span>
|
||||
</div>
|
||||
|
|
@ -72,7 +76,10 @@
|
|||
$company_id_select = $row['company_id'];
|
||||
$company_name_select = htmlentities($row['company_name']);
|
||||
?>
|
||||
<option <?php if ($company_id_select == $user_default_company) { echo "selected"; } ?> value="<?php echo $company_id_select; ?>"><?php echo $company_name_select; ?></option>
|
||||
<option <?php if ($company_id_select == $user_default_company) {
|
||||
echo "selected";
|
||||
} ?>
|
||||
value="<?php echo $company_id_select; ?>"><?php echo $company_name_select; ?></option>
|
||||
|
||||
<?php
|
||||
}
|
||||
|
|
@ -89,9 +96,18 @@
|
|||
</div>
|
||||
<select class="form-control select2" name="role" required>
|
||||
<option value="">- Role -</option>
|
||||
<option <?php if ($user_role == 3) { echo "selected"; } ?> value="3">Administrator</option>
|
||||
<option <?php if ($user_role == 2) { echo "selected"; } ?> value="2">Technician</option>
|
||||
<option <?php if ($user_role == 1) { echo "selected"; } ?> value="1">Accountant</option>
|
||||
<option <?php if ($user_role == 3) {
|
||||
echo "selected";
|
||||
} ?> value="3">Administrator
|
||||
</option>
|
||||
<option <?php if ($user_role == 2) {
|
||||
echo "selected";
|
||||
} ?> value="2">Technician
|
||||
</option>
|
||||
<option <?php if ($user_role == 1) {
|
||||
echo "selected";
|
||||
} ?> value="1">Accountant
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -121,7 +137,9 @@
|
|||
</div>
|
||||
<div class="modal-footer bg-white">
|
||||
<button type="button" class="btn btn-outline-secondary" data-dismiss="modal">Cancel</button>
|
||||
<button type="submit" name="edit_user" class="btn btn-primary text-bold"><i class="fa fa-check"></i> Save</button>
|
||||
<button type="submit" name="edit_user" class="btn btn-primary text-bold"><i class="fa fa-check"></i>
|
||||
Save
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -38,9 +38,8 @@
|
|||
?>
|
||||
<option value="<?php echo $company_id; ?>"><?php echo $company_name; ?></option>
|
||||
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php } ?>
|
||||
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -91,7 +91,9 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||
|
||||
$user_initials = htmlentities(initials($user_name));
|
||||
|
||||
$sql_last_login = mysqli_query($mysqli, "SELECT * FROM logs
|
||||
$sql_last_login = mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT * FROM logs
|
||||
WHERE log_user_id = $user_id AND log_type = 'Login'
|
||||
ORDER BY log_id DESC LIMIT 1"
|
||||
);
|
||||
|
|
|
|||
57
vendors.php
57
vendors.php
|
|
@ -1,4 +1,6 @@
|
|||
<?php include("inc_all.php");
|
||||
<?php
|
||||
|
||||
require_once("inc_all.php");
|
||||
|
||||
if (isset($_GET['q'])) {
|
||||
$q = strip_tags(mysqli_real_escape_string($mysqli, $_GET['q']));
|
||||
|
|
@ -31,14 +33,17 @@ if (!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 vendors
|
||||
$sql = mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT SQL_CALC_FOUND_ROWS * FROM vendors
|
||||
WHERE vendor_client_id = 0
|
||||
AND vendor_template = 0
|
||||
AND DATE(vendor_created_at) BETWEEN '$dtf' AND '$dtt'
|
||||
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%')
|
||||
AND vendor_archived_at IS NULL
|
||||
AND company_id = $session_company_id
|
||||
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()"));
|
||||
|
||||
|
|
@ -127,44 +132,32 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
|
|||
<tr>
|
||||
<th>
|
||||
<a class="text-dark" href="#" data-toggle="modal" data-target="#editVendorModal<?php echo $vendor_id; ?>"><?php echo $vendor_name; ?><a>
|
||||
<?php
|
||||
if (!empty($vendor_account_number)) {
|
||||
?>
|
||||
<?php if (!empty($vendor_account_number)) { ?>
|
||||
<br>
|
||||
<small class="text-secondary"><?php echo $vendor_account_number; ?></small>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php } ?>
|
||||
|
||||
</th>
|
||||
<td><?php echo $vendor_description_display; ?></td>
|
||||
<td>
|
||||
<?php
|
||||
if (!empty($vendor_contact_name)) {
|
||||
?>
|
||||
if (!empty($vendor_contact_name)) { ?>
|
||||
<i class="fa fa-fw fa-user text-secondary mr-2 mb-2"></i><?php echo $vendor_contact_name; ?>
|
||||
<br>
|
||||
<?php
|
||||
}else{
|
||||
<?php } else {
|
||||
echo $vendor_contact_name_display;
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
if (!empty($vendor_phone)) {
|
||||
?>
|
||||
|
||||
if (!empty($vendor_phone)) { ?>
|
||||
<i class="fa fa-fw fa-phone text-secondary mr-2 mb-2"></i><?php echo $vendor_phone; ?> <?php if (!empty($vendor_extension)) { echo "x$vendor_extension"; } ?>
|
||||
<br>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
if (!empty($vendor_email)) {
|
||||
?>
|
||||
<?php }
|
||||
|
||||
if (!empty($vendor_email)) { ?>
|
||||
<i class="fa fa-fw fa-envelope text-secondary mr-2 mb-2"></i><?php echo $vendor_email; ?>
|
||||
<br>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php } ?>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<div class="dropdown dropleft text-center">
|
||||
|
|
@ -182,7 +175,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
|
|||
|
||||
<?php
|
||||
|
||||
include("vendor_edit_modal.php");
|
||||
require("vendor_edit_modal.php");
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -191,14 +184,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("vendor_add_modal.php");
|
||||
|
||||
include("footer.php");
|
||||
|
||||
?>
|
||||
require_once("vendor_add_modal.php");
|
||||
require_once("footer.php");
|
||||
|
|
|
|||
Loading…
Reference in New Issue