Пример #1
0
                    <ul class="nav navbar-nav">
                    	<?php 
echo UIManager::getInstance()->getMenuItemsHTML();
?>
                    </ul>
                </div>
            </nav>
        </header>
        <div class="wrapper row-offcanvas row-offcanvas-left">
            <!-- Left side column. contains the logo and sidebar -->
            <aside class="left-side sidebar-offcanvas">                
                <!-- sidebar: style can be found in sidebar.less -->
                <section class="sidebar">
                    <!-- Sidebar user panel -->
                    <?php 
echo UIManager::getInstance()->getProfileBlocks();
?>
                  
                    <ul class="sidebar-menu">
                    	
                        
                        <?php 
if ($user->user_level == 'Admin' || $user->user_level == 'Manager' || $user->user_level == 'Other') {
    ?>
			            
			            <?php 
    foreach ($adminModules as $menu) {
        ?>
			            	<?php 
        if (count($menu['menu']) == 0) {
            continue;
Пример #2
0
        $UI = new UIManager();
        // to reload all extensions
        $UI->setRunning(true);
        trigger_error('NOTICE: Extension is installed in the database.');
        $UI->setRunning(false);
        $UI->loadPage('admin/extensions');
        break;
    case 'uninstallextension':
        $UI->setRunning(true);
        trigger_error('NOTICE: Extension is uninstalled in the database.');
        if ($UI->config->exists('/extensions/' . $_GET['name'])) {
            $UI->config->removeConfigItem('/extensions/' . $_GET['name']);
            $UI->saveAdmin(array());
        }
        $UI->unInstallExtension($_GET['name']);
        $UI->setRunning(false);
        $UI = new UIManager();
        // to reload all extensions
        $UI->loadPage('admin/extensions');
        break;
    default:
        $pages =& $UI->getPagesClass();
        $allModules = $pages->getAllAvailableModules(true);
        if (array_key_exists('admin/' . $module, $allModules)) {
            $UI->loadPage('admin/' . $module);
        } else {
            header('Location: http://127.0.0.1');
            // Nice joke for hackers
        }
        break;
}
Пример #3
0
 public function getHtml()
 {
     return UIManager::getInstance()->populateTemplate($this->templateName, 'menu', $this->params);
 }
Пример #4
0
} else {
    if ($user->user_level == "Admin") {
        header("Location:" . HOME_LINK_ADMIN);
    } else {
        header("Location:" . HOME_LINK_OTHERS);
    }
}
$tuser = SessionUtils::getSessionObject('user');
//check user
/*
$logoFileName = CLIENT_BASE_PATH."data/logo.png";
$logoFileUrl = CLIENT_BASE_URL."data/logo.png";
if(!file_exists($logoFileName)){
	$logoFileUrl = BASE_URL."images/logo.png";	
}*/
$logoFileUrl = UIManager::getInstance()->getCompanyLogoUrl();
?>
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title><?php 
echo APP_NAME;
?>
 Login</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">

    <!-- Le styles -->
    <link href="<?php 
Пример #5
0
along with iCE Hrm. If not, see <http://www.gnu.org/licenses/>.

------------------------------------------------------------------

Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd]  
Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilinah)
*/
$moduleName = 'travel';
define('MODULE_PATH', dirname(__FILE__));
include APP_BASE_PATH . 'header.php';
include APP_BASE_PATH . 'modulejslibs.inc.php';
$options = array();
$options['setRemoteTable'] = 'true';
$moduleBuilder = new ModuleBuilder();
$moduleBuilder->addModuleOrGroup(new ModuleTab('EmployeeTravelRecord', 'EmployeeTravelRecord', 'Travel Requests', 'EmployeeTravelRecordAdapter', '', '', true, $options));
echo UIManager::getInstance()->renderModule($moduleBuilder);
$itemName = 'TravelRequest';
$moduleName = 'Travel Management';
$itemNameLower = strtolower($itemName);
$statuses = array("Approved", "Pending", "Rejected", "Cancelled");
?>
<div class="modal" id="<?php 
echo $itemNameLower;
?>
StatusModel" tabindex="-1" role="dialog" aria-labelledby="messageModelLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true"><li class="fa fa-times"/></button>
                <h3 style="font-size: 17px;">Change <?php 
echo $itemName;
 public function initQuickAccessMenu()
 {
     UIManager::getInstance()->addQuickAccessMenuItem("View Employees", "fa-users", CLIENT_BASE_URL . "?g=admin&n=employees&m=admin_Employees", array("Admin", "Manager"));
     UIManager::getInstance()->addQuickAccessMenuItem("Add a New Employee", "fa-edit", CLIENT_BASE_URL . "?g=admin&n=employees&m=admin_Employees&action=new", array("Admin"));
 }
