2019-11-03 18:23:06 +00:00
|
|
|
<?php
|
2020-11-27 13:24:22 +00:00
|
|
|
if(isset($_POST['formLoginButtonSubmit'])){
|
|
|
|
$user = $oUser->login($_POST);
|
|
|
|
|
|
|
|
if(isset($user['email'])){
|
|
|
|
$_SESSION['translations'] = $oTrans->listTranslations($user['lang_code']);
|
|
|
|
$_SESSION['user'] = $user;
|
|
|
|
$_SESSION['features'] = $oFeat->getFeaturesOfUser($user['id'], $user['lang_code']);
|
|
|
|
header("Location:".$oConf->getURLRoot());
|
|
|
|
} else {
|
|
|
|
$_SESSION['message'] = $user;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-11-27 07:44:04 +00:00
|
|
|
if(isset($_POST['submit_change_password'])){
|
|
|
|
// Open connection with Globsi Backend
|
|
|
|
$userPassword = $oUser->changePassword($_SESSION['user']['id'], $_POST);
|
|
|
|
if($userPassword['state']=="success"){
|
|
|
|
$getUser = $oUser->getUser($_SESSION['user']['id']);
|
|
|
|
if(isset($getUser['password'])){
|
|
|
|
unset($_SESSION);
|
|
|
|
header("Location:".$oConf->getURLRoot('scripts/logout.php'));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-11-03 18:23:06 +00:00
|
|
|
$session_lifetime = 60*60*8;
|
|
|
|
if(isset($_SESSION['user']) and isset($_SESSION['user']['stay_connected']) and $_SESSION['user']['stay_connected'] == true){
|
|
|
|
$session_lifetime = 60*60*24*365*5;
|
|
|
|
}
|
|
|
|
setcookie(session_name(),session_id(),time() + $session_lifetime);
|
|
|
|
|
|
|
|
$lang_code = (isset($_SESSION['user']['lang_code']))?$_SESSION['user']['lang_code']:$_SESSION['config']['default_lang_code'];
|
2020-11-27 07:44:04 +00:00
|
|
|
|
2019-11-03 18:23:06 +00:00
|
|
|
?>
|
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="<?php echo substr($lang_code, 0, 2); ?>">
|
|
|
|
<head>
|
|
|
|
<!--META-->
|
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
2020-11-27 07:44:04 +00:00
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/>
|
|
|
|
<title>Projects Run Smoothly</title>
|
|
|
|
|
2019-11-03 18:23:06 +00:00
|
|
|
<script src="<?php echo $oConf->getURLRoot('lib/jquery/jquery-3.2.1.js'); ?>"></script>
|
|
|
|
<script src="<?php echo $oConf->getURLRoot('lib/jquery/jquery-ui.js'); ?>"></script>
|
|
|
|
|
|
|
|
|
2020-11-27 07:44:04 +00:00
|
|
|
<!--Cleave.js: easy formatting of HTML input tags-->
|
|
|
|
<script src="<?php echo $oConf->getURLRoot('lib/node_modules/cleave.js/dist/cleave.min.js'); ?>"></script>
|
2019-11-03 18:23:06 +00:00
|
|
|
|
2020-11-27 07:44:04 +00:00
|
|
|
<!--Materialize-->
|
|
|
|
<link href="<?php echo $oConf->getURLRoot('lib/materialize/materialize-1.1.0.min.css'); ?>" type="text/css" rel="stylesheet" media="screen,projection"/>
|
|
|
|
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
|
|
|
|
|
|
|
|
<script src="<?php echo $oConf->getURLRoot('lib/materialize/materialize-1.1.0.min.js'); ?>"></script>
|
|
|
|
<script src="<?php echo $oConf->getURLRoot('themes/materialize/js/init.js'); ?>"></script>
|
2019-11-03 18:23:06 +00:00
|
|
|
|
2020-11-27 07:44:04 +00:00
|
|
|
|
|
|
|
</head>
|
|
|
|
<body>
|
2019-11-03 18:23:06 +00:00
|
|
|
<?php
|
|
|
|
if(isset($display_cookie_message)){
|
|
|
|
echo '<div class="alert alert-warning" style="margin:0px;">'.$oTrans->getTranslation('display_cookie_message', $_SESSION['config']['default_lang_code']).'</div>';
|
|
|
|
unset($display_cookie_message);
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
|
2020-11-27 07:44:04 +00:00
|
|
|
<div class="navbar-fixed">
|
|
|
|
<nav>
|
|
|
|
<div class="nav-wrapper">
|
|
|
|
<a class="brand-logo" href="#!">Wodoo</a>
|
|
|
|
<a href="#" data-target="mobile-demo" class="sidenav-trigger"><i class="material-icons">menu</i></a>
|
|
|
|
<ul class="right hide-on-med-and-down">
|
|
|
|
<?php
|
|
|
|
foreach($_SESSION['features'] as $k=>$v){
|
|
|
|
// condition for logout
|
|
|
|
if ($_SESSION['features'][$k]->code == 'logout'){
|
2019-11-03 18:23:06 +00:00
|
|
|
echo '
|
2020-11-27 07:44:04 +00:00
|
|
|
<li class="">
|
|
|
|
<a class="nav-link" href="'.$oConf->getURLScript('logout.php').'">'.$_SESSION['features'][$k]->menu_label.'
|
2019-11-03 18:23:06 +00:00
|
|
|
</a>
|
|
|
|
</li>';
|
2020-11-27 07:44:04 +00:00
|
|
|
// and condition for others (not logout)
|
|
|
|
} else if($_SESSION['features'][$k]->is_menu_display == true) {
|
2019-11-03 18:23:06 +00:00
|
|
|
echo '
|
2020-11-27 07:44:04 +00:00
|
|
|
<li class="nav-item ">
|
2019-11-03 18:23:06 +00:00
|
|
|
<a class="nav-link" href="'.$oConf->getURLRoot($_SESSION['features'][$k]->url).'">
|
|
|
|
<span class="'.$_SESSION['features'][$k]->menu_icon.'"></span>'.$_SESSION['features'][$k]->menu_label.'
|
|
|
|
</a>
|
|
|
|
</li>';
|
|
|
|
}
|
|
|
|
}
|
2020-11-27 07:44:04 +00:00
|
|
|
?>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</nav>
|
|
|
|
</div>
|
|
|
|
<!--ENDOF .navbar-fixed-->
|
|
|
|
|
2019-11-03 18:23:06 +00:00
|
|
|
<ul class="sidenav" id="mobile-demo">
|
|
|
|
<?php
|
|
|
|
foreach($_SESSION['features'] as $k=>$v){
|
|
|
|
// condition for logout
|
|
|
|
if ($_SESSION['features'][$k]->code == 'logout'){
|
|
|
|
echo '
|
|
|
|
<li class="">
|
|
|
|
<a class="nav-link" href="'.$oConf->getURLScript('logout.php').'">'.$_SESSION['features'][$k]->menu_label.'
|
|
|
|
</a>
|
|
|
|
</li>';
|
|
|
|
// and condition for others (not logout)
|
2020-11-27 07:44:04 +00:00
|
|
|
} else if($_SESSION['features'][$k]->is_menu_display == true) {
|
|
|
|
echo '
|
|
|
|
<li class="nav-item">
|
|
|
|
<a class="nav-link" href="'.$oConf->getURLRoot($_SESSION['features'][$k]->url).'">
|
|
|
|
<span class="'.$_SESSION['features'][$k]->menu_icon.'"></span>'.$_SESSION['features'][$k]->menu_label.'
|
|
|
|
</a>
|
|
|
|
</li>';
|
2019-11-03 18:23:06 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
<!-- get and displays content of requested web page -->
|
|
|
|
<main>
|
|
|
|
<?php $oController->getPage("materialize", $lang_code); ?>
|
|
|
|
</main>
|
|
|
|
|
|
|
|
<!-- FOOTER SECTION -->
|
2020-11-27 07:44:04 +00:00
|
|
|
<footer class="page-footer">
|
2019-11-03 18:23:06 +00:00
|
|
|
<div class="container">
|
2020-11-27 07:44:04 +00:00
|
|
|
<div class="row center">
|
|
|
|
<div class="col s12 l6">
|
|
|
|
<p>
|
|
|
|
<a href="cookies-policy">Cookies Policy</a><br>
|
|
|
|
<a href="privacy-policy">Privacy Policy</a><br>
|
|
|
|
<a href="terms-and-conditions">Terms and Condtions</a><br>
|
|
|
|
</p>
|
2019-11-03 18:23:06 +00:00
|
|
|
</div>
|
2020-11-27 07:44:04 +00:00
|
|
|
<!--<div class="col s12"></div>-->
|
|
|
|
<div class="col s12 l6">
|
|
|
|
<p><b>Powered by</b><br><a href="https://www.jmdn-solutions.com/home" target="_blank">JMDN Solutions Sàrl</a><br>
|
|
|
|
info@jmdn-solutions.com</p>
|
2019-11-03 18:23:06 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2020-11-27 07:44:04 +00:00
|
|
|
<!--ENDOF .row-->
|
2019-11-03 18:23:06 +00:00
|
|
|
</div>
|
|
|
|
</footer>
|
|
|
|
|
2020-11-27 07:44:04 +00:00
|
|
|
<footer class="footer-bottom">
|
|
|
|
<div class="container">
|
|
|
|
<div class="row center">
|
|
|
|
<div class="col s12 l6">
|
|
|
|
<h5>Languages</h5>
|
|
|
|
<p>HTML 5, CSS 3, javascript, PHP 7, Postgresql</p>
|
|
|
|
</div>
|
|
|
|
<!--ENDOF .col-->
|
|
|
|
|
|
|
|
<div class="col s12 l6">
|
|
|
|
<h5>Librairies / APIs</h5>
|
|
|
|
<p>jQuery, d3js, node.js, XML-RPC, JSON-RPC</p>
|
|
|
|
</div>
|
|
|
|
<!--ENDOF .col-->
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<!--ENDOF .row-->
|
|
|
|
</div>
|
|
|
|
<!--ENDOF .container-->
|
|
|
|
</footer>
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-11-03 18:23:06 +00:00
|
|
|
</body>
|
|
|
|
</html>
|