| 399 |
global $adminside; |
global $adminside; |
| 400 |
if (($this->mosConfig_offline && !$adminside) OR file_exists($this->rootPath.'/installation/index.php')) { |
if (($this->mosConfig_offline && !$adminside) OR file_exists($this->rootPath.'/installation/index.php')) { |
| 401 |
require_once($this->rootPath().'/administrator/includes/admin.php'); |
require_once($this->rootPath().'/administrator/includes/admin.php'); |
|
session_name(md5($this->mosConfig_live_site)); |
|
| 402 |
session_start(); |
session_start(); |
| 403 |
$session =& mosSession::getCurrent(); |
$session =& mosSession::getCurrent(); |
| 404 |
|
if (!isset($_SESSION['initiated'])) { |
| 405 |
|
session_regenerate_id(true); |
| 406 |
|
$_SESSION['initiated'] = true; |
| 407 |
|
} |
| 408 |
$my =& new mosUser(); |
$my =& new mosUser(); |
| 409 |
$my->getSessionData(); |
$my->getSessionData(); |
| 410 |
if (mosSession::validate($my)) return; |
if (mosSession::validate($my)) return; |
| 824 |
$mainframe =& mosMainFrame::getInstance(); |
$mainframe =& mosMainFrame::getInstance(); |
| 825 |
$customs = $mainframe->getCustomPathWay(); |
$customs = $mainframe->getCustomPathWay(); |
| 826 |
$last = count($this->_names) - 1; |
$last = count($this->_names) - 1; |
| 827 |
if ($last == 0 AND count($customs == 0)) return ''; |
if (($last == 0) AND (count($customs) == 0)) return ''; |
| 828 |
$result = "<span class='pathway'>"; |
$result = "<span class='pathway'>"; |
| 829 |
$config =& mamboCore::getMamboCore(); |
$config =& mamboCore::getMamboCore(); |
| 830 |
$rootpath = $config->rootPath(); |
$rootpath = $config->rootPath(); |
| 1946 |
$result = array(); |
$result = array(); |
| 1947 |
if (isset( $this->_events[$event] )) { |
if (isset( $this->_events[$event] )) { |
| 1948 |
foreach ($this->_events[$event] as $func) { |
foreach ($this->_events[$event] as $func) { |
| 1949 |
|
$botargs = $args; |
| 1950 |
if (is_callable( $func[0] )) { |
if (is_callable( $func[0] )) { |
| 1951 |
$botparams = $this->_bots[$func[1]]->params; |
$botparams = $this->_bots[$func[1]]->params; |
| 1952 |
$args[] = new mosParameters($botparams); |
$botargs[] = new mosParameters($botparams); |
| 1953 |
$args[] = $event; |
$botargs[] = $event; |
| 1954 |
if ($doUnpublished) { |
if ($doUnpublished) { |
| 1955 |
$args[0] = $this->_bots[$func[1]]->published; |
$botargs[0] = $this->_bots[$func[1]]->published; |
| 1956 |
$result[] = call_user_func_array( $func[0], $args ); |
$result[] = call_user_func_array( $func[0], $botargs ); |
| 1957 |
} else if ($this->_bots[$func[1]]->published) { |
} else if ($this->_bots[$func[1]]->published) { |
| 1958 |
$result[] = call_user_func_array( $func[0], $args ); |
$result[] = call_user_func_array( $func[0], $botargs ); |
| 1959 |
} |
} |
| 1960 |
} |
} |
| 1961 |
} |
} |
| 2675 |
$configuration =& mamboCore::getMamboCore(); |
$configuration =& mamboCore::getMamboCore(); |
| 2676 |
$head['favicon'] = "<link rel=\"shortcut icon\" href=\"".$configuration->getFavIcon()."\" />"; |
$head['favicon'] = "<link rel=\"shortcut icon\" href=\"".$configuration->getFavIcon()."\" />"; |
| 2677 |
|
|
| 2678 |
|
if (mamboCore::get('mosConfig_sef')) { |
| 2679 |
|
$head['base'] = "<base href=\"".mamboCore::get('mosConfig_live_site')."/\" />"; |
| 2680 |
|
} |
| 2681 |
|
|
| 2682 |
foreach($head as $key=>$value) |
foreach($head as $key=>$value) |
| 2683 |
$this->_head['output'][$key] = "$value"; |
$this->_head['output'][$key] = "$value"; |
| 2684 |
|
|
| 2728 |
$handler =& new contentHandler(); |
$handler =& new contentHandler(); |
| 2729 |
return $handler->getContentItemLinkCount(); |
return $handler->getContentItemLinkCount(); |
| 2730 |
} |
} |
| 2731 |
|
|
| 2732 |
|
function formId($option='', $task='', $my='') { |
| 2733 |
|
$option=trim($option);$task=trim($task); |
| 2734 |
|
if (!$option) die('Illegal option for mainframe formId in core.classes.php'); |
| 2735 |
|
if (!$task) die('Illegal task for mainframe formId in core.classes.php'); |
| 2736 |
|
if (!is_object($my)) die('Illegal user object for mainframe formId in core.classes.php'); |
| 2737 |
|
mos_session_start(); |
| 2738 |
|
$hash = md5(microtime().mt_rand()); |
| 2739 |
|
$_SESSION['mosfid'] = md5($hash.$option.$task.$my->id.mamboCore::get('mosConfig_secret')); |
| 2740 |
|
return $hash; |
| 2741 |
|
} |
| 2742 |
|
|
| 2743 |
|
function validFormId($option='', $task='', $my='') { |
| 2744 |
|
$option=trim($option);$task=trim($task); |
| 2745 |
|
if (!$option) die('Illegal option for mainframe validFormId in core.classes.php'); |
| 2746 |
|
if (!$task) die('Illegal task for mainframe validFormId in core.classes.php'); |
| 2747 |
|
if (!is_object($my)) die('Illegal user object for mainframe validFormId in core.classes.php'); |
| 2748 |
|
if (!isset($_REQUEST['f'])) die('Missing hash for mainframe validFormId in core.classes.php'); |
| 2749 |
|
if (!isset($_SESSION['mosfid'])) return false; |
| 2750 |
|
$valid = $_SESSION['mosfid'] == md5($_REQUEST['f'].$option.$task.$my->id.mamboCore::get('mosConfig_secret')); |
| 2751 |
|
unset($_SESSION['mosfid']); |
| 2752 |
|
return $valid; |
| 2753 |
|
} |
| 2754 |
|
|
| 2755 |
/** |
/** |
| 2756 |
* retained for backward compatability |
* retained for backward compatability |
| 2757 |
*/ |
*/ |