cleanup index file

master
Jean-Christian Paul Denis 2021-08-26 02:08:41 +02:00
parent 0afc3db3d5
commit ab0217fb89
1 changed files with 17 additions and 21 deletions

View File

@ -10,7 +10,9 @@
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
# -- END LICENSE BLOCK ------------------------------------
if (!defined('DC_CONTEXT_ADMIN')){return;}
if (!defined('DC_CONTEXT_ADMIN')) {
return;
}
# Check user perms
dcPage::check('admin');
@ -40,20 +42,16 @@ $footer = '<hr class="clear"/><p class="right">
<a class="button" href="' . $p_url . '&amp;part=service" title="' . __('Configure services') . '">' . __('Services') . '</a> -
kUtRL - ' . $core->plugins->moduleInfo('kUtRL','version') . '&nbsp;
<img alt="' . __('kUtRL') . '" src="index.php?pf=kUtRL/icon.png" />
</p>
<h2 class="titleKutrl"><a title="kUtRL, '.__('Links shortener').' | http://kutrl.fr" href="http://kutrl.fr">
<img alt="kUtRL, '.__('Links shortener').' | http://kutrl.fr" src="index.php?pf=kUtRL/inc/img/kutrl_logo.png" />
</a></h2>
';
</p>';
# Messages
$msg = isset($_REQUEST['msg']) ? $_REQUEST['msg'] : '';
$msg_list = array(
$msg_list = [
'savesetting' => __('Configuration successfully saved'),
'saveservice' => __('Services successfully updated'),
'createlink' => __('Link successfully shorten'),
'deletelinks' => __('Links successfully deleted')
);
];
if (isset($msg_list[$msg])) {
$msg = sprintf('<p class="message">%s</p>', $msg_list[$msg]);
}
@ -66,5 +64,3 @@ if (!file_exists(dirname(__FILE__).'/inc/index.'.$default_part.'.php')) {
$default_part = 'setting';
}
include dirname(__FILE__) . '/inc/index.' . $default_part . '.php';
?>