-
Notifications
You must be signed in to change notification settings - Fork 7
/
usersettings.php
99 lines (86 loc) · 2.43 KB
/
usersettings.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<?php
$page_title = "User Settings";
define('OSW_IN_SYSTEM', true);
require_once('inc/header.php');
if ($user) {
?>
<!-- Nav tabs -->
<ul class="nav nav-tabs">
<li class="active"><a href="#settings" data-toggle="tab">Settings</a></li>
<li><a href="#profile" data-toggle="tab">Profile</a></li>
<li><a href="#messages" data-toggle="tab">Messages</a></li>
<li><a href="#inv" data-toggle="tab">Inventory</a></li>
</ul>
<!-- Tab panes -->
<div class="tab-content">
<div class="tab-pane active" id="settings">
<?php
?>
</div>
<div class="tab-pane" id="profile">
<?php
?>
</div>
<div class="tab-pane" id="messages">
<?php
?>
</div>
<div class="tab-pane" id="inv">
<table class='table'>
<thead>
<tr>
<th>Folder/Item name</th>
<th>Type</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php
$ifq = $osw->SQL->query("SELECT * FROM `{$osw->config['robust_db']}`.InventoryFolders WHERE agentID = '$user_uuid' ORDER BY `folderName` ASC LIMIT 0,100");
while ($ifr = $osw->SQL->fetch_array($ifq)) {
$folderName = $ifr['folderName'];
$folderID = $ifr['folderID'];
if ($folderName == "Trash") {
$fbuttons = "<input type='submit' name='emptytrash' value='Empty Trash' class='btn btn-primary'>";
}else{
$fbuttons = "<input type='submit' name='movefolder' value='Move Folder' class='btn btn-primary'>";
}
echo "
<tr>
<td>".$folderName."</td>
<td></td>
<td>".$fbuttons."</td>
</tr>
";
$iiq = $osw->SQL->query("SELECT * FROM `{$osw->config['robust_db']}`.InventoryItems WHERE parentFolderID = '$folderID' ORDER BY `inventoryName` ASC LIMIT 0,100");
$iin = $osw->SQL->num_rows($iiq);
if ($iin) {
while ($iir = $osw->SQL->fetch_array($iiq)) {
$invName = $iir['inventoryName'];
$invDesc = $iir['inventoryDescription'];
$invType = $iir['invType'];
if ($invName == "") {
$ibuttons = "<input type='submit' name='emptytrash' value='Empty Trash' class='btn btn-primary'>";
}else{
$ibuttons = "<input type='submit' name='moveitem' value='Move Item' class='btn btn-primary'>";
}
echo "
<tr>
<td> - ".$invName."</td>
<td></td>
<td>".$ibuttons."</td>
</tr>
";
}
}else{
}
}
?>
</tbody>
</table>
</div>
</div>
<?php
}
include ('inc/footer.php');
?>