diff --git a/interface/lib/lang/de.lng b/interface/lib/lang/de.lng index 9d2a670294dfe675b1a6aea79457d5e43f4e2e3d..247e6a454b3ac792c68a36a8e701db165a254da2 100644 --- a/interface/lib/lang/de.lng +++ b/interface/lib/lang/de.lng @@ -33,4 +33,5 @@ $wb['top_menu_tools'] = 'Tools'; $wb['top_menu_help'] = 'Support'; $wb['top_menu_billing'] = 'Billing'; $wb['top_menu_domain'] = 'Domänen'; +$wb['top_menu_dashboard'] = 'Startseite'; ?> diff --git a/interface/lib/lang/en.lng b/interface/lib/lang/en.lng index da7caf12f3d307400acebdd8befae99d6731e93f..1693bb154fb875b4c1b337b075d742a8dee1a499 100644 --- a/interface/lib/lang/en.lng +++ b/interface/lib/lang/en.lng @@ -33,5 +33,6 @@ $wb['top_menu_tools'] = 'Tools'; $wb['top_menu_help'] = 'Help'; $wb['top_menu_billing'] = 'Billing'; $wb['top_menu_domain'] = 'Domains'; +$wb['top_menu_dashboard'] = 'Home'; $wb['toolsarea_head_txt'] = 'Tools'; ?> diff --git a/interface/web/dashboard/dashboard.php b/interface/web/dashboard/dashboard.php new file mode 100644 index 0000000000000000000000000000000000000000..53a745c6e16ed6665af6dbb1a3051c0932606b26 --- /dev/null +++ b/interface/web/dashboard/dashboard.php @@ -0,0 +1,119 @@ +auth->check_module_permissions('dashboard'); + +//* Loading Template +$app->uses('tpl'); +$app->tpl->newTemplate("templates/dashboard.htm"); + +//* load language file +$lng_file = 'lib/lang/'.$_SESSION['s']['language'].'.lng'; +include($lng_file); +$app->tpl->setVar($wb); + +//* set Default - Values +$app->tpl_defaults(); + +/* + * Let the user welcome +*/ +$welcome = sprintf($wb['welcome_user_txt'], $_SESSION['s']['user']['username']); +$app->tpl->setVar('welcome_user', $welcome); + + +/* + * ToDo: Display errors, warnings and hints +*/ +///* +// * If there is any error to display, do it... +//*/ +//$error = array(); +// +//$error[] = array('error_msg' => 'EClaus1'); +//$error[] = array('error_msg' => 'EEClaus2'); +//$error[] = array('error_msg' => 'EClaus3'); +//$error[] = array('error_msg' => 'EClaus4'); +// +//$app->tpl->setloop('error', $error); +// +///* +// * If there is any warning to display, do it... +//*/ +//$warning = array(); +// +//$warning[] = array('warning_msg' => 'WClaus1'); +//$warning[] = array('warning_msg' => 'WWClaus2'); +//$warning[] = array('warning_msg' => 'WClaus3'); +//$warning[] = array('warning_msg' => 'WClaus4'); +// +//$app->tpl->setloop('warning', $warning); +// +///* +// * If there is any information to display, do it... +//*/ +//$info = array(); +// +//$info[] = array('info_msg' => 'IClaus1'); +//$info[] = array('info_msg' => 'IClaus2'); +//$info[] = array('info_msg' => 'IClaus3'); +//$info[] = array('info_msg' => 'IClaus4'); +// +//$app->tpl->setloop('info', $info); + +/* + * Show all modules, the user is allowed to use +*/ +$modules = explode(',', $_SESSION['s']['user']['modules']); +$mod = array(); +if(is_array($modules)) { + foreach($modules as $mt) { + if(is_file('../' . $mt . '/lib/module.conf.php')) { + if(!preg_match("/^[a-z]{2,20}$/i", $mt)) die('module name contains unallowed chars.'); + include_once('../' . $mt.'/lib/module.conf.php'); + /* We don't want to show the dashboard */ + if ($mt != 'dashboard') { + $mod[] = array( 'modules_title' => $app->lng($module['title']), + 'modules_startpage' => $module['startpage'], + 'modules_name' => $module['name']); + } + } + } + + $app->tpl->setloop('modules', $mod); +} + +//* Do Output +$app->tpl->pparse(); + +?> \ No newline at end of file diff --git a/interface/web/dashboard/lib/admin.conf.php b/interface/web/dashboard/lib/admin.conf.php new file mode 100644 index 0000000000000000000000000000000000000000..584f28bad6bb16793a5f8f488d9ebf48b7b92683 --- /dev/null +++ b/interface/web/dashboard/lib/admin.conf.php @@ -0,0 +1,29 @@ + \ No newline at end of file diff --git a/interface/web/dashboard/lib/lang/de.lng b/interface/web/dashboard/lib/lang/de.lng new file mode 100644 index 0000000000000000000000000000000000000000..79ffff06e3e70744c88d42f273dc82fa150ddd6e --- /dev/null +++ b/interface/web/dashboard/lib/lang/de.lng @@ -0,0 +1,4 @@ + diff --git a/interface/web/dashboard/lib/lang/en.lng b/interface/web/dashboard/lib/lang/en.lng new file mode 100644 index 0000000000000000000000000000000000000000..177fad0416a8a85f1be052efcd0973a08e572968 --- /dev/null +++ b/interface/web/dashboard/lib/lang/en.lng @@ -0,0 +1,4 @@ + diff --git a/interface/web/dashboard/lib/module.conf.php b/interface/web/dashboard/lib/module.conf.php new file mode 100644 index 0000000000000000000000000000000000000000..28f47a26a6fba0127ad517a3e7fd72e634df2a75 --- /dev/null +++ b/interface/web/dashboard/lib/module.conf.php @@ -0,0 +1,46 @@ + 'Dashboard 1', +// 'target' => 'content', +// 'link' => 'dashboard/dashboard.php'); +// +//$module['nav'][] = array( 'title' => 'Dashboard 2', +// 'open' => 1, +// 'items' => $items); + +?> \ No newline at end of file diff --git a/interface/web/dashboard/templates/dashboard.htm b/interface/web/dashboard/templates/dashboard.htm new file mode 100644 index 0000000000000000000000000000000000000000..190252b655c7cca845051d2c8f7722d301caab00 --- /dev/null +++ b/interface/web/dashboard/templates/dashboard.htm @@ -0,0 +1,36 @@ +