Пример #7
0
 public function sendEmailWithoutWrap($subject, $toEmail, $template, $params, $ccList = array(), $bccList = array())
 {
     $body = $template;
     foreach ($params as $k => $v) {
         $body = str_replace("#_" . $k . "_#", $v, $body);
     }
     $fromEmail = APP_NAME . " <" . $this->settings->getSetting("Email: Email From") . ">";
     //Convert to an html email
     $emailBody = $body;
     $emailBody = str_replace("#_logourl_#", UIManager::getInstance()->getCompanyLogoUrl(), $emailBody);
     $user = new User();
     $user->load("username = ?", array('admin'));
     if (empty($user->id)) {
         $users = $user->Find("user_level = ?", array('Admin'));
         $user = $users[0];
     }
     $emailBody = str_replace("#_adminEmail_#", $user->email, $emailBody);
     $emailBody = str_replace("#_url_#", CLIENT_BASE_URL, $emailBody);
     foreach ($params as $k => $v) {
         $emailBody = str_replace("#_" . $k . "_#", $v, $emailBody);
     }
     $this->sendMail($subject, $emailBody, $toEmail, $fromEmail, $user->email, $ccList, $bccList);
 }
Пример #8
0
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 
*/
/** \file index.php
 * Main file
 *
 * \todo change everything to invalidLink
 * \todo implement invalidLink
 * $Id$
 * \author Nathan Samson
*/
error_reporting(E_ALL);
global $startTime;
list($usec, $sec) = explode(" ", microtime());
$startTime = (double) $usec + (double) $sec;
include 'core/uimanager.class.php';
$UI = new UIManager();
if (array_key_exists('module', $_GET)) {
    $selectedModule = $_GET['module'];
} else {
    $selectedModule = 'index';
}
$pages = $UI->getPagesClass();
$availableModules = $pages->getAllAvailableModules(true);
if ($selectedModule == 'viewadmin') {
    header('Location: admin.php');
} elseif ($selectedModule == 'login') {
    $UI->signalMan->execSignal('login', $_POST['loginname'], $_POST['password']);
    $user = $UI->getUserClass();
    $UI->setRunning(true);
    $success = $user->login($_POST['loginname'], $_POST['password']);
    if ($success) {
Пример #9
0
<?php

UIManager::getInstance()->setCurrentUser($user);
UIManager::getInstance()->setProfiles($profileCurrent, $profileSwitched);
UIManager::getInstance()->setHomeLink($homeLink);
$moduleManagers = BaseService::getInstance()->getModuleManagers();
foreach ($moduleManagers as $moduleManagerObj) {
    $allowed = BaseService::getInstance()->isModuleAllowedForUser($moduleManagerObj);
    if ($allowed) {
        $moduleManagerObj->initQuickAccessMenu();
    }
}
Пример #10
0
<?php

UIManager::getInstance()->setCurrentUser($user);
UIManager::getInstance()->setProfiles($profileCurrent, $profileSwitched);
UIManager::getInstance()->setHomeLink($homeLink);
UIManager::getInstance()->addQuickAccessMenuItem("View Employees", "fa-users", CLIENT_BASE_URL . "?g=admin&n=employees&m=admin_Employees", array("Admin", "Manager"));
UIManager::getInstance()->addQuickAccessMenuItem("Add a New Employee", "fa-edit", CLIENT_BASE_URL . "?g=admin&n=employees&m=admin_Employees&action=new", array("Admin"));
UIManager::getInstance()->addQuickAccessMenuItem("Manage Client/Projects", "fa-list-alt", CLIENT_BASE_URL . "?g=admin&n=projects&m=admin_Admin", array("Admin", "Manager"));
UIManager::getInstance()->addQuickAccessMenuItem("Clocked In Employees", "fa-clock-o", CLIENT_BASE_URL . "?g=admin&n=attendance&m=admin_Employees#tabAttendanceStatus", array("Admin", "Manager"));
UIManager::getInstance()->addQuickAccessMenuItem("Additional Modules", "fa-shopping-cart", "http://icehrm.com/modules.php", array("Admin"));
 public function initQuickAccessMenu()
 {
     UIManager::getInstance()->addQuickAccessMenuItem("Clocked In Employees", "fa-clock-o", CLIENT_BASE_URL . "?g=admin&n=attendance&m=admin_Employees#tabAttendanceStatus", array("Admin", "Manager"));
 }
 public function initQuickAccessMenu()
 {
     UIManager::getInstance()->addQuickAccessMenuItem("Manage Client/Projects", "fa-list-alt", CLIENT_BASE_URL . "?g=admin&n=projects&m=admin_Admin", array("Admin", "Manager"));
 }