-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsettings.php
155 lines (137 loc) · 6.02 KB
/
settings.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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
<?php
require("core.php");
head();
if (isset($_POST['save'])) {
if (isset($_POST['fixed_layout'])) {
$fixed_layout = 'Yes';
} else {
$fixed_layout = 'No';
}
if (isset($_POST['boxed_layout'])) {
$boxed_layout = 'Yes';
} else {
$boxed_layout = 'No';
}
if (isset($_POST['sidebar_collapsed'])) {
$sidebar_collapsed = 'Yes';
} else {
$sidebar_collapsed = 'No';
}
if (isset($_POST['sidebar_hover'])) {
$sidebar_hover = 'Yes';
} else {
$sidebar_hover = 'No';
}
$config['fixed_layout'] = $fixed_layout;
$config['boxed_layout'] = $boxed_layout;
$config['sidebar_collapsed'] = $sidebar_collapsed;
$config['sidebar_hover'] = $sidebar_hover;
file_put_contents('config.php', '<?php return ' . var_export($config, true) . '; ?>');
echo '<meta http-equiv="refresh" content="0; url=settings.php" />';
}
?>
<div class="content-wrapper">
<!--CONTENT CONTAINER-->
<!--===================================================-->
<div id="content-container">
<section class="content-header">
<h1><i class="fa fa-cogs"></i> Settings</h1>
<ol class="breadcrumb">
<li><a href="dashboard.php"><i class="fa fa-home"></i> Admin Panel</a></li>
<li class="active">Settings</li>
</ol>
</section>
<!--Page content-->
<!--===================================================-->
<section class="content">
<div class="row">
<div class="col-md-12">
<form class="form-horizontal" method="post">
<div class="box">
<div class="box-header">
<h3 class="box-title"><i class="fa fa-cog"></i> Settings</h3>
</div>
<div class="box-body">
<br /><h4 class="box-title"><i class="fa fa-desktop"></i> Interface Options</h4>
<div class="form-group">
<label class="control-label col-md-3">Fixed Layout</label>
<div class="col-md-9">
<div class="switch switch-success">
<div class="switch switch-sm switch-success">
<input type="checkbox" name="fixed_layout" id="ios-switch" <?php
if ($config['fixed_layout'] == 'Yes') {
echo 'checked="checked" checked';
}
?> />
</div> Activates the fixed layout. Fixed and boxed layouts can't work together<br />
</div>
</div>
</div><hr>
<div class="form-group">
<label class="control-label col-md-3">Boxed Layout</label>
<div class="col-md-9">
<div class="switch switch-success">
<div class="switch switch-sm switch-success">
<input type="checkbox" name="boxed_layout" id="ios-switch2" <?php
if ($config['boxed_layout'] == 'Yes') {
echo 'checked="checked" checked';
}
?> />
</div> Activates the boxed layout<br />
</div>
</div>
</div><hr>
<div class="form-group">
<label class="control-label col-md-3">Collapsed sidebar</label>
<div class="col-md-9">
<div class="switch switch-success">
<div class="switch switch-sm switch-success">
<input type="checkbox" name="sidebar_collapsed" id="ios-switch3" <?php
if ($config['sidebar_collapsed'] == 'Yes') {
echo 'checked="checked" checked';
}
?> />
</div> Activates the compact sidebar navigation<br />
</div>
</div>
</div><hr>
<div class="form-group">
<label class="control-label col-md-3">Sidebar Expand on Hover</label>
<div class="col-md-9">
<div class="switch switch-success">
<div class="switch switch-sm switch-success">
<input type="checkbox" name="sidebar_hover" id="ios-switch4" <?php
if ($config['sidebar_hover'] == 'Yes') {
echo 'checked="checked" checked';
}
?> />
</div> Lets the sidebar navigation expand on hover<br />
</div>
</div>
</div>
</div>
<div class="panel-footer text-left">
<button class="btn btn-flat btn-primary" name="save" type="submit">Save</button>
<button type="reset" class="btn btn-flat btn-default">Reset</button>
</div>
</div>
</form>
</div>
</div>
</div>
<!--===================================================-->
<!--End page content-->
</div>
<!--===================================================-->
<!--END CONTENT CONTAINER-->
<script>
$(document).ready(function() {
new Switchery(document.getElementById('ios-switch'), { size: 'large' });
new Switchery(document.getElementById('ios-switch2'), { size: 'large' });
new Switchery(document.getElementById('ios-switch3'), { size: 'large' });
new Switchery(document.getElementById('ios-switch4'), { size: 'large' });
});
</script>
<?php
footer();
?>