+ +
+
+ +
+ +

{tmpl_var name='error_msg'}

+
+
+
+ +
+ +

{tmpl_var name='warning_msg'}

+
+
+
+ +
+ +

{tmpl_var name='info_msg'}

+
+
+
+
+

 

+

{tmpl_var name='available_modules_txt'}

+ + + +
diff --git a/interface/web/nav.php b/interface/web/nav.php index 73a63717208be5f1a7568435ba6984b2301bee73..07eb9326e692bd5ee850351c487ed317549a1c9a 100644 --- a/interface/web/nav.php +++ b/interface/web/nav.php @@ -35,13 +35,21 @@ $app->uses('tpl'); //** Top Naviation if(isset($_GET['nav']) && $_GET['nav'] == 'top') { - + $app->tpl->newTemplate('topnav.tpl.htm'); - + //* Check User Login and current module if(isset($_SESSION["s"]["user"]) && $_SESSION["s"]["user"]['active'] == 1 && is_array($_SESSION['s']['module'])) { //* Loading modules of the user and building top navigation $modules = explode(',', $_SESSION['s']['user']['modules']); + /* + * If the dashboard is in the list of modules it always has to be the first! + */ + if (in_array('dashboard', $modules)) { + $key = array_search('dashboard', $modules); + unset($modules[$key]); + $modules = array_merge(array('dashboard'), $modules); + } if(is_array($modules)) { foreach($modules as $mt) { if(is_file($mt.'/lib/module.conf.php')) { @@ -49,8 +57,8 @@ if(isset($_GET['nav']) && $_GET['nav'] == 'top') { include_once($mt.'/lib/module.conf.php'); $active = ($module['name'] == $_SESSION['s']['module']['name']) ? 1 : 0; $topnav[] = array( 'title' => $app->lng($module['title']), - 'active' => $active, - 'module' => $module['name']); + 'active' => $active, + 'module' => $module['name']); } } } @@ -59,21 +67,21 @@ if(isset($_GET['nav']) && $_GET['nav'] == 'top') { include_once('login/lib/module.conf.php'); $_SESSION['s']['module'] = $module; $topnav[] = array( 'title' => 'Login', - 'active' => 1); + 'active' => 1); $module = null; unset($module); } //* Topnavigation $app->tpl->setLoop('nav_top',$topnav); - + } //** Side Naviation if(isset($_GET['nav']) && $_GET['nav'] == 'side') { - + $app->tpl->newTemplate('sidenav.tpl.htm'); - + //* translating module navigation $nav_translated = array(); if(isset($_SESSION['s']['module']['nav']) && is_array($_SESSION['s']['module']['nav'])) { @@ -93,7 +101,7 @@ if(isset($_GET['nav']) && $_GET['nav'] == 'side') { } $app->tpl->setLoop('nav_left',$nav_translated); - + } $app->tpl_defaults(); diff --git a/interface/web/themes/default/css/navigation/nav_top.css b/interface/web/themes/default/css/navigation/nav_top.css index 1b5207563820ae1fd2bc0614d7541ae15967101f..13dc1c8980b6a012f7c30d16063cbf26453d6734 100644 --- a/interface/web/themes/default/css/navigation/nav_top.css +++ b/interface/web/themes/default/css/navigation/nav_top.css @@ -95,4 +95,8 @@ background-image: url('../../icons/x32/domain.png') !important; } + .topnav-dashboard { + background-image: url('../../icons/x32/dashboard.png') !important; + } + } \ No newline at end of file diff --git a/interface/web/themes/default/css/screen/content_ispc.css b/interface/web/themes/default/css/screen/content_ispc.css index 0f52f10cc1478cca673a5aba3e0b1849f5bbafc4..10803ced91eec810dbd4777c5f7a594a4c56ff53 100644 --- a/interface/web/themes/default/css/screen/content_ispc.css +++ b/interface/web/themes/default/css/screen/content_ispc.css @@ -230,6 +230,36 @@ padding:0px 5px; } + /* Dashboard */ + .dashboard-modules { + float:left; + width:100px; + height: 20px; + border:1px dotted #888888; + background-color: #cccccc; + margin:10px; + padding:10px; + background-position: center 5px; + background-repeat: no-repeat; + padding-top: 70px; + text-align: center; + } + + .dashboard-modules a{ + color: Black; + font-weight: bold; + } + + .dashboard-modules.admin { background-image: url('../../icons/x64/system.png') !important; } + .dashboard-modules.client { background-image: url('../../icons/x64/client.png') !important; } + .dashboard-modules.mail { background-image: url('../../icons/x64/email.png') !important; } + .dashboard-modules.monitor { background-image: url('../../icons/x64/monitor.png') !important; } + .dashboard-modules.dns { background-image: url('../../icons/x64/dns.png') !important; } + .dashboard-modules.tools { background-image: url('../../icons/x64/tools.png') !important; } + .dashboard-modules.help { background-image: url('../../icons/x64/help.png') !important; } + .dashboard-modules.domain { background-image: url('../../icons/x64/domain.png') !important; } + .dashboard-modules.sites { background-image: url('../../icons/x64/sites.png') !important; } + /* Image-Replacement */ .swap { background-repeat:no-repeat; } .swap span { display:none; height:16px; } diff --git a/interface/web/themes/default/icons/x32/dashboard.png b/interface/web/themes/default/icons/x32/dashboard.png new file mode 100644 index 0000000000000000000000000000000000000000..0094f836cd7a745b5023217afff165387ada1af9 Binary files /dev/null and b/interface/web/themes/default/icons/x32/dashboard.png differ diff --git a/interface/web/themes/default/icons/x64/dashboard.png b/interface/web/themes/default/icons/x64/dashboard.png new file mode 100644 index 0000000000000000000000000000000000000000..7b20e566319bbe83fd14ec0de677797a6e34ab2e Binary files /dev/null and b/interface/web/themes/default/icons/x64/dashboard.png differ diff --git a/interface/web/themes/default_64_navimg/css/additional.css b/interface/web/themes/default_64_navimg/css/additional.css index 95798061d3a64fd70f45051b1cc1ff4ddecc30e2..a58c8071622c56325efe7592bd3e0889815a7947 100644 --- a/interface/web/themes/default_64_navimg/css/additional.css +++ b/interface/web/themes/default_64_navimg/css/additional.css @@ -52,4 +52,9 @@ .topnav-domain { background-image: url('../../icons/x64/domain.png') !important; } + + .topnav-dashboard { + background-image: url('../../icons/x64/dashboard.png') !important; + } + } \ No newline at end of file