Skip to content

Commit b877f65

Browse files
committed
SimpleRisk 20220823-001 Release
1 parent edeff37 commit b877f65

325 files changed

Lines changed: 4101 additions & 17525 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

simplerisk/admin/extras.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@
142142
-->
143143
<tr>
144144
<td width="155px"><b>Import / Export</b></td>
145-
<td>Enables the import and export of CSV files containing risk information.</td>
145+
<td>Enables the import and export of CSV or XLS/XLSX files containing risk information.</td>
146146
<td width="60px"><?php echo (import_export_extra() ? '<a href="importexport.php">Yes</a>' : '<a href="importexport.php">No</a>'); ?></td>
147147
</tr>
148148
<tr>

simplerisk/admin/importexport.php

Lines changed: 29 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -61,65 +61,72 @@
6161
// If the user selected to do a combined export
6262
if (isset($_POST['combined_export']))
6363
{
64-
// Export the CSV file
65-
export_csv("combined");
64+
// Export the XLSX file
65+
export_xls("combined");
6666
}
6767

6868
// If the user selected to do a combined export
6969
if (isset($_POST['risks_export']))
7070
{
71-
// Export the CSV file
72-
export_csv("risks");
71+
// Export the XLSX file
72+
export_xls("risks");
7373
}
7474

7575
// If the user selected to do a combined export
7676
if (isset($_POST['mitigations_export']))
7777
{
78-
// Export the CSV file
79-
export_csv("mitigations");
78+
// Export the XLSX file
79+
export_xls("mitigations");
8080
}
8181

8282
// If the user selected to do a combined export
8383
if (isset($_POST['reviews_export']))
8484
{
85-
// Export the CSV file
86-
export_csv("reviews");
85+
// Export the XLSX file
86+
export_xls("reviews");
8787
}
8888

8989
// If the user selected to do a combined export
9090
if (isset($_POST['assessments_export']))
9191
{
92-
// Export the CSV file
93-
export_csv("assessments");
92+
// Export the XLSX file
93+
export_xls("assessments");
9494
}
9595

9696
// If the user selected to do an asset export
9797
if (isset($_POST['assets_export']))
9898
{
99-
// Export the CSV file
100-
export_csv("assets");
99+
// Export the XLSX file
100+
export_xls("assets");
101101
}
102102

103103
// If the user selected to do an asset group export
104104
if (isset($_POST['asset_groups_export']))
105105
{
106-
// Export the CSV file
107-
export_csv("asset_groups");
106+
// Export the XLSX file
107+
export_xls("asset_groups");
108108
}
109109

110110
// If the user selected to do a control export
111111
if (isset($_POST['controls_export']))
112112
{
113-
// Export the CSV file
114-
export_csv("controls");
113+
// Export the XLSX file
114+
export_xls("controls");
115115
}
116116

117-
// If the user selected to do a user export
118-
if (isset($_POST['users_export']))
119-
{
120-
// Export the CSV file
121-
export_csv("users");
122-
}
117+
// If the user selected to do a user export
118+
if (isset($_POST['users_export']))
119+
{
120+
// Export the XLSX file
121+
export_xls("users");
122+
}
123+
124+
// If the user selected to do a template groups export
125+
if (isset($_POST['template_groups_export']))
126+
{
127+
// Export the XLSX file
128+
export_xls("template_groups");
129+
}
123130
}
124131

