2017-06-04 21:08:31 +02:00
|
|
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
|
|
|
|
|
|
|
// ============================================================================
|
|
|
|
// Check role
|
|
|
|
// ============================================================================
|
|
|
|
|
2018-05-20 21:48:43 +02:00
|
|
|
checkRole(array('admin'));
|
2017-09-09 00:33:14 +02:00
|
|
|
|
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) {
|
2018-04-22 17:45:31 +02:00
|
|
|
echo '<h2 class="mb-2 mt-4">'.$title.'</h2>';
|
|
|
|
echo '<table class="table table-striped mt-3">
|
2017-06-04 21:08:31 +02:00
|
|
|
<tbody>
|
|
|
|
';
|
|
|
|
|
2017-09-22 23:11:08 +02:00
|
|
|
foreach ($array as $key=>$value) {
|
2017-06-04 21:08:31 +02:00
|
|
|
if($value===false) { $value = 'false'; }
|
|
|
|
elseif($value===true) { $value = 'true'; }
|
|
|
|
echo '<tr>';
|
|
|
|
echo '<td>'.$key.'</td>';
|
2017-09-22 23:11:08 +02:00
|
|
|
if (is_array($value)) {
|
|
|
|
echo '<td>'.json_encode($value).'</td>';
|
|
|
|
} else {
|
|
|
|
echo '<td>'.Sanitize::html($value).'</td>';
|
|
|
|
}
|
2017-06-04 21:08:31 +02:00
|
|
|
echo '</tr>';
|
|
|
|
}
|
|
|
|
|
|
|
|
echo '
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
';
|
|
|
|
}
|
|
|
|
|
|
|
|
// ============================================================================
|
|
|
|
// Main before POST
|
|
|
|
// ============================================================================
|
|
|
|
|
|
|
|
// ============================================================================
|
|
|
|
// POST Method
|
|
|
|
// ============================================================================
|
|
|
|
|
|
|
|
// ============================================================================
|
|
|
|
// Main after POST
|
|
|
|
// ============================================================================
|
2017-09-09 00:33:14 +02:00
|
|
|
|
2018-08-03 19:03:09 +02:00
|
|
|
$layout['title'] .= ' - '.$language->g('Developers');
|