interface/lib/lang/de.lng
@@ -33,4 +33,5 @@ $wb['top_menu_help'] = 'Support'; $wb['top_menu_billing'] = 'Billing'; $wb['top_menu_domain'] = 'Domänen'; $wb['top_menu_dashboard'] = 'Startseite'; ?> interface/lib/lang/en.lng
@@ -33,5 +33,6 @@ $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'; ?> interface/web/dashboard/dashboard.php
New file @@ -0,0 +1,119 @@ <?php /* Copyright (c) 2010 Till Brehm, projektfarm Gmbh and Oliver Vogel www.muv.com All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of ISPConfig nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ require_once('../../lib/config.inc.php'); require_once('../../lib/app.inc.php'); //* Check permissions for module $app->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(); ?> interface/web/dashboard/lib/admin.conf.php
New file @@ -0,0 +1,29 @@ <?php /* Copyright (c) 2010 Till Brehm, projektfarm Gmbh and Oliver Vogel www.muv.com All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of ISPConfig nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ ?> interface/web/dashboard/lib/lang/de.lng
New file @@ -0,0 +1,4 @@ <?php $wb['welcome_user_txt'] = "Herzlich Willkommen %s"; $wb['available_modules_txt'] = "Verfügbare Module"; ?> interface/web/dashboard/lib/lang/en.lng
New file @@ -0,0 +1,4 @@ <?php $wb['welcome_user_txt'] = "Welcome %s"; $wb['available_modules_txt'] = "Available Modules"; ?> interface/web/dashboard/lib/module.conf.php
New file @@ -0,0 +1,46 @@ <?php /* Copyright (c) 2010 Till Brehm, projektfarm Gmbh and Oliver Vogel www.muv.com All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of ISPConfig nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ $module['name'] = 'dashboard'; $module['title'] = 'top_menu_dashboard'; $module['template'] = 'dashboard.tpl.htm'; $module['startpage'] = 'dashboard/dashboard.php'; $module['tab_width'] = ''; //$items = array(); // //$items[] = array( 'title' => 'Dashboard 1', // 'target' => 'content', // 'link' => 'dashboard/dashboard.php'); // //$module['nav'][] = array( 'title' => 'Dashboard 2', // 'open' => 1, // 'items' => $items); ?> interface/web/dashboard/templates/dashboard.htm
New file @@ -0,0 +1,36 @@ <h1><tmpl_var name="welcome_user"></h1> <div class="panel panel_dashboard"> <div> <tmpl_if name='error'> <div class="systemmonitor-state state-error"> <tmpl_loop name="error"> <p>{tmpl_var name='error_msg'}</p> </tmpl_loop> </div> </tmpl_if> <tmpl_if name='warning'> <div class="systemmonitor-state state-warning"> <tmpl_loop name="warning"> <p>{tmpl_var name='warning_msg'}</p> </tmpl_loop> </div> </tmpl_if> <tmpl_if name='info'> <div class="systemmonitor-state state-info"> <tmpl_loop name="info"> <p>{tmpl_var name='info_msg'}</p> </tmpl_loop> </div> </tmpl_if> </div> <p> </p> <h2>{tmpl_var name='available_modules_txt'}</h2> <tmpl_loop name='modules'> <div class="dashboard-modules {tmpl_var name='modules_name'}"> <a href="#" onclick="capp('{tmpl_var name='modules_name'}')"> {tmpl_var name='modules_title'} </a> </div> </tmpl_loop> </div> interface/web/nav.php
@@ -42,6 +42,14 @@ 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')) { 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; } } 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; } interface/web/themes/default/icons/x32/dashboard.png
interface/web/themes/default/icons/x64/dashboard.png
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; } }