125132
/*********************

simplerisk/admin/notification.php

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -202,19 +202,6 @@ function display($display = "")
202202
</div>
203203
</div>
204204
<script>
205-
(function($) {
206-
207-
var tabs = $(".tabs li a");
208-
209-
tabs.click(function() {
210-
var content = this.hash.replace('/','');
211-
tabs.removeClass("active");
212-
$(this).addClass("active");
213-
$("#content").find('.settings_tab').hide();
214-
$(content).fadeIn(200);
215-
});
216-
217-
})(jQuery);
218205

219206
$(document).ready(function(){
220207
$(".period-dropdown").change(function(){
@@ -227,7 +214,26 @@ function display($display = "")
227214
$("#specified_" + period, container).show();
228215
$("#specified_" + period + " input," + "#specified_" + period + " select", container).prop('disabled', false);
229216

230-
})
217+
});
218+
219+
var tabs = $(".tabs li a");
220+
var hash = window.location.hash;
221+
if(hash){
222+
tabs.removeClass("active");
223+
$(".tabs").find("[href='"+hash+"']").addClass("active");
224+
225+
var content = hash.replace('/','');
226+
$("#content > div").hide();
227+
$(content).fadeIn(200);
228+
}
229+
230+
tabs.click(function() {
231+
var content = this.hash.replace('/','');
232+
tabs.removeClass("active");
233+
$(this).addClass("active");
234+
$("#content > div").hide();
235+
$(content).fadeIn(200);
236+
});
231237
});
232238

233239
<?php prevent_form_double_submit_script(['activate_extra', 'deactivate_extra']); ?>

simplerisk/assessments/index.php

Lines changed: 46 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,26 @@
3030
// Include the SimpleRisk language file
3131
require_once(language_file());
3232

33+
// Check if we should add a pending risk
34+
if (isset($_POST['add']))
35+
{
36+
// Push the pending risk to a real risk
37+
push_pending_risk();
38+
}
39+
40+
// Check if we should delete a pending risk
41+
if (isset($_POST['delete']))
42+
{
43+
// Get the risk id to delete
44+
$pending_risk_id = (int)$_POST['pending_risk_id'];
45+
46+
// Delete the pending risk
47+
delete_pending_risk($pending_risk_id);
48+
49+
// Set the alert message
50+
set_alert(true, "good", "The pending risk was deleted successfully.");
51+
}
52+
3353
// If an assessment was posted
3454
if (isset($_POST['action']) && $_POST['action'] == "submit")
3555
{
@@ -69,8 +89,8 @@
6989
// If the action is view
7090
else if ($_GET['action'] == "view")
7191
{
72-
// Use the Available Assessments menu
73-
$menu = "AvailableAssessments";
92+
// Use the Self Assessments menu
93+
$menu = "SelfAssessments";
7494
}
7595
// If the action is send
7696
else if ($_GET['action'] == "send")
@@ -82,8 +102,8 @@
82102
// Otherwise
83103
else
84104
{
85-
// Use the Available Assessments menu
86-
$menu = "AvailableAssessments";
105+
// Use the Self Assessments menu
106+
$menu = "SelfAssessments";
87107
}
88108

89109
?>
@@ -109,12 +129,14 @@
109129
// Include the jquery-ui javascript source
110130
display_jquery_ui_javascript($scripts);
111131

112-
display_bootstrap_javascript();
132+
display_bootstrap_javascript();
113133
?>
114134
<script src="../js/pages/assessment.js?<?php echo current_version("app"); ?>"></script>
115135
<script src="../js/common.js?<?php echo current_version("app"); ?>"></script>
116136
<script src="../js/cve_lookup.js?<?php echo current_version("app"); ?>"></script>
117137
<script src="../js/jquery.blockUI.min.js?<?php echo current_version("app"); ?>"></script>
138+
<script src="../js/selectize.min.js?<?php echo current_version("app"); ?>"></script>
139+
<script src="../js/jquery.datetimepicker.full.min.js?<?php echo current_version("app"); ?>"></script>
118140

119141
<title>SimpleRisk: Enterprise Risk Management Simplified</title>
120142
<meta name="viewport" content="width=device-width, initial-scale=1">
@@ -130,9 +152,11 @@
130152
<link rel="stylesheet" href="../vendor/components/font-awesome/css/fontawesome.min.css?<?php echo current_version("app"); ?>">
131153
<link rel="stylesheet" href="../css/theme.css?<?php echo current_version("app"); ?>">
132154
<link rel="stylesheet" href="../css/side-navigation.css?<?php echo current_version("app"); ?>">
155+
<link rel="stylesheet" href="../css/settings_tabs.css?<?php echo current_version("app"); ?>">
133156

134157
<link rel="stylesheet" href="../css/selectize.bootstrap3.css?<?php echo current_version("app"); ?>">
135158
<script src="../js/selectize.min.js?<?php echo current_version("app"); ?>"></script>
159+
<link rel="stylesheet" href="../css/jquery.datetimepicker.min.css?<?php echo current_version("app"); ?>">
136160

137161
<?php
138162
setup_favicon("..");
@@ -204,14 +228,28 @@
204228
}
205229
else
206230
{
207-
// Display the available assessments
208-
display_assessment_links();
231+
// Display the self assessments
232+
display_self_assessments();
209233
}
210234
?>
211235
</div>
212236
</div>
213237
</div>
214-
<?php display_set_default_date_format_script(); ?>
238+
<script>
239+
(function($) {
240+
241+
var tabs = $(".tabs li a");
242+
243+
tabs.click(function() {
244+
var content = this.hash.replace('/','');
245+
tabs.removeClass("active");
246+
$(this).addClass("active");
247+
$("#content").find('.settings_tab').hide();
248+
$(content).fadeIn(200);
249+
});
250+
})(jQuery);
251+
</script>
252+
<?php display_set_default_date_format_script(); ?>
215253
</body>
216254

217255
</html>

simplerisk/assessments/risks.php

Lines changed: 0 additions & 126 deletions
This file was deleted.

0 commit comments

Comments
 (0)