} function fatalError($sM) { print "fatal error: {$sM}<br>"; } function &oSharedInstance() { global $goApp; return $goApp; } } if (!isset($webyep_bDocumentPage)) { $webyep_bDocumentPage = true; } $goApp = new WYApplication(); WYLanguage::setup(); // check for file managers and start session only if one is present if (webyep_bHasFilemanager() && webyep_bHasEditPermissions()) { session_start(); } // caution: WYDocument's constructor needs $goApp! $goApp->oDocument = new WYDocument(WYURL::oCurrentURL()); $goApp->bEditPermission = $goApp->bEditMode; if ($goApp->bEditPermission && !$goApp->bAuthCheck($webyep_bDocumentPage ? $goApp->oDocument->oDocPath : WYEditor::oEditedPagesPath())) { $goApp->bEditPermission = false; $_SESSION[WY_SV_IS_AUTH] = false; } if ($webyep_bLiveDemo && !$webyep_sLiveDemoSlotID && $webyep_bLiveDemoLockTemplate) { $goApp->bEditPermission = false; $_SESSION[WY_SV_IS_AUTH] = false; }