HOR-3861
This commit is contained in:
@@ -748,6 +748,7 @@ class headPublisher
|
|||||||
*/
|
*/
|
||||||
public function getExtJsViewState()
|
public function getExtJsViewState()
|
||||||
{
|
{
|
||||||
|
$json = new stdClass();
|
||||||
$views = array();
|
$views = array();
|
||||||
$keyState = "extJsViewState";
|
$keyState = "extJsViewState";
|
||||||
$prefixExtJs = "ys-";
|
$prefixExtJs = "ys-";
|
||||||
@@ -772,7 +773,9 @@ class headPublisher
|
|||||||
$views[$key] = $value[1];
|
$views[$key] = $value[1];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if ((array)$json != $views) {
|
||||||
$oServerConf->setProperty($keyState, G::json_encode($views));
|
$oServerConf->setProperty($keyState, G::json_encode($views));
|
||||||
|
}
|
||||||
return $views;
|
return $views;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ use Illuminate\Support\Facades\Cache;
|
|||||||
* class.pmLicenseManager.php
|
* class.pmLicenseManager.php
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class PmLicenseManager
|
class PmLicenseManager
|
||||||
{
|
{
|
||||||
const CACHE_KEY = 'license';
|
const CACHE_KEY = 'license';
|
||||||
@@ -17,20 +16,13 @@ class PmLicenseManager
|
|||||||
public function __construct($flagActivatePlugins = true)
|
public function __construct($flagActivatePlugins = true)
|
||||||
{
|
{
|
||||||
$oServerConf = &ServerConf::getSingleton();
|
$oServerConf = &ServerConf::getSingleton();
|
||||||
|
|
||||||
|
if ($oServerConf->getProperty('LOGIN_NO_WS') === null || $oServerConf->getProperty('LOGIN_NO_WS') === false) {
|
||||||
$oServerConf->setProperty('LOGIN_NO_WS', true);
|
$oServerConf->setProperty('LOGIN_NO_WS', true);
|
||||||
|
}
|
||||||
//to do: this files probably needs to be in core, since they are GPL2
|
|
||||||
//include_once (PATH_PLUGINS . 'enterprise' . PATH_SEP . 'classes' . PATH_SEP . 'class.license.lib.php');
|
|
||||||
//include_once (PATH_PLUGINS . 'enterprise' . PATH_SEP . 'classes' . PATH_SEP . 'class.license.app.php');
|
|
||||||
|
|
||||||
|
|
||||||
//searching .dat files in workspace folder
|
//searching .dat files in workspace folder
|
||||||
$server_array = $_SERVER;
|
$server_array = $_SERVER;
|
||||||
$licfile = glob(PATH_DATA_SITE . "*.dat");
|
|
||||||
|
|
||||||
if (count($licfile) > 0 && is_file($licfile[0])) {
|
|
||||||
$oServerConf->setProperty('ACTIVE_LICENSE', array(SYS_SYS => ""));
|
|
||||||
}
|
|
||||||
|
|
||||||
$activeLicenseSetting = $oServerConf->getProperty('ACTIVE_LICENSE');
|
$activeLicenseSetting = $oServerConf->getProperty('ACTIVE_LICENSE');
|
||||||
|
|
||||||
@@ -38,7 +30,7 @@ class PmLicenseManager
|
|||||||
$licenseFile = $activeLicenseSetting[SYS_SYS];
|
$licenseFile = $activeLicenseSetting[SYS_SYS];
|
||||||
} else {
|
} else {
|
||||||
$activeLicense = $this->getActiveLicense();
|
$activeLicense = $this->getActiveLicense();
|
||||||
$oServerConf->setProperty('ACTIVE_LICENSE', array(SYS_SYS => $activeLicense ['LICENSE_PATH']));
|
$oServerConf->setProperty('ACTIVE_LICENSE', [SYS_SYS => $activeLicense['LICENSE_PATH']]);
|
||||||
$licenseFile = $activeLicense['LICENSE_PATH'];
|
$licenseFile = $activeLicense['LICENSE_PATH'];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -46,33 +38,34 @@ class PmLicenseManager
|
|||||||
$application->set_server_vars($server_array);
|
$application->set_server_vars($server_array);
|
||||||
$application->DATE_STRING = 'Y-m-d H:i:s';
|
$application->DATE_STRING = 'Y-m-d H:i:s';
|
||||||
$results = $application->validate();
|
$results = $application->validate();
|
||||||
$validStatus = array(
|
$validStatus = [
|
||||||
'OK',
|
'OK',
|
||||||
'EXPIRED',
|
'EXPIRED',
|
||||||
'TMINUS'
|
'TMINUS'
|
||||||
);
|
];
|
||||||
|
|
||||||
$this->result = $results['RESULT'];
|
$this->result = $results['RESULT'];
|
||||||
$this->features = array();
|
$this->features = [];
|
||||||
$this->licensedfeatures = array();
|
$this->licensedfeatures = [];
|
||||||
$this->licensedfeaturesList = array();
|
$this->licensedfeaturesList = [];
|
||||||
if (in_array($this->result, $validStatus)) {
|
if (in_array($this->result, $validStatus)) {
|
||||||
$this->serial="3ptta7Xko2prrptrZnSd356aqmPXvMrayNPFj6CLdaR1pWtrW6qPw9jV0OHjxrDGu8LVxtmSm9nP5kR23HRpdZWccpeui+bKkK°DoqCt2Kqgpq6Vg37s";
|
$this->serial = "3ptta7Xko2prrptrZnSd356aqmPXvMrayNPFj6CLdaR1pWtrW6qPw9jV0OHjxrDGu8LVxtmSm9nP5kR23HRpdZWccpeui+bKkK°DoqCt2Kqgpq6Vg37s";
|
||||||
|
$info = [];
|
||||||
$info['FIRST_NAME'] = $results['DATA']['FIRST_NAME'];
|
$info['FIRST_NAME'] = $results['DATA']['FIRST_NAME'];
|
||||||
$info['LAST_NAME'] = $results['DATA']['LAST_NAME'];
|
$info['LAST_NAME'] = $results['DATA']['LAST_NAME'];
|
||||||
$info['DOMAIN_WORKSPACE'] = $results['DATA']['DOMAIN_WORKSPACE'];
|
$info['DOMAIN_WORKSPACE'] = $results['DATA']['DOMAIN_WORKSPACE'];
|
||||||
$this->date = $results ['DATE'];
|
$this->date = $results ['DATE'];
|
||||||
$this->info = $info;
|
$this->info = $info;
|
||||||
$this->type = $results ['DATA']['TYPE'];
|
$this->type = $results ['DATA']['TYPE'];
|
||||||
$this->plan = isset($results ['DATA']['PLAN'])?$results ['DATA']['PLAN']:"";
|
$this->plan = isset($results ['DATA']['PLAN']) ? $results ['DATA']['PLAN'] : "";
|
||||||
$this->id = $results ['ID'];
|
$this->id = $results ['ID'];
|
||||||
$this->expireIn = $this->getExpireIn ();
|
$this->expireIn = $this->getExpireIn();
|
||||||
$this->features = $this->result!='TMINUS'?isset($results ['DATA']['CUSTOMER_PLUGIN'])? $results ['DATA']['CUSTOMER_PLUGIN'] : $this->getActiveFeatures() : array();
|
$this->features = $this->result != 'TMINUS' ? isset($results ['DATA']['CUSTOMER_PLUGIN']) ? $results ['DATA']['CUSTOMER_PLUGIN'] : $this->getActiveFeatures() : [];
|
||||||
$this->licensedfeatures = $this->result != 'TMINUS' ? (isset($results ['DATA']['CUSTOMER_LICENSED_FEATURES']) && is_array($results ['DATA']['CUSTOMER_LICENSED_FEATURES'])) ? $results ['DATA']['CUSTOMER_LICENSED_FEATURES'] : array() : array();
|
$this->licensedfeatures = $this->result != 'TMINUS' ? (isset($results ['DATA']['CUSTOMER_LICENSED_FEATURES']) && is_array($results ['DATA']['CUSTOMER_LICENSED_FEATURES'])) ? $results ['DATA']['CUSTOMER_LICENSED_FEATURES'] : [] : [];
|
||||||
$this->licensedfeaturesList = isset($results ['DATA']['LICENSED_FEATURES_LIST'])? $results ['DATA']['LICENSED_FEATURES_LIST'] : null;
|
$this->licensedfeaturesList = isset($results ['DATA']['LICENSED_FEATURES_LIST']) ? $results ['DATA']['LICENSED_FEATURES_LIST'] : null;
|
||||||
$this->status = $this->getCurrentLicenseStatus ();
|
$this->status = $this->getCurrentLicenseStatus();
|
||||||
|
|
||||||
if (isset ( $results ['LIC'] )) {
|
if (isset ($results ['LIC'])) {
|
||||||
$resultsRegister = $results['LIC'];
|
$resultsRegister = $results['LIC'];
|
||||||
$this->server = $results['LIC']['SRV'];
|
$this->server = $results['LIC']['SRV'];
|
||||||
$this->file = $results['LIC']['FILE'];
|
$this->file = $results['LIC']['FILE'];
|
||||||
@@ -84,7 +77,7 @@ class PmLicenseManager
|
|||||||
$this->supportEndDate = date("Y-m-d H:i:s", strtotime($this->supportEndDate));
|
$this->supportEndDate = date("Y-m-d H:i:s", strtotime($this->supportEndDate));
|
||||||
|
|
||||||
$conf = new Configurations();
|
$conf = new Configurations();
|
||||||
if ( defined('SYS_SYS') && $conf->exists("ENVIRONMENT_SETTINGS")) {
|
if (defined('SYS_SYS') && $conf->exists("ENVIRONMENT_SETTINGS")) {
|
||||||
$this->supportStartDate = $conf->getSystemDate($this->supportStartDate);
|
$this->supportStartDate = $conf->getSystemDate($this->supportStartDate);
|
||||||
$this->supportEndDate = $conf->getSystemDate($this->supportEndDate);
|
$this->supportEndDate = $conf->getSystemDate($this->supportEndDate);
|
||||||
} else {
|
} else {
|
||||||
@@ -92,8 +85,8 @@ class PmLicenseManager
|
|||||||
$this->supportEndDate = G::getformatedDate($this->supportEndDate, 'M d, yyyy', SYS_LANG);
|
$this->supportEndDate = G::getformatedDate($this->supportEndDate, 'M d, yyyy', SYS_LANG);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$resultsRegister=array();
|
$resultsRegister = [];
|
||||||
$resultsRegister['ID']=$results ['DATA'] ['DOMAIN_WORKSPACE'];
|
$resultsRegister['ID'] = $results['DATA']['DOMAIN_WORKSPACE'];
|
||||||
$this->server = null;
|
$this->server = null;
|
||||||
$this->file = null;
|
$this->file = null;
|
||||||
}
|
}
|
||||||
@@ -101,13 +94,15 @@ class PmLicenseManager
|
|||||||
$resultsRegister['date'] = $results ['DATE'];
|
$resultsRegister['date'] = $results ['DATE'];
|
||||||
$resultsRegister['info'] = $info;
|
$resultsRegister['info'] = $info;
|
||||||
$resultsRegister['type'] = $results ['DATA'] ['TYPE'];
|
$resultsRegister['type'] = $results ['DATA'] ['TYPE'];
|
||||||
if ($oServerConf->getProperty ( 'LICENSE_INFO')) {
|
if ($oServerConf->getProperty('LICENSE_INFO')) {
|
||||||
$licInfoA = $oServerConf->getProperty ( 'LICENSE_INFO');
|
$licInfoA = $oServerConf->getProperty('LICENSE_INFO');
|
||||||
} else {
|
} else {
|
||||||
$licInfoA = array();
|
$licInfoA = [];
|
||||||
|
}
|
||||||
|
if ($licInfoA[SYS_SYS] != $resultsRegister) {
|
||||||
|
$licInfoA[SYS_SYS] = $resultsRegister;
|
||||||
|
$oServerConf->setProperty('LICENSE_INFO', $licInfoA);
|
||||||
}
|
}
|
||||||
$licInfoA[SYS_SYS]=$resultsRegister;
|
|
||||||
$oServerConf->setProperty ( 'LICENSE_INFO', $licInfoA );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($flagActivatePlugins) {
|
if ($flagActivatePlugins) {
|
||||||
@@ -125,23 +120,23 @@ class PmLicenseManager
|
|||||||
|
|
||||||
public function serializeInstance()
|
public function serializeInstance()
|
||||||
{
|
{
|
||||||
return serialize ( self::$instance );
|
return serialize(self::$instance);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function activateFeatures()
|
public function activateFeatures()
|
||||||
{
|
{
|
||||||
//Get a list of all Enterprise plugins and active/inactive them
|
//Get a list of all Enterprise plugins and active/inactive them
|
||||||
if (file_exists ( PATH_PLUGINS . 'enterprise/data/default' )) {
|
if (file_exists(PATH_PLUGINS . 'enterprise/data/default')) {
|
||||||
if ($this->result=="OK") {
|
if ($this->result == "OK") {
|
||||||
//Disable
|
//Disable
|
||||||
if (file_exists ( PATH_PLUGINS . 'enterprise/data/data' )) {
|
if (file_exists(PATH_PLUGINS . 'enterprise/data/data')) {
|
||||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||||
$aPlugins = unserialize ( trim ( file_get_contents ( PATH_PLUGINS . 'enterprise/data/data' ) ) );
|
$aPlugins = unserialize(trim(file_get_contents(PATH_PLUGINS . 'enterprise/data/data')));
|
||||||
foreach ($aPlugins as $aPlugin) {
|
foreach ($aPlugins as $aPlugin) {
|
||||||
$sClassName = substr ( $aPlugin ['sFilename'], 0, strpos ( $aPlugin ['sFilename'], '-' ) );
|
$sClassName = substr($aPlugin ['sFilename'], 0, strpos($aPlugin ['sFilename'], '-'));
|
||||||
require_once PATH_PLUGINS . $sClassName . '.php';
|
require_once PATH_PLUGINS . $sClassName . '.php';
|
||||||
$oDetails = $oPluginRegistry->getPluginDetails ( $sClassName . '.php' );
|
$oDetails = $oPluginRegistry->getPluginDetails($sClassName . '.php');
|
||||||
$oPluginRegistry->disablePlugin ( $oDetails->getNamespace() );
|
$oPluginRegistry->disablePlugin($oDetails->getNamespace());
|
||||||
$oPluginRegistry->savePlugin($oDetails->getNamespace());
|
$oPluginRegistry->savePlugin($oDetails->getNamespace());
|
||||||
}
|
}
|
||||||
unlink(PATH_PLUGINS . 'enterprise/data/data');
|
unlink(PATH_PLUGINS . 'enterprise/data/data');
|
||||||
@@ -154,7 +149,7 @@ class PmLicenseManager
|
|||||||
foreach ($aPlugins as $aPlugin) {
|
foreach ($aPlugins as $aPlugin) {
|
||||||
if ($aPlugin ["bActive"]) {
|
if ($aPlugin ["bActive"]) {
|
||||||
$sClassName = substr($aPlugin["sFilename"], 0, strpos($aPlugin["sFilename"], "-"));
|
$sClassName = substr($aPlugin["sFilename"], 0, strpos($aPlugin["sFilename"], "-"));
|
||||||
require_once (PATH_PLUGINS . $sClassName . ".php");
|
require_once(PATH_PLUGINS . $sClassName . ".php");
|
||||||
$oDetails = $oPluginRegistry->getPluginDetails($sClassName . ".php");
|
$oDetails = $oPluginRegistry->getPluginDetails($sClassName . ".php");
|
||||||
$oPluginRegistry->enablePlugin($oDetails->getNamespace());
|
$oPluginRegistry->enablePlugin($oDetails->getNamespace());
|
||||||
$oPluginRegistry->savePlugin($oDetails->getNamespace());
|
$oPluginRegistry->savePlugin($oDetails->getNamespace());
|
||||||
@@ -162,56 +157,57 @@ class PmLicenseManager
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (file_exists(PATH_DATA_SITE . "ee")) {
|
if (file_exists(PATH_DATA_SITE . "ee")) {
|
||||||
$aPlugins = unserialize ( trim ( file_get_contents ( PATH_DATA_SITE.'ee' ) ) );
|
$aPlugins = unserialize(trim(file_get_contents(PATH_DATA_SITE . 'ee')));
|
||||||
$aDenied=array();
|
$aDenied = [];
|
||||||
foreach ($aPlugins as $aPlugin) {
|
foreach ($aPlugins as $aPlugin) {
|
||||||
$sClassName = substr ( $aPlugin ['sFilename'], 0, strpos ( $aPlugin ['sFilename'], '-' ) );
|
$sClassName = substr($aPlugin ['sFilename'], 0, strpos($aPlugin ['sFilename'], '-'));
|
||||||
if (!(in_array($sClassName,$this->features))) {
|
if (!(in_array($sClassName, $this->features))) {
|
||||||
if (file_exists(PATH_PLUGINS . $sClassName . '.php')) {
|
if (file_exists(PATH_PLUGINS . $sClassName . '.php')) {
|
||||||
require_once PATH_PLUGINS . $sClassName . '.php';
|
require_once PATH_PLUGINS . $sClassName . '.php';
|
||||||
$oDetails = $oPluginRegistry->getPluginDetails ( $sClassName . '.php' );
|
$oDetails = $oPluginRegistry->getPluginDetails($sClassName . '.php');
|
||||||
$oPluginRegistry->disablePlugin($oDetails->getNamespace());
|
$oPluginRegistry->disablePlugin($oDetails->getNamespace());
|
||||||
$oPluginRegistry->savePlugin($oDetails->getNamespace());
|
$oPluginRegistry->savePlugin($oDetails->getNamespace());
|
||||||
$aDenied[]=$oDetails->getNamespace();
|
$aDenied[] = $oDetails->getNamespace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!(empty($aDenied))) {
|
if (!(empty($aDenied))) {
|
||||||
if ((SYS_COLLECTION=="enterprise")&&(SYS_TARGET=="pluginsList")) {
|
if ((SYS_COLLECTION == "enterprise") && (SYS_TARGET == "pluginsList")) {
|
||||||
G::SendMessageText("The following plugins were restricted due to your enterprise license: ".implode(", ",$aDenied),"INFO");
|
G::SendMessageText("The following plugins were restricted due to your enterprise license: " . implode(", ",
|
||||||
|
$aDenied), "INFO");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
//Disable
|
//Disable
|
||||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||||
$aPlugins = unserialize ( trim ( file_get_contents ( PATH_PLUGINS . 'enterprise/data/default' ) ) );
|
$aPlugins = unserialize(trim(file_get_contents(PATH_PLUGINS . 'enterprise/data/default')));
|
||||||
foreach ($aPlugins as $aPlugin) {
|
foreach ($aPlugins as $aPlugin) {
|
||||||
$sClassName = substr ( $aPlugin ['sFilename'], 0, strpos ( $aPlugin ['sFilename'], '-' ) );
|
$sClassName = substr($aPlugin ['sFilename'], 0, strpos($aPlugin ['sFilename'], '-'));
|
||||||
//To avoid self disable
|
//To avoid self disable
|
||||||
if (($sClassName != "pmLicenseManager") && ($sClassName != "pmTrial") && ($sClassName != "enterprise")) {
|
if (($sClassName != "pmLicenseManager") && ($sClassName != "pmTrial") && ($sClassName != "enterprise")) {
|
||||||
require_once PATH_PLUGINS . $sClassName . '.php';
|
require_once PATH_PLUGINS . $sClassName . '.php';
|
||||||
$oDetails = $oPluginRegistry->getPluginDetails ( $sClassName . '.php' );
|
$oDetails = $oPluginRegistry->getPluginDetails($sClassName . '.php');
|
||||||
$oPluginRegistry->disablePlugin($oDetails->getNamespace());
|
$oPluginRegistry->disablePlugin($oDetails->getNamespace());
|
||||||
} else {
|
} else {
|
||||||
//Enable default and required plugins
|
//Enable default and required plugins
|
||||||
require_once PATH_PLUGINS . $sClassName . '.php';
|
require_once PATH_PLUGINS . $sClassName . '.php';
|
||||||
$oDetails = $oPluginRegistry->getPluginDetails ( $sClassName . '.php' );
|
$oDetails = $oPluginRegistry->getPluginDetails($sClassName . '.php');
|
||||||
$oPluginRegistry->enablePlugin($oDetails->getNamespace());
|
$oPluginRegistry->enablePlugin($oDetails->getNamespace());
|
||||||
}
|
}
|
||||||
$oPluginRegistry->savePlugin($oDetails->getNamespace());
|
$oPluginRegistry->savePlugin($oDetails->getNamespace());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (file_exists(PATH_DATA_SITE.'ee')) {
|
if (file_exists(PATH_DATA_SITE . 'ee')) {
|
||||||
$aPlugins = unserialize ( trim ( file_get_contents ( PATH_DATA_SITE.'ee' ) ) );
|
$aPlugins = unserialize(trim(file_get_contents(PATH_DATA_SITE . 'ee')));
|
||||||
|
|
||||||
foreach ($aPlugins as $aPlugin) {
|
foreach ($aPlugins as $aPlugin) {
|
||||||
$sClassName = substr ( $aPlugin ['sFilename'], 0, strpos ( $aPlugin ['sFilename'], '-' ) );
|
$sClassName = substr($aPlugin ['sFilename'], 0, strpos($aPlugin ['sFilename'], '-'));
|
||||||
if ( strlen($sClassName) > 0 ) {
|
if (strlen($sClassName) > 0) {
|
||||||
if (!class_exists($sClassName)) {
|
if (!class_exists($sClassName)) {
|
||||||
require_once PATH_PLUGINS . $sClassName . '.php';
|
require_once PATH_PLUGINS . $sClassName . '.php';
|
||||||
}
|
}
|
||||||
$oDetails = $oPluginRegistry->getPluginDetails ( $sClassName . '.php' );
|
$oDetails = $oPluginRegistry->getPluginDetails($sClassName . '.php');
|
||||||
if ($oDetails) {
|
if ($oDetails) {
|
||||||
$oPluginRegistry->disablePlugin($oDetails->getNamespace());
|
$oPluginRegistry->disablePlugin($oDetails->getNamespace());
|
||||||
$oPluginRegistry->savePlugin($oDetails->getNamespace());
|
$oPluginRegistry->savePlugin($oDetails->getNamespace());
|
||||||
@@ -225,7 +221,7 @@ class PmLicenseManager
|
|||||||
|
|
||||||
public function getCurrentLicenseStatus()
|
public function getCurrentLicenseStatus()
|
||||||
{
|
{
|
||||||
$result = array ();
|
$result = [];
|
||||||
switch ($this->result) {
|
switch ($this->result) {
|
||||||
case 'OK':
|
case 'OK':
|
||||||
$result ['result'] = 'ok';
|
$result ['result'] = 'ok';
|
||||||
@@ -233,8 +229,8 @@ class PmLicenseManager
|
|||||||
break;
|
break;
|
||||||
case 'TMINUS':
|
case 'TMINUS':
|
||||||
$result ['result'] = 'tminus';
|
$result ['result'] = 'tminus';
|
||||||
$startDateA=explode(" ",$this->date['HUMAN']['START']);
|
$startDateA = explode(" ", $this->date['HUMAN']['START']);
|
||||||
$result ['message'] = "License will be active on ".$startDateA[0];
|
$result ['message'] = "License will be active on " . $startDateA[0];
|
||||||
break;
|
break;
|
||||||
case 'EXPIRED':
|
case 'EXPIRED':
|
||||||
$result ['result'] = 'expired';
|
$result ['result'] = 'expired';
|
||||||
@@ -255,7 +251,7 @@ class PmLicenseManager
|
|||||||
case 'EMPTY':
|
case 'EMPTY':
|
||||||
$result ['result'] = 'empty';
|
$result ['result'] = 'empty';
|
||||||
$result ['message'] = "Empty License";
|
$result ['message'] = "Empty License";
|
||||||
if (defined ( 'write_error' )) {
|
if (defined('write_error')) {
|
||||||
$result ['message'] = "Write error" . $result ['message'];
|
$result ['message'] = "Write error" . $result ['message'];
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -270,17 +266,17 @@ class PmLicenseManager
|
|||||||
if (self::$instance == null) {
|
if (self::$instance == null) {
|
||||||
self::$instance = new PluginRegistry();
|
self::$instance = new PluginRegistry();
|
||||||
}
|
}
|
||||||
$instance = unserialize ( $serialized );
|
$instance = unserialize($serialized);
|
||||||
self::$instance = $instance;
|
self::$instance = $instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getExpireIn()
|
public function getExpireIn()
|
||||||
{
|
{
|
||||||
$status = $this->getCurrentLicenseStatus ();
|
$status = $this->getCurrentLicenseStatus();
|
||||||
$expireIn = 0;
|
$expireIn = 0;
|
||||||
if ($status ['result'] == 'ok') {
|
if ($status ['result'] == 'ok') {
|
||||||
if ($this->date ['END']!="NEVER") {
|
if ($this->date ['END'] != "NEVER") {
|
||||||
$expireIn = ceil ( ($this->date ['END'] - time ()) / 60 / 60 / 24 );
|
$expireIn = ceil(($this->date ['END'] - time()) / 60 / 60 / 24);
|
||||||
} else {
|
} else {
|
||||||
$expireIn = "NEVER";
|
$expireIn = "NEVER";
|
||||||
}
|
}
|
||||||
@@ -290,17 +286,17 @@ class PmLicenseManager
|
|||||||
|
|
||||||
public function getLicenseInfo()
|
public function getLicenseInfo()
|
||||||
{
|
{
|
||||||
$validStatus = array (
|
$validStatus = [
|
||||||
'ok',
|
'ok',
|
||||||
'expired'
|
'expired'
|
||||||
);
|
];
|
||||||
$status = $this->getCurrentLicenseStatus ();
|
$status = $this->getCurrentLicenseStatus();
|
||||||
$infoText = "";
|
$infoText = "";
|
||||||
if (in_array ( $status ['result'], $validStatus )) {
|
if (in_array($status ['result'], $validStatus)) {
|
||||||
$start = explode ( " ", $this->date ['HUMAN'] ['START'] );
|
$start = explode(" ", $this->date ['HUMAN'] ['START']);
|
||||||
$end = explode ( " ", $this->date ['HUMAN'] ['END'] );
|
$end = explode(" ", $this->date ['HUMAN'] ['END']);
|
||||||
$infoText .= "<b>" . "Issued to" . ":</b> " . $this->info ['FIRST_NAME'] . " " . $this->info ['LAST_NAME'] . "<br>";
|
$infoText .= "<b>" . "Issued to" . ":</b> " . $this->info ['FIRST_NAME'] . " " . $this->info ['LAST_NAME'] . "<br>";
|
||||||
$infoText .= "<b>" . G::LoadTranslation('ID_WORKSPACE') .":</b> " . $this->info ['DOMAIN_WORKSPACE'] . "<br>";
|
$infoText .= "<b>" . G::LoadTranslation('ID_WORKSPACE') . ":</b> " . $this->info ['DOMAIN_WORKSPACE'] . "<br>";
|
||||||
$infoText .= "<i>" . G::LoadTranslation('ID_VALID_FROM') . " " . $start [0] . " " . G::LoadTranslation('ID_TO') . " " . $end [0] . "</i>";
|
$infoText .= "<i>" . G::LoadTranslation('ID_VALID_FROM') . " " . $start [0] . " " . G::LoadTranslation('ID_TO') . " " . $end [0] . "</i>";
|
||||||
}
|
}
|
||||||
if ($status ['message'] != "") {
|
if ($status ['message'] != "") {
|
||||||
@@ -318,14 +314,14 @@ class PmLicenseManager
|
|||||||
if ($this->getExpireIn() != "NEVER" && ((int)$this->getExpireIn() <= 30) && ((int)$this->getExpireIn() > 0)) {
|
if ($this->getExpireIn() != "NEVER" && ((int)$this->getExpireIn() <= 30) && ((int)$this->getExpireIn() > 0)) {
|
||||||
$infoO = $this->getLicenseInfo();
|
$infoO = $this->getLicenseInfo();
|
||||||
$infoText = $infoO['infoText'];
|
$infoText = $infoO['infoText'];
|
||||||
$js = (EnterpriseUtils::skinIsUx() == 1)? "Ext.MessageBox.show({title: '', msg: '$infoText', buttons: Ext.MessageBox.OK, icon: Ext.MessageBox.INFO});" : "msgBox('$infoText');";
|
$js = (EnterpriseUtils::skinIsUx() == 1) ? "Ext.MessageBox.show({title: '', msg: '$infoText', buttons: Ext.MessageBox.OK, icon: Ext.MessageBox.INFO});" : "msgBox('$infoText');";
|
||||||
$linkText = $linkText . "<span style=\"color: red;\">" . G::LoadTranslation('ID_EXPIRES_IN') . " " . $this->getExpireIn () . " " . G::LoadTranslation('ID_DAYS') . "</span>";
|
$linkText = $linkText . "<span style=\"color: red;\">" . G::LoadTranslation('ID_EXPIRES_IN') . " " . $this->getExpireIn() . " " . G::LoadTranslation('ID_DAYS') . "</span>";
|
||||||
} else {
|
} else {
|
||||||
if ($this->getExpireIn() != "NEVER" && (int)$this->getExpireIn() <= 0) {
|
if ($this->getExpireIn() != "NEVER" && (int)$this->getExpireIn() <= 0) {
|
||||||
$infoO = $this->getLicenseInfo();
|
$infoO = $this->getLicenseInfo();
|
||||||
$infoText = $infoO['infoText'];
|
$infoText = $infoO['infoText'];
|
||||||
$infoLabel = $infoO['infoLabel'];
|
$infoLabel = $infoO['infoLabel'];
|
||||||
$js = (EnterpriseUtils::skinIsUx() == 1)? "Ext.MessageBox.show({title: '', msg: '$infoText', buttons: Ext.MessageBox.OK, icon: Ext.MessageBox.INFO});" : "msgBox('$infoText');";
|
$js = (EnterpriseUtils::skinIsUx() == 1) ? "Ext.MessageBox.show({title: '', msg: '$infoText', buttons: Ext.MessageBox.OK, icon: Ext.MessageBox.INFO});" : "msgBox('$infoText');";
|
||||||
$linkText = $linkText . "<a href=\"javascript:;\" onclick=\"$js return (false);\"><span style=\"color: red;\">" . $infoLabel . "</span></a>";
|
$linkText = $linkText . "<a href=\"javascript:;\" onclick=\"$js return (false);\"><span style=\"color: red;\">" . $infoLabel . "</span></a>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -339,16 +335,16 @@ class PmLicenseManager
|
|||||||
if (EnterpriseUtils::skinIsUx() == 1) {
|
if (EnterpriseUtils::skinIsUx() == 1) {
|
||||||
$aOnclick = "onclick=\"Ext.ComponentMgr.get('mainTabPanel').setActiveTab('pm-option-setup'); Ext.ComponentMgr.get('pm-option-setup').setLocation(Ext.ComponentMgr.get('pm-option-setup').defaultSrc + 's=PMENTERPRISE', true); return (false);\"";
|
$aOnclick = "onclick=\"Ext.ComponentMgr.get('mainTabPanel').setActiveTab('pm-option-setup'); Ext.ComponentMgr.get('pm-option-setup').setLocation(Ext.ComponentMgr.get('pm-option-setup').defaultSrc + 's=PMENTERPRISE', true); return (false);\"";
|
||||||
}
|
}
|
||||||
$linkText = $linkText . (($linkText != null)? " | " : null) . "<a href=\"javascript:;\" $aOnclick style=\"color: #008000;\">" . G::LoadTranslation('ID_UPGRADE_SYSTEM') . "</a>";
|
$linkText = $linkText . (($linkText != null) ? " | " : null) . "<a href=\"javascript:;\" $aOnclick style=\"color: #008000;\">" . G::LoadTranslation('ID_UPGRADE_SYSTEM') . "</a>";
|
||||||
}
|
}
|
||||||
$linkText = ($linkText != null)? $linkText . ((EnterpriseUtils::skinIsUx() == 1)? null : " |") : null;
|
$linkText = ($linkText != null) ? $linkText . ((EnterpriseUtils::skinIsUx() == 1) ? null : " |") : null;
|
||||||
return ($linkText);
|
return ($linkText);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function validateLicense($path)
|
public function validateLicense($path)
|
||||||
{
|
{
|
||||||
$application = new license_application ( $path, false, true, false, true, true );
|
$application = new license_application ($path, false, true, false, true, true);
|
||||||
$results = $application->validate ( false, false, "", "", "80", true );
|
$results = $application->validate(false, false, "", "", "80", true);
|
||||||
|
|
||||||
if ($results ['RESULT'] != 'OK') {
|
if ($results ['RESULT'] != 'OK') {
|
||||||
return true;
|
return true;
|
||||||
@@ -359,9 +355,9 @@ class PmLicenseManager
|
|||||||
|
|
||||||
public function installLicense($path, $redirect = true, $includeExpired = true)
|
public function installLicense($path, $redirect = true, $includeExpired = true)
|
||||||
{
|
{
|
||||||
$application = new license_application ( $path, false, true, false, true, true );
|
$application = new license_application ($path, false, true, false, true, true);
|
||||||
|
|
||||||
$results = $application->validate ( false, false, "", "", "80", true );
|
$results = $application->validate(false, false, "", "", "80", true);
|
||||||
|
|
||||||
//if the result is ok then it is saved into DB
|
//if the result is ok then it is saved into DB
|
||||||
$res = $results ['RESULT'];
|
$res = $results ['RESULT'];
|
||||||
@@ -373,21 +369,22 @@ class PmLicenseManager
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (( $res != 'OK') && ($res != 'EXPIRED' ) && ($res != 'TMINUS') ) {
|
if (($res != 'OK') && ($res != 'EXPIRED') && ($res != 'TMINUS')) {
|
||||||
G::SendTemporalMessage ( 'ID_ISNT_LICENSE', 'tmp-info', 'labels' );
|
G::SendTemporalMessage('ID_ISNT_LICENSE', 'tmp-info', 'labels');
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
$oServerConf = & ServerConf::getSingleton ();
|
$oServerConf = &ServerConf::getSingleton();
|
||||||
$oServerConf->setProperty ( 'ACTIVE_LICENSE',array(SYS_SYS => $path));
|
$oServerConf->setProperty('ACTIVE_LICENSE', [SYS_SYS => $path]);
|
||||||
$this->saveDataLicense( $results, $path, $redirect );
|
$this->saveDataLicense($results, $path, $redirect);
|
||||||
if ($redirect) {
|
if ($redirect) {
|
||||||
G::Header ( 'location: ../enterprise/addonsStore' );
|
G::Header('location: ../enterprise/addonsStore');
|
||||||
} else {
|
} else {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
get Active License
|
get Active License
|
||||||
*/
|
*/
|
||||||
@@ -395,8 +392,8 @@ class PmLicenseManager
|
|||||||
{
|
{
|
||||||
//get license from database, table LICENSE_MANAGER
|
//get license from database, table LICENSE_MANAGER
|
||||||
try {
|
try {
|
||||||
$aRow = array();
|
$aRow = [];
|
||||||
require_once ("classes/model/LicenseManager.php");
|
require_once("classes/model/LicenseManager.php");
|
||||||
$oCriteria = new Criteria('workflow');
|
$oCriteria = new Criteria('workflow');
|
||||||
$oCriteria->addSelectColumn(LicenseManagerPeer::LICENSE_USER);
|
$oCriteria->addSelectColumn(LicenseManagerPeer::LICENSE_USER);
|
||||||
$oCriteria->addSelectColumn(LicenseManagerPeer::LICENSE_START);
|
$oCriteria->addSelectColumn(LicenseManagerPeer::LICENSE_START);
|
||||||
@@ -408,27 +405,27 @@ class PmLicenseManager
|
|||||||
$oDataset->next();
|
$oDataset->next();
|
||||||
$aRow = $oDataset->getRow();
|
$aRow = $oDataset->getRow();
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
G::pr ($e);
|
G::pr($e);
|
||||||
}
|
}
|
||||||
return $aRow;
|
return $aRow;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function lookForStatusLicense()
|
public function lookForStatusLicense()
|
||||||
{
|
{
|
||||||
require_once ("classes/model/LicenseManager.php");
|
require_once("classes/model/LicenseManager.php");
|
||||||
//obtening info in a row that has ACTIVE status
|
//obtening info in a row that has ACTIVE status
|
||||||
$oCtia = new Criteria ( 'workflow' );
|
$oCtia = new Criteria ('workflow');
|
||||||
$oCtia->add ( LicenseManagerPeer::LICENSE_STATUS, 'ACTIVE' );
|
$oCtia->add(LicenseManagerPeer::LICENSE_STATUS, 'ACTIVE');
|
||||||
$oDataset = LicenseManagerPeer::doSelectRS ( $oCtia );
|
$oDataset = LicenseManagerPeer::doSelectRS($oCtia);
|
||||||
$oDataset->next ();
|
$oDataset->next();
|
||||||
$aRow = $oDataset->getRow ();
|
$aRow = $oDataset->getRow();
|
||||||
|
|
||||||
$oCtiaA = new Criteria ( 'workflow' );
|
$oCtiaA = new Criteria ('workflow');
|
||||||
$oCtiaA->add ( LicenseManagerPeer::LICENSE_UID, $aRow [0] );
|
$oCtiaA->add(LicenseManagerPeer::LICENSE_UID, $aRow [0]);
|
||||||
|
|
||||||
$oCtiaB = new Criteria ( 'workflow' );
|
$oCtiaB = new Criteria ('workflow');
|
||||||
$oCtiaB->add ( LicenseManagerPeer::LICENSE_STATUS, 'INACTIVE' );
|
$oCtiaB->add(LicenseManagerPeer::LICENSE_STATUS, 'INACTIVE');
|
||||||
BasePeer::doUpdate ( $oCtiaA, $oCtiaB, Propel::getConnection ( 'workflow' ) );
|
BasePeer::doUpdate($oCtiaA, $oCtiaB, Propel::getConnection('workflow'));
|
||||||
return 'ACTIVE';
|
return 'ACTIVE';
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -436,7 +433,7 @@ class PmLicenseManager
|
|||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
//getting info about file
|
//getting info about file
|
||||||
$LicenseUid = G::generateUniqueID ();
|
$LicenseUid = G::generateUniqueID();
|
||||||
$LicenseUser = $results ['DATA'] ['FIRST_NAME'] . ' ' . $results ['DATA'] ['LAST_NAME'];
|
$LicenseUser = $results ['DATA'] ['FIRST_NAME'] . ' ' . $results ['DATA'] ['LAST_NAME'];
|
||||||
$LicenseStart = $results ['DATE'] ['START'];
|
$LicenseStart = $results ['DATE'] ['START'];
|
||||||
$LicenseEnd = $results ['DATE'] ['END'];
|
$LicenseEnd = $results ['DATE'] ['END'];
|
||||||
@@ -448,35 +445,35 @@ class PmLicenseManager
|
|||||||
$filter = new InputFilter();
|
$filter = new InputFilter();
|
||||||
$path = $filter->xssFilterHard($path, 'path');
|
$path = $filter->xssFilterHard($path, 'path');
|
||||||
|
|
||||||
$handle = fopen ( $path, "r" );
|
$handle = fopen($path, "r");
|
||||||
$contents = fread ( $handle, filesize ( $path ) );
|
$contents = fread($handle, filesize($path));
|
||||||
fclose ( $handle );
|
fclose($handle);
|
||||||
$LicenseData = $contents;
|
$LicenseData = $contents;
|
||||||
$LicensePath = $path;
|
$LicensePath = $path;
|
||||||
$LicenseWorkspace = isset($results['DATA']['DOMAIN_WORKSPACE']) ? $results['DATA']['DOMAIN_WORKSPACE'] : '';
|
$LicenseWorkspace = isset($results['DATA']['DOMAIN_WORKSPACE']) ? $results['DATA']['DOMAIN_WORKSPACE'] : '';
|
||||||
$LicenseType = $results['DATA']['TYPE'];
|
$LicenseType = $results['DATA']['TYPE'];
|
||||||
|
|
||||||
require_once ("classes/model/LicenseManager.php");
|
require_once("classes/model/LicenseManager.php");
|
||||||
|
|
||||||
//if exists the row in the database propel will update it, otherwise will insert.
|
//if exists the row in the database propel will update it, otherwise will insert.
|
||||||
$tr = LicenseManagerPeer::retrieveByPK ( $LicenseUid );
|
$tr = LicenseManagerPeer::retrieveByPK($LicenseUid);
|
||||||
if (! (is_object ( $tr ) && get_class ( $tr ) == 'LicenseManager')) {
|
if (!(is_object($tr) && get_class($tr) == 'LicenseManager')) {
|
||||||
$tr = new LicenseManager ();
|
$tr = new LicenseManager ();
|
||||||
}
|
}
|
||||||
$tr->setLicenseUid ( $LicenseUid );
|
$tr->setLicenseUid($LicenseUid);
|
||||||
$tr->setLicenseUser ( $LicenseUser );
|
$tr->setLicenseUser($LicenseUser);
|
||||||
$tr->setLicenseStart ( $LicenseStart );
|
$tr->setLicenseStart($LicenseStart);
|
||||||
$tr->setLicenseEnd ( $LicenseEnd );
|
$tr->setLicenseEnd($LicenseEnd);
|
||||||
$tr->setLicenseSpan ( $LicenseSpan );
|
$tr->setLicenseSpan($LicenseSpan);
|
||||||
$tr->setLicenseStatus ( $LicenseStatus );
|
$tr->setLicenseStatus($LicenseStatus);
|
||||||
$tr->setLicenseData ( $LicenseData );
|
$tr->setLicenseData($LicenseData);
|
||||||
$tr->setLicensePath ( $LicensePath );
|
$tr->setLicensePath($LicensePath);
|
||||||
$tr->setLicenseWorkspace ( $LicenseWorkspace );
|
$tr->setLicenseWorkspace($LicenseWorkspace);
|
||||||
$tr->setLicenseType ( $LicenseType );
|
$tr->setLicenseType($LicenseType);
|
||||||
|
|
||||||
$res = $tr->save ();
|
$res = $tr->save();
|
||||||
Cache::forget(PmLicenseManager::CACHE_KEY . '.' . SYS_SYS);
|
Cache::forget(PmLicenseManager::CACHE_KEY . '.' . SYS_SYS);
|
||||||
} catch ( Exception $e ) {
|
} catch (Exception $e) {
|
||||||
G::pr($e);
|
G::pr($e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -484,28 +481,28 @@ class PmLicenseManager
|
|||||||
public function getResultQry($sNameTable, $sfield, $sCondition)
|
public function getResultQry($sNameTable, $sfield, $sCondition)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
require_once ("classes/model/LicenseManager.php");
|
require_once("classes/model/LicenseManager.php");
|
||||||
$oCriteria = new Criteria ( 'workflow' );
|
$oCriteria = new Criteria ('workflow');
|
||||||
$oCriteria->addSelectColumn ( LicenseManagerPeer::LICENSE_USER );
|
$oCriteria->addSelectColumn(LicenseManagerPeer::LICENSE_USER);
|
||||||
$oCriteria->addSelectColumn ( LicenseManagerPeer::LICENSE_START );
|
$oCriteria->addSelectColumn(LicenseManagerPeer::LICENSE_START);
|
||||||
$oCriteria->addSelectColumn ( LicenseManagerPeer::LICENSE_PATH );
|
$oCriteria->addSelectColumn(LicenseManagerPeer::LICENSE_PATH);
|
||||||
$oCriteria->addSelectColumn ( LicenseManagerPeer::LICENSE_DATA );
|
$oCriteria->addSelectColumn(LicenseManagerPeer::LICENSE_DATA);
|
||||||
$oCriteria->add ( LicenseManagerPeer::LICENSE_STATUS, 'ACTIVE' );
|
$oCriteria->add(LicenseManagerPeer::LICENSE_STATUS, 'ACTIVE');
|
||||||
$oDataset = LicenseManagerPeer::doSelectRS ( $oCriteria );
|
$oDataset = LicenseManagerPeer::doSelectRS($oCriteria);
|
||||||
$oDataset->setFetchmode ( ResultSet::FETCHMODE_ASSOC );
|
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||||
$oDataset->next ();
|
$oDataset->next();
|
||||||
$aRow = $oDataset->getRow ();
|
$aRow = $oDataset->getRow();
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
G::pr ( $e );
|
G::pr($e);
|
||||||
$aRow = array ();
|
$aRow = [];
|
||||||
}
|
}
|
||||||
return $aRow;
|
return $aRow;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getActiveFeatures()
|
public function getActiveFeatures()
|
||||||
{
|
{
|
||||||
if (file_exists ( PATH_PLUGINS . 'enterprise/data/default' )) {
|
if (file_exists(PATH_PLUGINS . 'enterprise/data/default')) {
|
||||||
return array();
|
return [];
|
||||||
}
|
}
|
||||||
return unserialize(G::decrypt($this->serial, file_get_contents(PATH_PLUGINS . 'enterprise/data/default')));
|
return unserialize(G::decrypt($this->serial, file_get_contents(PATH_PLUGINS . 'enterprise/data/default')));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,9 +43,9 @@ class SkinEngine
|
|||||||
$this->template = $template;
|
$this->template = $template;
|
||||||
$this->skin = $skin;
|
$this->skin = $skin;
|
||||||
$this->content = $content;
|
$this->content = $content;
|
||||||
$this->skinVariants = array('blank','extjs','raw','tracker','submenu');
|
$this->skinVariants = array('blank', 'extjs', 'raw', 'tracker', 'submenu');
|
||||||
$this->skinsBasePath = G::ExpandPath("skinEngine");
|
$this->skinsBasePath = G::ExpandPath("skinEngine");
|
||||||
$sysConf = System::getSystemConfiguration( PATH_CONFIG . 'env.ini' );
|
$sysConf = System::getSystemConfiguration(PATH_CONFIG . 'env.ini');
|
||||||
$this->skinDefault = (isset($sysConf['default_skin']) && $sysConf['default_skin'] != '') ? $sysConf['default_skin'] : 'classic';
|
$this->skinDefault = (isset($sysConf['default_skin']) && $sysConf['default_skin'] != '') ? $sysConf['default_skin'] : 'classic';
|
||||||
$this->_init();
|
$this->_init();
|
||||||
}
|
}
|
||||||
@@ -69,8 +69,7 @@ class SkinEngine
|
|||||||
$this->forceTemplateCompile = true;
|
$this->forceTemplateCompile = true;
|
||||||
}
|
}
|
||||||
$_SESSION['currentSkin'] = SYS_SKIN;
|
$_SESSION['currentSkin'] = SYS_SKIN;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
$_SESSION['currentSkin'] = SYS_SKIN;
|
$_SESSION['currentSkin'] = SYS_SKIN;
|
||||||
$_SESSION['currentSkinVariant'] = $this->skin;
|
$_SESSION['currentSkinVariant'] = $this->skin;
|
||||||
}
|
}
|
||||||
@@ -99,41 +98,43 @@ class SkinEngine
|
|||||||
if (strtolower($this->mainSkin) != "classic") {
|
if (strtolower($this->mainSkin) != "classic") {
|
||||||
if (defined('PATH_CUSTOM_SKINS') && is_dir(PATH_CUSTOM_SKINS . $this->mainSkin)) { // check this skin on user skins path
|
if (defined('PATH_CUSTOM_SKINS') && is_dir(PATH_CUSTOM_SKINS . $this->mainSkin)) { // check this skin on user skins path
|
||||||
$skinObject = PATH_CUSTOM_SKINS . $this->mainSkin;
|
$skinObject = PATH_CUSTOM_SKINS . $this->mainSkin;
|
||||||
}
|
} else {
|
||||||
else if (is_dir($this->skinsBasePath . $this->mainSkin)) { // check this skin on core skins path
|
if (is_dir($this->skinsBasePath . $this->mainSkin)) { // check this skin on core skins path
|
||||||
$skinObject = $this->skinsBasePath . $this->mainSkin;
|
$skinObject = $this->skinsBasePath . $this->mainSkin;
|
||||||
}
|
} else { //Skin doesn't exist
|
||||||
else { //Skin doesn't exist
|
|
||||||
$this->mainSkin = $this->skinDefault;
|
$this->mainSkin = $this->skinDefault;
|
||||||
if (defined('PATH_CUSTOM_SKINS') && is_dir(PATH_CUSTOM_SKINS . $this->mainSkin)) { // check this skin on user skins path
|
if (defined('PATH_CUSTOM_SKINS') && is_dir(PATH_CUSTOM_SKINS . $this->mainSkin)) { // check this skin on user skins path
|
||||||
$skinObject = PATH_CUSTOM_SKINS . $this->mainSkin;
|
$skinObject = PATH_CUSTOM_SKINS . $this->mainSkin;
|
||||||
}
|
} else {
|
||||||
else if (is_dir($this->skinsBasePath . $this->mainSkin)) { // check this skin on core skins path
|
if (is_dir($this->skinsBasePath . $this->mainSkin)) { // check this skin on core skins path
|
||||||
$skinObject = $this->skinsBasePath . $this->mainSkin;
|
$skinObject = $this->skinsBasePath . $this->mainSkin;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//This should have an XML definition and a layout html
|
//This should have an XML definition and a layout html
|
||||||
if ($skinObject && file_exists($skinObject . PATH_SEP . 'config.xml')
|
if ($skinObject && file_exists($skinObject . PATH_SEP . 'config.xml')
|
||||||
&& file_exists($skinObject . PATH_SEP . 'layout.html')) {
|
&& file_exists($skinObject . PATH_SEP . 'layout.html')
|
||||||
|
) {
|
||||||
|
|
||||||
$configurationFile = $skinObject . PATH_SEP . 'config.xml';
|
$configurationFile = $skinObject . PATH_SEP . 'config.xml';
|
||||||
$layoutFile = $skinObject . PATH_SEP . 'layout.html';
|
$layoutFile = $skinObject . PATH_SEP . 'layout.html';
|
||||||
|
|
||||||
if (file_exists($skinObject . PATH_SEP . 'layout-blank.html')){
|
if (file_exists($skinObject . PATH_SEP . 'layout-blank.html')) {
|
||||||
$layoutFileBlank = $skinObject . PATH_SEP . 'layout-blank.html';
|
$layoutFileBlank = $skinObject . PATH_SEP . 'layout-blank.html';
|
||||||
}
|
}
|
||||||
if (file_exists($skinObject . PATH_SEP . 'layout-extjs.html')){
|
if (file_exists($skinObject . PATH_SEP . 'layout-extjs.html')) {
|
||||||
$layoutFileExtjs = $skinObject . PATH_SEP . 'layout-extjs.html' ;
|
$layoutFileExtjs = $skinObject . PATH_SEP . 'layout-extjs.html';
|
||||||
}
|
}
|
||||||
if (file_exists($skinObject . PATH_SEP . 'layout-raw.html')){
|
if (file_exists($skinObject . PATH_SEP . 'layout-raw.html')) {
|
||||||
$layoutFileRaw = $skinObject . PATH_SEP . 'layout-raw.html';
|
$layoutFileRaw = $skinObject . PATH_SEP . 'layout-raw.html';
|
||||||
}
|
}
|
||||||
if (file_exists($skinObject . PATH_SEP . 'layout-tracker.html')){
|
if (file_exists($skinObject . PATH_SEP . 'layout-tracker.html')) {
|
||||||
$layoutFileTracker = $skinObject . PATH_SEP . 'layout-tracker.html';
|
$layoutFileTracker = $skinObject . PATH_SEP . 'layout-tracker.html';
|
||||||
}
|
}
|
||||||
if (file_exists($skinObject . PATH_SEP . 'layout-submenu.html')){
|
if (file_exists($skinObject . PATH_SEP . 'layout-submenu.html')) {
|
||||||
$layoutFileSubmenu = $skinObject . PATH_SEP . 'layout-submenu.html';
|
$layoutFileSubmenu = $skinObject . PATH_SEP . 'layout-submenu.html';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -167,8 +168,7 @@ class SkinEngine
|
|||||||
}
|
}
|
||||||
|
|
||||||
$this->$skinMethod();
|
$this->$skinMethod();
|
||||||
}
|
} catch (Exception $e) {
|
||||||
catch (Exception $e) {
|
|
||||||
switch ($e->getCode()) {
|
switch ($e->getCode()) {
|
||||||
case SE_LAYOUT_NOT_FOUND:
|
case SE_LAYOUT_NOT_FOUND:
|
||||||
|
|
||||||
@@ -178,14 +178,13 @@ class SkinEngine
|
|||||||
$data['exception_list'] = array();
|
$data['exception_list'] = array();
|
||||||
if (substr($this->mainSkin, 0, 2) != 'ux') {
|
if (substr($this->mainSkin, 0, 2) != 'ux') {
|
||||||
$url = '../login/login';
|
$url = '../login/login';
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
$url = '../main/login';
|
$url = '../main/login';
|
||||||
}
|
}
|
||||||
|
|
||||||
$link = '<a href="'.$url.'">Try Now</a>';
|
$link = '<a href="' . $url . '">Try Now</a>';
|
||||||
|
|
||||||
$data['exception_notes'][] = G::LoadTranslation('ID_REDIRECT_URL'). $link;
|
$data['exception_notes'][] = G::LoadTranslation('ID_REDIRECT_URL') . $link;
|
||||||
|
|
||||||
G::renderTemplate(PATH_TPL . 'exception', $data);
|
G::renderTemplate(PATH_TPL . 'exception', $data);
|
||||||
break;
|
break;
|
||||||
@@ -201,8 +200,8 @@ class SkinEngine
|
|||||||
|
|
||||||
private function _raw()
|
private function _raw()
|
||||||
{
|
{
|
||||||
G::verifyPath ( PATH_SMARTY_C, true );
|
G::verifyPath(PATH_SMARTY_C, true);
|
||||||
G::verifyPath ( PATH_SMARTY_CACHE, true );
|
G::verifyPath(PATH_SMARTY_CACHE, true);
|
||||||
|
|
||||||
$smarty = new Smarty();
|
$smarty = new Smarty();
|
||||||
$oHeadPublisher =& headPublisher::getSingleton();
|
$oHeadPublisher =& headPublisher::getSingleton();
|
||||||
@@ -216,14 +215,14 @@ class SkinEngine
|
|||||||
$header = $oHeadPublisher->printRawHeader();
|
$header = $oHeadPublisher->printRawHeader();
|
||||||
}
|
}
|
||||||
|
|
||||||
$smarty->assign('header', $header );
|
$smarty->assign('header', $header);
|
||||||
$smarty->force_compile = $this->forceTemplateCompile;
|
$smarty->force_compile = $this->forceTemplateCompile;
|
||||||
$smarty->display($this->layoutFileRaw['basename']);
|
$smarty->display($this->layoutFileRaw['basename']);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function _plain()
|
private function _plain()
|
||||||
{
|
{
|
||||||
$oHeadPublisher = & headPublisher::getSingleton();
|
$oHeadPublisher = &headPublisher::getSingleton();
|
||||||
echo $oHeadPublisher->renderExtJs();
|
echo $oHeadPublisher->renderExtJs();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -233,16 +232,16 @@ class SkinEngine
|
|||||||
$oServerConf =& ServerConf::getSingleton();
|
$oServerConf =& ServerConf::getSingleton();
|
||||||
$oHeadPublisher =& headPublisher::getSingleton();
|
$oHeadPublisher =& headPublisher::getSingleton();
|
||||||
|
|
||||||
if( $oHeadPublisher->extJsInit === true){
|
if ($oHeadPublisher->extJsInit === true) {
|
||||||
$header = $oHeadPublisher->getExtJsVariablesScript();
|
$header = $oHeadPublisher->getExtJsVariablesScript();
|
||||||
$styles = $oHeadPublisher->getExtJsStylesheets($this->cssFileName);
|
$styles = $oHeadPublisher->getExtJsStylesheets($this->cssFileName);
|
||||||
$body = $oHeadPublisher->getExtJsScripts();
|
$body = $oHeadPublisher->getExtJsScripts();
|
||||||
|
|
||||||
//default
|
//default
|
||||||
$templateFile = G::ExpandPath( "skinEngine" ).'base'.PATH_SEP .'extJsInitLoad.html';
|
$templateFile = G::ExpandPath("skinEngine") . 'base' . PATH_SEP . 'extJsInitLoad.html';
|
||||||
//Custom skins
|
//Custom skins
|
||||||
if (defined('PATH_CUSTOM_SKINS') && is_dir(PATH_CUSTOM_SKINS . $this->mainSkin)) {
|
if (defined('PATH_CUSTOM_SKINS') && is_dir(PATH_CUSTOM_SKINS . $this->mainSkin)) {
|
||||||
$templateFile = PATH_CUSTOM_SKINS . $this->mainSkin . PATH_SEP .'extJsInitLoad.html';
|
$templateFile = PATH_CUSTOM_SKINS . $this->mainSkin . PATH_SEP . 'extJsInitLoad.html';
|
||||||
}
|
}
|
||||||
//Skin uxs - simplified
|
//Skin uxs - simplified
|
||||||
if (!isset($_SESSION['user_experience'])) {
|
if (!isset($_SESSION['user_experience'])) {
|
||||||
@@ -251,8 +250,7 @@ class SkinEngine
|
|||||||
if ($_SESSION['user_experience'] != 'NORMAL') {
|
if ($_SESSION['user_experience'] != 'NORMAL') {
|
||||||
$templateFile = (is_dir(PATH_CUSTOM_SKINS . 'uxs')) ? PATH_CUSTOM_SKINS . 'simplified' . PATH_SEP . 'extJsInitLoad.html' : $templateFile;
|
$templateFile = (is_dir(PATH_CUSTOM_SKINS . 'uxs')) ? PATH_CUSTOM_SKINS . 'simplified' . PATH_SEP . 'extJsInitLoad.html' : $templateFile;
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
$styles = "";
|
$styles = "";
|
||||||
$header = $oHeadPublisher->getExtJsStylesheets($this->cssFileName);
|
$header = $oHeadPublisher->getExtJsStylesheets($this->cssFileName);
|
||||||
$header .= $oHeadPublisher->includeExtJs();
|
$header .= $oHeadPublisher->includeExtJs();
|
||||||
@@ -271,15 +269,19 @@ class SkinEngine
|
|||||||
$meta = null;
|
$meta = null;
|
||||||
$dirBody = null;
|
$dirBody = null;
|
||||||
|
|
||||||
if (isset($_SERVER["HTTP_USER_AGENT"]) && preg_match("/^.*\(.*Trident.(\d+)\..+\).*$/", $_SERVER["HTTP_USER_AGENT"], $arrayMatch)) {
|
if (isset($_SERVER["HTTP_USER_AGENT"]) && preg_match("/^.*\(.*Trident.(\d+)\..+\).*$/",
|
||||||
|
$_SERVER["HTTP_USER_AGENT"], $arrayMatch)
|
||||||
|
) {
|
||||||
|
|
||||||
//Get the IE version
|
//Get the IE version
|
||||||
if(preg_match("/^.*\(.*MSIE (\d+)\..+\).*$/", $_SERVER["HTTP_USER_AGENT"], $arrayMatch) || preg_match("/^.*\(.*rv.(\d+)\..+\).*$/", $_SERVER["HTTP_USER_AGENT"], $arrayMatch)){
|
if (preg_match("/^.*\(.*MSIE (\d+)\..+\).*$/", $_SERVER["HTTP_USER_AGENT"],
|
||||||
|
$arrayMatch) || preg_match("/^.*\(.*rv.(\d+)\..+\).*$/", $_SERVER["HTTP_USER_AGENT"], $arrayMatch)
|
||||||
|
) {
|
||||||
$ie = intval($arrayMatch[1]);
|
$ie = intval($arrayMatch[1]);
|
||||||
}
|
}
|
||||||
$isIE = Bootstrap::isIE();
|
$isIE = Bootstrap::isIE();
|
||||||
|
|
||||||
$swTrident = (preg_match("/^.*Trident.*$/", $_SERVER["HTTP_USER_AGENT"]))? 1 : 0; //Trident only in IE8+
|
$swTrident = (preg_match("/^.*Trident.*$/", $_SERVER["HTTP_USER_AGENT"])) ? 1 : 0; //Trident only in IE8+
|
||||||
|
|
||||||
$sw = 1;
|
$sw = 1;
|
||||||
|
|
||||||
@@ -289,7 +291,7 @@ class SkinEngine
|
|||||||
|
|
||||||
|
|
||||||
if ($sw == 1) {
|
if ($sw == 1) {
|
||||||
if ($ie == 10 || $ie == 11 ) {
|
if ($ie == 10 || $ie == 11) {
|
||||||
$ie = 8;
|
$ie = 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -297,7 +299,7 @@ class SkinEngine
|
|||||||
$meta = "<meta http-equiv=\"X-UA-Compatible\" content=\"IE=$ie\" />";
|
$meta = "<meta http-equiv=\"X-UA-Compatible\" content=\"IE=$ie\" />";
|
||||||
|
|
||||||
if (SYS_COLLECTION == 'cases') {
|
if (SYS_COLLECTION == 'cases') {
|
||||||
if($isIE) {
|
if ($isIE) {
|
||||||
$meta = "<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\" />";
|
$meta = "<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\" />";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -339,8 +341,9 @@ class SkinEngine
|
|||||||
$header .= $oHeadPublisher->getExtJsStylesheets($this->cssFileName);
|
$header .= $oHeadPublisher->getExtJsStylesheets($this->cssFileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
$smarty->assign('username', (isset($_SESSION['USR_USERNAME']) ? '(' . $_SESSION['USR_USERNAME'] . ' ' . G::LoadTranslation('ID_IN') . ' ' . SYS_SYS . ')' : '') );
|
$smarty->assign('username',
|
||||||
$smarty->assign('header', $header );
|
(isset($_SESSION['USR_USERNAME']) ? '(' . $_SESSION['USR_USERNAME'] . ' ' . G::LoadTranslation('ID_IN') . ' ' . SYS_SYS . ')' : ''));
|
||||||
|
$smarty->assign('header', $header);
|
||||||
$smarty->force_compile = $this->forceTemplateCompile;
|
$smarty->force_compile = $this->forceTemplateCompile;
|
||||||
|
|
||||||
// display
|
// display
|
||||||
@@ -362,7 +365,7 @@ class SkinEngine
|
|||||||
G::verifyPath(PATH_SMARTY_CACHE, true);
|
G::verifyPath(PATH_SMARTY_CACHE, true);
|
||||||
|
|
||||||
$smarty = new Smarty();
|
$smarty = new Smarty();
|
||||||
$oHeadPublisher = & headPublisher::getSingleton();
|
$oHeadPublisher = &headPublisher::getSingleton();
|
||||||
|
|
||||||
$smarty->template_dir = $this->layoutFileSubmenu['dirname'];
|
$smarty->template_dir = $this->layoutFileSubmenu['dirname'];
|
||||||
$smarty->compile_dir = PATH_SMARTY_C;
|
$smarty->compile_dir = PATH_SMARTY_C;
|
||||||
@@ -371,8 +374,7 @@ class SkinEngine
|
|||||||
|
|
||||||
if (isset($G_ENABLE_BLANK_SKIN) && $G_ENABLE_BLANK_SKIN) {
|
if (isset($G_ENABLE_BLANK_SKIN) && $G_ENABLE_BLANK_SKIN) {
|
||||||
$smarty->display($layoutFileBlank['basename']);
|
$smarty->display($layoutFileBlank['basename']);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
$header = '';
|
$header = '';
|
||||||
|
|
||||||
if (isset($oHeadPublisher)) {
|
if (isset($oHeadPublisher)) {
|
||||||
@@ -385,9 +387,12 @@ class SkinEngine
|
|||||||
|
|
||||||
if (strpos($_SERVER['REQUEST_URI'], '/login/login') !== false) {
|
if (strpos($_SERVER['REQUEST_URI'], '/login/login') !== false) {
|
||||||
$freeOfChargeText = "";
|
$freeOfChargeText = "";
|
||||||
if (! defined('SKIP_FREE_OF_CHARGE_TEXT'))
|
if (!defined('SKIP_FREE_OF_CHARGE_TEXT')) {
|
||||||
$freeOfChargeText = "Supplied free of charge with no support, certification, warranty, <br>maintenance nor indemnity by Processmaker and its Certified Partners.";
|
$freeOfChargeText = "Supplied free of charge with no support, certification, warranty, <br>maintenance nor indemnity by Processmaker and its Certified Partners.";
|
||||||
if(file_exists(PATH_CLASSES."class.pmLicenseManager.php")) $freeOfChargeText="";
|
}
|
||||||
|
if (file_exists(PATH_CLASSES . "class.pmLicenseManager.php")) {
|
||||||
|
$freeOfChargeText = "";
|
||||||
|
}
|
||||||
|
|
||||||
$fileFooter = PATH_SKINS . SYS_SKIN . PATH_SEP . 'footer.html';
|
$fileFooter = PATH_SKINS . SYS_SKIN . PATH_SEP . 'footer.html';
|
||||||
if (file_exists($fileFooter)) {
|
if (file_exists($fileFooter)) {
|
||||||
@@ -408,7 +413,8 @@ class SkinEngine
|
|||||||
}
|
}
|
||||||
|
|
||||||
$oMenu = new Menu();
|
$oMenu = new Menu();
|
||||||
$menus = $oMenu->generateArrayForTemplate($G_MAIN_MENU, 'SelectedMenu', 'mainMenu', $G_MENU_SELECTED, $G_ID_MENU_SELECTED);
|
$menus = $oMenu->generateArrayForTemplate($G_MAIN_MENU, 'SelectedMenu', 'mainMenu', $G_MENU_SELECTED,
|
||||||
|
$G_ID_MENU_SELECTED);
|
||||||
$smarty->assign('menus', $menus);
|
$smarty->assign('menus', $menus);
|
||||||
|
|
||||||
if (substr(SYS_SKIN, 0, 2) == 'ux') {
|
if (substr(SYS_SKIN, 0, 2) == 'ux') {
|
||||||
@@ -417,10 +423,11 @@ class SkinEngine
|
|||||||
}
|
}
|
||||||
|
|
||||||
$oSubMenu = new Menu();
|
$oSubMenu = new Menu();
|
||||||
$subMenus = $oSubMenu->generateArrayForTemplate($G_SUB_MENU, 'selectedSubMenu', 'subMenu', $G_SUB_MENU_SELECTED, $G_ID_SUB_MENU_SELECTED);
|
$subMenus = $oSubMenu->generateArrayForTemplate($G_SUB_MENU, 'selectedSubMenu', 'subMenu',
|
||||||
|
$G_SUB_MENU_SELECTED, $G_ID_SUB_MENU_SELECTED);
|
||||||
$smarty->assign('subMenus', $subMenus);
|
$smarty->assign('subMenus', $subMenus);
|
||||||
|
|
||||||
if (! defined('NO_DISPLAY_USERNAME')) {
|
if (!defined('NO_DISPLAY_USERNAME')) {
|
||||||
define('NO_DISPLAY_USERNAME', 0);
|
define('NO_DISPLAY_USERNAME', 0);
|
||||||
}
|
}
|
||||||
if (NO_DISPLAY_USERNAME == 0) {
|
if (NO_DISPLAY_USERNAME == 0) {
|
||||||
@@ -429,20 +436,21 @@ class SkinEngine
|
|||||||
$smarty->assign('rolename', isset($_SESSION['USR_ROLENAME']) ? $_SESSION['USR_ROLENAME'] . '' : '');
|
$smarty->assign('rolename', isset($_SESSION['USR_ROLENAME']) ? $_SESSION['USR_ROLENAME'] . '' : '');
|
||||||
$smarty->assign('pipe', isset($_SESSION['USR_USERNAME']) ? ' | ' : '');
|
$smarty->assign('pipe', isset($_SESSION['USR_USERNAME']) ? ' | ' : '');
|
||||||
$smarty->assign('logout', G::LoadTranslation('ID_LOGOUT'));
|
$smarty->assign('logout', G::LoadTranslation('ID_LOGOUT'));
|
||||||
$smarty->assign('workspace', defined('SYS_SYS')?SYS_SYS: '');
|
$smarty->assign('workspace', defined('SYS_SYS') ? SYS_SYS : '');
|
||||||
$uws = (isset($_SESSION['USR_ROLENAME']) && $_SESSION['USR_ROLENAME'] != '')? strtolower(G::LoadTranslation('ID_WORKSPACE_USING')): G::LoadTranslation('ID_WORKSPACE_USING');
|
$uws = (isset($_SESSION['USR_ROLENAME']) && $_SESSION['USR_ROLENAME'] != '') ? strtolower(G::LoadTranslation('ID_WORKSPACE_USING')) : G::LoadTranslation('ID_WORKSPACE_USING');
|
||||||
$smarty->assign('workspace_label', $uws);
|
$smarty->assign('workspace_label', $uws);
|
||||||
|
|
||||||
$conf = new Configurations();
|
$conf = new Configurations();
|
||||||
$conf->getFormats();
|
$conf->getFormats();
|
||||||
$name = $conf->userNameFormat(isset($_SESSION['USR_USERNAME']) ? $_SESSION['USR_USERNAME']: '', isset($_SESSION['USR_FULLNAME']) ? htmlentities($_SESSION['USR_FULLNAME'] , ENT_QUOTES, 'UTF-8'): '', isset($_SESSION['USER_LOGGED']) ? $_SESSION['USER_LOGGED'] : '');
|
$name = $conf->userNameFormat(isset($_SESSION['USR_USERNAME']) ? $_SESSION['USR_USERNAME'] : '',
|
||||||
$smarty->assign('user',$name);
|
isset($_SESSION['USR_FULLNAME']) ? htmlentities($_SESSION['USR_FULLNAME'], ENT_QUOTES,
|
||||||
|
'UTF-8') : '', isset($_SESSION['USER_LOGGED']) ? $_SESSION['USER_LOGGED'] : '');
|
||||||
|
$smarty->assign('user', $name);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (defined('SYS_SYS')) {
|
if (defined('SYS_SYS')) {
|
||||||
$logout = '/sys' . SYS_SYS . '/' . SYS_LANG . '/' . SYS_SKIN . '/login/login';
|
$logout = '/sys' . SYS_SYS . '/' . SYS_LANG . '/' . SYS_SKIN . '/login/login';
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
$logout = '/sys/' . SYS_LANG . '/' . SYS_SKIN . '/login/login';
|
$logout = '/sys/' . SYS_LANG . '/' . SYS_SKIN . '/login/login';
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -455,8 +463,7 @@ class SkinEngine
|
|||||||
if (class_exists('ProcessMaker\Plugins\PluginRegistry')) {
|
if (class_exists('ProcessMaker\Plugins\PluginRegistry')) {
|
||||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||||
$sCompanyLogo = $oPluginRegistry->getCompanyLogo('/images/processmaker.logo.jpg');
|
$sCompanyLogo = $oPluginRegistry->getCompanyLogo('/images/processmaker.logo.jpg');
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
$sCompanyLogo = '/images/processmaker.logo.jpg';
|
$sCompanyLogo = '/images/processmaker.logo.jpg';
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -469,8 +476,8 @@ class SkinEngine
|
|||||||
{
|
{
|
||||||
global $G_ENABLE_BLANK_SKIN;
|
global $G_ENABLE_BLANK_SKIN;
|
||||||
|
|
||||||
G::verifyPath ( PATH_SMARTY_C, true );
|
G::verifyPath(PATH_SMARTY_C, true);
|
||||||
G::verifyPath ( PATH_SMARTY_CACHE, true );
|
G::verifyPath(PATH_SMARTY_CACHE, true);
|
||||||
|
|
||||||
$smarty = new Smarty();
|
$smarty = new Smarty();
|
||||||
$oHeadPublisher =& headPublisher::getSingleton();
|
$oHeadPublisher =& headPublisher::getSingleton();
|
||||||
@@ -480,11 +487,10 @@ class SkinEngine
|
|||||||
$smarty->cache_dir = PATH_SMARTY_CACHE;
|
$smarty->cache_dir = PATH_SMARTY_CACHE;
|
||||||
$smarty->config_dir = PATH_THIRDPARTY . 'smarty/configs';
|
$smarty->config_dir = PATH_THIRDPARTY . 'smarty/configs';
|
||||||
|
|
||||||
if ( isset($G_ENABLE_BLANK_SKIN) && $G_ENABLE_BLANK_SKIN ) {
|
if (isset($G_ENABLE_BLANK_SKIN) && $G_ENABLE_BLANK_SKIN) {
|
||||||
$smarty->force_compile = $this->forceTemplateCompile;
|
$smarty->force_compile = $this->forceTemplateCompile;
|
||||||
$smarty->display($this->layoutFileBlank['basename']);
|
$smarty->display($this->layoutFileBlank['basename']);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
$header = '';
|
$header = '';
|
||||||
|
|
||||||
if (isset($oHeadPublisher)) {
|
if (isset($oHeadPublisher)) {
|
||||||
@@ -522,28 +528,30 @@ class SkinEngine
|
|||||||
global $G_ID_SUB_MENU_SELECTED;
|
global $G_ID_SUB_MENU_SELECTED;
|
||||||
|
|
||||||
$oMenu = new Menu();
|
$oMenu = new Menu();
|
||||||
$menus = $oMenu->generateArrayForTemplate ( $G_MAIN_MENU,'SelectedMenu', 'mainMenu',$G_MENU_SELECTED, $G_ID_MENU_SELECTED );
|
$menus = $oMenu->generateArrayForTemplate($G_MAIN_MENU, 'SelectedMenu', 'mainMenu', $G_MENU_SELECTED,
|
||||||
$smarty->assign('menus', $menus );
|
$G_ID_MENU_SELECTED);
|
||||||
|
$smarty->assign('menus', $menus);
|
||||||
|
|
||||||
$oSubMenu = new Menu();
|
$oSubMenu = new Menu();
|
||||||
$subMenus = $oSubMenu->generateArrayForTemplate ( $G_SUB_MENU,'selectedSubMenu', 'subMenu',$G_SUB_MENU_SELECTED, $G_ID_SUB_MENU_SELECTED );
|
$subMenus = $oSubMenu->generateArrayForTemplate($G_SUB_MENU, 'selectedSubMenu', 'subMenu',
|
||||||
$smarty->assign('subMenus', $subMenus );
|
$G_SUB_MENU_SELECTED, $G_ID_SUB_MENU_SELECTED);
|
||||||
|
$smarty->assign('subMenus', $subMenus);
|
||||||
|
|
||||||
$smarty->assign('user', isset($_SESSION['USR_USERNAME']) ? $_SESSION['USR_USERNAME'] : '');
|
$smarty->assign('user', isset($_SESSION['USR_USERNAME']) ? $_SESSION['USR_USERNAME'] : '');
|
||||||
$smarty->assign('pipe', isset($_SESSION['USR_USERNAME']) ? ' | ' : '');
|
$smarty->assign('pipe', isset($_SESSION['USR_USERNAME']) ? ' | ' : '');
|
||||||
$smarty->assign('logout', G::LoadTranslation('ID_LOGOUT'));
|
$smarty->assign('logout', G::LoadTranslation('ID_LOGOUT'));
|
||||||
$smarty->assign('header', $header );
|
$smarty->assign('header', $header);
|
||||||
$smarty->assign('tpl_menu', PATH_TEMPLATE . 'menu.html' );
|
$smarty->assign('tpl_menu', PATH_TEMPLATE . 'menu.html');
|
||||||
$smarty->assign('tpl_submenu', PATH_TEMPLATE . 'submenu.html' );
|
$smarty->assign('tpl_submenu', PATH_TEMPLATE . 'submenu.html');
|
||||||
|
|
||||||
if (class_exists('ProcessMaker\Plugins\PluginRegistry')) {
|
if (class_exists('ProcessMaker\Plugins\PluginRegistry')) {
|
||||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||||
$sCompanyLogo = $oPluginRegistry->getCompanyLogo ( '/images/processmaker.logo.jpg' );
|
$sCompanyLogo = $oPluginRegistry->getCompanyLogo('/images/processmaker.logo.jpg');
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
$sCompanyLogo = '/images/processmaker.logo.jpg';
|
$sCompanyLogo = '/images/processmaker.logo.jpg';
|
||||||
|
}
|
||||||
|
|
||||||
$smarty->assign('logo_company', $sCompanyLogo );
|
$smarty->assign('logo_company', $sCompanyLogo);
|
||||||
$smarty->force_compile = $this->forceTemplateCompile;
|
$smarty->force_compile = $this->forceTemplateCompile;
|
||||||
$smarty->display($this->layoutFileTracker['basename']);
|
$smarty->display($this->layoutFileTracker['basename']);
|
||||||
}
|
}
|
||||||
@@ -566,7 +574,7 @@ class SkinEngine
|
|||||||
|
|
||||||
// verify if is using extJs engine
|
// verify if is using extJs engine
|
||||||
if (count($oHeadPublisher->extJsScript) > 0) {
|
if (count($oHeadPublisher->extJsScript) > 0) {
|
||||||
$header = $oHeadPublisher->getExtJsStylesheets($this->cssFileName.'-extJs');
|
$header = $oHeadPublisher->getExtJsStylesheets($this->cssFileName . '-extJs');
|
||||||
$header .= $oHeadPublisher->includeExtJs();
|
$header .= $oHeadPublisher->includeExtJs();
|
||||||
|
|
||||||
$smarty->assign('_header', $header);
|
$smarty->assign('_header', $header);
|
||||||
@@ -578,10 +586,9 @@ class SkinEngine
|
|||||||
if (empty($this->layout)) {
|
if (empty($this->layout)) {
|
||||||
$smarty->template_dir = PATH_TPL;
|
$smarty->template_dir = PATH_TPL;
|
||||||
$tpl = $viewFile . '.html';
|
$tpl = $viewFile . '.html';
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
$smarty->template_dir = $this->layoutFile['dirname'];
|
$smarty->template_dir = $this->layoutFile['dirname'];
|
||||||
$tpl = 'layout-'.$this->layout.'.html';
|
$tpl = 'layout-' . $this->layout . '.html';
|
||||||
//die($smarty->template_dir.PATH_SEP.$tpl);
|
//die($smarty->template_dir.PATH_SEP.$tpl);
|
||||||
|
|
||||||
if (!file_exists($smarty->template_dir . PATH_SEP . $tpl)) {
|
if (!file_exists($smarty->template_dir . PATH_SEP . $tpl)) {
|
||||||
@@ -601,7 +608,7 @@ class SkinEngine
|
|||||||
$smarty->assign($key, $value);
|
$smarty->assign($key, $value);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (defined('DEBUG') && DEBUG ) {
|
if (defined('DEBUG') && DEBUG) {
|
||||||
$smarty->force_compile = true;
|
$smarty->force_compile = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -620,7 +627,7 @@ class SkinEngine
|
|||||||
$this->_default($enableJavascript);
|
$this->_default($enableJavascript);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function _default($enableJsScript=true)
|
private function _default($enableJsScript = true)
|
||||||
{
|
{
|
||||||
global $G_ENABLE_BLANK_SKIN;
|
global $G_ENABLE_BLANK_SKIN;
|
||||||
//menu
|
//menu
|
||||||
@@ -637,7 +644,7 @@ class SkinEngine
|
|||||||
G::verifyPath(PATH_SMARTY_CACHE, true);
|
G::verifyPath(PATH_SMARTY_CACHE, true);
|
||||||
|
|
||||||
$smarty = new Smarty();
|
$smarty = new Smarty();
|
||||||
$oHeadPublisher = & headPublisher::getSingleton();
|
$oHeadPublisher = &headPublisher::getSingleton();
|
||||||
|
|
||||||
$smarty->compile_dir = PATH_SMARTY_C;
|
$smarty->compile_dir = PATH_SMARTY_C;
|
||||||
$smarty->cache_dir = PATH_SMARTY_CACHE;
|
$smarty->cache_dir = PATH_SMARTY_CACHE;
|
||||||
@@ -648,12 +655,14 @@ class SkinEngine
|
|||||||
$oServerConf =& ServerConf::getSingleton();
|
$oServerConf =& ServerConf::getSingleton();
|
||||||
$extSkin = $oServerConf->getProperty("extSkin");
|
$extSkin = $oServerConf->getProperty("extSkin");
|
||||||
|
|
||||||
if(!$extSkin) {
|
if (!$extSkin) {
|
||||||
$extSkin = array();
|
$extSkin = [SYS_SKIN => "xtheme-gray"];
|
||||||
|
$oServerConf->setProperty("extSkin", $extSkin);
|
||||||
|
} else if (empty($extSkin[SYS_SKIN])) {
|
||||||
|
$extSkin[SYS_SKIN] = "xtheme-gray";
|
||||||
|
$oServerConf->setProperty("extSkin", $extSkin);
|
||||||
}
|
}
|
||||||
|
|
||||||
$extSkin[SYS_SKIN]="xtheme-gray";
|
|
||||||
$oServerConf->setProperty("extSkin",$extSkin);
|
|
||||||
//End of extJS Theme setup
|
//End of extJS Theme setup
|
||||||
|
|
||||||
if (isset($G_ENABLE_BLANK_SKIN) && $G_ENABLE_BLANK_SKIN) {
|
if (isset($G_ENABLE_BLANK_SKIN) && $G_ENABLE_BLANK_SKIN) {
|
||||||
@@ -661,8 +670,7 @@ class SkinEngine
|
|||||||
$smarty->force_compile = $this->forceTemplateCompile;
|
$smarty->force_compile = $this->forceTemplateCompile;
|
||||||
|
|
||||||
$smarty->display($layoutFileBlank['basename']);
|
$smarty->display($layoutFileBlank['basename']);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
$smarty->template_dir = $this->layoutFile['dirname'];
|
$smarty->template_dir = $this->layoutFile['dirname'];
|
||||||
|
|
||||||
$meta = null;
|
$meta = null;
|
||||||
@@ -671,7 +679,10 @@ class SkinEngine
|
|||||||
if (preg_match("/^.*\(.*Trident.(\d+)\..+\).*$/", $_SERVER["HTTP_USER_AGENT"], $arrayMatch)) {
|
if (preg_match("/^.*\(.*Trident.(\d+)\..+\).*$/", $_SERVER["HTTP_USER_AGENT"], $arrayMatch)) {
|
||||||
|
|
||||||
//Get the IE version
|
//Get the IE version
|
||||||
if(preg_match("/^.*\(.*MSIE (\d+)\..+\).*$/", $_SERVER["HTTP_USER_AGENT"], $arrayMatch) || preg_match("/^.*\(.*rv.(\d+)\..+\).*$/", $_SERVER["HTTP_USER_AGENT"], $arrayMatch)){
|
if (preg_match("/^.*\(.*MSIE (\d+)\..+\).*$/", $_SERVER["HTTP_USER_AGENT"],
|
||||||
|
$arrayMatch) || preg_match("/^.*\(.*rv.(\d+)\..+\).*$/", $_SERVER["HTTP_USER_AGENT"],
|
||||||
|
$arrayMatch)
|
||||||
|
) {
|
||||||
$ie = intval($arrayMatch[1]);
|
$ie = intval($arrayMatch[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -700,9 +711,12 @@ class SkinEngine
|
|||||||
|
|
||||||
if (strpos($_SERVER['REQUEST_URI'], '/login/login') !== false) {
|
if (strpos($_SERVER['REQUEST_URI'], '/login/login') !== false) {
|
||||||
$freeOfChargeText = "";
|
$freeOfChargeText = "";
|
||||||
if (! defined('SKIP_FREE_OF_CHARGE_TEXT'))
|
if (!defined('SKIP_FREE_OF_CHARGE_TEXT')) {
|
||||||
$freeOfChargeText = "Supplied free of charge with no support, certification, warranty, maintenance nor indemnity by ProcessMaker and its Certified Partners.";
|
$freeOfChargeText = "Supplied free of charge with no support, certification, warranty, maintenance nor indemnity by ProcessMaker and its Certified Partners.";
|
||||||
if(file_exists(PATH_CLASSES."PmLicenseManager.php")) $freeOfChargeText="";
|
}
|
||||||
|
if (file_exists(PATH_CLASSES . "PmLicenseManager.php")) {
|
||||||
|
$freeOfChargeText = "";
|
||||||
|
}
|
||||||
|
|
||||||
$fileFooter = PATH_SKINS . SYS_SKIN . PATH_SEP . 'footer.html';
|
$fileFooter = PATH_SKINS . SYS_SKIN . PATH_SEP . 'footer.html';
|
||||||
if (file_exists($fileFooter)) {
|
if (file_exists($fileFooter)) {
|
||||||
@@ -723,38 +737,44 @@ class SkinEngine
|
|||||||
}
|
}
|
||||||
|
|
||||||
$oMenu = new Menu();
|
$oMenu = new Menu();
|
||||||
$menus = $oMenu->generateArrayForTemplate($G_MAIN_MENU, 'SelectedMenu', 'mainMenu', $G_MENU_SELECTED, $G_ID_MENU_SELECTED);
|
$menus = $oMenu->generateArrayForTemplate($G_MAIN_MENU, 'SelectedMenu', 'mainMenu', $G_MENU_SELECTED,
|
||||||
|
$G_ID_MENU_SELECTED);
|
||||||
$smarty->assign('menus', $menus);
|
$smarty->assign('menus', $menus);
|
||||||
|
|
||||||
$oSubMenu = new Menu();
|
$oSubMenu = new Menu();
|
||||||
$subMenus = $oSubMenu->generateArrayForTemplate($G_SUB_MENU, 'selectedSubMenu', 'subMenu', $G_SUB_MENU_SELECTED, $G_ID_SUB_MENU_SELECTED);
|
$subMenus = $oSubMenu->generateArrayForTemplate($G_SUB_MENU, 'selectedSubMenu', 'subMenu',
|
||||||
|
$G_SUB_MENU_SELECTED, $G_ID_SUB_MENU_SELECTED);
|
||||||
$smarty->assign('subMenus', $subMenus);
|
$smarty->assign('subMenus', $subMenus);
|
||||||
|
|
||||||
if (! defined('NO_DISPLAY_USERNAME')) {
|
if (!defined('NO_DISPLAY_USERNAME')) {
|
||||||
define('NO_DISPLAY_USERNAME', 0);
|
define('NO_DISPLAY_USERNAME', 0);
|
||||||
}
|
}
|
||||||
if (NO_DISPLAY_USERNAME == 0) {
|
if (NO_DISPLAY_USERNAME == 0) {
|
||||||
$switch_interface = isset($_SESSION['user_experience']) && $_SESSION['user_experience'] == 'SWITCHABLE';
|
$switch_interface = isset($_SESSION['user_experience']) && $_SESSION['user_experience'] == 'SWITCHABLE';
|
||||||
|
|
||||||
$smarty->assign('user_logged', (isset($_SESSION['USER_LOGGED'])? $_SESSION['USER_LOGGED'] : ''));
|
$smarty->assign('user_logged', (isset($_SESSION['USER_LOGGED']) ? $_SESSION['USER_LOGGED'] : ''));
|
||||||
if(SYS_SKIN == 'neoclassic'){
|
if (SYS_SKIN == 'neoclassic') {
|
||||||
$smarty->assign('tracker', (SYS_COLLECTION == 'tracker') ? ( ($G_PUBLISH->Parts[0]['File'] != 'tracker/loginpm3' ) ? true : '') : '');
|
$smarty->assign('tracker',
|
||||||
}else{
|
(SYS_COLLECTION == 'tracker') ? (($G_PUBLISH->Parts[0]['File'] != 'tracker/loginpm3') ? true : '') : '');
|
||||||
$smarty->assign('tracker', (SYS_COLLECTION == 'tracker') ? ( ($G_PUBLISH->Parts[0]['File'] != 'tracker/login' ) ? true : '') : '');
|
} else {
|
||||||
|
$smarty->assign('tracker',
|
||||||
|
(SYS_COLLECTION == 'tracker') ? (($G_PUBLISH->Parts[0]['File'] != 'tracker/login') ? true : '') : '');
|
||||||
}
|
}
|
||||||
$smarty->assign('switch_interface', $switch_interface);
|
$smarty->assign('switch_interface', $switch_interface);
|
||||||
$smarty->assign('switch_interface_label', G::LoadTranslation('ID_SWITCH_INTERFACE'));
|
$smarty->assign('switch_interface_label', G::LoadTranslation('ID_SWITCH_INTERFACE'));
|
||||||
$smarty->assign('rolename', isset($_SESSION['USR_ROLENAME']) ? $_SESSION['USR_ROLENAME'] . '' : '');
|
$smarty->assign('rolename', isset($_SESSION['USR_ROLENAME']) ? $_SESSION['USR_ROLENAME'] . '' : '');
|
||||||
$smarty->assign('pipe', isset($_SESSION['USR_USERNAME']) ? ' | ' : '');
|
$smarty->assign('pipe', isset($_SESSION['USR_USERNAME']) ? ' | ' : '');
|
||||||
$smarty->assign('logout', G::LoadTranslation('ID_LOGOUT'));
|
$smarty->assign('logout', G::LoadTranslation('ID_LOGOUT'));
|
||||||
$smarty->assign('workspace', defined('SYS_SYS')?SYS_SYS: '');
|
$smarty->assign('workspace', defined('SYS_SYS') ? SYS_SYS : '');
|
||||||
$uws = (isset($_SESSION['USR_ROLENAME']) && $_SESSION['USR_ROLENAME'] != '')? strtolower(G::LoadTranslation('ID_WORKSPACE_USING')): G::LoadTranslation('ID_WORKSPACE_USING');
|
$uws = (isset($_SESSION['USR_ROLENAME']) && $_SESSION['USR_ROLENAME'] != '') ? strtolower(G::LoadTranslation('ID_WORKSPACE_USING')) : G::LoadTranslation('ID_WORKSPACE_USING');
|
||||||
$smarty->assign('workspace_label', $uws);
|
$smarty->assign('workspace_label', $uws);
|
||||||
|
|
||||||
$conf = new Configurations();
|
$conf = new Configurations();
|
||||||
$conf->getFormats();
|
$conf->getFormats();
|
||||||
$name = $conf->userNameFormat(isset($_SESSION['USR_USERNAME']) ? $_SESSION['USR_USERNAME']: '', isset($_SESSION['USR_FULLNAME']) ? htmlentities($_SESSION['USR_FULLNAME'] , ENT_QUOTES, 'UTF-8'): '', isset($_SESSION['USER_LOGGED']) ? $_SESSION['USER_LOGGED'] : '');
|
$name = $conf->userNameFormat(isset($_SESSION['USR_USERNAME']) ? $_SESSION['USR_USERNAME'] : '',
|
||||||
$smarty->assign('user',$name);
|
isset($_SESSION['USR_FULLNAME']) ? htmlentities($_SESSION['USR_FULLNAME'], ENT_QUOTES,
|
||||||
|
'UTF-8') : '', isset($_SESSION['USER_LOGGED']) ? $_SESSION['USER_LOGGED'] : '');
|
||||||
|
$smarty->assign('user', $name);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (defined('SYS_SYS')) {
|
if (defined('SYS_SYS')) {
|
||||||
@@ -767,13 +787,14 @@ class SkinEngine
|
|||||||
$RBAC->aUserInfo['PROCESSMAKER']['ROLE']['ROL_CODE'] == 'PROCESSMAKER_ADMIN'
|
$RBAC->aUserInfo['PROCESSMAKER']['ROLE']['ROL_CODE'] == 'PROCESSMAKER_ADMIN'
|
||||||
) {
|
) {
|
||||||
if ($expireInLabel != '') {
|
if ($expireInLabel != '') {
|
||||||
$smarty->assign('msgVer', '<label class="textBlack">' . $expireInLabel . '</label> ');
|
$smarty->assign('msgVer',
|
||||||
|
'<label class="textBlack">' . $expireInLabel . '</label> ');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (defined('SYS_SYS')) {
|
if (defined('SYS_SYS')) {
|
||||||
$logout = "/sys" . SYS_SYS . "/" . SYS_LANG . "/" . SYS_SKIN . ((SYS_COLLECTION != "tracker")? "/login/login" : "/tracker/login");
|
$logout = "/sys" . SYS_SYS . "/" . SYS_LANG . "/" . SYS_SKIN . ((SYS_COLLECTION != "tracker") ? "/login/login" : "/tracker/login");
|
||||||
} else {
|
} else {
|
||||||
$logout = '/sys/' . SYS_LANG . '/' . SYS_SKIN . '/login/login';
|
$logout = '/sys/' . SYS_LANG . '/' . SYS_SKIN . '/login/login';
|
||||||
}
|
}
|
||||||
@@ -785,8 +806,8 @@ class SkinEngine
|
|||||||
|
|
||||||
$oLogoR = new ReplacementLogo();
|
$oLogoR = new ReplacementLogo();
|
||||||
|
|
||||||
if(defined("SYS_SYS")){
|
if (defined("SYS_SYS")) {
|
||||||
$aFotoSelect = $oLogoR->getNameLogo((isset($_SESSION['USER_LOGGED']))?$_SESSION['USER_LOGGED']:'');
|
$aFotoSelect = $oLogoR->getNameLogo((isset($_SESSION['USER_LOGGED'])) ? $_SESSION['USER_LOGGED'] : '');
|
||||||
|
|
||||||
if (is_array($aFotoSelect)) {
|
if (is_array($aFotoSelect)) {
|
||||||
$sFotoSelect = trim($aFotoSelect['DEFAULT_LOGO_NAME']);
|
$sFotoSelect = trim($aFotoSelect['DEFAULT_LOGO_NAME']);
|
||||||
@@ -795,15 +816,13 @@ class SkinEngine
|
|||||||
}
|
}
|
||||||
if (class_exists('ProcessMaker\Plugins\PluginRegistry') && defined("SYS_SYS")) {
|
if (class_exists('ProcessMaker\Plugins\PluginRegistry') && defined("SYS_SYS")) {
|
||||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||||
if ( isset($sFotoSelect) && $sFotoSelect!='' && !(strcmp($sWspaceSelect, SYS_SYS)) ){
|
if (isset($sFotoSelect) && $sFotoSelect != '' && !(strcmp($sWspaceSelect, SYS_SYS))) {
|
||||||
$sCompanyLogo = $oPluginRegistry->getCompanyLogo($sFotoSelect);
|
$sCompanyLogo = $oPluginRegistry->getCompanyLogo($sFotoSelect);
|
||||||
$sCompanyLogo = "/sys".SYS_SYS."/".SYS_LANG."/".SYS_SKIN."/setup/showLogoFile.php?id=".base64_encode($sCompanyLogo);
|
$sCompanyLogo = "/sys" . SYS_SYS . "/" . SYS_LANG . "/" . SYS_SKIN . "/setup/showLogoFile.php?id=" . base64_encode($sCompanyLogo);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
$sCompanyLogo = $oPluginRegistry->getCompanyLogo('/images/processmaker.logo.jpg');
|
$sCompanyLogo = $oPluginRegistry->getCompanyLogo('/images/processmaker.logo.jpg');
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
$sCompanyLogo = '/images/processmaker.logo.jpg';
|
$sCompanyLogo = '/images/processmaker.logo.jpg';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user