koblog/bl-kernel/admin/controllers/developers.php
2025-01-18 20:04:58 +01:00

53 lines
No EOL
1.6 KiB
PHP

<?php defined('KOBLOG') or die('Koblog CMS.');
// ============================================================================
// Check role
// ============================================================================
checkRole(array('admin'));
// ============================================================================
// Functions
// ============================================================================
// This function is used on the VIEW to show the tables
function printTable($title, $array) {
echo '<h2 class="mb-2">'.$title.'</h2>';
echo '<div class="card mb-4">';
echo '<table class="table m-0">
<tbody>
';
foreach ($array as $key=>$value) {
if($value===false) { $value = 'false'; }
elseif($value===true) { $value = 'true'; }
echo '<tr class="card-tablebody">';
echo '<td>'.$key.'</td>';
if (is_array($value)) {
echo '<td>'.json_encode($value).'</td>';
} else {
echo '<td>'.Sanitize::html($value).'</td>';
}
echo '</tr>';
}
echo '
</tbody>
</table>
</div>
';
}
// ============================================================================
// Main before POST
// ============================================================================
// ============================================================================
// POST Method
// ============================================================================
// ============================================================================
// Main after POST
// ============================================================================
$layout['title'] .= ' - '.$L->g('Developers');