Merge pull request #604 from wrongecho/misc-tidy-2

Tidy
This commit is contained in:
wrongecho
2023-02-05 08:40:33 +00:00
committed by GitHub
129 changed files with 11002 additions and 11255 deletions
+6 -7
View File
@@ -1,4 +1,6 @@
<?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']));
@@ -97,14 +99,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("account_add_modal.php");
include("footer.php");
?>
require_once("account_add_modal.php");
require_once("footer.php");
+2 -8
View File
@@ -55,10 +55,8 @@
$calendar_color = htmlentities($row['calendar_color']);
?>
<option <?php if ($config_default_calendar == $calendar_id) { echo "selected"; } ?> data-content="<i class='fa fa-circle mr-2' style='color:<?php echo $calendar_color; ?>;'></i> <?php echo $calendar_name; ?>" value="<?php echo $calendar_id; ?>"><?php echo $calendar_name; ?></option>
<?php } ?>
<?php
}
?>
</select>
<div class="input-group-append">
<button type="button" class="btn btn-dark" data-toggle="modal" data-target="#addQuickCalendarModal"><i class="fas fa-fw fa-plus"></i></button>
@@ -106,9 +104,7 @@
<div class="tab-pane fade" id="pills-attendees">
<?php if (isset($client_id)) { ?>
<input type="hidden" name="client" value="<?php echo $client_id; ?>">
<?php } else{ ?>
<div class="form-group">
@@ -129,9 +125,7 @@
?>
<option value="<?php echo $client_id; ?>"><?php echo $client_name; ?></option>
<?php
}
?>
<?php } ?>
</select>
</div>
</div>
+3 -8
View File
@@ -58,9 +58,7 @@
?>
<option data-content="<i class='fa fa-circle mr-2' style='color:<?php echo $calendar_color_select; ?>;'></i> <?php echo $calendar_name_select; ?>"<?php if ($calendar_id == $calendar_id_select) { echo "selected"; } ?> value="<?php echo $calendar_id_select; ?>"><?php echo $calendar_name_select; ?></option>
<?php
}
?>
<?php } ?>
</select>
</div>
</div>
@@ -105,9 +103,7 @@
<div class="tab-pane fade" id="pills-attendees<?php echo $event_id; ?>">
<?php if (isset($_GET['client_id'])) { ?>
<input type="hidden" name="client" value="<?php echo $client_id; ?>">
<?php } else { ?>
<div class="form-group">
@@ -128,9 +124,8 @@
?>
<option <?php if ($client_id == $client_id_select) { echo "selected"; } ?> value="<?php echo $client_id_select; ?>"><?php echo $client_name_select; ?></option>
<?php
}
?>
<?php } ?>
</select>
</div>
</div>
+8 -23
View File
@@ -1,26 +1,22 @@
<?php include("inc_all.php"); ?>
<link href='plugins/fullcalendar/main.min.css' rel='stylesheet' />
<?php
require_once("inc_all.php");
if (isset($_GET['calendar_id'])) {
$calendar_selected_id = intval($_GET['calendar_id']);
}
?>
<link href='plugins/fullcalendar/main.min.css' rel='stylesheet' />
<div id='calendar'></div>
<?php
include("calendar_event_add_modal.php");
include("calendar_add_modal.php");
include("category_quick_add_modal.php");
require_once("calendar_event_add_modal.php");
require_once("calendar_add_modal.php");
require_once("category_quick_add_modal.php");
?>
<?php
//loop through IDs and create a modal for each
$sql = mysqli_query($mysqli,"SELECT * FROM events LEFT JOIN calendars ON event_calendar_id = calendar_id WHERE calendars.company_id = $session_company_id");
while ($row = mysqli_fetch_array($sql)) {
@@ -35,13 +31,13 @@ while ($row = mysqli_fetch_array($sql)) {
$calendar_color = htmlentities($row['calendar_color']);
$client_id = $row['event_client_id'];
include("calendar_event_edit_modal.php");
require("calendar_event_edit_modal.php");
}
?>
<?php include("footer.php"); ?>
<?php require_once("footer.php"); ?>
<script src='plugins/fullcalendar/main.min.js'></script>
@@ -86,9 +82,7 @@ while ($row = mysqli_fetch_array($sql)) {
echo "{ id: $event_id, title: $event_title, start: $event_start, end: $event_end, color: $calendar_color },";
}
?>
<?php
//Invoices Created
$sql = mysqli_query($mysqli,"SELECT * FROM clients LEFT JOIN invoices ON client_id = invoice_client_id WHERE clients.company_id = $session_company_id");
while ($row = mysqli_fetch_array($sql)) {
@@ -98,9 +92,7 @@ while ($row = mysqli_fetch_array($sql)) {
echo "{ id: $event_id, title: $event_title, start: $event_start, color: 'blue', url: 'invoice.php?invoice_id=$event_id' },";
}
?>
<?php
//Quotes Created
$sql = mysqli_query($mysqli,"SELECT * FROM clients LEFT JOIN quotes ON client_id = quote_client_id WHERE clients.company_id = $session_company_id");
while ($row = mysqli_fetch_array($sql)) {
@@ -110,9 +102,7 @@ while ($row = mysqli_fetch_array($sql)) {
echo "{ id: $event_id, title: $event_title, start: $event_start, color: 'purple', url: 'quote.php?quote_id=$event_id' },";
}
?>
<?php
//Tickets Created
$sql = mysqli_query($mysqli,"SELECT * FROM clients LEFT JOIN tickets ON client_id = ticket_client_id WHERE clients.company_id = $session_company_id");
while ($row = mysqli_fetch_array($sql)) {
@@ -124,9 +114,6 @@ while ($row = mysqli_fetch_array($sql)) {
}
?>
<?php
//Vendors Added Created
$sql = mysqli_query($mysqli,"SELECT * FROM clients LEFT JOIN vendors ON client_id = vendor_client_id WHERE vendor_template = 0 AND clients.company_id = $session_company_id");
while ($row = mysqli_fetch_array($sql)) {
@@ -136,9 +123,7 @@ while ($row = mysqli_fetch_array($sql)) {
echo "{ id: $event_id, title: $event_title, start: $event_start, color: 'brown', url: 'client_vendors.php?client_id=$event_id' },";
}
?>
<?php
//Clients Added
$sql = mysqli_query($mysqli,"SELECT * FROM clients WHERE clients.company_id = $session_company_id");
while ($row = mysqli_fetch_array($sql)) {
+6 -8
View File
@@ -1,4 +1,6 @@
<?php require_once("inc_all_settings.php");
<?php
require_once("inc_all_settings.php");
if (isset($_GET['category'])) {
$category = strip_tags(mysqli_real_escape_string($mysqli,$_GET['category']));
@@ -119,14 +121,10 @@ $colors_diff = array_diff($colors_array, $colors_used_array);
</tbody>
</table>
</div>
<?php include("pagination.php"); ?>
<?php require_once("pagination.php"); ?>
</div>
</div>
<?php
include("category_add_modal.php");
include("footer.php");
?>
require_once("category_add_modal.php");
require_once("footer.php");
+2 -4
View File
@@ -22,9 +22,7 @@
<?php
foreach ($colors_diff as $color) {
?>
foreach ($colors_diff as $color) { ?>
<div class="col-3 mb-3">
<div class="form-check">
@@ -34,8 +32,8 @@
</label>
</div>
</div>
<?php } ?>
</div>
</div>
+2 -3
View File
@@ -30,8 +30,7 @@
<?php
foreach($colors_diff as $color) {
?>
foreach($colors_diff as $color) { ?>
<div class="col-3 mb-3">
<div class="form-check">
<input class="form-check-input" type="radio" name="color" value="<?php echo $color; ?>">
@@ -40,8 +39,8 @@
</label>
</div>
</div>
<?php } ?>
</div>
</div>
+1 -3
View File
@@ -22,10 +22,8 @@ if (!isset($_SESSION['logged']) || !$_SESSION['logged']) {
exit;
}
// SESSION FINGERPRINT
// User IP & UA
$session_ip = strip_tags(mysqli_real_escape_string($mysqli, getIP()));
// User agent
$session_user_agent = strip_tags(mysqli_real_escape_string($mysqli, $_SERVER['HTTP_USER_AGENT']));
$session_user_id = $_SESSION['user_id'];
+3 -9
View File
@@ -66,13 +66,10 @@
$referral_sql = mysqli_query($mysqli,"SELECT * FROM categories WHERE category_type = 'Referral' AND category_archived_at IS NULL AND company_id = $session_company_id ORDER BY category_name ASC");
while ($row = mysqli_fetch_array($referral_sql)) {
$referral = htmlentities($row['category_name']);
?>
$referral = htmlentities($row['category_name']); ?>
<option><?php echo $referral; ?></option>
<?php } ?>
<?php
}
?>
</select>
<div class="input-group-append">
<button type="button" class="btn btn-secondary" data-toggle="modal" data-target="#addQuickReferralModal"><i class="fas fa-fw fa-plus"></i></button>
@@ -258,7 +255,6 @@
</div>
<?php } else { ?>
<input type="hidden" name="currency_code" value="<?php echo $session_company_currency; ?>">
<input type="hidden" name="net_terms" value="0">
<?php } ?>
@@ -295,9 +291,7 @@
</div>
</li>
<?php
}
?>
<?php } ?>
</ul>
+5 -12
View File
@@ -128,10 +128,8 @@
$location_name = htmlentities($row['location_name']);
?>
<option value="<?php echo $location_id; ?>"><?php echo $location_name; ?></option>
<?php } ?>
<?php
}
?>
</select>
</div>
</div>
@@ -154,9 +152,8 @@
?>
<option value="<?php echo $contact_id; ?>"><?php echo $contact_name; ?></option>
<?php
}
?>
<?php } ?>
</select>
</div>
</div>
@@ -196,9 +193,7 @@
?>
<option value="<?php echo $network_id; ?>"><?php echo $network_name; ?> - <?php echo $network; ?></option>
<?php
}
?>
<?php } ?>
</select>
</div>
</div>
@@ -244,9 +239,7 @@
?>
<option value="<?php echo $vendor_id; ?>"><?php echo $vendor_name; ?></option>
<?php
}
?>
<?php } ?>
</select>
</div>
</div>
+4 -13
View File
@@ -1,4 +1,3 @@
<div class="modal" id="copyAssetModal<?php echo $asset_id; ?>" tabindex="-1">
<div class="modal-dialog">
<div class="modal-content bg-dark">
@@ -126,10 +125,8 @@
$location_name_select = htmlentities($row['location_name']);
?>
<option <?php if ($asset_location_id == $location_id_select) { echo "selected"; } ?> value="<?php echo $location_id_select; ?>"><?php echo $location_name_select; ?></option>
<?php } ?>
<?php
}
?>
</select>
</div>
</div>
@@ -151,10 +148,8 @@
$contact_name = htmlentities($row['contact_name']);
?>
<option value="<?php echo $contact_id; ?>"><?php echo $contact_name; ?></option>
<?php } ?>
<?php
}
?>
</select>
</div>
</div>
@@ -193,9 +188,7 @@
?>
<option <?php if ($asset_network_id == $network_id_select) { echo "selected"; } ?> value="<?php echo $network_id_select; ?>"><?php echo $network_name_select; ?> - <?php echo $network_select; ?></option>
<?php
}
?>
<?php } ?>
</select>
</div>
</div>
@@ -241,9 +234,7 @@
?>
<option <?php if ($asset_vendor_id == $vendor_id_select) { echo "selected"; } ?> value="<?php echo $vendor_id_select; ?>"><?php echo $vendor_name_select; ?></option>
<?php
}
?>
<?php } ?>
</select>
</div>
</div>
+1 -3
View File
@@ -18,9 +18,7 @@
<i class="fas fa-fw fa-document text-secondary"></i>
<?php echo $related_document_name; ?> <a href="client_documents.php?q=<?php echo $related_document_name; ?>"><?php echo $related_document_name; ?></a>
</p>
<?php
}
?>
<?php } ?>
</div>
<div class="modal-footer bg-white">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button>
+4 -12
View File
@@ -128,9 +128,7 @@
?>
<option <?php if ($asset_location_id == $location_id_select) { echo "selected"; } ?> value="<?php echo $location_id_select; ?>"><?php echo $location_name_select; ?></option>
<?php
}
?>
<?php } ?>
</select>
</div>
</div>
@@ -154,9 +152,7 @@
<?php echo $contact_name_select; ?> <?php if (!empty($row['contact_archived_at'])) { echo " (Archived " . date('Y-m-d',strtotime($row['contact_archived_at'])) .")"; } ?>
</option>
<?php
}
?>
<?php } ?>
</select>
</div>
</div>
@@ -194,9 +190,7 @@
?>
<option <?php if ($asset_network_id == $network_id_select) { echo "selected"; } ?> value="<?php echo $network_id_select; ?>"><?php echo $network_name_select; ?> - <?php echo $network_select; ?></option>
<?php
}
?>
<?php } ?>
</select>
</div>
</div>
@@ -242,9 +236,7 @@
?>
<option <?php if ($asset_vendor_id == $vendor_id_select) { echo "selected"; } ?> value="<?php echo $vendor_id_select; ?>"><?php echo $vendor_name_select; ?></option>
<?php
}
?>
<?php } ?>
</select>
</div>
</div>
+1 -4
View File
@@ -83,10 +83,7 @@
?>
<option value="<?php echo $network_id; ?>"><?php echo $network_name; ?> - <?php echo $network; ?></option>
<?php
}
?>
<?php } ?>
</select>
</div>
</div>
+1 -3
View File
@@ -24,9 +24,7 @@
<i class="fas fa-fw fa-ticket-alt"></i>
Ticket: <a href="ticket.php?ticket_id=<?php echo $ticket_id; ?>"><?php echo "$ticket_prefix$ticket_number" ?></a> on <?php echo $ticket_created_at; ?> <?php echo $ticket_subject; ?>
</p>
<?php
}
?>
<?php } ?>
</div>
<div class="modal-footer bg-white">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button>
+11 -41
View File
@@ -97,23 +97,19 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
if ($workstation_count > 0) { ?>
<a href="?<?php echo $url_query_strings_sb; ?>&type=workstation" class="btn <?php if ($_GET['type'] == 'workstation') { echo 'btn-primary'; } else { echo 'btn-default'; } ?>"><i class="fa fa-fw fa-desktop"></i> Workstations <span class="right badge badge-light"><?php echo $workstation_count; ?></span></a>
<?php
} ?>
<?php
}
if ($server_count > 0) { ?>
<a href="?<?php echo $url_query_strings_sb; ?>&type=server" class="btn <?php if ($_GET['type'] == 'server') { echo 'btn-primary'; } else { echo 'btn-default'; } ?>"><i class="fa fa-fw fa-server"></i> Servers <span class="right badge badge-light"><?php echo $server_count; ?></span></a>
<?php
} ?>
<?php
}
if ($virtual_count > 0) { ?>
<a href="?<?php echo $url_query_strings_sb; ?>&type=virtual" class="btn <?php if ($_GET['type'] == 'virtual') { echo 'btn-primary'; } else { echo 'btn-default'; } ?>"><i class="fa fa-fw fa-cloud"></i> Virtual <span class="right badge badge-light"><?php echo $virtual_count; ?></span></a>
<?php
} ?>
<?php
}
if ($network_count > 0) { ?>
<a href="?<?php echo $url_query_strings_sb; ?>&type=network" class="btn <?php if ($_GET['type'] == 'network') { echo 'btn-primary'; } else { echo 'btn-default'; } ?>"><i class="fa fa-fw fa-network-wired"></i> Network <span class="right badge badge-light"><?php echo $network_count; ?></span></a>
<?php
} ?>
<?php
}
if ($network_count > 0) { ?>
<a href="?<?php echo $url_query_strings_sb; ?>&type=other" class="btn <?php if ($_GET['type'] == 'other') { echo 'btn-primary'; } else { echo 'btn-default'; } ?>"><i class="fa fa-fw fa-tag"></i> Other <span class="right badge badge-light"><?php echo $other_count; ?></span></a>
<?php
@@ -138,14 +134,14 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
<th><a class="text-secondary" href="?<?php echo $url_query_strings_sb; ?>&sb=asset_name&o=<?php echo $disp; ?>">Name</a></th>
<?php if ($_GET['type'] !== 'virtual' && $_GET['type'] !== 'servers') { ?>
<th><a class="text-secondary" href="?<?php echo $url_query_strings_sb; ?>&sb=asset_type&o=<?php echo $disp; ?>">Type</a></th>
<?php } ?>
<?php if ($_GET['type'] !== 'virtual') { ?>
<?php }
if ($_GET['type'] !== 'virtual') { ?>
<th><a class="text-secondary" href="?<?php echo $url_query_strings_sb; ?>&sb=asset_make&o=<?php echo $disp; ?>">Make/Model</a></th>
<?php } ?>
<?php if ($_GET['type'] !== 'virtual') { ?>
<?php }
if ($_GET['type'] !== 'virtual') { ?>
<th><a class="text-secondary" href="?<?php echo $url_query_strings_sb; ?>&sb=asset_serial&o=<?php echo $disp; ?>">Serial Number</a></th>
<?php } ?>
<?php if ($_GET['type'] !== 'network' && $_GET['type'] !== 'other') { ?>
<?php }
if ($_GET['type'] !== 'network' && $_GET['type'] !== 'other') { ?>
<th><a class="text-secondary" href="?<?php echo $url_query_strings_sb; ?>&sb=asset_os&o=<?php echo $disp; ?>">Operating System</a></th>
<?php } ?>
<th><a class="text-secondary" href="?<?php echo $url_query_strings_sb; ?>&sb=asset_install_date&o=<?php echo $disp; ?>">Install Date</a></th>
@@ -201,33 +197,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
$asset_contact_id = $row['asset_contact_id'];
$asset_network_id = $row['asset_network_id'];
if ($asset_type == 'Laptop') {
$device_icon = "laptop";
} elseif ($asset_type == 'Desktop') {
$device_icon = "desktop";
} elseif ($asset_type == 'Server') {
$device_icon = "server";
} elseif ($asset_type == 'Printer') {
$device_icon = "print";
} elseif ($asset_type == 'Camera') {
$device_icon = "video";
} elseif ($asset_type == 'Switch' || $asset_type == 'Firewall/Router') {
$device_icon = "network-wired";
} elseif ($asset_type == 'Access Point') {
$device_icon = "wifi";
} elseif ($asset_type == 'Phone') {
$device_icon = "phone";
} elseif ($asset_type == 'Mobile Phone') {
$device_icon = "mobile-alt";
} elseif ($asset_type == 'Tablet') {
$device_icon = "tablet-alt";
} elseif ($asset_type == 'TV') {
$device_icon = "tv";
} elseif ($asset_type == 'Virtual Machine') {
$device_icon = "cloud";
} else {
$device_icon = "tag";
}
$device_icon = getAssetIcon($asset_type);
$contact_name = $row['contact_name'];
if (empty($contact_name)) {
+1 -1
View File
@@ -1,4 +1,4 @@
<?php include("inc_all_client.php"); ?>
<?php require_once("inc_all_client.php"); ?>
<?php
+1 -3
View File
@@ -126,10 +126,8 @@
$location_name = htmlentities($row['location_name']);
?>
<option value="<?php echo $location_id; ?>"><?php echo $location_name; ?></option>
<?php } ?>
<?php
}
?>
</select>
</div>
</div>
+26 -45
View File
@@ -1,4 +1,6 @@
<?php include("inc_all_client.php");
<?php
require_once("inc_all_client.php");
if (isset($_GET['contact_id'])) {
$contact_id = intval($_GET['contact_id']);
@@ -39,7 +41,7 @@ if (isset($_GET['contact_id'])) {
$auth_method = htmlentities($row['contact_auth_method']);
// Related Assets Query
$sql_related_assets = mysqli_query($mysqli, "SELECT * FROM assets WHERE asset_contact_id = $contact_id AND company_id = $session_company_id ORDER BY asset_name DESC");
$sql_related_assets = mysqli_query($mysqli, "SELECT * FROM assets LEFT JOIN logins ON logins.login_asset_id = assets.asset_id WHERE asset_contact_id = $contact_id AND assets.company_id = $session_company_id ORDER BY asset_name DESC");
$asset_count = mysqli_num_rows($sql_related_assets);
// Related Logins Query
@@ -82,14 +84,14 @@ if (isset($_GET['contact_id'])) {
<hr>
<?php if (!empty($location_name)) { ?>
<div class="mb-1"><i class="fa fa-fw fa-map-marker-alt text-secondary mr-3"></i><?php echo $location_name_display; ?></div>
<?php } ?>
<?php if (!empty($contact_email)) { ?>
<?php }
if (!empty($contact_email)) { ?>
<div><i class="fa fa-fw fa-envelope text-secondary mr-3"></i><a href='mailto:<?php echo $contact_email; ?>'><?php echo $contact_email; ?></a><button class='btn btn-sm clipboardjs' data-clipboard-text='<?php echo $contact_email; ?>'><i class='far fa-copy text-secondary'></i></button></div>
<?php } ?>
<?php if (!empty($contact_phone)) { ?>
<?php }
if (!empty($contact_phone)) { ?>
<div class="mb-2"><i class="fa fa-fw fa-phone text-secondary mr-3"></i><?php echo "$contact_phone $contact_extension"; ?></div>
<?php } ?>
<?php if (!empty($contact_mobile)) { ?>
<?php }
if (!empty($contact_mobile)) { ?>
<div class="mb-2"><i class="fa fa-fw fa-mobile-alt text-secondary mr-3"></i><?php echo $contact_mobile; ?></div>
<?php } ?>
<div class="mb-2"><i class="fa fa-fw fa-clock text-secondary mr-3"></i><?php echo date('Y-m-d',strtotime($contact_created_at)); ?></div>
@@ -98,7 +100,7 @@ if (isset($_GET['contact_id'])) {
<i class="fas fa-fw fa-user-edit"></i> Edit
</button>
<?php include("client_contact_edit_modal.php"); ?>
<?php require_once("client_contact_edit_modal.php"); ?>
</div>
</div>
@@ -195,33 +197,12 @@ if (isset($_GET['contact_id'])) {
$asset_location_id = $row['asset_location_id'];
$asset_network_id = $row['asset_network_id'];
$asset_contact_id = $row['asset_contact_id'];
if ($asset_type == 'Laptop') {
$device_icon = "laptop";
} elseif ($asset_type == 'Desktop') {
$device_icon = "desktop";
} elseif ($asset_type == 'Server') {
$device_icon = "server";
} elseif ($asset_type == 'Printer') {
$device_icon = "print";
} elseif ($asset_type == 'Camera') {
$device_icon = "video";
} elseif ($asset_type == 'Switch' || $asset_type == 'Firewall/Router') {
$device_icon = "network-wired";
} elseif ($asset_type == 'Access Point') {
$device_icon = "wifi";
} elseif ($asset_type == 'Phone') {
$device_icon = "phone";
} elseif ($asset_type == 'Mobile Phone') {
$device_icon = "mobile-alt";
} elseif ($asset_type == 'Tablet') {
$device_icon = "tablet-alt";
} elseif ($asset_type == 'TV') {
$device_icon = "tv";
} elseif ($asset_type == 'Virtual Machine') {
$device_icon = "cloud";
} else {
$device_icon = "tag";
}
$login_id = $row['login_id'];
$login_username = htmlentities(decryptLoginEntry($row['login_username']));
$login_password = htmlentities(decryptLoginEntry($row['login_password']));
$device_icon = getAssetIcon($asset_type);
?>
<tr>
@@ -254,10 +235,9 @@ if (isset($_GET['contact_id'])) {
<?php
include("client_asset_edit_modal.php");
include("client_asset_copy_modal.php");
//include("client_asset_tickets_modal.php");
include("client_asset_interface_add_modal.php");
require("client_asset_edit_modal.php");
require("client_asset_copy_modal.php");
require("client_asset_interface_add_modal.php");
}
@@ -352,7 +332,7 @@ if (isset($_GET['contact_id'])) {
<?php
include("client_login_edit_modal.php");
require("client_login_edit_modal.php");
}
?>
@@ -444,7 +424,7 @@ if (isset($_GET['contact_id'])) {
<?php
include("client_software_edit_modal.php");
require("client_software_edit_modal.php");
}
?>
@@ -554,7 +534,7 @@ if (isset($_GET['contact_id'])) {
<?php
include("share_modal.php");
require_once("share_modal.php");
?>
@@ -564,7 +544,7 @@ if (isset($_GET['contact_id'])) {
function updateContactNotes(contact_id) {
var notes = document.getElementById("contactNotes").value;
// Send a POST request to ajax.php as ajax.php with data client_set_notes=true, client_id=NUM, notes=NOTES
// Send a POST request to ajax.php as ajax.php with data contact_set_notes=true, contact_id=NUM, notes=NOTES
jQuery.post(
"ajax.php",
{
@@ -576,4 +556,5 @@ function updateContactNotes(contact_id) {
}
</script>
<?php include("footer.php"); ?>
<?php
require_once("footer.php");
+4 -12
View File
@@ -45,9 +45,7 @@
<li><?php echo $asset_name; ?></li>
<?php
}
?>
<?php } ?>
</ul>
</div>
@@ -71,9 +69,7 @@
<li><?php echo "$login_name - $login_username"; ?></li>
<?php
}
?>
<?php } ?>
</ul>
</div>
@@ -92,9 +88,7 @@
<li><?php echo "$software_name - $software_type"; ?></li>
<?php
}
?>
<?php } ?>
</ul>
</div>
@@ -113,9 +107,7 @@
<li><a href="ticket.php?ticket_id=<?=$ticket_id ?>"><?php echo "[$ticket_prefix$ticket_number] - $ticket_subject"; ?></a></li>
<?php
}
?>
<?php } ?>
</ul>
</div>
+1 -3
View File
@@ -128,10 +128,8 @@
$location_name_select = htmlentities($row['location_name']);
?>
<option <?php if ($contact_location_id == $location_id_select) { echo "selected"; } ?> value="<?php echo $location_id_select; ?>"><?php echo $location_name_select; ?></option>
<?php } ?>
<?php
}
?>
</select>
</div>
</div>
+9 -11
View File
@@ -1,7 +1,7 @@
<?php include("inc_all_client.php"); ?>
<?php
require_once("inc_all_client.php");
if (isset($_GET['q'])) {
$q = strip_tags(mysqli_real_escape_string($mysqli,$_GET['q']));
//Phone Numbers
@@ -174,6 +174,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
<i class="fa fa-circle fa-stack-2x text-secondary"></i>
<span class="fa fa-stack-1x text-white"><?php echo $contact_initials; ?></span>
</span>
<br>
<?php } ?>
@@ -209,7 +210,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
<?php
include("client_contact_edit_modal.php");
require("client_contact_edit_modal.php");
}
@@ -218,16 +219,13 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
</tbody>
</table>
</div>
<?php include("pagination.php"); ?>
<?php require_once("pagination.php"); ?>
</div>
</div>
<?php
include("client_contact_add_modal.php");
include("client_contact_invite_modal.php");
include("client_contact_import_modal.php");
?>
<?php include("footer.php"); ?>
require_once("client_contact_add_modal.php");
require_once("client_contact_invite_modal.php");
require_once("client_contact_import_modal.php");
require_once("footer.php");
+1 -11
View File
@@ -1,14 +1,3 @@
<script>
function validateClientNameDelete(client_id) {
if (document.getElementById("clientNameProvided" + client_id).value === document.getElementById("clientName" + client_id).value) {
document.getElementById("clientDeleteButton" + client_id).className = "btn btn-danger btn-lg px-5";
}
else{
document.getElementById("clientDeleteButton" + client_id).className = "btn btn-danger btn-lg px-5 disabled";
}
}
</script>
<div class="modal" id="deleteClientModal<?php echo $client_id; ?>" tabindex="-1">
<div class="modal-dialog">
<div class="modal-content">
@@ -28,3 +17,4 @@
</div>
</div>
</div>
<script src="js/client_delete_confirm.js"></script>
+1 -1
View File
@@ -1,4 +1,4 @@
<?php include("inc_all_client.php"); ?>
<?php require_once("inc_all_client.php"); ?>
<?php
+1 -1
View File
@@ -1,4 +1,4 @@
<?php include("inc_all_client.php"); ?>
<?php require_once("inc_all_client.php"); ?>
<?php
+1 -1
View File
@@ -1,4 +1,4 @@
<?php include("inc_all_client.php"); ?>
<?php require_once("inc_all_client.php"); ?>
<?php
+13 -15
View File
@@ -1,7 +1,7 @@
<?php include("inc_all_client.php"); ?>
<?php
require_once("inc_all_client.php");
// Folder
if (!empty($_GET['folder_id'])) {
$folder = intval($_GET['folder_id']);
@@ -99,9 +99,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
<?php
if ($get_folder_id == $folder_id) { ?>
<i class="fas fa-fw fa-folder-open"></i>
<?php
}else{
?>
<?php } else { ?>
<i class="fas fa-fw fa-folder"></i>
<?php } ?>
@@ -126,12 +124,12 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
</li>
<?php
include("client_document_folder_rename_modal.php");
require("client_document_folder_rename_modal.php");
}
?>
</ul>
<?php include("client_document_folder_add_modal.php"); ?>
<?php require_once("client_document_folder_add_modal.php"); ?>
</div>
<div class="col-md-9">
@@ -198,13 +196,13 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
<?php } ?>
</div>
</div>
<?php include("client_document_view_modal.php"); ?>
<?php require("client_document_view_modal.php"); ?>
</td>
</tr>
<?php
include("client_document_edit_modal.php");
require("client_document_edit_modal.php");
}
?>
@@ -213,15 +211,15 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
</table>
<br>
</div>
<?php include("pagination.php"); ?>
<?php require_once("pagination.php"); ?>
</div>
</div>
</div>
</div>
<?php include("share_modal.php"); ?>
<?php include("client_document_add_modal.php"); ?>
<?php include("client_document_add_from_template_modal.php"); ?>
<?php include("footer.php"); ?>
<?php
require_once("share_modal.php");
require_once("client_document_add_modal.php");
require_once("client_document_add_from_template_modal.php");
require_once("footer.php");
+2 -8
View File
@@ -37,10 +37,7 @@
$vendor_name = htmlentities($row['vendor_name']);
?>
<option value="<?php echo $vendor_id; ?>"><?php echo $vendor_name; ?></option>
<?php
}
?>
<?php } ?>
</select>
</div>
</div>
@@ -61,10 +58,7 @@
$vendor_name = htmlentities($row['vendor_name']);
?>
<option value="<?php echo $vendor_id; ?>"><?php echo $vendor_name; ?></option>
<?php
}
?>
<?php } ?>
</select>
</div>
</div>
+7 -85
View File
@@ -1,7 +1,7 @@
<?php include("inc_all_client.php"); ?>
<?php
require_once("inc_all_client.php");
if (!empty($_GET['sb'])) {
$sb = strip_tags(mysqli_real_escape_string($mysqli,$_GET['sb']));
} else {
@@ -111,90 +111,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>
<script src="js/domain_edit_modal.js"></script>
<?php
include("client_domain_edit_modal.php");
include("client_domain_add_modal.php");
?>
<script>
function populateDomainEditModal(client_id, domain_id) {
// Send a GET request to post.php as post.php?domain_get_json_details=true&client_id=NUM&domain_id=NUM
jQuery.get(
"ajax.php",
{domain_get_json_details: 'true', client_id: client_id, domain_id: domain_id},
function(data) {
// If we get a response from post.php, parse it as JSON
const response = JSON.parse(data);
// Access the domain info (one), registrars (multiple) and webhosts (multiple)
const domain = response.domain[0];
const vendors = response.vendors;
// Populate the domain modal fields
document.getElementById("editHeader").innerText = domain.domain_name;
document.getElementById("editDomainId").value = domain_id;
document.getElementById("editDomainName").value = domain.domain_name;
document.getElementById("editExpire").value = domain.domain_expire;
document.getElementById("editDomainIP").value = domain.domain_ip;
document.getElementById("editNameServers").value = domain.domain_name_servers;
document.getElementById("editMailServers").value = domain.domain_mail_servers;
document.getElementById("editTxtRecords").value = domain.domain_txt;
document.getElementById("editRawWhois").value = domain.domain_raw_whois;
/* DROPDOWNS */
// Registrar dropdown
var registrarDropdown = document.getElementById("editRegistrarId");
// Clear registrar dropdown
var i, L = registrarDropdown.options.length -1;
for(i = L; i >= 0; i--) {
registrarDropdown.remove(i);
}
registrarDropdown[registrarDropdown.length] = new Option('- Vendor -', '0');
// Populate dropdown
vendors.forEach(vendor => {
if (parseInt(vendor.vendor_id) == parseInt(domain.domain_registrar)) {
// Selected domain
registrarDropdown[registrarDropdown.length] = new Option(vendor.vendor_name, vendor.vendor_id, true, true);
}
else{
registrarDropdown[registrarDropdown.length] = new Option(vendor.vendor_name, vendor.vendor_id);
}
});
// Webhost dropdown
var webhostDropdown = document.getElementById("editWebhostId");
// Clear registrar dropdown
var i, L = webhostDropdown.options.length -1;
for(i = L; i >= 0; i--) {
webhostDropdown.remove(i);
}
webhostDropdown[webhostDropdown.length] = new Option('- Vendor -', '0');
// Populate dropdown
vendors.forEach(vendor => {
if (parseInt(vendor.vendor_id) == parseInt(domain.domain_webhost)) {
// Selected domain
webhostDropdown[webhostDropdown.length] = new Option(vendor.vendor_name, vendor.vendor_id, true, true);
}
else{
webhostDropdown[webhostDropdown.length] = new Option(vendor.vendor_name, vendor.vendor_id);
}
});
}
);
}
</script>
<?php include("footer.php"); ?>
require_once("client_domain_edit_modal.php");
require_once("client_domain_add_modal.php");
require_once("footer.php");
+1 -4
View File
@@ -117,7 +117,6 @@
</div>
<?php } else { ?>
<input type="hidden" name="currency_code" value="<?php echo $currency_code; ?>">
<input type="hidden" name="net_terms" value="<?php echo $net_term_value; ?>">
<?php } ?>
@@ -158,9 +157,7 @@
</div>
</li>
<?php
}
?>
<?php } ?>
</ul>
+1 -1
View File
@@ -1,4 +1,4 @@
<?php include("inc_all_client.php"); ?>
<?php require_once("inc_all_client.php"); ?>
<link href='plugins/fullcalendar/main.min.css' rel='stylesheet' />
+5 -6
View File
@@ -1,4 +1,6 @@
<?php require_once("inc_all_client.php");
<?php
require_once("inc_all_client.php");
$sql_files_images = mysqli_query($mysqli, "SELECT * FROM files WHERE file_client_id = $client_id AND (file_ext LIKE 'JPG' OR file_ext LIKE 'jpg' OR file_ext LIKE 'JPEG' OR file_ext LIKE 'jpeg' OR file_ext LIKE 'png' OR file_ext LIKE 'PNG') ORDER BY file_name ASC");
@@ -19,11 +21,8 @@ $num_of_files = mysqli_num_rows($sql_files_images) + mysqli_num_rows($sql_files_
<?php
if ($num_of_files == 0) {
echo "<div style='text-align: center;'><h3 class='text-secondary'>No Records Here</h3></div>";
}
?>
} ?>
<div class="row">
@@ -54,7 +53,7 @@ $num_of_files = mysqli_num_rows($sql_files_images) + mysqli_num_rows($sql_files_
</div>
<?php
include("client_file_view_modal.php");
require("client_file_view_modal.php");
}
?>
</div>
+1 -1
View File
@@ -1,4 +1,4 @@
<?php include("inc_all_client.php"); ?>
<?php require_once("inc_all_client.php"); ?>
<?php
+1 -3
View File
@@ -119,10 +119,8 @@
$contact_name = htmlentities($row['contact_name']);
?>
<option value="<?php echo $contact_id; ?>"><?php echo $contact_name; ?></option>
<?php } ?>
<?php
}
?>
</select>
</div>
</div>
+1 -3
View File
@@ -122,10 +122,8 @@
?>
<option <?php if ($location_contact_id == $contact_id_select) { echo "selected"; } ?> value="<?php echo $contact_id_select; ?>"><?php echo $contact_name_select; ?></option>
<?php } ?>
<?php
}
?>
</select>
</div>
</div>
+1 -1
View File
@@ -1,4 +1,4 @@
<?php include("inc_all_client.php"); ?>
<?php require_once("inc_all_client.php"); ?>
<?php
+4 -13
View File
@@ -120,10 +120,7 @@
$contact_name_select = htmlentities($row['contact_name']);
?>
<option <?php if ($login_contact_id == $contact_id_select) { echo "selected"; } ?> value="<?php echo $contact_id_select; ?>"><?php echo $contact_name_select; ?></option>
<?php
}
?>
<?php } ?>
</select>
</div>
</div>
@@ -144,10 +141,8 @@
$vendor_name_select = htmlentities($row['vendor_name']);
?>
<option <?php if ($login_vendor_id == $vendor_id_select) { echo "selected"; } ?> value="<?php echo $vendor_id_select; ?>"><?php echo $vendor_name_select; ?></option>
<?php } ?>
<?php
}
?>
</select>
</div>
</div>
@@ -169,9 +164,7 @@
?>
<option <?php if ($login_asset_id == $asset_id_select) { echo "selected"; } ?> value="<?php echo $asset_id_select; ?>"><?php echo $asset_name_select; ?></option>
<?php
}
?>
<?php } ?>
</select>
</div>
</div>
@@ -193,9 +186,7 @@
?>
<option <?php if ($login_software_id == $software_id_select) { echo "selected"; } ?> value="<?php echo $software_id_select; ?>"><?php echo $software_name_select; ?></option>
<?php
}
?>
<?php } ?>
</select>
</div>
</div>
+1 -1
View File
@@ -1,4 +1,4 @@
<?php include("inc_all_client.php"); ?>
<?php require_once("inc_all_client.php"); ?>
<?php
+1 -1
View File
@@ -1,4 +1,4 @@
<?php include("inc_all_client.php"); ?>
<?php require_once("inc_all_client.php"); ?>
<?php
+1 -1
View File
@@ -1,4 +1,4 @@
<?php include("inc_all_client.php"); ?>
<?php require_once("inc_all_client.php"); ?>
<?php
+1 -1
View File
@@ -1,4 +1,4 @@
<?php include("inc_all_client.php"); ?>
<?php require_once("inc_all_client.php"); ?>
<?php
+8 -8
View File
@@ -1,7 +1,7 @@
<?php include("inc_all_client.php"); ?>
<?php
require_once("inc_all_client.php");
if (!empty($_GET['sb'])) {
$sb = strip_tags(mysqli_real_escape_string($mysqli,$_GET['sb']));
} else {
@@ -140,8 +140,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");
}
?>
@@ -149,10 +149,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("quote_add_modal.php"); ?>
<?php include("footer.php"); ?>
<?php
require_once("quote_add_modal.php");
require_once("footer.php");
+1 -1
View File
@@ -1,4 +1,4 @@
<?php include("inc_all_client.php"); ?>
<?php require_once("inc_all_client.php"); ?>
<?php
+13 -19
View File
@@ -1,7 +1,7 @@
<?php include("inc_all_client.php"); ?>
<?php
require_once("inc_all_client.php");
if (!empty($_GET['sb'])) {
$sb = strip_tags(mysqli_real_escape_string($mysqli,$_GET['sb']));
} else {
@@ -23,7 +23,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
?>
<script src="js/scheduledTickets.js"></script>
<script src="js/scheduled_tickets_edit_modal.js"></script>
<div class="card card-dark">
<div class="card-header">
@@ -78,8 +78,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
?>
<tr>
<td><a href="#" data-toggle="modal" data-target="#editScheduledTicketModal"
onclick="populateScheduledTicketEditModal(<?php echo $client_id, ",", $scheduled_ticket_id ?>)"> <?php echo $scheduled_ticket_subject ?> </a></td>
<td><a href="#" data-toggle="modal" data-target="#editScheduledTicketModal" onclick="populateScheduledTicketEditModal(<?php echo $client_id, ',', $scheduled_ticket_id ?>)"> <?php echo $scheduled_ticket_subject ?> </a></td>
<td><a> <?php echo $scheduled_ticket_priority ?></a></td>
<td><a> <?php echo $scheduled_ticket_frequency ?></a></td>
<td><a> <?php echo $scheduled_ticket_next_run ?></a></td>
@@ -91,33 +90,28 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
</button>
<div class="dropdown-menu">
<a class="dropdown-item" href="#" data-toggle="modal"
data-target="#editScheduledTicketModal" onclick="populateScheduledTicketEditModal(<?php echo $client_id, ",", $scheduled_ticket_id ?>)">Edit</a>
data-target="#editScheduledTicketModal" onclick="populateScheduledTicketEditModal(<?php echo $client_id, ',', $scheduled_ticket_id ?>)">Edit</a>
<?php
if ($session_user_role == 3) {
?>
if ($session_user_role == 3) { ?>
<div class="dropdown-divider"></div>
<a class="dropdown-item text-danger"
href="post.php?delete_scheduled_ticket=<?php echo $scheduled_ticket_id; ?>">Delete</a>
<a class="dropdown-item text-danger" href="post.php?delete_scheduled_ticket=<?php echo $scheduled_ticket_id; ?>">Delete</a>
</div>
<?php
}
?>
<?php } ?>
</div>
</td>
</tr>
<?php
}
?>
<?php } ?>
</tbody>
</table>
</div>
<?php
include('pagination.php');
include("scheduled_ticket_edit_modal.php")
require_once('pagination.php');
require_once("scheduled_ticket_edit_modal.php")
?>
</div>
</div>
<?php include("footer.php"); ?>
<?php
require_once("footer.php");
+10 -12
View File
@@ -1,7 +1,7 @@
<?php include("inc_all_client.php"); ?>
<?php
require_once("inc_all_client.php");
if (!empty($_GET['sb'])) {
$sb = strip_tags(mysqli_real_escape_string($mysqli, $_GET['sb']));
} else {
@@ -165,8 +165,8 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
WHERE service_id = '$service_id'"
);
include("client_service_edit_modal.php");
include("client_service_view_modal.php");
require("client_service_edit_modal.php");
require("client_service_view_modal.php");
}
?>
@@ -174,12 +174,10 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
</tbody>
</table>
</div>
<?php require_once('pagination.php'); ?>
</div>
</div>
<?php
include ('pagination.php');
?>
</div>
</div>
<?php include("client_service_add_modal.php"); ?>
<?php include("footer.php"); ?>
require_once("client_service_add_modal.php");
require_once("footer.php");
+1 -1
View File
@@ -1,4 +1,4 @@
<?php include("inc_all_client.php"); ?>
<?php require_once("inc_all_client.php"); ?>
<?php
+1 -1
View File
@@ -1,4 +1,4 @@
<?php include("inc_all_client.php"); ?>
<?php require_once("inc_all_client.php"); ?>
<?php
+1 -3
View File
@@ -27,9 +27,7 @@
?>
<option value="<?php echo $software_template_id ?>"><?php echo $software_template_name; ?></option>
<?php
}
?>
<?php } ?>
</select>
</div>
+2 -6
View File
@@ -152,9 +152,7 @@
</div>
</li>
<?php
}
?>
<?php } ?>
</ul>
@@ -184,9 +182,7 @@
</div>
</li>
<?php
}
?>
<?php } ?>
</ul>
+2 -6
View File
@@ -152,9 +152,7 @@
</div>
</li>
<?php
}
?>
<?php } ?>
</ul>
@@ -184,9 +182,7 @@
</div>
</li>
<?php
}
?>
<?php } ?>
</ul>
+1 -1
View File
@@ -1,4 +1,4 @@
<?php include("inc_all_client.php"); ?>
<?php require_once("inc_all_client.php"); ?>
<?php
+1 -1
View File
@@ -1,4 +1,4 @@
<?php include("inc_all_client.php"); ?>
<?php require_once("inc_all_client.php"); ?>
<?php
+8 -8
View File
@@ -1,7 +1,7 @@
<?php include("inc_all_client.php"); ?>
<?php
require_once("inc_all_client.php");
if (!empty($_GET['sb'])) {
$sb = strip_tags(mysqli_real_escape_string($mysqli,$_GET['sb']));
} else {
@@ -135,8 +135,8 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
<?php
include("trip_copy_modal.php");
include("trip_edit_modal.php");
require("trip_copy_modal.php");
require("trip_edit_modal.php");
}
?>
@@ -144,10 +144,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("trip_add_modal.php"); ?>
<?php include("footer.php"); ?>
<?php
require_once("trip_add_modal.php");
require_once("footer.php");
+1 -1
View File
@@ -1,4 +1,4 @@
<?php include("inc_all_client.php"); ?>
<?php require_once("inc_all_client.php"); ?>
<?php
+19 -33
View File
@@ -1,7 +1,7 @@
<?php include("inc_all_client.php"); ?>
<?php
require_once("inc_all_client.php");
if (isset($_GET['q'])) {
$q = strip_tags(mysqli_real_escape_string($mysqli,$_GET['q']));
//Phone Numbers
@@ -118,42 +118,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="#editVendorModal<?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">
@@ -173,19 +161,17 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
<?php
include("vendor_edit_modal.php");
}
?>
require("vendor_edit_modal.php");
} ?>
</tbody>
</table>
</div>
<?php include("pagination.php"); ?>
<?php require_once("pagination.php"); ?>
</div>
</div>
<?php include("vendor_add_modal.php"); ?>
<?php include("vendor_add_from_template_modal.php"); ?>
<?php include("footer.php"); ?>
<?php
require_once("vendor_add_modal.php");
require_once("vendor_add_from_template_modal.php");
require_once("footer.php");
+22 -38
View File
@@ -1,6 +1,6 @@
<?php
include("inc_all.php");
require_once("inc_all.php");
//Paging
if (isset($_GET['p'])) {
@@ -274,8 +274,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
<small class="text-secondary"><?php echo $client_type; ?></small>
<?php } ?>
<?php
if (!empty($client_tags_display)) {
?>
if (!empty($client_tags_display)) { ?>
<br>
<?php echo $client_tags_display; ?>
<?php } ?>
@@ -288,40 +287,27 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
if (empty($contact_name) && empty($contact_phone) && empty($contact_mobile) && empty($client_email)) {
echo "-";
}
?>
<?php
if (!empty($contact_name)) {
?>
if (!empty($contact_name)) { ?>
<i class="fa fa-fw fa-user text-secondary mr-2 mb-2"></i><strong><?php echo $contact_name; ?></strong>
<br>
<?php
}else{
<?php } else {
echo "-";
}
?>
<?php
if (!empty($contact_phone)) {
?>
if (!empty($contact_phone)) { ?>
<i class="fa fa-fw fa-phone text-secondary mr-2 mb-2"></i><?php echo $contact_phone; ?> <?php if (!empty($contact_extension)) { echo "x$contact_extension"; } ?>
<br>
<?php
}
?>
<?php
if (!empty($contact_mobile)) {
?>
<?php }
if (!empty($contact_mobile)) { ?>
<i class="fa fa-fw fa-mobile-alt text-secondary mr-2"></i><?php echo $contact_mobile; ?>
<br>
<?php
}
?>
<?php
if (!empty($contact_email)) {
?>
<?php }
if (!empty($contact_email)) { ?>
<i class="fa fa-fw fa-envelope text-secondary mr-2"></i><a href="mailto:<?php echo $contact_email; ?>"><?php echo $contact_email; ?></a><button class='btn btn-sm clipboardjs' data-clipboard-text='<?php echo $contact_email; ?>'><i class='far fa-copy text-secondary'></i></button>
<?php
}
?>
<?php } ?>
</td>
<!-- Show Billing for Admin/Accountant roles only and if accounting module is enabled -->
@@ -356,21 +342,19 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
<?php
include("client_edit_modal.php");
include("client_delete_modal.php");
require("client_edit_modal.php");
require("client_delete_modal.php");
}
?>
} ?>
</tbody>
</table>
</div>
<?php include("pagination.php"); ?>
<?php require_once("pagination.php"); ?>
</div>
</div>
<?php include("client_add_modal.php"); ?>
<?php include("category_quick_add_modal.php"); ?>
<?php include("footer.php"); ?>
<?php
require_once("client_add_modal.php");
require_once("category_quick_add_modal.php");
require_once("footer.php");
+7 -6
View File
@@ -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']));
@@ -113,7 +114,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
<?php
include("company_edit_modal.php");
require("company_edit_modal.php");
}
?>
@@ -121,10 +122,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("company_add_modal.php"); ?>
<?php include("footer.php");
<?php
require_once("company_add_modal.php");
require_once("footer.php");
+3 -6
View File
@@ -1,10 +1,7 @@
<?php require_once("config.php"); ?>
<?php require_once("functions.php"); ?>
<?php
?>
<?php
require_once("config.php");
require_once("functions.php");
$sql_companies = mysqli_query($mysqli,"SELECT * FROM companies, settings WHERE companies.company_id = settings.company_id");
@@ -683,4 +680,4 @@ while($row = mysqli_fetch_array($sql_companies)){
} //End Company Loop through
?>
+4 -3
View File
@@ -1,7 +1,7 @@
<?php include_once("inc_all.php"); ?>
<?php
require_once("inc_all.php");
if (isset($_GET['year'])) {
$year = intval($_GET['year']);
} else {
@@ -172,5 +172,6 @@ $expiring_certificates = $sql_certs_expiring['expiring_certs'];
</div> <!-- rows -->
<?php include_once("footer.php"); ?>
<?php
require_once("footer.php");
+14 -15
View File
@@ -1,4 +1,6 @@
<?php include("inc_all.php");
<?php
require_once("inc_all.php");
//$o = "DESC";
@@ -184,13 +186,10 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
</button>
<div class="dropdown-menu">
<?php
if (!empty($expense_receipt)) {
?>
if (!empty($expense_receipt)) { ?>
<a class="dropdown-item" href="<?php echo "uploads/expenses/$session_company_id/$expense_receipt"; ?>" download="<?php echo "$expense_date-$vendor_name-$category_name-$expense_id.pdf"; ?>">Download</a>
<div class="dropdown-divider"></div>
<?php
}
?>
<?php } ?>
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#editExpenseModal<?php echo $expense_id; ?>">Edit</a>
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#addExpenseCopyModal<?php echo $expense_id; ?>">Copy</a>
<div class="dropdown-divider"></div>
@@ -204,10 +203,10 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
<?php
include("expense_edit_modal.php");
include("expense_copy_modal.php");
include("expense_refund_modal.php");
include("expense_export_modal.php");
require("expense_edit_modal.php");
require("expense_copy_modal.php");
require("expense_refund_modal.php");
require("expense_export_modal.php");
}
@@ -216,11 +215,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("expense_add_modal.php"); ?>
<?php include("category_quick_add_modal.php"); ?>
<?php include("footer.php");
<?php
require_once("expense_add_modal.php");
require_once("category_quick_add_modal.php");
require_once("footer.php");
+1 -1
View File
@@ -10,8 +10,8 @@
<!-- Bootstrap 4 -->
<script src="plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- Custom js-->
<!-- Custom js-->
<script src="plugins/moment/moment.min.js"></script>
<script src="plugins/chart.js/Chart.min.js"></script>
<script src="plugins/tempusdominus-bootstrap-4/js/tempusdominus-bootstrap-4.min.js"></script>
+52
View File
@@ -540,3 +540,55 @@ function roundUpToNearestMultiple($n, $increment = 1000)
{
return (int) ($increment * ceil($n / $increment));
}
function getAssetIcon($asset_type)
{
if ($asset_type == 'Laptop') {
$device_icon = "laptop";
} elseif ($asset_type == 'Desktop') {
$device_icon = "desktop";
} elseif ($asset_type == 'Server') {
$device_icon = "server";
} elseif ($asset_type == 'Printer') {
$device_icon = "print";
} elseif ($asset_type == 'Camera') {
$device_icon = "video";
} elseif ($asset_type == 'Switch' || $asset_type == 'Firewall/Router') {
$device_icon = "network-wired";
} elseif ($asset_type == 'Access Point') {
$device_icon = "wifi";
} elseif ($asset_type == 'Phone') {
$device_icon = "phone";
} elseif ($asset_type == 'Mobile Phone') {
$device_icon = "mobile-alt";
} elseif ($asset_type == 'Tablet') {
$device_icon = "tablet-alt";
} elseif ($asset_type == 'TV') {
$device_icon = "tv";
} elseif ($asset_type == 'Virtual Machine') {
$device_icon = "cloud";
} else {
$device_icon = "tag";
}
return $device_icon;
}
function getInvoiceBadgeColor($invoice_status)
{
if ($invoice_status == "Sent") {
$invoice_badge_color = "warning text-white";
} elseif ($invoice_status == "Viewed") {
$invoice_badge_color = "info";
} elseif ($invoice_status == "Partial") {
$invoice_badge_color = "primary";
} elseif ($invoice_status == "Paid") {
$invoice_badge_color = "success";
} elseif ($invoice_status == "Cancelled") {
$invoice_badge_color = "danger";
} else{
$invoice_badge_color = "secondary";
}
return $invoice_badge_color;
}
+2 -2
View File
@@ -26,8 +26,8 @@ if (isset($_SERVER['HTTP_ORIGIN'])) {
}
}
include_once("config.php");
include_once("functions.php");
require_once("config.php");
require_once("functions.php");
// IP & User Agent for logging
$ip = strip_tags(mysqli_real_escape_string($mysqli,getIP()));
+17 -24
View File
@@ -1,7 +1,7 @@
<?php include("inc_all.php"); ?>
<?php
require_once("inc_all.php");
if (isset($_GET['query'])) {
$query = trim(strip_tags(mysqli_real_escape_string($mysqli,$_GET['query'])));
@@ -60,9 +60,7 @@ if (isset($_GET['query'])) {
<td><?php echo $location_phone; ?></td>
</tr>
<?php
}
?>
<?php } ?>
</tbody>
</table>
@@ -118,9 +116,8 @@ if (isset($_GET['query'])) {
<td><?php echo $contact_mobile; ?></td>
</tr>
<?php
}
?>
<?php } ?>
</tbody>
</table>
@@ -161,9 +158,8 @@ if (isset($_GET['query'])) {
<td><?php echo $vendor_phone; ?></td>
</tr>
<?php
}
?>
<?php } ?>
</tbody>
</table>
@@ -201,9 +197,8 @@ if (isset($_GET['query'])) {
<td><?php echo $product_description; ?></td>
</tr>
<?php
}
?>
<?php } ?>
</tbody>
</table>
@@ -246,9 +241,8 @@ if (isset($_GET['query'])) {
<td><?php echo $document_updated ?></td>
</tr>
<?php
}
?>
<?php } ?>
</tbody>
</table>
@@ -296,9 +290,8 @@ if (isset($_GET['query'])) {
</tr>
<?php
}
?>
<?php } ?>
</tbody>
</table>
@@ -343,9 +336,8 @@ if (isset($_GET['query'])) {
</tr>
<?php
}
?>
<?php } ?>
</tbody>
</table>
@@ -360,4 +352,5 @@ if (isset($_GET['query'])) {
<?php } ?>
<?php include("footer.php");
<?php
require_once("footer.php");
+4 -5
View File
@@ -1,7 +1,8 @@
<?php
// Not including the guest header as we don't want any HTML output
include("config.php");
include("functions.php");
require_once("config.php");
require_once("functions.php");
$ip = trim(strip_tags(mysqli_real_escape_string($mysqli,getIP())));
$user_agent = strip_tags(mysqli_real_escape_string($mysqli,$_SERVER['HTTP_USER_AGENT']));
@@ -32,8 +33,7 @@ if (isset($_GET['id']) && isset($_GET['key'])) {
if (empty($row['item_views'])) {
$item_views = 0;
}
else {
} else {
$item_views = intval($row['item_views']);
}
@@ -64,5 +64,4 @@ if (isset($_GET['id']) && isset($_GET['key'])) {
// Logging
mysqli_query($mysqli,"INSERT INTO logs SET log_type = 'Sharing', log_action = 'View', log_description = 'Downloaded shared file $file_name via link', log_client_id = '$client_id', log_created_at = NOW(), log_ip = '$ip', log_user_agent = '$user_agent', company_id = '1'");
}
+4 -4
View File
@@ -1,7 +1,7 @@
<?php
include("config.php");
include("functions.php");
require_once("config.php");
require_once("functions.php");
session_start();
@@ -23,7 +23,7 @@ if (isset($_GET['accept_quote'], $_GET['company_id'], $_GET['url_key'])) {
header("Location: " . $_SERVER["HTTP_REFERER"]);
} else {
echo "GTFO!!";
echo "Invalid!!";
}
}
@@ -47,7 +47,7 @@ if (isset($_GET['decline_quote'], $_GET['company_id'], $_GET['url_key'])) {
header("Location: " . $_SERVER["HTTP_REFERER"]);
} else {
echo "GTFO!!";
echo "Invalid!!";
}
}
+1 -13
View File
@@ -76,19 +76,7 @@ if (isset($_GET['invoice_id'], $_GET['url_key'])) {
$invoice_tally_total = 0; // Default
//Set Badge color based off of invoice status
if ($invoice_status == "Sent") {
$invoice_badge_color = "warning text-white";
}elseif ($invoice_status == "Viewed") {
$invoice_badge_color = "info";
}elseif ($invoice_status == "Partial") {
$invoice_badge_color = "primary";
}elseif ($invoice_status == "Paid") {
$invoice_badge_color = "success";
}elseif ($invoice_status == "Cancelled") {
$invoice_badge_color = "danger";
}else{
$invoice_badge_color = "secondary";
}
$invoice_badge_color = getInvoiceBadgeColor($invoice_status);
//Update status to Viewed only if invoice_status = "Sent"
if ($invoice_status == 'Sent') {
+3 -3
View File
@@ -4,7 +4,7 @@ header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', FALSE);
header('Pragma: no-cache');
include("guest_header.php"); ?>
require_once("guest_header.php"); ?>
<br>
<h1> <?php echo $config_app_name ?> Guest sharing </h1>
@@ -56,7 +56,7 @@ if ($item_type == "Document") {
if (mysqli_num_rows($doc_sql) !== 1 || !$doc_row) {
echo "<div class=\"alert alert-danger\" role=\"alert\">Error retrieving document to view.</div>";
include("guest_footer.php");
require_once("guest_footer.php");
exit();
}
@@ -148,4 +148,4 @@ if ($item_type == "Document") {
echo "<br><hr>";
echo $config_app_name;
include("guest_footer.php");
require_once("guest_footer.php");
+8 -8
View File
@@ -1,12 +1,12 @@
<?php
include("config.php");
require_once("config.php");
include_once("functions.php");
include("check_login.php");
include("header.php");
include("top_nav.php");
include("side_nav.php");
include("inc_wrapper.php");
include("inc_alert_feedback.php");
include("pagination_head.php");
require_once("check_login.php");
require_once("header.php");
require_once("top_nav.php");
require_once("side_nav.php");
require_once("inc_wrapper.php");
require_once("inc_alert_feedback.php");
require_once("pagination_head.php");
+10 -20
View File
@@ -1,14 +1,10 @@
<?php
include("config.php");
include_once("functions.php");
include("check_login.php");
include("header.php");
include("top_nav.php");
?>
<?php
require_once("config.php");
require_once("functions.php");
require_once("check_login.php");
require_once("header.php");
require_once("top_nav.php");
if (isset($_GET['client_id'])) {
$client_id = intval($_GET['client_id']);
@@ -237,14 +233,8 @@ if (isset($_GET['client_id'])) {
}
}
?>
<?php
include("client_side_nav.php");
include("inc_wrapper.php");
include("inc_alert_feedback.php");
include("inc_client_top_head.php");
include("pagination_head.php");
?>
require_once("client_side_nav.php");
require_once("inc_wrapper.php");
require_once("inc_alert_feedback.php");
require_once("inc_client_top_head.php");
require_once("pagination_head.php");
+1 -13
View File
@@ -82,19 +82,7 @@ if (isset($_GET['invoice_id'])) {
}
//Set Badge color based off of invoice status
if ($invoice_status == "Sent") {
$invoice_badge_color = "warning text-white";
} elseif ($invoice_status == "Viewed") {
$invoice_badge_color = "info";
} elseif ($invoice_status == "Partial") {
$invoice_badge_color = "primary";
} elseif ($invoice_status == "Paid") {
$invoice_badge_color = "success";
} elseif ($invoice_status == "Cancelled") {
$invoice_badge_color = "danger";
} else {
$invoice_badge_color = "secondary";
}
$invoice_badge_color = getInvoiceBadgeColor($invoice_status);
//Product autocomplete
$products_sql = mysqli_query($mysqli, "SELECT product_name AS label, product_description AS description, product_price AS price FROM products WHERE company_id = $session_company_id");
+8 -24
View File
@@ -1,6 +1,6 @@
<?php
include("inc_all.php");
require_once("inc_all.php");
$row = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT COUNT('invoice_id') AS num FROM invoices WHERE invoice_status = 'Sent' AND company_id = $session_company_id"));
$sent_count = $row['num'];
@@ -299,19 +299,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
$overdue_color = "";
}
if ($invoice_status == "Sent") {
$invoice_badge_color = "warning text-white";
} elseif ($invoice_status == "Viewed") {
$invoice_badge_color = "info";
} elseif ($invoice_status == "Partial") {
$invoice_badge_color = "primary";
} elseif ($invoice_status == "Paid") {
$invoice_badge_color = "success";
} elseif ($invoice_status == "Cancelled") {
$invoice_badge_color = "danger";
} else{
$invoice_badge_color = "secondary";
}
$invoice_badge_color = getInvoiceBadgeColor($invoice_status);
?>
@@ -350,8 +338,8 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
<?php
include("invoice_edit_modal.php");
include("invoice_copy_modal.php");
require("invoice_edit_modal.php");
require("invoice_copy_modal.php");
}
@@ -360,15 +348,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("invoice_add_modal.php");
include("category_quick_add_modal.php");
include("footer.php");
?>
require_once("invoice_add_modal.php");
require_once("category_quick_add_modal.php");
require_once("footer.php");
+9
View File
@@ -0,0 +1,9 @@
// Force the user to correctly type the client name to be deleted before activating the button to delete a client
function validateClientNameDelete(client_id) {
if (document.getElementById("clientNameProvided" + client_id).value === document.getElementById("clientName" + client_id).value) {
document.getElementById("clientDeleteButton" + client_id).className = "btn btn-danger btn-lg px-5";
}
else{
document.getElementById("clientDeleteButton" + client_id).className = "btn btn-danger btn-lg px-5 disabled";
}
}
+74
View File
@@ -0,0 +1,74 @@
function populateDomainEditModal(client_id, domain_id) {
// Send a GET request to post.php as post.php?domain_get_json_details=true&client_id=NUM&domain_id=NUM
jQuery.get(
"ajax.php",
{domain_get_json_details: 'true', client_id: client_id, domain_id: domain_id},
function(data) {
// If we get a response from post.php, parse it as JSON
const response = JSON.parse(data);
// Access the domain info (one), registrars (multiple) and webhosts (multiple)
const domain = response.domain[0];
const vendors = response.vendors;
// Populate the domain modal fields
document.getElementById("editHeader").innerText = domain.domain_name;
document.getElementById("editDomainId").value = domain_id;
document.getElementById("editDomainName").value = domain.domain_name;
document.getElementById("editExpire").value = domain.domain_expire;
document.getElementById("editDomainIP").value = domain.domain_ip;
document.getElementById("editNameServers").value = domain.domain_name_servers;
document.getElementById("editMailServers").value = domain.domain_mail_servers;
document.getElementById("editTxtRecords").value = domain.domain_txt;
document.getElementById("editRawWhois").value = domain.domain_raw_whois;
/* DROPDOWNS */
// Registrar dropdown
var registrarDropdown = document.getElementById("editRegistrarId");
// Clear registrar dropdown
var i, L = registrarDropdown.options.length -1;
for(i = L; i >= 0; i--) {
registrarDropdown.remove(i);
}
registrarDropdown[registrarDropdown.length] = new Option('- Vendor -', '0');
// Populate dropdown
vendors.forEach(vendor => {
if (parseInt(vendor.vendor_id) == parseInt(domain.domain_registrar)) {
// Selected domain
registrarDropdown[registrarDropdown.length] = new Option(vendor.vendor_name, vendor.vendor_id, true, true);
}
else{
registrarDropdown[registrarDropdown.length] = new Option(vendor.vendor_name, vendor.vendor_id);
}
});
// Webhost dropdown
var webhostDropdown = document.getElementById("editWebhostId");
// Clear registrar dropdown
var i, L = webhostDropdown.options.length -1;
for(i = L; i >= 0; i--) {
webhostDropdown.remove(i);
}
webhostDropdown[webhostDropdown.length] = new Option('- Vendor -', '0');
// Populate dropdown
vendors.forEach(vendor => {
if (parseInt(vendor.vendor_id) == parseInt(domain.domain_webhost)) {
// Selected domain
webhostDropdown[webhostDropdown.length] = new Option(vendor.vendor_name, vendor.vendor_id, true, true);
}
else{
webhostDropdown[webhostDropdown.length] = new Option(vendor.vendor_name, vendor.vendor_id);
}
});
}
);
}
+6 -3
View File
@@ -1,4 +1,6 @@
<?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']));
@@ -179,8 +181,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");
+7 -5
View File
@@ -1,4 +1,6 @@
<?php require_once("inc_all.php");
<?php
require_once("inc_all.php");
$sql = mysqli_query($mysqli, "SELECT * FROM notifications LEFT JOIN clients ON notification_client_id = client_id WHERE notification_dismissed_at IS NULL AND (notification_user_id = $session_user_id OR notification_user_id = 0) AND notifications.company_id = $session_company_id ORDER BY notification_id DESC");
@@ -52,9 +54,8 @@ $sql = mysqli_query($mysqli, "SELECT * FROM notifications LEFT JOIN clients ON n
<td class="text-center"><a class="btn btn-info btn-sm" href="post.php?dismiss_notification=<?php echo $notification_id; ?>"><i class="fa fa-check"></a></td>
</tr>
<?php
}
?>
<?php } ?>
</tbody>
</table>
@@ -69,4 +70,5 @@ $sql = mysqli_query($mysqli, "SELECT * FROM notifications LEFT JOIN clients ON n
</div>
<?php require_once("footer.php");
<?php
require_once("footer.php");
+6 -7
View File
@@ -1,4 +1,5 @@
<?php include("inc_all.php");
<?php
require_once("inc_all.php");
//Column Filter
if (!empty($_GET['sb'])) {
@@ -118,17 +119,15 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
<td><?php echo $notification_dismissed_at; ?></td>
<td><?php echo $user_name; ?></td>
<?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");
+2 -2
View File
@@ -5347,7 +5347,7 @@ if(isset($_POST['add_asset'])){
if (!empty($_POST['username'])) {
$asset_id = mysqli_insert_id($mysqli);
$username = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['username'])));
$username = trim(mysqli_real_escape_string($mysqli, encryptLoginEntry($_POST['username'])));
$password = trim(mysqli_real_escape_string($mysqli, encryptLoginEntry($_POST['password'])));
mysqli_query($mysqli,"INSERT INTO logins SET login_name = '$name', login_username = '$username', login_password = '$password', login_asset_id = $asset_id, login_client_id = $client_id, company_id = $session_company_id");
@@ -5396,7 +5396,7 @@ if(isset($_POST['edit_asset'])){
$install_date = "0000-00-00";
}
$notes = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['notes'])));
$username = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['username'])));
$username = trim(mysqli_real_escape_string($mysqli, encryptLoginEntry($_POST['username'])));
$password = trim(mysqli_real_escape_string($mysqli, encryptLoginEntry($_POST['password'])));
mysqli_query($mysqli,"UPDATE assets SET asset_name = '$name', asset_type = '$type', asset_make = '$make', asset_model = '$model', asset_serial = '$serial', asset_os = '$os', asset_ip = '$ip', asset_mac = '$mac', asset_location_id = $location, asset_vendor_id = $vendor, asset_contact_id = $contact, asset_status = '$status', asset_purchase_date = '$purchase_date', asset_warranty_expire = '$warranty_expire', asset_install_date = '$install_date', asset_notes = '$notes', asset_network_id = $network WHERE asset_id = $asset_id AND company_id = $session_company_id");
+3 -6
View File
@@ -31,10 +31,8 @@
$client_name = htmlentities($row['client_name']);
?>
<option value="<?php echo $client_id; ?>"><?php echo $client_name; ?></option>
<?php } ?>
<?php
}
?>
</select>
</div>
</div>
@@ -68,9 +66,8 @@
?>
<option value="<?php echo $category_id; ?>"><?php echo $category_name; ?></option>
<?php
}
?>
<?php } ?>
</select>
<div class="input-group-append">
<button type="button" class="btn btn-secondary" data-toggle="modal" data-target="#addQuickCategoryIncomeModal"><i class="fas fa-fw fa-plus"></i></button>
+9 -10
View File
@@ -1,4 +1,6 @@
<?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']));
@@ -178,30 +180,27 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
</div>
<?php
include("revenue_edit_modal.php");
require("revenue_edit_modal.php");
?>
</td>
</tr>
<?php
<?php } ?>
}
?>
</tbody>
</table>
</div>
<?php include("pagination.php"); ?>
<?php require_once("pagination.php"); ?>
</div>
</div>
<?php
include("revenue_add_modal.php");
include("category_quick_add_modal.php");
require_once("revenue_add_modal.php");
require_once("category_quick_add_modal.php");
include("footer.php");
require_once("footer.php");
?>
+1 -1
View File
@@ -20,7 +20,7 @@ $sql = mysqli_query($mysqli,"SELECT SQL_CALC_FOUND_ROWS * FROM scheduled_tickets
$num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
?>
<script src="js/scheduledTickets.js"></script>
<script src="js/scheduled_tickets_edit_modal.js"></script>
<div class="card card-dark">
<div class="card-header">
+8 -14
View File
@@ -1,4 +1,6 @@
<?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']));
@@ -63,8 +65,7 @@
if ($row['api_key_client_id'] == 0) {
$api_key_client = "<i>All Clients</i>";
}
else{
} else {
$api_key_client = htmlentities($row['client_name']);
}
@@ -87,23 +88,16 @@
</td>
</tr>
<?php
<?php } ?>
}
?>
</tbody>
</table>
</div>
<?php include("pagination.php"); ?>
<?php require_once("pagination.php"); ?>
</div>
</div>
<?php
include("api_key_add_modal.php");
include("footer.php");
?>
require_once("api_key_add_modal.php");
require_once("footer.php");
+4 -2
View File
@@ -1,4 +1,5 @@
<?php require_once("inc_all_settings.php"); ?>
<?php
require_once("inc_all_settings.php"); ?>
<div class="card card-dark mb-3">
<div class="card-header py-3">
@@ -30,4 +31,5 @@
</div>
</div>
<?php require_once("footer.php");
<?php
require_once("footer.php");
+19 -44
View File
@@ -1,4 +1,6 @@
<?php require_once("inc_all_settings.php"); ?>
<?php
require_once("inc_all_settings.php"); ?>
<div class="card card-dark">
<div class="card-header py-3">
@@ -20,14 +22,10 @@
$sql = mysqli_query($mysqli,"SELECT * FROM accounts WHERE company_id = $session_company_id ORDER BY account_name ASC");
while ($row = mysqli_fetch_array($sql)) {
$account_id = $row['account_id'];
$account_name = htmlentities($row['account_name']);
?>
$account_name = htmlentities($row['account_name']); ?>
<option <?php if ($config_default_transfer_from_account == $account_id) { echo "selected"; } ?> value="<?php echo $account_id; ?>"><?php echo $account_name; ?></option>
<?php } ?>
<?php
}
?>
</select>
</div>
</div>
@@ -45,14 +43,10 @@
$sql = mysqli_query($mysqli,"SELECT * FROM accounts WHERE company_id = $session_company_id ORDER BY account_name ASC");
while ($row = mysqli_fetch_array($sql)) {
$account_id = $row['account_id'];
$account_name = htmlentities($row['account_name']);
?>
$account_name = htmlentities($row['account_name']); ?>
<option <?php if ($config_default_transfer_to_account == $account_id) { echo "selected"; } ?> value="<?php echo $account_id; ?>"><?php echo $account_name; ?></option>
<?php } ?>
<?php
}
?>
</select>
</div>
</div>
@@ -70,14 +64,10 @@
$sql = mysqli_query($mysqli,"SELECT * FROM accounts WHERE company_id = $session_company_id ORDER BY account_name ASC");
while ($row = mysqli_fetch_array($sql)) {
$account_id = $row['account_id'];
$account_name = htmlentities($row['account_name']);
?>
$account_name = htmlentities($row['account_name']); ?>
<option <?php if ($config_default_payment_account == $account_id) { echo "selected"; } ?> value="<?php echo $account_id; ?>"><?php echo $account_name; ?></option>
<?php } ?>
<?php
}
?>
</select>
</div>
</div>
@@ -95,14 +85,10 @@
$sql = mysqli_query($mysqli,"SELECT * FROM accounts WHERE company_id = $session_company_id ORDER BY account_name ASC");
while ($row = mysqli_fetch_array($sql)) {
$account_id = $row['account_id'];
$account_name = htmlentities($row['account_name']);
?>
$account_name = htmlentities($row['account_name']); ?>
<option <?php if ($config_default_expense_account == $account_id) { echo "selected"; } ?> value="<?php echo $account_id; ?>"><?php echo $account_name; ?></option>
<?php } ?>
<?php
}
?>
</select>
</div>
</div>
@@ -119,14 +105,10 @@
$sql = mysqli_query($mysqli,"SELECT * FROM categories WHERE category_type = 'Payment Method' AND company_id = $session_company_id ORDER BY category_name ASC");
while ($row = mysqli_fetch_array($sql)) {
$payment_method = htmlentities($row['category_name']);
?>
$payment_method = htmlentities($row['category_name']); ?>
<option <?php if ($config_default_payment_method == $payment_method) { echo "selected"; } ?>><?php echo $payment_method; ?></option>
<?php } ?>
<?php
}
?>
</select>
</div>
</div>
@@ -143,14 +125,10 @@
$sql = mysqli_query($mysqli,"SELECT * FROM categories WHERE category_type = 'Payment Method' AND company_id = $session_company_id ORDER BY category_name ASC");
while ($row = mysqli_fetch_array($sql)) {
$payment_method = htmlentities($row['category_name']);
?>
$payment_method = htmlentities($row['category_name']); ?>
<option <?php if ($config_default_expense_payment_method == $payment_method) { echo "selected"; } ?>><?php echo $payment_method; ?></option>
<?php } ?>
<?php
}
?>
</select>
</div>
</div>
@@ -168,14 +146,10 @@
$sql = mysqli_query($mysqli,"SELECT * FROM calendars WHERE company_id = $session_company_id ORDER BY calendar_name ASC");
while ($row = mysqli_fetch_array($sql)) {
$calendar_id = $row['calendar_id'];
$calendar_name = htmlentities($row['calendar_name']);
?>
$calendar_name = htmlentities($row['calendar_name']); ?>
<option <?php if ($config_default_calendar == $calendar_id) { echo "selected"; } ?> value="<?php echo $calendar_id; ?>"><?php echo $calendar_name; ?></option>
<?php } ?>
<?php
}
?>
</select>
</div>
</div>
@@ -202,4 +176,5 @@
</div>
</div>
<?php include("footer.php");
<?php
require_once("footer.php");
+5 -2
View File
@@ -1,4 +1,6 @@
<?php require_once("inc_all_settings.php"); ?>
<?php
require_once("inc_all_settings.php"); ?>
<div class="card card-dark">
<div class="card-header py-3">
@@ -36,4 +38,5 @@
</div>
</div>
<?php include("footer.php");
<?php
require_once("footer.php");
+5 -3
View File
@@ -1,7 +1,9 @@
<?php require_once("inc_all_settings.php"); ?>
<?php
require_once("inc_all_settings.php"); ?>
<div class="alert alert-warning">
Work in Progress
Work in Progress - Not yet functioning
</div>
<div class="card card-dark">
@@ -50,4 +52,4 @@
</div>
</div>
<?php include("footer.php");
<?php require_once("footer.php");
+4 -2
View File
@@ -1,4 +1,5 @@
<?php require_once("inc_all_settings.php"); ?>
<?php
require_once("inc_all_settings.php"); ?>
<div class="card card-dark">
<div class="card-header py-3">
@@ -69,4 +70,5 @@
</div>
</div>
<?php include("footer.php");
<?php
require_once("footer.php");
+3 -6
View File
@@ -67,9 +67,8 @@
?>
<option <?php if ($config_default_transfer_from_account == $account_id) { echo "selected"; } ?> value="<?php echo $account_id; ?>"><?php echo $account_name; ?> [$<?php echo number_format($balance,2); ?>]</option>
<?php
}
?>
<?php } ?>
</select>
</div>
</div>
@@ -106,9 +105,7 @@
?>
<option <?php if ($config_default_transfer_to_account == $account_id) { echo "selected"; } ?> value="<?php echo $account_id; ?>"><?php echo $account_name; ?> [$<?php echo number_format($balance,2); ?>]</option>
<?php
}
?>
<?php } ?>
</select>
</div>
</div>
+2 -6
View File
@@ -81,9 +81,7 @@
?>
<option <?php if ($trip_user_id == $user_id_select) { echo "selected"; } ?> value="<?php echo $user_id_select; ?>"><?php echo $user_name_select; ?></option>
<?php
}
?>
<?php } ?>
</select>
</div>
</div>
@@ -109,9 +107,7 @@
?>
<option <?php if ($client_id == $client_id_select) { echo "selected"; } ?> value="<?php echo $client_id_select; ?>"><?php echo $client_name_select; ?></option>
<?php
}
?>
<?php } ?>
</select>
</div>
</div>
+2 -3
View File
@@ -82,9 +82,8 @@
?>
<option <?php if ($trip_user_id == $user_id_select) { echo "selected"; } ?> value="<?php echo $user_id_select; ?>"><?php echo $user_name_select; ?></option>
<?php
}
?>
<?php } ?>
</select>
</div>
</div>
+7 -8
View File
@@ -204,21 +204,20 @@
<?php
include("trip_copy_modal.php");
include("trip_edit_modal.php");
include("trip_export_modal.php");
require("trip_copy_modal.php");
require("trip_edit_modal.php");
require("trip_export_modal.php");
}
?>
</tbody>
</table>
</div>
<?php include("pagination.php"); ?>
<?php require_once("pagination.php"); ?>
</div>
</div>
<?php include("trip_add_modal.php"); ?>
<?php include("footer.php");
<?php
require_once("trip_add_modal.php");
require_once("footer.php");
+5 -5
View File
@@ -1,4 +1,5 @@
<?php include("inc_all.php");
<?php
require_once("inc_all.php");
$sql_recent_logins = mysqli_query($mysqli, "SELECT * FROM logs
WHERE log_type = 'Login' OR log_type = 'Login 2FA' AND log_action = 'Success' AND log_user_id = $session_user_id
@@ -167,9 +168,7 @@ $sql_recent_logs = mysqli_query($mysqli, "SELECT * FROM logs
<td><?php echo "<strong>$log_user_os</strong><br>$log_user_browser<br><i class='fa fa-fw fa-globe text-secondary'></i> $log_ip"; ?></td>
</tr>
<?php
}
?>
<?php } ?>
</tbody>
</table>
<div class="card-footer">
@@ -229,4 +228,5 @@ $sql_recent_logs = mysqli_query($mysqli, "SELECT * FROM logs
</div>
<?php include("footer.php"); ?>
<?php
require_once("footer.php");
+1 -3
View File
@@ -29,9 +29,7 @@
?>
<option value="<?php echo $vendor_template_id ?>"><?php echo $vendor_template_name; ?></option>
<?php
}
?>
<?php } ?>
</select>
</div>