Skip to content

Commit cd68aff

Browse files
bhdreshbhdresh
authored andcommitted
v15 changes
1 parent bdd93d1 commit cd68aff

Some content is hidden

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

52 files changed

+612
-1568
lines changed

Console/Decoify/addEdit.php

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

Console/Decoify/backupSettings.php

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,19 @@
22

33
if(!isset($_SESSION))
44
{
5-
session_start();
5+
session_start();
66
}
7-
require_once('includes/common.php');
87

98
include "db.php";
10-
if(!isset($_SESSION['user_name']) && !isAdmin($_SESSION))
9+
if(!isset($_SESSION['user_name']) && $_SESSION['role'] != 'admin')
1110
{
12-
header('location:loginView.php');
13-
exit();
11+
header('location:loginView.php');
12+
exit();
1413

1514
}
1615

1716

18-
if(isset($_SESSION['user_name']) && isAdmin($_SESSION)) {
17+
if(isset($_SESSION['user_name']) && $_SESSION['role'] == 'admin') {
1918

2019
?>
2120

@@ -86,10 +85,11 @@
8685
</div>
8786
<!-- /.box-body -->
8887

89-
90-
<div class="box box-primary">
88+
89+
90+
<div class="box box-primary">
9191
<div class="box-header with-border">
92-
<h3 class="box-title">Upgrade DejaVu Console</h3>
92+
<h3 class="box-title">Upgrade DejaVu</h3>
9393
</div>
9494
<!-- /.box-header -->
9595
<div class="box-body">
@@ -108,7 +108,7 @@
108108

109109
echo "<form role=\"form\" action=\"updateFramework.php\" method=\"post\" enctype=\"multipart/form-data\">";
110110
echo "<input type=\"hidden\" name=\"csrf_token\" value=\"$csrf_token\"/>";
111-
echo "<button type=\"submit\" class=\"btn btn-primary\">Upgrade DejaVu Console</button>";
111+
echo "<button type=\"submit\" class=\"btn btn-primary\">Upgrade DejaVu Engine</button>";
112112
echo "</form>";
113113

114114
}
@@ -124,9 +124,11 @@
124124

125125

126126

127-
128-
129-
127+
128+
129+
130+
131+
130132
<div class="box box-primary">
131133
<div class="box-header with-border">
132134
<h3 class="box-title">Reboot/Shutdown/Reset DejaVu Console</h3>
@@ -179,6 +181,6 @@
179181
}
180182
else
181183
{
182-
header('location:loginView.php');
184+
header('location:loginView.php');
183185
}
184186
?>

Console/Decoify/dashboard.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@
44
{
55
session_start();
66
}
7-
require_once('includes/common.php');
87

98
include 'db.php';
109

11-
if(isset($_SESSION['user_name']) && isAuthorized($_SESSION)) {
10+
if(isset($_SESSION['user_name']) && $_SESSION['role'] == 'admin') {
1211

1312
$user_id=$_SESSION['user_id'];
1413

Console/Decoify/db.class.php

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

Console/Decoify/db.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<?php
22

33
//Connection to database
4-
require_once('includes/common.php');
54

65
function db_connect() {
76

@@ -43,7 +42,7 @@ function check_session(){
4342
}
4443

4544

46-
if(isset($_SESSION['user_name']) && isAuthorized($_SESSION))
45+
if(isset($_SESSION['user_name']) && $_SESSION['role'] == 'admin')
4746
{
4847
$logged_in = 'true';
4948
return $logged_in;
@@ -105,8 +104,8 @@ function activeAlerts()
105104

106105
$mysqli = db_connect();
107106
$user_id=$_SESSION['user_id'];
108-
$stmt = $mysqli->prepare("select COUNT(Status) as active_events from Alerts where Status=1;");
109-
//$stmt->bind_param("s", $user_id);
107+
$stmt = $mysqli->prepare("select COUNT(Status) as active_events from Alerts where Status=1 and user_id=?;");
108+
$stmt->bind_param("s", $user_id);
110109
$stmt->execute();
111110
$result = $stmt->get_result();
112111

0 commit comments

Comments
 (0)