Merge branch 'master' into techbar
This commit is contained in:
@@ -1,52 +1,81 @@
|
||||
<div class="modal" id="addLinkModal" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content bg-dark">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title"><i class="fas fa-fw fa-external-link-alt mr-2"></i>New Custom Link</h5>
|
||||
<button type="button" class="close text-white" data-dismiss="modal">
|
||||
<span>×</span>
|
||||
</button>
|
||||
</div>
|
||||
<form action="post.php" method="post" autocomplete="off">
|
||||
|
||||
<div class="modal-body bg-white">
|
||||
|
||||
<div class="form-group">
|
||||
<label>Name <strong class="text-danger">*</strong></label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-list-ul"></i></span>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="name" placeholder="Link name" required autofocus>
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content bg-dark">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title"><i class="fas fa-fw fa-external-link-alt mr-2"></i>New Custom Link</h5>
|
||||
<button type="button" class="close text-white" data-dismiss="modal">
|
||||
<span>×</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<form action="post.php" method="post" autocomplete="off">
|
||||
|
||||
<div class="form-group">
|
||||
<label>URI <strong class="text-danger">*</strong></label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-external-link-alt"></i></span>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="uri" placeholder="Enter Link" required>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="new_tab" value="0">
|
||||
|
||||
<div class="form-group">
|
||||
<label>Icon</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-image"></i></span>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="icon" placeholder="Icon ex handshake">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-body bg-white">
|
||||
|
||||
<div class="form-group">
|
||||
<label>Name <strong class="text-danger">*</strong></label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-list-ul"></i></span>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="name" placeholder="Link name" required autofocus>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Order</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-sort-numeric-down"></i></span>
|
||||
</div>
|
||||
<input type="number" class="form-control" name="order" placeholder="Leave blank for no order">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>URI <strong class="text-danger">*</strong></label> / <span class="text-secondary">Open New Tab</span>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-external-link-alt"></i></span>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="uri" placeholder="Enter Link" required>
|
||||
<div class="input-group-append">
|
||||
<div class="input-group-text">
|
||||
<input type="checkbox" name="new_tab" value="1">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Icon</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-image"></i></span>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="icon" placeholder="Icon ex handshake">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Location <strong class="text-danger">*</strong></label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-home"></i></span>
|
||||
</div>
|
||||
<select class="form-control select2" name="location" required>
|
||||
<option value="1">Main Side Nav</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer bg-white">
|
||||
<button type="submit" name="add_custom_link" class="btn btn-primary text-bold"><i class="fas fa-check mr-2"></i>Create</button>
|
||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer bg-white">
|
||||
<button type="submit" name="add_custom_link" class="btn btn-primary text-bold"><i class="fas fa-check mr-2"></i>Create</button>
|
||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,52 +1,79 @@
|
||||
<div class="modal" id="editLinkModal<?php echo $custom_link_id; ?>" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content bg-dark">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title"><i class="fas fa-fw fa-external-link-alt mr-2"></i>Editing link: <strong><?php echo $custom_link_name; ?></strong></h5>
|
||||
<button type="button" class="close text-white" data-dismiss="modal">
|
||||
<span>×</span>
|
||||
</button>
|
||||
</div>
|
||||
<form action="post.php" method="post" autocomplete="off">
|
||||
<input type="hidden" name="custom_link_id" value="<?php echo $custom_link_id; ?>">
|
||||
<div class="modal-body bg-white">
|
||||
|
||||
<div class="form-group">
|
||||
<label>Name <strong class="text-danger">*</strong></label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-list-ul"></i></span>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="name" value="<?php echo $custom_link_name; ?>" required>
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content bg-dark">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title"><i class="fas fa-fw fa-external-link-alt mr-2"></i>Editing link: <strong><?php echo $custom_link_name; ?></strong></h5>
|
||||
<button type="button" class="close text-white" data-dismiss="modal">
|
||||
<span>×</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>URI <strong class="text-danger">*</strong></label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-external-link-alt"></i></span>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="uri" value="<?php echo $custom_link_uri; ?>" required>
|
||||
</div>
|
||||
</div>
|
||||
<form action="post.php" method="post" autocomplete="off">
|
||||
<input type="hidden" name="custom_link_id" value="<?php echo $custom_link_id; ?>">
|
||||
<div class="modal-body bg-white">
|
||||
|
||||
<div class="form-group">
|
||||
<label>Icon</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-image"></i></span>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="icon" placeholder="Icon ex handshake" value="<?php echo $custom_link_icon; ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Name <strong class="text-danger">*</strong></label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-list-ul"></i></span>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="name" value="<?php echo $custom_link_name; ?>" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Order</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-sort-numeric-down"></i></span>
|
||||
</div>
|
||||
<input type="number" class="form-control" name="order" placeholder="Leave blank for no order" value="<?php echo $custom_link_order; ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>URI <strong class="text-danger">*</strong></label> / <span class="text-secondary">Open New Tab</span>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-external-link-alt"></i></span>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="uri" placeholder="Enter Link" value="<?php echo $custom_link_uri; ?>" required>
|
||||
<div class="input-group-append">
|
||||
<div class="input-group-text">
|
||||
<input type="checkbox" name="new_tab" value="1" <?php if ($custom_link_new_tab == 1) { echo "checked"; } ?>>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Icon</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-image"></i></span>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="icon" placeholder="Icon ex handshake" value="<?php echo $custom_link_icon; ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Location <strong class="text-danger">*</strong></label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-home"></i></span>
|
||||
</div>
|
||||
<select class="form-control select2" name="location" required>
|
||||
<option value="1" <?php if ($custom_link_location == 1) { echo "selected"; } ?> >Main Side Nav</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer bg-white">
|
||||
<button type="submit" name="edit_custom_link" class="btn btn-primary text-bold"><i class="fas fa-check mr-2"></i>Save</button>
|
||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer bg-white">
|
||||
<button type="submit" name="edit_custom_link" class="btn btn-primary text-bold"><i class="fas fa-check mr-2"></i>Save</button>
|
||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -51,7 +51,9 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
<thead class="text-dark <?php if ($num_rows[0] == 0) { echo "d-none"; } ?>">
|
||||
<tr>
|
||||
<th><a class="text-dark" href="?<?php echo $url_query_strings_sort; ?>&sort=custom_link_name&order=<?php echo $disp; ?>">Name</a></th>
|
||||
<th><a class="text-dark" href="?<?php echo $url_query_strings_sort; ?>&sort=custom_link_uri&order=<?php echo $disp; ?>">URI</a></th>
|
||||
<th><a class="text-dark" href="?<?php echo $url_query_strings_sort; ?>&sort=custom_link_order&order=<?php echo $disp; ?>">Order</a></th>
|
||||
<th><a class="text-dark" href="?<?php echo $url_query_strings_sort; ?>&sort=custom_link_uri&order=<?php echo $disp; ?>">URI / <span class="text-secondary">New Tab</span></a></th>
|
||||
<th><a class="text-dark" href="?<?php echo $url_query_strings_sort; ?>&sort=custom_link_location&order=<?php echo $disp; ?>">Location</a></th>
|
||||
<th class="text-center">Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -63,6 +65,19 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
$custom_link_name = nullable_htmlentities($row['custom_link_name']);
|
||||
$custom_link_uri = nullable_htmlentities($row['custom_link_uri']);
|
||||
$custom_link_icon = nullable_htmlentities($row['custom_link_icon']);
|
||||
$custom_link_new_tab = intval($row['custom_link_new_tab']);
|
||||
if ($custom_link_new_tab == 1 ) {
|
||||
$custom_link_new_tab_display = "<i class='fas fa-fw fa-checkmark'></i>";
|
||||
} else {
|
||||
$custom_link_new_tab_display = "";
|
||||
}
|
||||
$custom_link_order = intval($row['custom_link_order']);
|
||||
if ($custom_link_order == 0 ) {
|
||||
$custom_link_order_display = "-";
|
||||
} else {
|
||||
$custom_link_order_display = $custom_link_order;
|
||||
}
|
||||
$custom_link_location = intval($row['custom_link_location']);
|
||||
|
||||
?>
|
||||
<tr>
|
||||
@@ -72,7 +87,9 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
<?php echo $custom_link_name;?>
|
||||
</a>
|
||||
</td>
|
||||
<td><?php echo $custom_link_uri; ?></td>
|
||||
<td><?php echo $custom_link_order_display; ?></td>
|
||||
<td><?php echo "$custom_link_uri $custom_link_new_tab_display"; ?></td>
|
||||
<td><?php echo $custom_link_location; ?></td>
|
||||
<td>
|
||||
<div class="dropdown dropleft text-center">
|
||||
<button class="btn btn-secondary btn-sm" type="button" data-toggle="dropdown">
|
||||
|
||||
@@ -1,14 +1,19 @@
|
||||
<!-- Main Sidebar Container -->
|
||||
<aside class="main-sidebar sidebar-dark-<?php echo nullable_htmlentities($config_theme); ?> d-print-none">
|
||||
<a class="brand-link pb-1 mt-1" href="clients.php">
|
||||
<p class="h6"><i class="nav-icon fas fa-arrow-left ml-3 mr-2"></i> Back | <strong>Administration</strong></p>
|
||||
<p class="h6">
|
||||
<i class="nav-icon fas fa-arrow-left ml-3 mr-2"></i>
|
||||
<span class="brand-text">
|
||||
Back | <strong>Administration</strong>
|
||||
</span>
|
||||
</p>
|
||||
</a>
|
||||
|
||||
<!-- Sidebar -->
|
||||
<div class="sidebar">
|
||||
<!-- Sidebar Menu -->
|
||||
<nav>
|
||||
<ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" data-accordion="false">
|
||||
<ul class="nav nav-pills nav-sidebar flex-column mt-2" data-widget="treeview" data-accordion="false">
|
||||
<!-- ACCESS Section -->
|
||||
<li class="nav-header">ACCESS</li>
|
||||
<li class="nav-item">
|
||||
|
||||
5
ajax.php
5
ajax.php
@@ -279,7 +279,7 @@ if (isset($_GET['share_generate_link'])) {
|
||||
}
|
||||
|
||||
// Insert entry into DB
|
||||
$sql = mysqli_query($mysqli, "INSERT INTO shared_items SET item_active = 1, item_key = '$item_key', item_type = '$item_type', item_related_id = $item_id, item_encrypted_username = '$item_encrypted_username', item_encrypted_credential = '$item_encrypted_credential', item_note = '$item_note', item_views = 0, item_view_limit = $item_view_limit, item_expire_at = NOW() + INTERVAL + $item_expires, item_client_id = $client_id");
|
||||
$sql = mysqli_query($mysqli, "INSERT INTO shared_items SET item_active = 1, item_key = '$item_key', item_type = '$item_type', item_related_id = $item_id, item_encrypted_username = '$item_encrypted_username', item_encrypted_credential = '$item_encrypted_credential', item_note = '$item_note', item_recipient = '$item_email', item_views = 0, item_view_limit = $item_view_limit, item_expire_at = NOW() + INTERVAL + $item_expires, item_client_id = $client_id");
|
||||
$share_id = $mysqli->insert_id;
|
||||
|
||||
// Return URL
|
||||
@@ -310,6 +310,9 @@ if (isset($_GET['share_generate_link'])) {
|
||||
}
|
||||
$body = "Hello,<br><br>$session_name from $company_name sent you a time sensitive secure link regarding \"$item_name\".<br><br>The link will expire in <strong>$item_expires_friendly</strong> and may only be viewed <strong>$item_view_limit</strong> times, before the link is destroyed. <br><br><strong><a href=\'$url\'>Click here to access your secure content</a></strong><br><br>--<br>$company_name - Support<br>$config_ticket_from_email<br>$company_phone";
|
||||
|
||||
// Add the intended recipient disclosure
|
||||
$body .= "<br><br><em>This email and any attachments are confidential and intended for the specified recipient(s) only. If you are not the intended recipient, please notify the sender and delete this email. Unauthorized use, disclosure, or distribution is prohibited.</em>";
|
||||
|
||||
$data = [
|
||||
[
|
||||
'from' => $config_mail_from_email,
|
||||
|
||||
@@ -4,10 +4,9 @@
|
||||
<a class="brand-link pb-1 mt-1" href="clients.php">
|
||||
<p class="h5">
|
||||
<i class="nav-icon fas fa-arrow-left ml-3 mr-2"></i>
|
||||
Back |
|
||||
<strong>
|
||||
<?php if($client_abbreviation) { echo $client_abbreviation; } else { echo shortenClient($client_name); } ?>
|
||||
</strong>
|
||||
<span class="brand-text">
|
||||
Back | <strong><?php if($client_abbreviation) { echo $client_abbreviation; } else { echo shortenClient($client_name); } ?></strong>
|
||||
</span>
|
||||
</p>
|
||||
</a>
|
||||
|
||||
|
||||
@@ -623,7 +623,7 @@ if ($user_config_dashboard_technical_enable == 1) {
|
||||
<!-- ./col -->
|
||||
|
||||
<div class="col-lg-4 col-6">
|
||||
<a class="small-box bg-warning" href="domains.php">
|
||||
<a class="small-box bg-warning" href="report_domains.php">
|
||||
<div class="inner">
|
||||
<h3><?php echo $expiring_domains; ?></h3>
|
||||
<p>Expiring Domains</p>
|
||||
|
||||
@@ -2209,10 +2209,32 @@ if (LATEST_DATABASE_VERSION > CURRENT_DATABASE_VERSION) {
|
||||
mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.5.0'");
|
||||
}
|
||||
|
||||
// if (CURRENT_DATABASE_VERSION == '1.5.0') {
|
||||
// // Insert queries here required to update to DB version 1.5.1
|
||||
if (CURRENT_DATABASE_VERSION == '1.5.0') {
|
||||
|
||||
mysqli_query($mysqli, "DROP TABLE `account_types`");
|
||||
|
||||
mysqli_query($mysqli, "ALTER TABLE `accounts` ADD `account_description` VARCHAR(250) DEFAULT NULL AFTER `account_name`");
|
||||
|
||||
mysqli_query($mysqli, "ALTER TABLE `user_roles` MODIFY `user_role_is_admin` TINYINT(1) NOT NULL DEFAULT '0'");
|
||||
|
||||
mysqli_query($mysqli, "ALTER TABLE `shared_items` ADD `item_recipient` VARCHAR(250) DEFAULT NULL AFTER `item_note`");
|
||||
|
||||
mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.5.1'");
|
||||
}
|
||||
|
||||
if (CURRENT_DATABASE_VERSION == '1.5.1') {
|
||||
|
||||
mysqli_query($mysqli, "ALTER TABLE `custom_links` ADD `custom_link_location` INT(11) NOT NULL DEFAULT 1 AFTER `custom_link_icon`");
|
||||
mysqli_query($mysqli, "ALTER TABLE `custom_links` ADD `custom_link_new_tab` TINYINT(1) NOT NULL DEFAULT 0 AFTER `custom_link_uri`");
|
||||
mysqli_query($mysqli, "ALTER TABLE `custom_links` ADD `custom_link_order` INT(11) NOT NULL DEFAULT 0 AFTER `custom_link_location`");
|
||||
|
||||
mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.5.2'");
|
||||
}
|
||||
|
||||
// if (CURRENT_DATABASE_VERSION == '1.5.2') {
|
||||
// // Insert queries here required to update to DB version 1.5.3
|
||||
// // Then, update the database to the next sequential version
|
||||
// mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.5.1'");
|
||||
// mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.5.3'");
|
||||
// }
|
||||
|
||||
} else {
|
||||
|
||||
@@ -5,4 +5,4 @@
|
||||
* It is used in conjunction with database_updates.php
|
||||
*/
|
||||
|
||||
DEFINE("LATEST_DATABASE_VERSION", "1.5.0");
|
||||
DEFINE("LATEST_DATABASE_VERSION", "1.5.2");
|
||||
|
||||
68
db.sql
68
db.sql
@@ -15,25 +15,6 @@
|
||||
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
||||
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
||||
|
||||
--
|
||||
-- Table structure for table `account_types`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `account_types`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `account_types` (
|
||||
`account_type_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`account_type_parent` int(11) NOT NULL DEFAULT 1,
|
||||
`account_type_name` varchar(255) NOT NULL,
|
||||
`account_type_description` text DEFAULT NULL,
|
||||
`account_type_created_at` datetime NOT NULL DEFAULT current_timestamp(),
|
||||
`account_type_updated_at` datetime DEFAULT NULL ON UPDATE current_timestamp(),
|
||||
`account_type_archived_at` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`account_type_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `accounts`
|
||||
--
|
||||
@@ -44,6 +25,7 @@ DROP TABLE IF EXISTS `accounts`;
|
||||
CREATE TABLE `accounts` (
|
||||
`account_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`account_name` varchar(200) NOT NULL,
|
||||
`account_description` varchar(250) DEFAULT NULL,
|
||||
`opening_balance` decimal(15,2) NOT NULL DEFAULT 0.00,
|
||||
`account_currency_code` varchar(200) NOT NULL,
|
||||
`account_notes` text DEFAULT NULL,
|
||||
@@ -474,7 +456,10 @@ CREATE TABLE `custom_links` (
|
||||
`custom_link_name` varchar(200) NOT NULL,
|
||||
`custom_link_description` text DEFAULT NULL,
|
||||
`custom_link_uri` varchar(500) NOT NULL,
|
||||
`custom_link_new_tab` tinyint(1) NOT NULL DEFAULT 0,
|
||||
`custom_link_icon` varchar(200) DEFAULT NULL,
|
||||
`custom_link_location` int(11) NOT NULL DEFAULT 1,
|
||||
`custom_link_order` int(11) NOT NULL DEFAULT 0,
|
||||
`custom_link_created_at` datetime NOT NULL DEFAULT current_timestamp(),
|
||||
`custom_link_updated_at` datetime DEFAULT NULL ON UPDATE current_timestamp(),
|
||||
`custom_link_archived_at` datetime DEFAULT NULL,
|
||||
@@ -894,12 +879,15 @@ CREATE TABLE `logs` (
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `modules`;
|
||||
CREATE TABLE IF NOT EXISTS `modules` (
|
||||
`module_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`module_name` varchar(200) NOT NULL,
|
||||
`module_description` varchar(200) DEFAULT NULL,
|
||||
PRIMARY KEY (`module_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `modules` (
|
||||
`module_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`module_name` varchar(200) NOT NULL,
|
||||
`module_description` varchar(200) DEFAULT NULL,
|
||||
PRIMARY KEY (`module_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `networks`
|
||||
@@ -1563,6 +1551,7 @@ CREATE TABLE `shared_items` (
|
||||
`item_encrypted_username` varchar(255) DEFAULT NULL,
|
||||
`item_encrypted_credential` varchar(255) DEFAULT NULL,
|
||||
`item_note` varchar(255) DEFAULT NULL,
|
||||
`item_recipient` varchar(250) DEFAULT NULL,
|
||||
`item_views` int(11) NOT NULL,
|
||||
`item_view_limit` int(11) DEFAULT NULL,
|
||||
`item_created_at` datetime NOT NULL DEFAULT current_timestamp(),
|
||||
@@ -1960,6 +1949,20 @@ CREATE TABLE `user_permissions` (
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `user_role_permissions`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `user_role_permissions`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `user_role_permissions` (
|
||||
`user_role_id` int(11) NOT NULL,
|
||||
`module_id` int(11) NOT NULL,
|
||||
`user_role_permission_level` int(11) NOT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `user_roles`
|
||||
--
|
||||
@@ -1971,7 +1974,7 @@ CREATE TABLE `user_roles` (
|
||||
`user_role_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`user_role_name` varchar(200) NOT NULL,
|
||||
`user_role_description` varchar(200) DEFAULT NULL,
|
||||
`user_role_is_admin` int(11) NOT NULL DEFAULT 0,
|
||||
`user_role_is_admin` tinyint(1) NOT NULL DEFAULT 0,
|
||||
`user_role_created_at` datetime NOT NULL DEFAULT current_timestamp(),
|
||||
`user_role_updated_at` datetime DEFAULT NULL ON UPDATE current_timestamp(),
|
||||
`user_role_archived_at` datetime DEFAULT NULL,
|
||||
@@ -1979,17 +1982,6 @@ CREATE TABLE `user_roles` (
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `user_role_permissions`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `user_role_permissions`;
|
||||
CREATE TABLE IF NOT EXISTS `user_role_permissions` (
|
||||
`user_role_id` int(11) NOT NULL,
|
||||
`module_id` int(11) NOT NULL,
|
||||
`user_role_permission_level` int(11) NOT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
|
||||
|
||||
--
|
||||
-- Table structure for table `user_settings`
|
||||
--
|
||||
@@ -2117,4 +2109,4 @@ CREATE TABLE `vendors` (
|
||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
-- Dump completed on 2024-09-05 16:21:24
|
||||
-- Dump completed on 2024-09-18 18:21:54
|
||||
|
||||
@@ -69,10 +69,12 @@ if ($row['item_active'] !== "1" || ($row['item_view_limit'] > 0 && $row['item_vi
|
||||
$item_type = nullable_htmlentities($row['item_type']);
|
||||
$item_related_id = intval($row['item_related_id']);
|
||||
$item_encrypted_credential = nullable_htmlentities($row['item_encrypted_credential']);
|
||||
$item_recipient = nullable_htmlentities($row['item_recipient']);
|
||||
$item_note = nullable_htmlentities($row['item_note']);
|
||||
$item_views = intval($row['item_views']);
|
||||
$item_view_limit = intval($row['item_view_limit']);
|
||||
$item_created = nullable_htmlentities($row['item_created_at']);
|
||||
$item_expire = nullable_htmlentities($row['item_expire_at']);
|
||||
$item_expire = date('Y-m-d h:i A', strtotime($row['item_expire_at']));
|
||||
$client_id = intval($row['item_client_id']);
|
||||
?>
|
||||
|
||||
@@ -86,8 +88,24 @@ $client_id = intval($row['item_client_id']);
|
||||
?>
|
||||
|
||||
<div class="card mt-2">
|
||||
<div class="card-header bg-dark">
|
||||
<div class="card-title">
|
||||
<h5><small>Secure Message intended for:</small><br><strong><?php echo $item_recipient ?></strong></h5>
|
||||
</div>
|
||||
|
||||
<div class="card-tools">
|
||||
<div>
|
||||
<?php echo "Views: $item_views / <strong>$item_view_limit</strong>"; ?>
|
||||
</div>
|
||||
<div>
|
||||
<?php echo "Expires: <strong>$item_expire</strong>"; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
|
||||
|
||||
<?php
|
||||
if ($item_type == "Document") {
|
||||
|
||||
@@ -105,7 +123,7 @@ if ($item_type == "Document") {
|
||||
$doc_title_escaped = sanitizeInput($doc_row['document_name']);
|
||||
$doc_content = $purifier->purify($doc_row['document_content']);
|
||||
|
||||
echo "<h2>$doc_title</h2>";
|
||||
echo "<h3>$doc_title</h3>";
|
||||
echo $doc_content;
|
||||
|
||||
// Update document view count
|
||||
@@ -176,7 +194,7 @@ if ($item_type == "Document") {
|
||||
|
||||
?>
|
||||
|
||||
<h4><?php echo $login_name; ?></h4>
|
||||
<h5><?php echo $login_name; ?></h5>
|
||||
<table class="table col-md-3">
|
||||
<tr>
|
||||
<th>URL</th>
|
||||
@@ -235,6 +253,11 @@ if ($item_type == "Document") {
|
||||
|
||||
?>
|
||||
|
||||
<hr>
|
||||
<em>
|
||||
This message and any attachments are confidential and intended for the specified recipient(s) only. If you are not the intended recipient, please notify us immediately with the contact info below. Unauthorized use, disclosure, or distribution is prohibited.
|
||||
</em>
|
||||
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<?php echo "<i class='fas fa-phone fa-fw mr-2'></i>$company_phone | <i class='fas fa-globe fa-fw mr-2 ml-2'></i>$company_website"; ?>
|
||||
|
||||
@@ -298,9 +298,12 @@ if (isset($_POST['add_custom_link'])) {
|
||||
|
||||
$name = sanitizeInput($_POST['name']);
|
||||
$uri = sanitizeInput($_POST['uri']);
|
||||
$new_tab = intval($_POST['new_tab']);
|
||||
$icon = preg_replace("/[^0-9a-zA-Z-]/", "", sanitizeInput($_POST['icon']));
|
||||
|
||||
mysqli_query($mysqli,"INSERT INTO custom_links SET custom_link_name = '$name', custom_link_uri = '$uri', custom_link_icon = '$icon'");
|
||||
$order = intval($_POST['order']);
|
||||
$location = intval($_POST['location']);
|
||||
|
||||
mysqli_query($mysqli,"INSERT INTO custom_links SET custom_link_name = '$name', custom_link_uri = '$uri', custom_link_new_tab = $new_tab, custom_link_icon = '$icon', custom_link_order = $order, custom_link_location = $location");
|
||||
|
||||
//Logging
|
||||
mysqli_query($mysqli,"INSERT INTO logs SET log_type = 'Custom Link', log_action = 'Create', log_description = '$session_name created custom link $name --> $uri', log_ip = '$session_ip', log_user_agent = '$session_user_agent', log_user_id = $session_user_id");
|
||||
@@ -316,9 +319,12 @@ if (isset($_POST['edit_custom_link'])) {
|
||||
$custom_link_id = intval($_POST['custom_link_id']);
|
||||
$name = sanitizeInput($_POST['name']);
|
||||
$uri = sanitizeInput($_POST['uri']);
|
||||
$new_tab = intval($_POST['new_tab']);
|
||||
$icon = preg_replace("/[^0-9a-zA-Z-]/", "", sanitizeInput($_POST['icon']));
|
||||
$order = intval($_POST['order']);
|
||||
$location = intval($_POST['location']);
|
||||
|
||||
mysqli_query($mysqli,"UPDATE custom_links SET custom_link_name = '$name', custom_link_uri = '$uri', custom_link_icon = '$icon' WHERE custom_link_id = $custom_link_id");
|
||||
mysqli_query($mysqli,"UPDATE custom_links SET custom_link_name = '$name', custom_link_uri = '$uri', custom_link_new_tab = $new_tab, custom_link_icon = '$icon', custom_link_order = $order, custom_link_location = $location WHERE custom_link_id = $custom_link_id");
|
||||
|
||||
//Logging
|
||||
mysqli_query($mysqli,"INSERT INTO logs SET log_type = 'Custom Link', log_action = 'Modify', log_description = '$session_name edited the custom link $name', log_ip = '$session_ip', log_user_agent = '$session_user_agent', log_user_id = $session_user_id");
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
<!-- Main Sidebar Container -->
|
||||
<aside class="main-sidebar sidebar-dark-primary d-print-none">
|
||||
|
||||
<a class="brand-link pb-1 mt-1" href="clients.php">
|
||||
<p class="h5"><i class="nav-icon fas fa-arrow-left ml-3 mr-2"></i> Back | <strong>Reports</strong></p>
|
||||
<a class="pb-1 mt-1 brand-link" href="clients.php">
|
||||
<p class="h5"><i class="nav-icon fas fa-arrow-left ml-3 mr-2"></i>
|
||||
<span class="brand-text ">Back | <strong>Reports</strong>
|
||||
</p>
|
||||
</a>
|
||||
|
||||
<!-- Sidebar -->
|
||||
@@ -11,7 +13,7 @@
|
||||
<!-- Sidebar Menu -->
|
||||
<nav>
|
||||
|
||||
<ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" data-accordion="false">
|
||||
<ul class="nav nav-pills nav-sidebar flex-column mt-2" data-widget="treeview" data-accordion="false">
|
||||
|
||||
<?php if ($session_user_role == 1 || $session_user_role == 3 && $config_module_enable_accounting == 1) { ?>
|
||||
<li class="nav-header">FINANCIAL</li>
|
||||
|
||||
16
side_nav.php
16
side_nav.php
@@ -1,8 +1,8 @@
|
||||
<!-- Main Sidebar Container -->
|
||||
<aside class="main-sidebar sidebar-dark-<?php echo nullable_htmlentities($config_theme); ?> d-print-none">
|
||||
|
||||
<div class="brand-link">
|
||||
<h3 class="brand-text text-light mb-0"><?php echo nullable_htmlentities($session_company_name); ?></h3>
|
||||
<div class="brand-link brand-text">
|
||||
<h3 class="text-light mb-0"><?php echo nullable_htmlentities($session_company_name); ?></h3>
|
||||
</div>
|
||||
|
||||
<!-- Sidebar -->
|
||||
@@ -184,19 +184,25 @@
|
||||
</li>
|
||||
|
||||
<?php
|
||||
$sql_custom_links = mysqli_query($mysqli, "SELECT * FROM custom_links WHERE custom_link_archived_at IS NULL
|
||||
ORDER BY custom_link_name DESC"
|
||||
$sql_custom_links = mysqli_query($mysqli, "SELECT * FROM custom_links WHERE custom_link_location = 1 AND custom_link_archived_at IS NULL
|
||||
ORDER BY custom_link_order DESC, custom_link_name DESC"
|
||||
);
|
||||
|
||||
while ($row = mysqli_fetch_array($sql_custom_links)) {
|
||||
$custom_link_name = nullable_htmlentities($row['custom_link_name']);
|
||||
$custom_link_uri = nullable_htmlentities($row['custom_link_uri']);
|
||||
$custom_link_icon = nullable_htmlentities($row['custom_link_icon']);
|
||||
$custom_link_new_tab = intval($row['custom_link_new_tab']);
|
||||
if ($custom_link_new_tab == 1) {
|
||||
$target = "target='_blank' rel='noopener noreferrer'";
|
||||
} else {
|
||||
$target = "";
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="<?php echo $custom_link_uri; ?>" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == basename($custom_link_uri)) { echo "active"; } ?>">
|
||||
<a href="<?php echo $custom_link_uri; ?>" <?php echo $target; ?> class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == basename($custom_link_uri)) { echo "active"; } ?>">
|
||||
<i class="fas fa-<?php echo $custom_link_icon; ?> nav-icon"></i>
|
||||
<p><?php echo $custom_link_name; ?></p>
|
||||
<i class="fas fa-angle-right nav-icon float-right"></i>
|
||||
|
||||
@@ -2,7 +2,12 @@
|
||||
<aside class="main-sidebar sidebar-dark-<?php echo nullable_htmlentities($config_theme); ?> d-print-none">
|
||||
|
||||
<a class="brand-link pb-1 mt-1" href="clients.php">
|
||||
<p class="h5"><i class="nav-icon fas fa-arrow-left ml-3 mr-2"></i> Go Back</strong></p>
|
||||
<p class="h5">
|
||||
<i class="nav-icon fas fa-arrow-left ml-3 mr-2"></i>
|
||||
<span class="brand-text">
|
||||
Back | <strong>Account</strong>
|
||||
</span>
|
||||
</p>
|
||||
</a>
|
||||
|
||||
<!-- Sidebar -->
|
||||
@@ -11,9 +16,9 @@
|
||||
<!-- Sidebar Menu -->
|
||||
<nav>
|
||||
|
||||
<ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu" data-accordion="false">
|
||||
<ul class="nav nav-pills nav-sidebar flex-column mt-2" data-widget="treeview" role="menu" data-accordion="false">
|
||||
|
||||
<li class="nav-item mt-3">
|
||||
<li class="nav-item">
|
||||
<a href="user_details.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "user_details.php") { echo "active"; } ?>">
|
||||
<i class="nav-icon fas fa-user"></i>
|
||||
<p>Details</p>
|
||||
|
||||
Reference in New Issue
Block a user