| 64 |
function mamboCore () { |
function mamboCore () { |
| 65 |
global $adminside; |
global $adminside; |
| 66 |
$this->rootPath = dirname(__FILE__); |
$this->rootPath = dirname(__FILE__); |
|
// $this->rootPath = substr($_SERVER['SCRIPT_FILENAME'],0,-strlen($_SERVER['PHP_SELF'])+1); |
|
|
// if ($adminside) $this->rootPath = substr($this->rootPath,0,strlen($this->rootPath)-14); |
|
| 67 |
$this->checkConfig(); |
$this->checkConfig(); |
| 68 |
$this->Itemid = mosGetParam($_REQUEST, 'Itemid', 0); |
$this->Itemid = mosGetParam($_REQUEST, 'Itemid', 0); |
| 69 |
$this->getConfig(); |
$this->getConfig(); |
| 124 |
while ($f AND !feof($f)) { |
while ($f AND !feof($f)) { |
| 125 |
$line = fgets($f, 256); |
$line = fgets($f, 256); |
| 126 |
$altered = str_replace('$', '$this->', $line); |
$altered = str_replace('$', '$this->', $line); |
| 127 |
if ($line != $altered) $code .= $altered; |
if ($altered != $line) $code .= $altered; |
| 128 |
} |
} |
| 129 |
} |
} |
| 130 |
else { |
else { |
| 1857 |
if ($mos_change_template) { |
if ($mos_change_template) { |
| 1858 |
// check that template exists in case it was deleted |
// check that template exists in case it was deleted |
| 1859 |
$path = mamboCore::get('mosConfig_absolute_path')."/templates/$mos_change_template/index.php"; |
$path = mamboCore::get('mosConfig_absolute_path')."/templates/$mos_change_template/index.php"; |
| 1860 |
if (file_exists( $path)) { |
if (strpos($mos_change_template,'..') == false AND strpos($mos_change_template,':') == false AND file_exists($path)) { |
| 1861 |
$lifetime = 60*10; |
$lifetime = 60*10; |
| 1862 |
$cur_template = $mos_change_template; |
$cur_template = $mos_change_template; |
| 1863 |
setcookie( "mos_user_template", "$mos_change_template", time()+$lifetime); |
setcookie( "mos_user_template", "$mos_change_template", time()+$lifetime); |