2010-12-02 23:34:41 +00:00
|
|
|
<?php
|
|
|
|
|
/**
|
|
|
|
|
* login.php
|
|
|
|
|
*
|
|
|
|
|
* ProcessMaker Open Source Edition
|
|
|
|
|
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
|
|
|
*
|
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
|
* it under the terms of the GNU Affero General Public License as
|
|
|
|
|
* published by the Free Software Foundation, either version 3 of the
|
|
|
|
|
* License, or (at your option) any later version.
|
|
|
|
|
*
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU Affero General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU Affero General Public License
|
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
*
|
|
|
|
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
|
|
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
|
|
|
*
|
|
|
|
|
*/
|
2017-08-04 09:32:25 -04:00
|
|
|
|
2017-08-14 16:13:46 -04:00
|
|
|
use ProcessMaker\Core\System;
|
2017-08-04 09:32:25 -04:00
|
|
|
use ProcessMaker\Plugins\PluginRegistry;
|
|
|
|
|
|
2014-12-04 10:23:06 -04:00
|
|
|
/*----------------------------------********---------------------------------*/
|
2014-12-03 13:42:09 -04:00
|
|
|
//Browser Compatibility
|
|
|
|
|
$browserSupported = G::checkBrowserCompatibility();
|
2017-12-04 13:25:35 +00:00
|
|
|
if ($browserSupported==false) {
|
|
|
|
|
if (!isset($_SESSION['G_MESSAGE']) || $_SESSION['G_MESSAGE'] == "") {
|
|
|
|
|
G::SendTemporalMessage('ID_CURRENT_BROWSER_NOT_SUPPORTED', 'warning');
|
|
|
|
|
}
|
2014-10-20 17:41:47 -04:00
|
|
|
}
|
2014-12-04 10:23:06 -04:00
|
|
|
/*----------------------------------********---------------------------------*/
|
2012-07-09 19:08:34 -04:00
|
|
|
$aFields = array();
|
|
|
|
|
|
2017-08-08 10:42:08 -04:00
|
|
|
//Validated redirect url
|
|
|
|
|
$aFields['URL'] = '';
|
|
|
|
|
if (!empty($_GET['u'])) {
|
|
|
|
|
//clean url with protocols
|
|
|
|
|
$flagUrl = true;
|
2017-08-08 14:51:42 -04:00
|
|
|
//Most used protocols
|
|
|
|
|
$protocols = ['https://', 'http://', 'ftp://', 'sftp://','smb://', 'file:', 'mailto:'];
|
2017-08-08 10:42:08 -04:00
|
|
|
foreach ($protocols as $protocol) {
|
|
|
|
|
if (strpos($_GET['u'], $protocol) !== false) {
|
|
|
|
|
$_GET['u'] = '';
|
|
|
|
|
$flagUrl = false;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if ($flagUrl) {
|
|
|
|
|
$aFields['URL'] = htmlspecialchars(addslashes(stripslashes(strip_tags(trim(urldecode($_GET['u']))))));
|
|
|
|
|
}
|
2012-07-09 19:08:34 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!isset($_SESSION['G_MESSAGE'])) {
|
|
|
|
|
$_SESSION['G_MESSAGE'] = '';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!isset($_SESSION['G_MESSAGE_TYPE'])) {
|
|
|
|
|
$_SESSION['G_MESSAGE_TYPE'] = '';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$msg = $_SESSION['G_MESSAGE'];
|
|
|
|
|
$msgType = $_SESSION['G_MESSAGE_TYPE'];
|
|
|
|
|
|
|
|
|
|
if (!isset($_SESSION['FAILED_LOGINS'])) {
|
|
|
|
|
$_SESSION['FAILED_LOGINS'] = 0;
|
2014-09-19 10:45:24 -04:00
|
|
|
$_SESSION["USERNAME_PREVIOUS1"] = "";
|
|
|
|
|
$_SESSION["USERNAME_PREVIOUS2"] = "";
|
2012-07-09 19:08:34 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$sFailedLogins = $_SESSION['FAILED_LOGINS'];
|
2014-09-19 10:45:24 -04:00
|
|
|
$usernamePrevious1 = $_SESSION["USERNAME_PREVIOUS1"];
|
|
|
|
|
$usernamePrevious2 = $_SESSION["USERNAME_PREVIOUS2"];
|
2012-07-09 19:08:34 -04:00
|
|
|
|
2015-03-09 10:00:07 -04:00
|
|
|
$pass = (isset($_SESSION['NW_PASSWORD'])) ? $_SESSION['NW_PASSWORD'] : '';
|
|
|
|
|
$pass1 = (isset($_SESSION['NW_PASSWORD2'])) ? $_SESSION['NW_PASSWORD2'] : '';
|
|
|
|
|
|
2012-07-09 19:08:34 -04:00
|
|
|
$aFields['LOGIN_VERIFY_MSG'] = G::loadTranslation('LOGIN_VERIFY_MSG');
|
2012-11-13 15:09:16 -04:00
|
|
|
//$aFields['LOGIN_VERIFY_MSG'] = Bootstrap::loadTranslation('LOGIN_VERIFY_MSG');
|
2012-07-09 19:08:34 -04:00
|
|
|
|
2017-12-04 13:25:35 +00:00
|
|
|
if (isset($_SESSION['USER_LOGGED'])) {
|
2012-11-13 15:09:16 -04:00
|
|
|
require_once 'classes/model/LoginLog.php';
|
2012-07-09 19:08:34 -04:00
|
|
|
//close the session, if the current session_id was used in PM.
|
|
|
|
|
$oCriteria = new Criteria('workflow');
|
|
|
|
|
|
|
|
|
|
$oCriteria->add(LoginLogPeer::LOG_SID, session_id());
|
|
|
|
|
$oCriteria->add(LoginLogPeer::USR_UID, isset($_SESSION['USER_LOGGED']) ? $_SESSION['USER_LOGGED'] : '-');
|
|
|
|
|
$oCriteria->add(LoginLogPeer::LOG_STATUS, 'ACTIVE');
|
|
|
|
|
$oCriteria->add(LoginLogPeer::LOG_END_DATE, null, Criteria::ISNULL);
|
|
|
|
|
|
|
|
|
|
$oDataset = LoginLogPeer::doSelectRS($oCriteria);
|
|
|
|
|
|
|
|
|
|
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
|
|
|
|
$oDataset->next();
|
|
|
|
|
|
|
|
|
|
$aRow = $oDataset->getRow();
|
2010-12-23 22:30:39 +00:00
|
|
|
|
2010-12-02 23:34:41 +00:00
|
|
|
if ($aRow) {
|
2012-07-09 19:08:34 -04:00
|
|
|
if ($aRow['LOG_STATUS'] != 'CLOSED' && $aRow['LOG_END_DATE'] == null) {
|
|
|
|
|
$weblog = new LoginLog();
|
2016-09-09 15:15:51 -04:00
|
|
|
$endDate = date('Y-m-d H:i:s');
|
|
|
|
|
$aLog = array();
|
2016-10-20 16:00:08 -04:00
|
|
|
$aLog['LOG_ID'] = $aRow['LOG_ID'];
|
2012-07-09 19:08:34 -04:00
|
|
|
$aLog['LOG_UID'] = $aRow['LOG_UID'];
|
|
|
|
|
$aLog['LOG_STATUS'] = 'CLOSED';
|
|
|
|
|
$aLog['LOG_IP'] = $aRow['LOG_IP'];
|
|
|
|
|
$aLog['LOG_SID'] = session_id();
|
|
|
|
|
$aLog['LOG_INIT_DATE'] = $aRow['LOG_INIT_DATE'];
|
2016-09-09 15:15:51 -04:00
|
|
|
$aLog['LOG_END_DATE'] = $endDate;
|
2012-07-09 19:08:34 -04:00
|
|
|
$aLog['LOG_CLIENT_HOSTNAME'] = $aRow['LOG_CLIENT_HOSTNAME'];
|
|
|
|
|
$aLog['USR_UID'] = $aRow['USR_UID'];
|
|
|
|
|
|
|
|
|
|
$weblog->update($aLog);
|
|
|
|
|
}
|
2010-12-02 23:34:41 +00:00
|
|
|
}
|
2012-07-09 19:08:34 -04:00
|
|
|
} else {
|
2011-08-29 10:41:23 -04:00
|
|
|
// Execute SSO trigger
|
2017-08-04 09:32:25 -04:00
|
|
|
$pluginRegistry = PluginRegistry::loadSingleton();
|
2011-08-29 10:41:23 -04:00
|
|
|
if (defined('PM_SINGLE_SIGN_ON')) {
|
2015-06-19 11:44:02 -04:00
|
|
|
/*----------------------------------********---------------------------------*/
|
2017-12-04 13:25:35 +00:00
|
|
|
$licensedFeatures = PMLicensedFeatures::getSingleton();
|
2015-06-17 12:52:08 -04:00
|
|
|
if ($licensedFeatures->verifyfeature('x4TTzlISnp2K2tnSTJoMC8rTDRMTjlhMCtZeXV0QnNCLzU=')) {
|
2015-06-16 17:14:03 -04:00
|
|
|
//Check in SSO class
|
2017-08-11 13:29:22 -04:00
|
|
|
$oSso = new PmSsoClass();
|
2015-06-16 17:14:03 -04:00
|
|
|
$res = $oSso->ssocVerifyUser();
|
2017-12-04 13:25:35 +00:00
|
|
|
if ($res) {
|
2015-06-16 17:14:03 -04:00
|
|
|
// Start new session
|
|
|
|
|
@session_destroy();
|
|
|
|
|
session_start();
|
|
|
|
|
session_regenerate_id();
|
|
|
|
|
// Authenticate
|
|
|
|
|
require_once 'authentication.php';
|
|
|
|
|
die();
|
|
|
|
|
}
|
|
|
|
|
//Check in SSO class
|
2015-06-16 16:50:37 -04:00
|
|
|
}
|
2015-06-19 11:44:02 -04:00
|
|
|
/*----------------------------------********---------------------------------*/
|
2012-07-09 19:08:34 -04:00
|
|
|
if ($pluginRegistry->existsTrigger(PM_SINGLE_SIGN_ON)) {
|
|
|
|
|
if ($pluginRegistry->executeTriggers(PM_SINGLE_SIGN_ON, null)) {
|
|
|
|
|
// Start new session
|
|
|
|
|
@session_destroy();
|
|
|
|
|
session_start();
|
|
|
|
|
session_regenerate_id();
|
|
|
|
|
|
|
|
|
|
// Authenticate
|
|
|
|
|
require_once 'authentication.php';
|
|
|
|
|
|
|
|
|
|
die();
|
|
|
|
|
}
|
2011-08-29 10:41:23 -04:00
|
|
|
}
|
|
|
|
|
}
|
2012-07-09 19:08:34 -04:00
|
|
|
}
|
|
|
|
|
//end log
|
|
|
|
|
|
|
|
|
|
//start new session
|
|
|
|
|
@session_destroy();
|
|
|
|
|
session_start();
|
|
|
|
|
session_regenerate_id();
|
|
|
|
|
|
2015-04-13 11:59:47 -04:00
|
|
|
if (PHP_VERSION < 5.2) {
|
2017-10-10 12:33:25 -04:00
|
|
|
setcookie("workspaceSkin", SYS_SKIN, time() + (24 * 60 * 60), "/sys" . config("system.workspace"), "; HttpOnly");
|
2015-04-13 11:59:47 -04:00
|
|
|
} else {
|
2017-10-10 12:33:25 -04:00
|
|
|
setcookie("workspaceSkin", SYS_SKIN, time() + (24 * 60 * 60), "/sys" . config("system.workspace"), null, false, true);
|
2015-04-13 11:59:47 -04:00
|
|
|
}
|
2013-04-26 10:21:48 -04:00
|
|
|
|
2012-07-09 19:08:34 -04:00
|
|
|
if (strlen($msg) > 0) {
|
|
|
|
|
$_SESSION['G_MESSAGE'] = $msg;
|
|
|
|
|
}
|
|
|
|
|
if (strlen($msgType) > 0) {
|
|
|
|
|
$_SESSION['G_MESSAGE_TYPE'] = $msgType;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$_SESSION['FAILED_LOGINS'] = $sFailedLogins;
|
2014-09-19 10:45:24 -04:00
|
|
|
$_SESSION["USERNAME_PREVIOUS1"] = $usernamePrevious1;
|
|
|
|
|
$_SESSION["USERNAME_PREVIOUS2"] = $usernamePrevious2;
|
2012-07-09 19:08:34 -04:00
|
|
|
|
2015-03-09 10:00:07 -04:00
|
|
|
$_SESSION['NW_PASSWORD'] = $pass;
|
|
|
|
|
$_SESSION['NW_PASSWORD2'] = $pass1;
|
|
|
|
|
|
2014-12-03 13:42:09 -04:00
|
|
|
/*----------------------------------********---------------------------------*/
|
2017-02-14 21:24:08 +00:00
|
|
|
|
2017-12-04 13:25:35 +00:00
|
|
|
$licenseManager = PmLicenseManager::getSingleton();
|
2015-03-26 11:22:37 -04:00
|
|
|
if (in_array(G::encryptOld($licenseManager->result), array('38afd7ae34bd5e3e6fc170d8b09178a3', 'ba2b45bdc11e2a4a6e86aab2ac693cbb'))) {
|
2014-12-03 13:42:09 -04:00
|
|
|
$G_PUBLISH = new Publisher();
|
2015-09-25 19:55:26 -04:00
|
|
|
$version = explode('.', trim(file_get_contents(PATH_GULLIVER . 'VERSION')));
|
|
|
|
|
$version = isset($version[0]) ? intval($version[0]) : 0;
|
|
|
|
|
if ($version >= 3) {
|
2015-04-15 16:11:04 -04:00
|
|
|
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/licenseExpiredpm3', '', array(), 'licenseUpdate');
|
2017-12-04 13:25:35 +00:00
|
|
|
} else {
|
2015-04-15 16:11:04 -04:00
|
|
|
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/licenseExpired', '', array(), 'licenseUpdate');
|
|
|
|
|
}
|
2014-12-03 13:42:09 -04:00
|
|
|
G::RenderPage('publish');
|
|
|
|
|
die();
|
|
|
|
|
}
|
|
|
|
|
|
2015-12-04 16:43:45 -04:00
|
|
|
/*----------------------------------********---------------------------------*/
|
2015-11-27 15:38:27 -04:00
|
|
|
|
2012-07-09 19:08:34 -04:00
|
|
|
//translation
|
2012-11-12 14:44:44 -04:00
|
|
|
//$Translations = G::getModel("Translation");
|
2012-11-20 16:45:09 -04:00
|
|
|
//require_once "classes/model/Translation.php";
|
2012-11-12 14:44:44 -04:00
|
|
|
$Translations = new Translation();
|
2012-07-09 19:08:34 -04:00
|
|
|
$translationsTable = $Translations->getTranslationEnvironments();
|
|
|
|
|
|
2017-12-04 13:25:35 +00:00
|
|
|
$availableLangArray = array();
|
|
|
|
|
$availableLangArray [] = array('LANG_ID' => 'char', 'LANG_NAME' => 'char' );
|
2015-12-03 15:01:58 -04:00
|
|
|
/*----------------------------------********---------------------------------*/
|
2017-12-04 13:25:35 +00:00
|
|
|
$licensedFeatures = PMLicensedFeatures::getSingleton();
|
2015-12-03 15:01:58 -04:00
|
|
|
if ($licensedFeatures->verifyfeature('w2LL3o4NFNiaDRXcFFCYVpJS3Jsall5dmh0ZWtBTkdKR3ROS0VzWGdoLzNQYz0=')) {
|
2017-12-04 13:25:35 +00:00
|
|
|
$availableLangArray [] = array('LANG_ID' => 'default', 'LANG_NAME' => G::LoadTranslation("ID_DEFAULT_LANGUAGE") );
|
2015-12-03 15:01:58 -04:00
|
|
|
}
|
|
|
|
|
/*----------------------------------********---------------------------------*/
|
2012-07-09 19:08:34 -04:00
|
|
|
foreach ($translationsTable as $locale) {
|
2010-12-02 23:34:41 +00:00
|
|
|
$row['LANG_ID'] = $locale['LOCALE'];
|
2012-07-09 19:08:34 -04:00
|
|
|
|
|
|
|
|
if ($locale['COUNTRY'] != '.') {
|
|
|
|
|
$row['LANG_NAME'] = $locale['LANGUAGE'] . ' (' . (ucwords(strtolower($locale['COUNTRY']))) . ')';
|
|
|
|
|
} else {
|
|
|
|
|
$row['LANG_NAME'] = $locale['LANGUAGE'];
|
|
|
|
|
}
|
2011-08-24 19:30:03 -04:00
|
|
|
|
2010-12-02 23:34:41 +00:00
|
|
|
$availableLangArray [] = $row;
|
2012-07-09 19:08:34 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
global $_DBArray;
|
|
|
|
|
$_DBArray ['langOptions'] = $availableLangArray;
|
|
|
|
|
|
|
|
|
|
$oConf = new Configurations();
|
|
|
|
|
$oConf->loadConfig($obj, 'ENVIRONMENT_SETTINGS', '');
|
2014-08-04 10:02:54 -04:00
|
|
|
|
2015-09-09 16:48:28 -04:00
|
|
|
if (isset($oConf->aConfig["login_defaultLanguage"]) && $oConf->aConfig["login_defaultLanguage"] != "") {
|
|
|
|
|
$aFields["USER_LANG"] = $oConf->aConfig["login_defaultLanguage"];
|
2015-12-03 15:01:58 -04:00
|
|
|
/*----------------------------------********---------------------------------*/
|
2017-12-04 13:25:35 +00:00
|
|
|
$licensedFeatures = PMLicensedFeatures::getSingleton();
|
2015-12-03 15:01:58 -04:00
|
|
|
if ($licensedFeatures->verifyfeature('w2LL3o4NFNiaDRXcFFCYVpJS3Jsall5dmh0ZWtBTkdKR3ROS0VzWGdoLzNQYz0=')) {
|
|
|
|
|
$aFields["USER_LANG"] = "default";
|
|
|
|
|
}
|
|
|
|
|
/*----------------------------------********---------------------------------*/
|
2014-08-04 10:02:54 -04:00
|
|
|
} else {
|
2015-09-09 16:48:28 -04:00
|
|
|
$myUrl = explode("/", $_SERVER["REQUEST_URI"]);
|
|
|
|
|
|
|
|
|
|
$aFields["USER_LANG"] = (isset($myUrl[2]) && trim($myUrl[2]) != "")? trim($myUrl[2]) : SYS_LANG;
|
2014-08-04 10:02:54 -04:00
|
|
|
}
|
2011-08-24 19:30:03 -04:00
|
|
|
|
2012-07-09 19:08:34 -04:00
|
|
|
$G_PUBLISH = new Publisher();
|
2015-09-25 19:55:26 -04:00
|
|
|
$version = explode('.', trim(file_get_contents(PATH_GULLIVER . 'VERSION')));
|
|
|
|
|
$version = isset($version[0]) ? intval($version[0]) : 0;
|
2016-09-15 11:53:35 -04:00
|
|
|
$aFields["FAILED_LOGINS"] = $sFailedLogins;
|
2015-09-25 19:55:26 -04:00
|
|
|
if ($version >= 3) {
|
2015-04-09 16:25:47 -04:00
|
|
|
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/loginpm3', '', $aFields, SYS_URI . 'login/authentication.php');
|
2017-12-04 13:25:35 +00:00
|
|
|
} else {
|
2015-04-09 16:25:47 -04:00
|
|
|
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/login', '', $aFields, SYS_URI . 'login/authentication.php');
|
|
|
|
|
}
|
|
|
|
|
|
2012-07-09 19:08:34 -04:00
|
|
|
//get the serverconf singleton, and check if we can send the heartbeat
|
2017-12-04 13:25:35 +00:00
|
|
|
$oServerConf = ServerConf::getSingleton();
|
2013-03-19 10:12:35 -04:00
|
|
|
$partnerFlag = (defined('PARTNER_FLAG')) ? PARTNER_FLAG : false;
|
|
|
|
|
if (!$partnerFlag) {
|
2013-03-18 15:13:14 -04:00
|
|
|
$sflag = $oServerConf->getHeartbeatProperty('HB_OPTION', 'HEART_BEAT_CONF');
|
|
|
|
|
$sflag = (trim($sflag) != '') ? $sflag : '1';
|
|
|
|
|
|
|
|
|
|
//get date of next beat
|
|
|
|
|
$nextBeatDate = $oServerConf->getHeartbeatProperty('HB_NEXT_BEAT_DATE', 'HEART_BEAT_CONF');
|
|
|
|
|
|
|
|
|
|
//if flag to send heartbeat is enabled, and it is time to send heartbeat, sent it using asynchronous beat.
|
|
|
|
|
if (($sflag == "1") && ((strtotime("now") > $nextBeatDate) || is_null($nextBeatDate))) {
|
2017-12-04 13:25:35 +00:00
|
|
|
$oHeadPublisher = headPublisher::getSingleton();
|
2013-03-18 15:13:14 -04:00
|
|
|
//To do: we need to change to ExtJs
|
|
|
|
|
$oHeadPublisher->addScriptCode('var flagHeartBeat = 1;');
|
|
|
|
|
} else {
|
|
|
|
|
$oHeadPublisher->addScriptCode('var flagHeartBeat = 0;');
|
|
|
|
|
}
|
2012-07-09 19:08:34 -04:00
|
|
|
} else {
|
|
|
|
|
$oHeadPublisher->addScriptCode('var flagHeartBeat = 0;');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//check if we show the panel with the getting started info
|
|
|
|
|
|
|
|
|
|
require_once 'classes/model/Configuration.php';
|
2017-12-04 13:25:35 +00:00
|
|
|
$oConfiguration = new Configuration();
|
|
|
|
|
$oCriteria = new Criteria('workflow');
|
2012-07-09 19:08:34 -04:00
|
|
|
$oCriteria->add(ConfigurationPeer::CFG_UID, 'getStarted');
|
|
|
|
|
$oCriteria->add(ConfigurationPeer::OBJ_UID, '');
|
|
|
|
|
$oCriteria->add(ConfigurationPeer::CFG_VALUE, '1');
|
|
|
|
|
$oCriteria->add(ConfigurationPeer::PRO_UID, '');
|
|
|
|
|
$oCriteria->add(ConfigurationPeer::USR_UID, '');
|
|
|
|
|
$oCriteria->add(ConfigurationPeer::APP_UID, '');
|
|
|
|
|
$flagGettingStarted = ConfigurationPeer::doCount($oCriteria);
|
|
|
|
|
if ($flagGettingStarted == 0) {
|
|
|
|
|
$oHeadPublisher->addScriptCode('var flagGettingStarted = 1;');
|
|
|
|
|
} else {
|
|
|
|
|
$oHeadPublisher->addScriptCode('var flagGettingStarted = 0;');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$dummy = '';
|
|
|
|
|
|
|
|
|
|
$oConf->loadConfig($dummy, 'ENVIRONMENT_SETTINGS', '');
|
|
|
|
|
$flagForgotPassword = isset($oConf->aConfig['login_enableForgotPassword'])
|
|
|
|
|
? $oConf->aConfig['login_enableForgotPassword']
|
|
|
|
|
: 'off';
|
|
|
|
|
|
2016-03-15 11:54:22 -04:00
|
|
|
setcookie('PM-Warning', trim(G::LoadTranslation('ID_BLOCKER_MSG'), '*'), time() + (24 * 60 * 60), SYS_URI);
|
2016-04-25 23:17:58 -04:00
|
|
|
|
2017-10-10 12:33:25 -04:00
|
|
|
$configS = System::getSystemConfiguration('', '', config("system.workspace"));
|
2016-04-25 23:17:58 -04:00
|
|
|
$activeSession = isset($configS['session_block']) ? !(int)$configS['session_block'] : true;
|
|
|
|
|
if ($activeSession) {
|
|
|
|
|
setcookie("PM-TabPrimary", 101010010, time() + (24 * 60 * 60), '/');
|
|
|
|
|
} else {
|
|
|
|
|
setcookie("PM-TabPrimary", uniqid(), time() + (24 * 60 * 60), '/');
|
|
|
|
|
}
|
2016-03-08 18:37:38 -04:00
|
|
|
|
2012-07-09 19:08:34 -04:00
|
|
|
$oHeadPublisher->addScriptCode("var flagForgotPassword = '$flagForgotPassword';");
|
2016-03-08 18:37:38 -04:00
|
|
|
$oHeadPublisher->addScriptFile('/jscore/src/PM.js');
|
|
|
|
|
$oHeadPublisher->addScriptFile('/jscore/src/Sessions.js');
|
|
|
|
|
$oHeadPublisher->addScriptFile('/jscore/src/Register.js');
|
2012-07-09 19:08:34 -04:00
|
|
|
|
|
|
|
|
G::RenderPage('publish');
|