mirror of
https://github.com/itflow-org/itflow
synced 2026-03-25 14:55:38 +00:00
Fix Some Undefined Vars PHP Errors
This commit is contained in:
@@ -87,7 +87,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<a class="text-dark" href="#" data-toggle="modal" data-target="#editProjectTemplateModal<?php echo $project_id; ?>">
|
<a class="text-dark" href="#" data-toggle="modal" data-target="#editProjectTemplateModal<?php echo $project_template_id; ?>">
|
||||||
<div class="media">
|
<div class="media">
|
||||||
<i class="fa fa-fw fa-2x fa-project-diagram mr-3"></i>
|
<i class="fa fa-fw fa-2x fa-project-diagram mr-3"></i>
|
||||||
<div class="media-body">
|
<div class="media-body">
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<a class="text-dark" href="#" data-toggle="modal" data-target="#editTicketTemplateModal<?php echo $ticket_id; ?>">
|
<a class="text-dark" href="#" data-toggle="modal" data-target="#editTicketTemplateModal<?php echo $ticket_template_id; ?>">
|
||||||
<div class="media">
|
<div class="media">
|
||||||
<i class="fa fa-fw fa-2x fa-life-ring mr-3"></i>
|
<i class="fa fa-fw fa-2x fa-life-ring mr-3"></i>
|
||||||
<div class="media-body">
|
<div class="media-body">
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ if (isset($_GET['location']) & !empty($_GET['location'])) {
|
|||||||
} else {
|
} else {
|
||||||
// Default - any
|
// Default - any
|
||||||
$location_query = '';
|
$location_query = '';
|
||||||
|
$location = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
//Get Asset Counts
|
//Get Asset Counts
|
||||||
@@ -194,7 +195,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#bulkEditStatusModal">
|
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#bulkEditStatusModal">
|
||||||
<i class="fas fa-fw fa-info mr-2"></i>Set Status
|
<i class="fas fa-fw fa-info mr-2"></i>Set Status
|
||||||
</a>
|
</a>
|
||||||
<?php if ($_GET['archived']) { ?>
|
<?php if (isset($_GET['archived'])) { ?>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<button class="dropdown-item text-info"
|
<button class="dropdown-item text-info"
|
||||||
type="submit" form="bulkActions" name="bulk_unarchive_assets">
|
type="submit" form="bulkActions" name="bulk_unarchive_assets">
|
||||||
|
|||||||
@@ -236,6 +236,7 @@ if (isset($_GET['contact_id'])) {
|
|||||||
} else {
|
} else {
|
||||||
$asset_ip_display = "$asset_ip<button class='btn btn-sm' data-clipboard-text='$asset_ip'><i class='far fa-copy text-secondary'></i></button>";
|
$asset_ip_display = "$asset_ip<button class='btn btn-sm' data-clipboard-text='$asset_ip'><i class='far fa-copy text-secondary'></i></button>";
|
||||||
}
|
}
|
||||||
|
$asset_nat_ip = nullable_htmlentities($row['asset_nat_ip']);
|
||||||
$asset_mac = nullable_htmlentities($row['asset_mac']);
|
$asset_mac = nullable_htmlentities($row['asset_mac']);
|
||||||
$asset_status = nullable_htmlentities($row['asset_status']);
|
$asset_status = nullable_htmlentities($row['asset_status']);
|
||||||
$asset_purchase_date = nullable_htmlentities($row['asset_purchase_date']);
|
$asset_purchase_date = nullable_htmlentities($row['asset_purchase_date']);
|
||||||
@@ -246,6 +247,8 @@ if (isset($_GET['contact_id'])) {
|
|||||||
} else {
|
} else {
|
||||||
$asset_install_date_display = $asset_install_date;
|
$asset_install_date_display = $asset_install_date;
|
||||||
}
|
}
|
||||||
|
$asset_uri = nullable_htmlentities($row['asset_uri']);
|
||||||
|
$asset_uri_2 = nullable_htmlentities($row['asset_uri_2']);
|
||||||
$asset_notes = nullable_htmlentities($row['asset_notes']);
|
$asset_notes = nullable_htmlentities($row['asset_notes']);
|
||||||
$asset_created_at = nullable_htmlentities($row['asset_created_at']);
|
$asset_created_at = nullable_htmlentities($row['asset_created_at']);
|
||||||
$asset_vendor_id = intval($row['asset_vendor_id']);
|
$asset_vendor_id = intval($row['asset_vendor_id']);
|
||||||
@@ -355,6 +358,7 @@ if (isset($_GET['contact_id'])) {
|
|||||||
} 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_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_uri_2 = nullable_htmlentities($row['login_uri_2']);
|
||||||
$login_username = nullable_htmlentities(decryptLoginEntry($row['login_username']));
|
$login_username = nullable_htmlentities(decryptLoginEntry($row['login_username']));
|
||||||
if (empty($login_username)) {
|
if (empty($login_username)) {
|
||||||
$login_username_display = "-";
|
$login_username_display = "-";
|
||||||
@@ -461,11 +465,6 @@ if (isset($_GET['contact_id'])) {
|
|||||||
|
|
||||||
$seat_count = 0;
|
$seat_count = 0;
|
||||||
|
|
||||||
// Get Login
|
|
||||||
$login_id = intval($row['login_id']);
|
|
||||||
$login_username = nullable_htmlentities(decryptLoginEntry($row['login_username']));
|
|
||||||
$login_password = nullable_htmlentities(decryptLoginEntry($row['login_password']));
|
|
||||||
|
|
||||||
// Asset Licenses
|
// Asset Licenses
|
||||||
$asset_licenses_sql = mysqli_query($mysqli, "SELECT asset_id FROM software_assets WHERE software_id = $software_id");
|
$asset_licenses_sql = mysqli_query($mysqli, "SELECT asset_id FROM software_assets WHERE software_id = $software_id");
|
||||||
$asset_licenses_array = array();
|
$asset_licenses_array = array();
|
||||||
|
|||||||
@@ -18,6 +18,8 @@ if (isset($_GET['tags']) && is_array($_GET['tags']) && !empty($_GET['tags'])) {
|
|||||||
// Convert the sanitized tags into a comma-separated string
|
// Convert the sanitized tags into a comma-separated string
|
||||||
$sanitizedTagsString = implode(",", $sanitizedTags);
|
$sanitizedTagsString = implode(",", $sanitizedTags);
|
||||||
$tag_query = "AND tags.tag_id IN ($sanitizedTagsString)";
|
$tag_query = "AND tags.tag_id IN ($sanitizedTagsString)";
|
||||||
|
} else {
|
||||||
|
$tag_query = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
//Rebuild URL
|
//Rebuild URL
|
||||||
@@ -124,7 +126,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#bulkAssignTagsModal">
|
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#bulkAssignTagsModal">
|
||||||
<i class="fas fa-fw fa-tags mr-2"></i>Assign Tags
|
<i class="fas fa-fw fa-tags mr-2"></i>Assign Tags
|
||||||
</a>
|
</a>
|
||||||
<?php if ($_GET['archived']) { ?>
|
<?php if (isset($_GET['archived'])) { ?>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<button class="dropdown-item text-info"
|
<button class="dropdown-item text-info"
|
||||||
type="submit" form="bulkActions" name="bulk_unarchive_contacts">
|
type="submit" form="bulkActions" name="bulk_unarchive_contacts">
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
$folder_id_select = intval($row['folder_id']);
|
$folder_id_select = intval($row['folder_id']);
|
||||||
$folder_name_select = nullable_htmlentities($row['folder_name']);
|
$folder_name_select = nullable_htmlentities($row['folder_name']);
|
||||||
?>
|
?>
|
||||||
<option <?php if ($folder_id_select == $document_folder_id) echo "selected"; ?> value="<?php echo $folder_id_select ?>"><?php echo $folder_name_select; ?></option>
|
<option <?php if ($folder_id_select == $get_folder_id) echo "selected"; ?> value="<?php echo $folder_id_select ?>"><?php echo $folder_name_select; ?></option>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ if ($view == 1) {
|
|||||||
// Set Folder Location Var used when creating folders
|
// Set Folder Location Var used when creating folders
|
||||||
$folder_location = 1;
|
$folder_location = 1;
|
||||||
|
|
||||||
if ($get_folder_id == 0 && $_GET["q"]) {
|
if ($get_folder_id == 0 && isset($_GET["q"])) {
|
||||||
$sql = mysqli_query(
|
$sql = mysqli_query(
|
||||||
$mysqli,
|
$mysqli,
|
||||||
"SELECT SQL_CALC_FOUND_ROWS * FROM files
|
"SELECT SQL_CALC_FOUND_ROWS * FROM files
|
||||||
|
|||||||
@@ -18,6 +18,8 @@ if (isset($_GET['tags']) && is_array($_GET['tags']) && !empty($_GET['tags'])) {
|
|||||||
// Convert the sanitized tags into a comma-separated string
|
// Convert the sanitized tags into a comma-separated string
|
||||||
$sanitizedTagsString = implode(",", $sanitizedTags);
|
$sanitizedTagsString = implode(",", $sanitizedTags);
|
||||||
$tag_query = "AND tags.tag_id IN ($sanitizedTagsString)";
|
$tag_query = "AND tags.tag_id IN ($sanitizedTagsString)";
|
||||||
|
} else {
|
||||||
|
$tag_query = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
//Rebuild URL
|
//Rebuild URL
|
||||||
|
|||||||
@@ -145,9 +145,9 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
class="collapse mt-3
|
class="collapse mt-3
|
||||||
<?php
|
<?php
|
||||||
if (
|
if (
|
||||||
$_GET['dtf']
|
isset($_GET['dtf'])
|
||||||
|| $_GET['industry']
|
|| isset($_GET['industry'])
|
||||||
|| $_GET['referral']
|
|| isset($_GET['referral'])
|
||||||
|| (isset($_GET['tags']) && is_array($_GET['tags']))
|
|| (isset($_GET['tags']) && is_array($_GET['tags']))
|
||||||
|| $_GET['canned_date'] !== "custom" )
|
|| $_GET['canned_date'] !== "custom" )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ if (isset($_GET['account']) & !empty($_GET['account'])) {
|
|||||||
} else {
|
} else {
|
||||||
// Default - any
|
// Default - any
|
||||||
$account_query = '';
|
$account_query = '';
|
||||||
|
$account = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Vendor Filter
|
// Vendor Filter
|
||||||
@@ -22,6 +23,7 @@ if (isset($_GET['vendor']) & !empty($_GET['vendor'])) {
|
|||||||
} else {
|
} else {
|
||||||
// Default - any
|
// Default - any
|
||||||
$vendor_query = '';
|
$vendor_query = '';
|
||||||
|
$vendor = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Category Filter
|
// Category Filter
|
||||||
@@ -31,6 +33,7 @@ if (isset($_GET['category']) & !empty($_GET['category'])) {
|
|||||||
} else {
|
} else {
|
||||||
// Default - any
|
// Default - any
|
||||||
$category_query = '';
|
$category_query = '';
|
||||||
|
$category = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
//Rebuild URL
|
//Rebuild URL
|
||||||
@@ -107,7 +110,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="collapse mt-3 <?php if ($_GET['dtf'] || $_GET['canned_date'] !== "custom" || $_GET['account'] || $_GET['vendor'] || $_GET['category']) { echo "show"; } ?>" id="advancedFilter">
|
<div class="collapse mt-3 <?php if (isset($_GET['dtf']) || $_GET['canned_date'] !== "custom" || isset($_GET['account']) || isset($_GET['vendor']) || isset($_GET['category'])) { echo "show"; } ?>" id="advancedFilter">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ $real_overdue_amount = $total_overdue_amount - $total_overdue_partial_amount;
|
|||||||
$total_unpaid_amount = $total_sent_amount + $total_viewed_amount + $total_partial_amount;
|
$total_unpaid_amount = $total_sent_amount + $total_viewed_amount + $total_partial_amount;
|
||||||
$unpaid_count = $sent_count + $viewed_count + $partial_count;
|
$unpaid_count = $sent_count + $viewed_count + $partial_count;
|
||||||
|
|
||||||
|
$overdue_query = '';
|
||||||
//Invoice status from GET
|
//Invoice status from GET
|
||||||
if (isset($_GET['status']) && ($_GET['status']) == 'Draft') {
|
if (isset($_GET['status']) && ($_GET['status']) == 'Draft') {
|
||||||
$status_query = "invoice_status = 'Draft'";
|
$status_query = "invoice_status = 'Draft'";
|
||||||
|
|||||||
@@ -84,7 +84,7 @@
|
|||||||
<select class="form-control select2" name="account" required>
|
<select class="form-control select2" name="account" required>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$sql_accounts = mysqli_query($mysqli, "SELECT account_id, account_name, opening_balance, account_archived_at FROM accounts WHERE (account_archived_at > '$expense_created_at' OR account_archived_at IS NULL) ORDER BY account_archived_at ASC, account_name ASC");
|
$sql_accounts = mysqli_query($mysqli, "SELECT account_id, account_name, opening_balance, account_archived_at FROM accounts WHERE (account_archived_at > '$recurring_expense_created_at' OR account_archived_at IS NULL) ORDER BY account_archived_at ASC, account_name ASC");
|
||||||
while ($row = mysqli_fetch_array($sql_accounts)) {
|
while ($row = mysqli_fetch_array($sql_accounts)) {
|
||||||
$account_id_select = intval($row['account_id']);
|
$account_id_select = intval($row['account_id']);
|
||||||
$account_name_select = nullable_htmlentities($row['account_name']);
|
$account_name_select = nullable_htmlentities($row['account_name']);
|
||||||
@@ -129,7 +129,7 @@
|
|||||||
<select class="form-control select2" name="vendor" required>
|
<select class="form-control select2" name="vendor" required>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$sql_select = mysqli_query($mysqli, "SELECT vendor_id, vendor_name FROM vendors WHERE vendor_client_id = 0 AND vendor_template = 0 AND (vendor_archived_at > '$expense_created_at' OR vendor_archived_at IS NULL) ORDER BY vendor_name ASC");
|
$sql_select = mysqli_query($mysqli, "SELECT vendor_id, vendor_name FROM vendors WHERE vendor_client_id = 0 AND vendor_template = 0 AND (vendor_archived_at > '$recurring_expense_created_at' OR vendor_archived_at IS NULL) ORDER BY vendor_name ASC");
|
||||||
while ($row = mysqli_fetch_array($sql_select)) {
|
while ($row = mysqli_fetch_array($sql_select)) {
|
||||||
$vendor_id_select = intval($row['vendor_id']);
|
$vendor_id_select = intval($row['vendor_id']);
|
||||||
$vendor_name_select = nullable_htmlentities($row['vendor_name']);
|
$vendor_name_select = nullable_htmlentities($row['vendor_name']);
|
||||||
@@ -174,7 +174,7 @@
|
|||||||
<select class="form-control select2" name="category" required>
|
<select class="form-control select2" name="category" required>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$sql_select = mysqli_query($mysqli, "SELECT category_id, category_name FROM categories WHERE category_type = 'Expense' AND (category_archived_at > '$expense_created_at' OR category_archived_at IS NULL) ORDER BY category_name ASC");
|
$sql_select = mysqli_query($mysqli, "SELECT category_id, category_name FROM categories WHERE category_type = 'Expense' AND (category_archived_at > '$recurring_expense_created_at' OR category_archived_at IS NULL) ORDER BY category_name ASC");
|
||||||
while ($row = mysqli_fetch_array($sql_select)) {
|
while ($row = mysqli_fetch_array($sql_select)) {
|
||||||
$category_id_select = intval($row['category_id']);
|
$category_id_select = intval($row['category_id']);
|
||||||
$category_name_select = nullable_htmlentities($row['category_name']);
|
$category_name_select = nullable_htmlentities($row['category_name']);
|
||||||
|
|||||||
@@ -43,8 +43,8 @@ require_once "inc_all_admin.php";
|
|||||||
<?php if ($config_module_enable_accounting) { ?>
|
<?php if ($config_module_enable_accounting) { ?>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="custom-control custom-switch">
|
<div class="custom-control custom-switch">
|
||||||
<input type="checkbox" class="custom-control-input" name="config_ticket_default_billable" <?php if ($config_ticket_default_billable == 1) { echo "checked"; } ?> value="1" id="ticketBillableSwitch<?php echo $ticket_id; ?>">
|
<input type="checkbox" class="custom-control-input" name="config_ticket_default_billable" <?php if ($config_ticket_default_billable == 1) { echo "checked"; } ?> value="1" id="ticketBillableSwitch">
|
||||||
<label class="custom-control-label" for="ticketBillableSwitch<?php echo $ticket_id; ?>">Default to Billable <small class="text-secondary">(This will check the billable box on all new tickets)</small></label>
|
<label class="custom-control-label" for="ticketBillableSwitch">Default to Billable <small class="text-secondary">(This will check the billable box on all new tickets)</small></label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ if (isset($_GET['account_from']) & !empty($_GET['account_from'])) {
|
|||||||
} else {
|
} else {
|
||||||
// Default - any
|
// Default - any
|
||||||
$account_from_query = '';
|
$account_from_query = '';
|
||||||
|
$account_from = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Account Transfer To Filter
|
// Account Transfer To Filter
|
||||||
@@ -21,6 +22,7 @@ if (isset($_GET['account_to']) & !empty($_GET['account_to'])) {
|
|||||||
} else {
|
} else {
|
||||||
// Default - any
|
// Default - any
|
||||||
$account_to_query = '';
|
$account_to_query = '';
|
||||||
|
$account_to = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -64,7 +66,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="collapse mt-3 <?php if (!empty($_GET['dtf']) || $_GET['canned_date'] !== "custom" || $_GET['account_from'] || $_GET['account_to'] ) { echo "show"; } ?>" id="advancedFilter">
|
<div class="collapse mt-3 <?php if (!empty($_GET['dtf']) || $_GET['canned_date'] !== "custom" || isset($_GET['account_from']) || isset($_GET['account_to']) ) { echo "show"; } ?>" id="advancedFilter">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@@ -118,7 +120,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Account To</label>
|
<label>Account To</label>
|
||||||
<select class="form-control select2" name="account_to" onchange="this.form.submit()">
|
<select class="form-control select2" name="account_to" onchange="this.form.submit()">
|
||||||
<option value="" <?php if ($account == "") { echo "selected"; } ?>>- All Accounts -</option>
|
<option value="" <?php if ($account_to == "") { echo "selected"; } ?>>- All Accounts -</option>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$sql_accounts_to_filter = mysqli_query($mysqli, "SELECT * FROM accounts WHERE account_archived_at IS NULL ORDER BY account_name ASC");
|
$sql_accounts_to_filter = mysqli_query($mysqli, "SELECT * FROM accounts WHERE account_archived_at IS NULL ORDER BY account_name ASC");
|
||||||
|
|||||||
Reference in New Issue
Block a user