| 1 | 1 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,105 @@ |
| 1 |
+<?php |
|
| 2 |
+ |
|
| 3 |
+/** |
|
| 4 |
+ * @copyright 2024 Double Bastion LLC <www.doublebastion.com> |
|
| 5 |
+ * |
|
| 6 |
+ * @author Double Bastion LLC |
|
| 7 |
+ * |
|
| 8 |
+ * @license GNU AGPL version 3 or any later version |
|
| 9 |
+ * |
|
| 10 |
+ * This program is free software; you can redistribute it and/or |
|
| 11 |
+ * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE |
|
| 12 |
+ * License as published by the Free Software Foundation; either |
|
| 13 |
+ * version 3 of the License, or any later version. |
|
| 14 |
+ * |
|
| 15 |
+ * This program is distributed in the hope that it will be useful, |
|
| 16 |
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 17 |
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
| 18 |
+ * GNU AFFERO GENERAL PUBLIC LICENSE for more details. |
|
| 19 |
+ * |
|
| 20 |
+ * You should have received a copy of the GNU Affero General Public |
|
| 21 |
+ * License along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
| 22 |
+ * |
|
| 23 |
+ */ |
|
| 24 |
+ |
|
| 25 |
+if ($_SESSION['loggedtorspanel'] == true) {
|
|
| 26 |
+ |
|
| 27 |
+?> |
|
| 28 |
+ <!-- Left Panel --> |
|
| 29 |
+ <aside id="left-panel" class="left-panel"> |
|
| 30 |
+ <nav class="navbar navbar-expand-sm navbar-default"> |
|
| 31 |
+ <div id="main-menu" class="main-menu collapse navbar-collapse"> |
|
| 32 |
+ <ul class="nav navbar-nav"> |
|
| 33 |
+ <li> |
|
| 34 |
+ <a id="dashboardpage" href="index.php"><i class="menu-icon fa fa-laptop" title="Dashboard"></i>Dashboard </a> |
|
| 35 |
+ </li> |
|
| 36 |
+ <li id="settingsmenugen" class="menu-item-has-children"> |
|
| 37 |
+ <a id="settings-menu"><i class="menu-icon fa fa-cogs" title="Settings"></i>Settings</a> |
|
| 38 |
+ <?php |
|
| 39 |
+ if (($_SESSION['loggedtorspanel'] == true) && ($_SESSION['userrole'] == 'superadmin')) {
|
|
| 40 |
+ echo '<ul id="settingsdroparea" class="sub-menu children"> |
|
| 41 |
+ <li><a id="addbuttons" href="add-buttons.php"><i class="fa fa-th" title="Add Buttons"></i>Edit Launch Buttons</a></li> |
|
| 42 |
+ <li><a id="editcomponents" href="add-components.php"><i class="fa fa-bars" title="Edit Components List"></i>Edit Components List</a></li> |
|
| 43 |
+ <li><a id="detectionsfolder" href="set-detections-dir.php"><i class="fa fa-folder-o" title="Detections Directory"></i>Detections Directory</a></li> |
|
| 44 |
+ <li><a id="changepassword" href="change-password.php"><i class="fa ti-lock" title="Change Password"></i>Change Password</a></li> |
|
| 45 |
+ </ul>'; |
|
| 46 |
+ } elseif (($_SESSION['loggedtorspanel'] == true) && ($_SESSION['userrole'] == 'admin')) {
|
|
| 47 |
+ echo '<ul id="settingsdroparea" class="sub-menu children"> |
|
| 48 |
+ <li><a id="changepassword" href="change-password.php"><i class="fa ti-lock" title="Change Password"></i>Change Password</a></li> |
|
| 49 |
+ </ul>'; |
|
| 50 |
+ } |
|
| 51 |
+ ?> |
|
| 52 |
+ </li> |
|
| 53 |
+ <li> |
|
| 54 |
+ <a href="" data-toggle="modal" data-target="#scrollmodal"><i class="menu-icon fa ti-book" title="About"></i>About</a> |
|
| 55 |
+ </li> |
|
| 56 |
+ <li> |
|
| 57 |
+ <a id="logoutlink" href="logout.php"><i class="menu-icon fa fa-power-off" title="Logout"></i>Logout </a> |
|
| 58 |
+ </li> |
|
| 59 |
+ </ul> |
|
| 60 |
+ </div> <!-- /.navbar-collapse --> |
|
| 61 |
+ </nav> |
|
| 62 |
+ </aside> |
|
| 63 |
+ <!-- /#left-panel --> |
|
| 64 |
+ |
|
| 65 |
+ <!-- Right Panel --> |
|
| 66 |
+ <div id="right-panel" class="right-panel"> |
|
| 67 |
+ <!-- Header--> |
|
| 68 |
+ <header id="header" class="header"> |
|
| 69 |
+ <div class="top-left"> |
|
| 70 |
+ <div class="navbar-header"> |
|
| 71 |
+ <a class="navbarlogo" href="index.php"><img class="dashboardlogo" src="images/red-scarf-suite-panel_logo.svg" alt="RED SCARF Suite Panel logo small"></a> |
|
| 72 |
+ <a id="menuToggle" class="menutoggle"><i class="fa fa-bars"></i></a> |
|
| 73 |
+ </div> |
|
| 74 |
+ </div> |
|
| 75 |
+ |
|
| 76 |
+ <div class="top-right"> |
|
| 77 |
+ <div class="header-menu"> |
|
| 78 |
+ <div class="header-left"> |
|
| 79 |
+ |
|
| 80 |
+ <div class="user-area dropdown float-right"> |
|
| 81 |
+ <a href="" class="dropdown-toggle active" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> |
|
| 82 |
+ <img class="user-avatar rounded-circle" src="images/user_image.svg" alt="User Avatar"> |
|
| 83 |
+ </a> |
|
| 84 |
+ |
|
| 85 |
+ <div class="user-menu dropdown-menu"> |
|
| 86 |
+ <span class="nav-link">You are logged in as:<br><i class="fa fa-user"></i><?php print_r($_SESSION['login']); ?><span id="userroleline">(<?php print_r($_SESSION['userrole']); ?>)</span></span> |
|
| 87 |
+ |
|
| 88 |
+ <a id="logoutlink" class="nav-link" href="logout.php"><i class="fa fa-power-off"></i>Logout</a> |
|
| 89 |
+ </div> |
|
| 90 |
+ </div> |
|
| 91 |
+ |
|
| 92 |
+ </div> |
|
| 93 |
+ </div> |
|
| 94 |
+ </header> |
|
| 95 |
+ <!-- /#header --> |
|
| 96 |
+ <!-- /#right-panel --> |
|
| 97 |
+ |
|
| 98 |
+<?php |
|
| 99 |
+ |
|
| 100 |
+} else {
|
|
| 101 |
+ header("Location: panel-login.php");
|
|
| 102 |
+} |
|
| 103 |
+ |
|
| 104 |
+?> |
|
| 105 |
+ |