2017-06-04 21:08:31 +02:00
|
|
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
|
|
|
|
|
|
|
// ============================================================================
|
|
|
|
// Check role
|
|
|
|
// ============================================================================
|
|
|
|
|
2017-09-09 00:33:14 +02:00
|
|
|
if ($Login->role()!=='admin') {
|
|
|
|
Alert::set($Language->g('You do not have sufficient permissions'));
|
|
|
|
Redirect::page('dashboard');
|
|
|
|
}
|
|
|
|
|
2017-06-04 21:08:31 +02:00
|
|
|
// ============================================================================
|
|
|
|
// Functions
|
|
|
|
// ============================================================================
|
|
|
|
|
2017-09-09 00:33:14 +02:00
|
|
|
// This function is used on the VIEW to show the tables
|
2017-06-04 21:08:31 +02:00
|
|
|
function printTable($title, $array) {
|
|
|
|
echo '<h2>'.$title.'</h2>';
|
|
|
|
echo '
|
|
|
|
<table class="uk-table uk-table-striped">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th class="uk-width-1-5"></th>
|
|
|
|
<th class="uk-width-3-5"></th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
';
|
|
|
|
|
|
|
|
foreach($array as $key=>$value) {
|
|
|
|
if($value===false) { $value = 'false'; }
|
|
|
|
elseif($value===true) { $value = 'true'; }
|
|
|
|
echo '<tr>';
|
|
|
|
echo '<td>'.$key.'</td>';
|
|
|
|
echo '<td>'.Sanitize::html($value).'</td>';
|
|
|
|
echo '</tr>';
|
|
|
|
}
|
|
|
|
|
|
|
|
echo '
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
';
|
|
|
|
}
|
|
|
|
|
|
|
|
// ============================================================================
|
|
|
|
// Main before POST
|
|
|
|
// ============================================================================
|
|
|
|
|
|
|
|
// ============================================================================
|
|
|
|
// POST Method
|
|
|
|
// ============================================================================
|
|
|
|
|
|
|
|
// ============================================================================
|
|
|
|
// Main after POST
|
|
|
|
// ============================================================================
|
2017-09-09 00:33:14 +02:00
|
|
|
|
|
|
|
$layout['title'] .= ' - '.$Language->g('Developers');
|